/* Product-page overrides load after each theme's stylesheet. */
.product-gallery .product-gallery__primary {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 6 / 5;
    overflow: hidden;
    touch-action: pan-y pinch-zoom;
}
.product-gallery__open {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 16px;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}
.product-gallery__open .product-picture,
.product-gallery .product-gallery__primary img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 100%;
    margin: 0;
    object-fit: contain;
}
.product-gallery__open img { pointer-events: none; }
.product-gallery__primary > .empty-image { position: absolute; inset: 0; min-height: 0; }
.product-gallery__arrow {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(44px, 10%, 72px);
    padding: 0;
    border: 0;
    color: #172033;
    background: transparent;
    cursor: pointer;
}
.product-gallery__arrow--previous { left: 0; }
.product-gallery__arrow--next { right: 0; }
.product-gallery__arrow span {
    display: grid;
    place-items: center;
    width: 38px;
    height: 44px;
    border-radius: 8px;
    background: rgb(255 255 255 / 90%);
    box-shadow: 0 1px 6px rgb(0 0 0 / 16%);
    font: 36px/1 sans-serif;
}
.product-gallery__arrow:hover span { background: #fff; }
.product-gallery__arrow:focus-visible,
.product-gallery__open:focus-visible,
.product-gallery-viewer__close:focus-visible { outline: 3px solid var(--accent, #cd1730); outline-offset: -3px; }
.product-gallery .product-gallery__thumbs { padding: 3px; }
.product-gallery .product-gallery__thumb { flex-shrink: 0; }
.product-detail .payment-icon-container { padding-block: 10px; }
.product-detail .product-summary-intro h1 { font-size: clamp(1rem, 1.7vw, 1.6rem); line-height: 1.3; }
@media (min-width: 961px) {
    .product-detail > .product-gallery { flex: 1.2 1 0; }
    .product-detail > .product-summary { flex: 1 1 0; }
}
@media (max-width: 960px) {
    .product-gallery .product-gallery__primary { aspect-ratio: 1; }
}
@media (max-width: 959.98px) {
    .breadcrumbs { margin-top: 10px; }
    .hero h1, .section h1, .section h2, .product-summary h1 { margin: 0; }
    .section--tight { padding: 0; }
    .product-detail { gap: 10px; }
    .product-detail .product-summary-intro { padding: 0; }
    .product-detail .product-summary-intro--mobile { margin: 0; }
    .product-detail .payment-icon-container { padding: 8px; }
}
html.product-gallery-viewer-open { overflow: hidden; }
.product-gallery-viewer {
    width: min(96vw, 1480px);
    height: 92vh;
    height: 92dvh;
    max-width: 96vw;
    max-height: 96vh;
    max-height: 96dvh;
    padding: 24px;
    margin: auto;
    border: 0;
    border-radius: 12px;
    background: #fff;
    color: #172033;
    box-shadow: 0 12px 60px rgb(0 0 0 / 40%);
}
.product-gallery-viewer[open] { display: flex; flex-direction: column; }
.product-gallery-viewer::backdrop { background: rgb(0 0 0 / 82%); }
.product-gallery-viewer__stage { position: relative; flex: 1; min-height: 0; width: 100%; touch-action: pan-y pinch-zoom; }
.product-gallery-viewer__stage > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 24px; }
.product-gallery-viewer__close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 8px;
    background: #fff;
    color: #172033;
    font: 32px/1 sans-serif;
    cursor: pointer;
}
.product-gallery-viewer__count { margin: 12px 0 0; text-align: center; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
    .product-gallery-viewer { width: 100vw; height: 100vh; height: 100dvh; max-width: 100vw; max-height: 100vh; max-height: 100dvh; margin: 0; padding: 16px; border-radius: 0; }
}
@media (prefers-reduced-motion: no-preference) {
    .product-gallery .gallery-forward { animation: gallery-forward .18s ease-out; }
    .product-gallery .gallery-backward { animation: gallery-backward .18s ease-out; }
}
@keyframes gallery-forward { from { opacity: .5; transform: translateX(14px); } to { opacity: 1; transform: translateX(0); } }
@keyframes gallery-backward { from { opacity: .5; transform: translateX(-14px); } to { opacity: 1; transform: translateX(0); } }
