/* Alfa Food B2B V4.7.2 · Concept A: Clean White Product Showcase
   DISPLAY-ONLY. Applies to home and public catalog cards, never product details.
   Preserves add-to-cart, discounts, list buttons, and all image sources.
   Intended to load after the existing v4.6.7/v4.6.8 CSS.
*/

/* A quiet pale frame around each inset, white media panel. */
body #af-home-v459 .af-lp-products .af-product-media-link,
body .af-catalog-page .af-products-grid .af-product-media-link {
    display:block !important;
    box-sizing:border-box !important;
    width:100% !important;
    padding:10px 10px 0 !important;
    background:#f6f8f5 !important;
    text-decoration:none;
}

body #af-home-v459 .af-lp-products .af-product-media,
body .af-catalog-page .af-products-grid .af-product-media {
    box-sizing:border-box !important;
    position:relative;
    width:100% !important;
    max-width:100% !important;
    height:180px !important;
    min-height:0 !important;
    aspect-ratio:auto !important;
    padding:11px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    overflow:hidden !important;
    background:#fff !important;
    border:1px solid #e7eee8 !important;
    border-radius:19px !important;
    box-shadow:0 2px 8px rgba(13,55,38,.045) !important;
}

/* Never crop the package, jar, bucket or campaign badge. */
body #af-home-v459 .af-lp-products .af-product-media > img,
body #af-home-v459 .af-lp-products .af-product-media > picture,
body #af-home-v459 .af-lp-products .af-product-media > picture > img,
body .af-catalog-page .af-products-grid .af-product-media > img,
body .af-catalog-page .af-products-grid .af-product-media > picture,
body .af-catalog-page .af-products-grid .af-product-media > picture > img {
    display:block !important;
    box-sizing:border-box !important;
    width:100% !important;
    height:100% !important;
    max-width:100% !important;
    max-height:100% !important;
    margin:auto !important;
    padding:0 !important;
    object-fit:contain !important;
    object-position:center center !important;
    border:0 !important;
    border-radius:0 !important;
    background:#fff !important;
}

/* Empty-photo placeholders remain legible and don't look like broken images. */
body #af-home-v459 .af-lp-products .af-product-media .af-product-placeholder,
body .af-catalog-page .af-products-grid .af-product-media .af-product-placeholder {
    border-radius:12px;
    max-width:100%;
    background:#f6faf7;
}

@media (max-width:730px) {
    body #af-home-v459 .af-lp-products .af-product-media-link,
    body .af-catalog-page .af-products-grid .af-product-media-link {
        padding:7px 7px 0 !important;
    }
    body #af-home-v459 .af-lp-products .af-product-media,
    body .af-catalog-page .af-products-grid .af-product-media {
        height:148px !important;
        padding:8px !important;
        border-radius:14px !important;
        box-shadow:0 1px 5px rgba(13,55,38,.035) !important;
    }
}

@media (max-width:350px) {
    /* Existing catalogue/home CSS uses one column on very narrow screens. */
    body #af-home-v459 .af-lp-products .af-product-media,
    body .af-catalog-page .af-products-grid .af-product-media {
        height:200px !important;
        padding:12px !important;
        border-radius:18px !important;
    }
}
