/* Product photographs only. Enabled with the matching static square manifests. */
.woof-square-photos .woof-product-photo {
    aspect-ratio: 1;
    width: 100%;
    height: auto;
    min-width: 0;
    max-height: none;
    object-fit: contain;
    background-color: #fff;
    scale: 1;
    transform: none;
}

.woof-square-photos .woof-product-photo::after,
.woof-square-photos .woof-photo-card-placeholder > div::after {
    content: none;
    padding: 0;
}

.woof-square-photos .woof-photo-card-frame,
.woof-square-photos .woof-photo-card-placeholder {
    aspect-ratio: 1;
    width: 100%;
    max-height: none;
    background-color: #fff;
}

.woof-square-photos .woof-photo-card-frame > a,
.woof-square-photos .woof-photo-list-frame > a {
    display: block;
}

.woof-square-photos .woof-photo-card-details {
    min-width: 0;
    max-width: 100%;
}

.woof-square-photos .woof-photo-list-frame,
.woof-square-photos .woof-photo-list-placeholder {
    flex: 0 0 250px;
    aspect-ratio: 1;
    width: 250px;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    max-height: none;
    background-color: #fff;
}

.woof-square-photos .woof-photo-gallery-frame {
    aspect-ratio: 1;
    width: 560px;
    max-width: 100%;
    max-height: none;
}

.woof-square-photos .woof-photo-gallery-placeholder {
    aspect-ratio: 1;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
}

.woof-square-photos .woof-photo-gallery-thumb {
    flex: 0 0 100px;
    width: 100px;
    height: 100px;
}

.woof-square-photos .woof-photo-mobile-slide,
.woof-square-photos .woof-photo-mobile-placeholder {
    max-height: none;
}

/* Keep slides full width for swipe offsets; limit the photo and its loading frame. */
.woof-photo-mobile-slide > .woof-product-photo,
.woof-photo-mobile-placeholder {
    max-width: 500px;
    margin-inline: auto;
}

@media (width < 1180px) {
    .woof-photo-product-gallery {
        width: 100%;
        min-width: 0;
    }

    /* Center the full-width swipe track inside the centered product column. */
    .woof-photo-mobile-carousel {
        margin-inline: calc((100% - 100vw) / 2);
    }
}

.woof-square-photos .woof-photo-cart,
.woof-square-photos .woof-photo-mini-cart {
    display: block;
    width: 110px;
    height: 110px;
    max-width: none;
}

.woof-square-photos .woof-photo-zoom-slide:not(.woof-photo-is-zooming) {
    flex: none;
    aspect-ratio: 1;
    width: min(calc(100vw - 48px), calc(100dvh - 132px));
    height: auto;
    background: #fff;
}

.woof-square-photos .woof-photo-zoom-image {
    aspect-ratio: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

/* Intentional zoom retains the original dimensions and native pan controls. */
.woof-square-photos .woof-photo-is-zooming .woof-photo-zoom-image {
    aspect-ratio: auto;
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
}

@media (max-width: 767px) {
    .woof-square-photos .woof-photo-card-frame { max-width: 100%; }
    .woof-square-photos .woof-photo-cart,
    .woof-square-photos .woof-photo-mini-cart {
        width: 80px;
        height: 80px;
    }
}
