/* Product photos keep their proportions inside a white square.
   Original image URLs and modal images are intentionally unaffected. */
body.product_page .ec-shelfGrid .ec-shelfGrid__item-image,
body#page_product_detail .item_visual .slide-item,
body#page_product_detail .item_nav .slideThumb {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #fff;
    overflow: hidden;
}
body.product_page .ec-shelfGrid .ec-shelfGrid__item-image {
    width: 100%;
}
body#page_product_detail .item_visual .slide-item > .ec-productGallery__trigger {
    position: absolute;
    inset: 0;
}
body.product_page .ec-shelfGrid .ec-shelfGrid__item-image > img,
body#page_product_detail .item_visual .slide-item img,
body#page_product_detail .item_nav .slideThumb > img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}
