/* Show complete, authentic product photographs at their available resolution.
   scale-down combines contain with the image's intrinsic pixel bounds. It works
   for cached/slow/replaced images and without JS, leaving the stable white stage,
   gallery selections, original links, PhotoSwipe and PDF data untouched. */
.storefront .product-image-link > img,
.storefront :is(.product-grid, .spotlight-rail-track) .product-image-link > img,
.storefront:not(.page-home) .product-grid .product-image-link > img,
.storefront .gallery-product-page .product-detail .detail-image-zoom > img,
.storefront .gallery-product-page .product-notes-image img,
.storefront .qv-image-wrap > img {
    object-fit: scale-down;
    object-position: center;
    image-rendering: auto;
}

/* A common inset keeps cover photos and their hover alternate in the same
   uncropped square. White margins inside the supplied artwork stay intact. */
.storefront :is(.product-grid, .spotlight-rail-track) .product-image-link > img,
.storefront:not(.page-home) .product-grid .product-image-link > img {
    padding: var(--product-photo-inset, 8%);
    --product-photo-hover-scale: 1;
}

/* Enlarge remains an explicit image action. Avoid silently enlarging a small
   photograph again on hover after respecting its native resolution above. */
.storefront .gallery-product-page .product-detail .detail-image-zoom:hover > img,
.storefront .gallery-product-page .product-notes-image a:hover img {
    transform: none;
}
