/* LASTO — Featured Products mobile card parity
   Mobile only. Standardise Featured Products mobile cards to match the
   approved All Products mobile card rhythm.
   Desktop/tablet are intentionally untouched. */
@media (max-width:599px){
    #featured-products{
        --featured-mobile-card-width:min(176px, calc((100vw - 32px) / 2));
        --featured-mobile-gap:10px;
    }

    #featured-products .featured-products-grid{
        display:grid!important;
        grid-template-columns:none!important;
        grid-auto-flow:column!important;
        grid-auto-columns:var(--featured-mobile-card-width)!important;
        gap:var(--featured-mobile-gap)!important;
        width:100%!important;
        max-width:none!important;
        margin:0!important;
        padding:0!important;
        justify-content:start!important;
        justify-items:stretch!important;
        align-items:start!important;
        overflow-x:auto!important;
        overflow-y:hidden!important;
        scroll-padding-inline:0!important;
        scroll-snap-type:x proximity!important;
    }

    #featured-products .featured-products-grid > .catalog-product-card,
    #featured-products .featured-products-grid > .catalog-product-card:nth-child(n+5){
        width:var(--featured-mobile-card-width)!important;
        min-width:var(--featured-mobile-card-width)!important;
        max-width:var(--featured-mobile-card-width)!important;
        height:auto!important;
        min-height:0!important;
        align-self:start!important;
        box-sizing:border-box!important;
        border-radius:11px!important;
        overflow:hidden!important;
        scroll-snap-align:start!important;
    }

    /* Match requested image canvas ratio. */
    #featured-products .catalog-product-image{
        width:100%!important;
        height:auto!important;
        min-height:0!important;
        max-height:none!important;
        aspect-ratio:4 / 3!important;
        padding:9px!important;
        box-sizing:border-box!important;
        overflow:hidden!important;
        background:#fff!important;
    }
    #featured-products .catalog-product-image > a{
        display:flex!important;
        width:100%!important;
        height:100%!important;
        align-items:center!important;
        justify-content:center!important;
    }
    #featured-products .catalog-product-image img,
    #featured-products .catalog-product-card:hover .catalog-product-image img{
        display:block!important;
        width:100%!important;
        height:100%!important;
        max-width:100%!important;
        max-height:100%!important;
        object-fit:contain!important;
        object-position:center!important;
        transform:none!important;
    }

    /* Keep the currently-approved content spacing. */
    #featured-products .catalog-product-content{
        padding:9px 9px 10px!important;
        display:flex!important;
        flex-direction:column!important;
        gap:0!important;
        min-height:0!important;
    }
    #featured-products .catalog-product-main{
        min-height:0!important;
    }
    #featured-products .catalog-product-brand-logo-row{
        min-height:24px!important;
        margin:0 0 5px!important;
        gap:6px!important;
    }
    #featured-products .catalog-product-brand-logo-frame{
        width:56px!important;
        height:24px!important;
        padding:3px 6px!important;
    }
    #featured-products .catalog-product-brand-logo-frame--dell,
    #featured-products .catalog-product-brand-logo-frame--hp{
        width:40px!important;
        height:24px!important;
        padding:3px 7px!important;
    }
    #featured-products .catalog-product-brand-logo-frame--acer,
    #featured-products .catalog-product-brand-logo-frame--asus,
    #featured-products .catalog-product-brand-logo-frame--lenovo{
        width:60px!important;
        height:24px!important;
        padding:3px 7px!important;
    }

    #featured-products .catalog-product-content h2,
    #featured-products .catalog-product-content h2 a{
        min-height:30px!important;
        margin:0 0 5px!important;
        font-size:11px!important;
        font-weight:700!important;
        line-height:1.35!important;
        white-space:normal!important;
        display:-webkit-box!important;
        -webkit-box-orient:vertical!important;
        -webkit-line-clamp:2!important;
        overflow:hidden!important;
        text-overflow:ellipsis!important;
    }

    #featured-products .catalog-product-key-specs{
        min-height:0!important;
        margin:5px 0 4px!important;
        gap:3px!important;
    }
    #featured-products .catalog-product-key-spec{
        min-width:0!important;
        min-height:0!important;
        gap:5px!important;
        font-size:9px!important;
        line-height:1.25!important;
    }
    #featured-products .catalog-product-key-spec-icon{
        width:15px!important;
        min-width:15px!important;
        height:15px!important;
    }
    #featured-products .catalog-product-key-spec-icon .icon{
        width:14px!important;
        height:14px!important;
    }

    #featured-products .catalog-product-bottom{
        margin-top:0!important;
        padding-top:3px!important;
    }
    #featured-products .catalog-product-bottom:has(.product-original-price){
        padding-top:15px!important;
    }
    #featured-products .catalog-product-bottom > strong{
        margin:0 0 8px!important;
        font-size:15.5px!important;
        line-height:1.05!important;
        letter-spacing:-.02em!important;
    }
    #featured-products .product-original-price{
        font-size:8.5px!important;
    }
    #featured-products .catalog-product-actions{
        display:grid!important;
        grid-template-columns:minmax(0,1fr) 34px!important;
        gap:6px!important;
        margin-top:0!important;
    }
    #featured-products .product-details-button{
        min-height:34px!important;
        height:34px!important;
        padding:0 7px!important;
        border-radius:7px!important;
        font-size:9px!important;
        line-height:1!important;
    }
    #featured-products .product-card-whatsapp{
        width:34px!important;
        min-width:34px!important;
        height:34px!important;
        min-height:34px!important;
        padding:0!important;
        border-radius:7px!important;
    }
    #featured-products .product-card-whatsapp .icon{
        width:15px!important;
        height:15px!important;
    }
}

@media (max-width:375px){
    #featured-products{
        --featured-mobile-card-width:min(170px, calc((100vw - 28px) / 2));
        --featured-mobile-gap:10px;
    }
}
