/* MRC_PRODUCT_CARD_ACTION_ALIGNMENT_PHASE251_V1
   Corrected targeted UI fix:
   - Product title is always a single visual line with ellipsis.
   - Catalogue Preview starts at the same vertical position on every catalogue card.
   - View Catalogue / Add to Cart remain pinned to one bottom baseline.
   - Applies to Homepage New Arrivals, All Products and dedicated Category pages.
*/

.listing-product-card{
    display:flex !important;
    flex-direction:column !important;
    height:100% !important;
    min-height:0 !important;
}

.listing-product-info{
    display:flex !important;
    flex:1 1 auto !important;
    min-width:0 !important;
    flex-direction:column !important;
}

/* Reserve one identical row for the category label. */
.listing-product-info > small{
    display:block !important;
    min-width:0 !important;
    min-height:14px !important;
    max-height:14px !important;
    line-height:14px !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
}

/* Root cause fix: long titles must not create a second line and push the
   Catalogue Preview badge down. Full title remains available on click/PDP. */
.listing-product-info > h3{
    display:block !important;
    width:100% !important;
    min-width:0 !important;
    height:28px !important;
    min-height:28px !important;
    max-height:28px !important;
    margin:7px 0 8px !important;
    line-height:28px !important;
    overflow:hidden !important;
}

.listing-product-info > h3 > a{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    height:28px !important;
    line-height:28px !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
    color:inherit !important;
    text-decoration:none !important;
}

/* Keep catalogue badge on a consistent row. */
.listing-product-info > .catalogue-listing-label{
    display:inline-flex !important;
    align-items:center !important;
    align-self:flex-start !important;
    flex:0 0 auto !important;
    min-height:26px !important;
    box-sizing:border-box !important;
    margin-top:4px !important;
    margin-bottom:0 !important;
}

/* Sale metadata is content-sized; action still sits at the card bottom. */
.listing-product-info > .db-sale-price{
    flex:0 0 auto !important;
}

/* One common action footer baseline. */
.listing-product-info > .db-cart-form,
.listing-product-info > .db-cart-view{
    width:100% !important;
    box-sizing:border-box !important;
    margin-top:auto !important;
}

.listing-product-info > .db-cart-form{
    padding-top:12px !important;
    margin-bottom:0 !important;
}

.listing-product-info > .db-cart-view{
    min-height:38px !important;
}

.listing-product-info .db-cart-btn{
    width:100% !important;
    min-height:38px !important;
    box-sizing:border-box !important;
}

.home-new-arrivals-listing.mrc-loop-track,
.listing-product-grid,
.category-product-grid{
    align-items:stretch !important;
}

.home-new-arrivals-listing.mrc-loop-track > .listing-product-card,
.listing-product-grid > .listing-product-card,
.category-product-grid > .listing-product-card{
    align-self:stretch !important;
    height:auto !important;
}
