/* Scoped to product-detail photos and their enlarged viewer. */
.product-detail-layout>.actual-gallery{min-width:0;padding:48px 22px 24px;background:var(--photo);align-self:start}
.actual-gallery .gallery-stage{position:relative;touch-action:pan-y pinch-zoom}
.actual-gallery .gallery-open{display:block;width:100%;padding:0;cursor:zoom-in}
.actual-gallery .gallery-open:hover{opacity:1}
.actual-gallery [data-photo-main]{display:block;width:100%;height:360px;object-fit:contain;mix-blend-mode:normal}
.actual-gallery .gallery-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0;font-size:12px}
.actual-gallery .gallery-controls button{min-width:72px;min-height:44px;border:1px solid var(--line);background:var(--paper);padding:8px 12px;font-size:12px}
.actual-gallery .gallery-controls button:disabled{opacity:.4}
.actual-gallery .gallery-thumbnails{display:flex;gap:8px;overflow-x:auto;overscroll-behavior-x:contain;padding:5px 3px 10px;scrollbar-width:thin}
.actual-gallery .gallery-thumbnails button{padding:3px;flex:0 0 66px;height:66px;border:1px solid var(--line);background:var(--photo)}
.actual-gallery .gallery-thumbnails button[aria-current=true]{border:2px solid var(--accent)}
.actual-gallery .gallery-thumbnails img{width:100%;height:100%;object-fit:contain}
.actual-gallery .gallery-hint{font-size:11px;line-height:1.6;color:var(--muted);margin:4px 0 0}
.actual-gallery .photo-zoom-dialog{width:min(1100px,96vw);max-width:96vw;max-height:96dvh;padding:16px;background:var(--paper)}
.actual-gallery .photo-zoom-toolbar{display:flex;justify-content:space-between;gap:12px;margin-bottom:12px}
.actual-gallery .photo-zoom-toolbar button{min-height:44px;padding:8px 14px;border:1px solid var(--line);font-size:13px}
.actual-gallery .photo-zoom-stage{width:100%;height:calc(90dvh - 160px);min-height:180px;overflow:auto;background:var(--photo);overscroll-behavior:contain;touch-action:pan-x pan-y pinch-zoom}
.actual-gallery [data-photo-large]{width:100%;height:100%;max-width:none;object-fit:contain;mix-blend-mode:normal}
.actual-gallery .photo-zoom-stage.is-magnified [data-photo-large]{width:200%;height:200%}
.actual-gallery-empty{min-height:400px}
@media(max-width:700px){
 .product-detail-layout>.actual-gallery{padding:48px 15px 15px}
 .actual-gallery [data-photo-main]{height:280px;max-height:45dvh}
 .actual-gallery .gallery-thumbnails button{flex-basis:58px;height:58px}
 .actual-gallery .photo-zoom-dialog{padding:12px;max-height:96dvh}
 .actual-gallery .photo-zoom-stage{height:calc(90dvh - 155px)}
 .actual-gallery-empty{min-height:275px}
}
@media(max-width:359px){.actual-gallery [data-photo-main]{height:230px}.actual-gallery .gallery-controls{gap:8px}}

/* Clean photo navigation: gestures/thumbnails, plus keyboard and screen-reader controls. */
.actual-gallery .gallery-controls{position:relative;justify-content:center;min-height:18px;margin:8px 0}
.actual-gallery .gallery-controls .photo-sr-nav:not(:focus){position:absolute;width:1px;height:1px;min-width:1px;min-height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.actual-gallery .gallery-stage{user-select:none}
.actual-gallery .photo-zoom-stage:not(.is-magnified){touch-action:pan-y pinch-zoom;user-select:none}

.actual-gallery .gallery-thumbnails button:focus-visible{outline:2px solid var(--ink);outline-offset:2px}

.actual-gallery [data-photo-main],.actual-gallery [data-photo-large]{-webkit-user-drag:none}
.actual-gallery .photo-zoom-stage>.photo-swipe-frame,.actual-gallery .photo-zoom-stage .photo-swipe-rail,.actual-gallery .photo-zoom-stage .photo-swipe-current{height:100%}
.actual-gallery .photo-zoom-stage.is-magnified .photo-swipe-frame,.actual-gallery .photo-zoom-stage.is-magnified .photo-swipe-current{overflow:visible}
.actual-gallery .photo-zoom-stage.is-magnified .photo-swipe-rail{display:block;transform:none;transition:none}
.actual-gallery .photo-zoom-stage.is-magnified .photo-swipe-side{display:none}
@media(prefers-reduced-motion:reduce){.actual-gallery .photo-swipe-rail{transition:none}}
