/* Product photography uses a white, consistently framed stage. Technical covers retain their own design. */
.product-detail > .gallery { min-width: 0; }
.product-gallery { min-width: 0; }
.storefront-v2 .product-gallery .gallery-thumbs { display: flex; max-width: 100%; overflow-x: auto; scrollbar-width: thin; padding: 5px 3px 9px; margin-top: 0; }
.storefront-v2 .product-gallery .gallery-thumbs button { flex: 0 0 80px; }
.product-gallery [hidden] { display: none !important; }
.product-gallery button:focus-visible { outline: 3px solid #ba202f; outline-offset: 2px; }
.gallery-toolbar { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 8px 0; min-height: 44px; }
.gallery-toolbar button { width: 44px; min-height: 44px; padding: 0; background: #fff; color: #20262b; border: 1px solid #c8cdd0; border-radius: 3px; cursor: pointer; font-size: 20px; }
.gallery-toolbar button:disabled { opacity: .35; cursor: default; }
.gallery-toolbar output { font-size: .8rem; color: #47515a; font-variant-numeric: tabular-nums; min-width: 100px; text-align: center; }
.gallery-enlarge { position: absolute; bottom: 12px; right: 12px; z-index: 3; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 1px solid #c8cdd0; border-radius: 3px; background: #fff; color: #20262b; cursor: pointer; }
.gallery-dialog { width: min(1200px, calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); padding: 56px 16px 16px; border: 0; border-radius: 4px; background: #fff; color: #16191c; }
.gallery-dialog::backdrop { background: rgb(12 18 22 / .82); }
.gallery-dialog > img { display: block; width: 100%; height: calc(100dvh - 120px); max-height: 900px; object-fit: contain; }
.gallery-dialog-close { position: absolute; top: 8px; right: 12px; min-height: 44px; padding: 8px 14px; background: #fff; border: 1px solid #c8cdd0; border-radius: 3px; color: #16191c; cursor: pointer; }
.storefront-v2 .product-detail-photography .purchase-buy-panel { grid-template-columns: 90px minmax(0, 1fr); }
.storefront-v2 .product-detail-photography .purchase-buy-panel > div:first-of-type { grid-column: 1 / -1; }
.storefront-v2 .product-detail-photography .purchase-buy-panel > button[type="submit"] { width: 100%; min-width: 0; }
.storefront-v2 .product-photo-stage {
    position: relative;
    isolation: isolate;
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 3;
    height: auto;
    min-height: 0;
    overflow: hidden;
    background: #fff;
}
.storefront-v2 .product-photo-stage > img {
    position: absolute;
    inset: auto;
    top: 50%;
    left: 50%;
    display: block;
    width: auto;
    height: auto;
    max-width: 84%;
    max-height: 84%;
    min-height: 0;
    padding: 0;
    object-fit: contain;
    object-position: center;
    transform: translate(var(--photo-x, -50%), var(--photo-y, -50%));
}
.storefront-v2 .detail-photo.product-photo-stage {
    border: 1px solid #e5e7e8;
}
.storefront-v2 .detail-photo.product-photo-stage > img {
    max-width: 82%;
    max-height: 82%;
}
.storefront-v2 .v2-product-art.product-photo-stage:hover > img {
    transform: translate(var(--photo-x, -50%), var(--photo-y, -50%)) scale(1.035);
}
.storefront-v2 .v2-product-art.product-photo-stage:has(> .v2-image-secondary):hover > img:not(.v2-image-secondary) {
    opacity: 0;
}
.storefront-v2 .product-photo-stage .product-tag {
    z-index: 2;
    max-width: calc(100% - 24px);
    top: 12px;
    left: 12px;
}
.storefront-v2 .v2-product-art.product-photo-stage .product-tag {
    top: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    line-height: 1.2;
}
.storefront-v2 .gallery-thumbs {
    gap: 10px;
    margin-top: 12px;
}
.storefront-v2 .gallery-thumbs button {
    background: #fff;
    flex-basis: 80px;
    height: 64px;
    padding: 7px;
}
.storefront-v2 .v2-cart-image { background: #fff; }
.storefront-v2 .product-photo-stage > img.product-subject-frame {
    width: var(--photo-width);
    max-width: none;
    max-height: none;
}
.storefront-v2 .gallery-thumbs { overflow-y: hidden; }
.storefront-v2 .gallery-thumbs button.product-thumb-frame {
    position: relative;
    overflow: hidden;
    padding: 0;
}
.storefront-v2 .gallery-thumbs button.product-thumb-frame > img,
.storefront-v2 .cart-photo-frame > img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--photo-width);
    height: auto;
    max-width: none;
    max-height: none;
    object-fit: contain;
    transform: translate(var(--photo-x), var(--photo-y));
}
.storefront-v2 .cart-photo-frame { position: relative; display: block; width: 100px; height: 80px; overflow: hidden; background: #fff; }
@media (max-width: 900px) {
    .storefront-v2 .product-detail-photography { row-gap: 28px; }
    .storefront-v2 .product-detail-photography .detail-copy { padding-top: 0; }
}
/* Fade only the reviewed empty studio margins; no filter, cropping or retouching touches the part. */
.product-studio-margin {
    mask-image: linear-gradient(to right, transparent, #000 3%, #000 97%, transparent), linear-gradient(to bottom, transparent, #000 3%, #000 97%, transparent);
    mask-composite: intersect;
}
@media (prefers-reduced-motion: reduce) {
    .storefront-v2 .product-photo-stage > img { transition: none; }
    .storefront-v2 .v2-product-art.product-photo-stage:hover > img { transform: translate(var(--photo-x, -50%), var(--photo-y, -50%)); }
}
