/* Product media only: retain existing containers, breakpoints and padding.
 * Secondary images keep their existing positioning and hover crossfade.
 * Banners, category artwork, logos and intentional lightbox zoom are excluded.
 */
body .product-card .product-image img,
body .product-showcase .product-main-visual .main-image,
body .product-showcase .product-thumbs img,
body .product-lightbox-stage > img,
body .product-lightbox-thumbs img,
body .collection-panel-image-link img,
body .collection-product-panel-content > img,
body .collection-product-deck-card img,
body .bundle-device-photo img,
body .bundle-device-tab img,
body .bundle-detail-collage img,
body .compare-image img,
body .compare-buy-dock-items img,
body .comparison-table thead img,
body .cart-items article > img,
body .checkout-order-items article > img,
body .live-search-item > img,
body .search-result-image img {
    object-fit: contain;
    object-position: center;
}

/* All aspect ratios share the existing card image box, including unloaded
 * secondary images. Do not derive card height from the source image ratio. */
body .product-card .product-image img {
    display: block;
    min-width: 0;
    min-height: 0;
    width: 100%;
    height: 100%;
}

/* A definite positioned frame keeps intrinsic portrait image dimensions from
 * expanding the gallery's grid track. Retain the existing responsive shell. */
.product-main-visual .zoom-image-shell { position: relative; }
.product-contain-frame { position: absolute; inset: 0; overflow: hidden; }
.product-contain-frame > img.main-image {
    position: absolute;
    inset: 0;
    display: block;
    min-width: 0;
    min-height: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    box-sizing: border-box;
    margin: auto;
    object-fit: contain;
    object-position: center;
}
