/* Horizon catalog — square image boxes (B2.8-fix)
   Root cause corrected: parent's a.thumb-link { display:inline-block } collapsed
   the container chain, so the image's width shrank to its natural pixel size
   (e.g. 65x199 for a tall bottle) even though our previous rule set height=240px.
   Fix (Option B — aspect-ratio square):
     1) .product-thumb becomes a 1:1 flex box (adaptive to card width, max 300px).
     2) Break the inline-block collapse by forcing .thumb-wrapper, .thumb-link and
        figure.primary-thumb to display:block with width/height 100%.
     3) img uses object-fit:contain to fit inside the square without cropping. */

body .product-item .product-thumb {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 300px;
    background: #fff;
}

body .product-item .product-thumb .thumb-wrapper,
body .product-item .product-thumb .thumb-link,
body .product-item .product-thumb figure.primary-thumb {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
}

body .product-item .product-thumb img,
body .slick-slide .product-thumb img,
body .kt-wc-loop-product .product-thumbnail img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    object-position: center center !important;
    background: #fff;
    display: block;
    margin: 0 auto;
}

/* Single product page image — keep aspect ratio, no crop. */
body .woocommerce div.product div.images img.wp-post-image {
    object-fit: contain !important;
    background: #fff;
}
