/* Product photographs share the same controls on main and affiliate shops. */
.product-gallery{display:grid;grid-template-columns:72px minmax(0,1fr);gap:14px;align-items:start;min-width:0;position:relative;align-self:start}
.product-gallery--single{grid-template-columns:minmax(0,1fr)}
.gallery-thumbnails{display:flex;flex-direction:column;gap:10px;max-height:550px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#cad7ce transparent;padding:2px}
.gallery-thumbnail{width:68px;height:68px;flex:0 0 auto;display:grid;grid-template: minmax(0,1fr) / minmax(0,1fr);place-items:center;padding:3px;border:1px solid var(--line);border-radius:10px;background:white;transition:border-color .15s,box-shadow .15s}
.gallery-thumbnail img{display:block;width:100%;height:100%;min-width:0;min-height:0;object-fit:contain;border-radius:6px}
.gallery-thumbnail:hover{border-color:var(--primary)}
.gallery-thumbnail[aria-pressed=true]{border:2px solid var(--primary);padding:2px;box-shadow:0 0 0 2px color-mix(in srgb,var(--primary) 10%,transparent)}
.gallery-stage{position:relative;min-width:0;border:1px solid var(--line);border-radius:18px;background:white;padding:10px}
.gallery-open{display:block;width:100%;aspect-ratio:1;padding:0;position:relative;border-radius:11px;overflow:hidden;cursor:zoom-in;touch-action:pan-y pinch-zoom}
.gallery-main-image{display:block;width:100%;height:100%;max-height:none;object-fit:contain;user-select:none}
.gallery-is-sliding,.gallery-lightbox-viewport.gallery-is-sliding{overflow:hidden}
.gallery-slide-copy{position:absolute;inset:0;display:block;width:100%;height:100%;max-width:none;object-fit:contain;pointer-events:none;user-select:none}
.gallery-is-sliding>[data-gallery-main],.gallery-is-sliding>[data-gallery-full],.gallery-slide-copy{will-change:transform}
.gallery-zoom-indicator,.gallery-lens{z-index:1}
.gallery-zoom-indicator{position:absolute;right:9px;top:9px;width:34px;height:34px;display:grid;place-items:center;border-radius:50%;background:#ffffffeb;border:1px solid var(--line);color:var(--primary);pointer-events:none}
.gallery-counter{position:absolute;right:20px;bottom:20px;padding:3px 9px;border-radius:6px;background:#172d26ba;color:white;backdrop-filter:blur(8px);font-size:11px;font-weight:600;line-height:1.6;pointer-events:none}
.gallery-lens{position:absolute;pointer-events:none;background:#ffffff26;border:1px solid #ffffffbf;box-shadow:0 0 0 1px #173f3240}
.gallery-magnifier{position:absolute;top:-1px;left:calc(100% + 30px);z-index:35;background:white;border:1px solid var(--line);box-shadow:0 12px 36px #173f321a;border-radius:14px;overflow:hidden;pointer-events:none}
.gallery-magnifier img{position:absolute;max-width:none;object-fit:fill}
.product-gallery [hidden]{display:none!important}
body.gallery-modal-open{overflow:hidden}
.gallery-lightbox{padding:0;width:min(1100px,calc(100vw - 48px));height:min(860px,calc(100dvh - 48px));max-width:none;max-height:none;border:1px solid #ffffff33;border-radius:18px;box-shadow:0 24px 90px #0005;color:var(--ink);background:white;overflow:hidden}
.gallery-lightbox::backdrop{background:#081610d9;backdrop-filter:blur(5px)}
.gallery-lightbox-content{height:100%;display:flex;flex-direction:column;min-height:0}
.gallery-lightbox-header{display:flex;align-items:center;gap:14px;padding:14px 18px;border-bottom:1px solid var(--line);flex-shrink:0}
.gallery-lightbox-header>div{flex:1;min-width:0}
.gallery-lightbox-header strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
.gallery-lightbox-header span[data-gallery-dialog-counter]{display:block;font-size:11px;color:var(--muted);margin-top:3px}
.gallery-control{height:42px;width:42px;padding:0;flex:0 0 auto;display:grid;place-items:center;border:1px solid var(--line);border-radius:50%;background:white}
.gallery-control:hover,.gallery-zoom-toggle:hover{background:var(--mint)}
.gallery-zoom-toggle{display:flex;align-items:center;gap:7px;border:1px solid var(--line);padding:9px 12px;border-radius:22px;font-size:12px;white-space:nowrap}
.gallery-lightbox-viewport{flex:1;min-height:0;position:relative;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;background:#f8faf7;touch-action:pan-y pinch-zoom}
.gallery-lightbox-viewport>img{display:block;width:100%;height:100%;object-fit:contain;max-width:none;cursor:zoom-in;user-select:none}
.gallery-lightbox-viewport.is-zoomed{touch-action:auto}
.gallery-lightbox-viewport.is-zoomed>img{width:200%;height:200%;cursor:grab}
.gallery-lightbox-viewport.is-dragging>img{cursor:grabbing}
.gallery-lightbox-footer{display:flex;align-items:center;justify-content:center;gap:18px;padding:10px 18px;border-top:1px solid var(--line);flex-shrink:0}
.gallery-previous-icon{transform:rotate(180deg)}
.gallery-dots{display:flex;align-items:center;justify-content:center;flex-wrap:wrap}
.gallery-dots button{height:36px;width:28px;display:grid;place-items:center;padding:0}
.gallery-dots span{height:6px;width:6px;border-radius:8px;background:#cbd6cf;transition:width .15s,background .15s}
.gallery-dots [aria-pressed=true] span{width:18px;background:var(--primary)}
@media(min-width:701px) and (max-width:1023px){.product-gallery{grid-template-columns:54px minmax(0,1fr);gap:9px}.product-gallery--single{grid-template-columns:1fr}.gallery-thumbnail{width:50px;height:50px}.gallery-stage{padding:8px}.gallery-thumbnails{max-height:350px}}
@media(max-width:700px){
 .product-gallery{display:flex;flex-direction:column;gap:12px}
 .gallery-stage{order:0;width:100%;border-radius:14px;padding:9px}
 .gallery-open{border-radius:8px}
 .gallery-thumbnails{order:1;width:100%;max-height:none;flex-direction:row;gap:10px;padding:3px 2px;scrollbar-width:none}
 .gallery-thumbnail{width:72px;height:72px;border-radius:9px}
 .gallery-counter{bottom:18px;right:18px;font-size:11px}
 .gallery-zoom-indicator{height:32px;width:32px;right:7px;top:7px}
 .gallery-magnifier,.gallery-lens{display:none!important}
 .gallery-lightbox{width:100%;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0}
 .gallery-lightbox-header{padding:calc(10px + env(safe-area-inset-top)) 12px 10px;gap:8px}
 .gallery-lightbox-header strong{font-size:12px}
 .gallery-zoom-toggle{height:40px;width:40px;padding:0;justify-content:center}
 .gallery-zoom-toggle span{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .gallery-lightbox-footer{gap:12px;padding:10px 12px calc(10px + env(safe-area-inset-bottom))}
 .gallery-dots button{width:25px}
}
@media(prefers-reduced-motion:reduce){.gallery-thumbnail,.gallery-dots span{transition:none}}
