/* Product photos edge to edge (inc/photos-edge-to-edge.php). Photo boxes marked .is-photo-edge
   lose the padding that frames a photo in white, and the photo fills the box (cropped to it).
   Each box keeps its size: a card's photo link stays square whatever the padding, and the
   product page's photo box keeps its height. */

/* Product cards: category pages, Shop, search, You May Also Like. */
.custom-product-item .product-image.is-photo-edge {
    padding: 0;
}

.custom-product-item .product-image.is-photo-edge > a.product-image-link img {
    object-fit: cover;
}

/* Product page: the main photo (a flex box with a minimum height on wider screens). */
.product_gallery.is-photo-edge .featured-image {
    padding: 0;
    overflow: hidden;
}

.product_gallery.is-photo-edge .featured-image img {
    width: 100%;
    max-width: none;
    align-self: stretch;
    object-fit: cover;
}

/* Quick view: the photo already spans its box; only its fit changes. */
.popup-product-image-gallery.is-photo-edge .popup-product-image img,
.popup-product-image-gallery.is-photo-edge .gallery-img img {
    object-fit: cover;
}

@media screen and (max-width: 767px) {
    /* Phones: the product page's main photo and the photo strip under it, and the quick view's slides. */
    .product_gallery.is-photo-edge img,
    .product_gallery_gallery.is-photo-edge img,
    .popup-product-image-gallery.is-photo-edge .slick-slide img {
        padding: 0;
        object-fit: cover;
    }
}
