.catalog-detail .product-photo-gallery{min-width:0;max-width:100%;position:static}
.product-photo-gallery .product-main-image{position:relative}
.gallery-open{display:block;width:100%;height:100%;cursor:zoom-in;touch-action:pan-y pinch-zoom}
.gallery-open:hover{opacity:1}
.gallery-open:focus-visible{outline-offset:-6px}
.gallery-open img{transition:opacity .15s ease}
.gallery-zoom-hint,.gallery-count{position:absolute;bottom:18px;background:rgba(255,255,255,.94);border:1px solid rgba(32,33,30,.1);border-radius:30px;font-size:12px;line-height:1;padding:11px 14px;color:#252621}
.gallery-zoom-hint{inset-inline-start:18px;display:flex;align-items:center;gap:7px}
.gallery-zoom-hint svg{fill:none;stroke:currentColor;stroke-width:1.5}
.gallery-count{left:18px;pointer-events:none;font-variant-numeric:tabular-nums}
.gallery-caption{font-size:12px;color:var(--muted);line-height:1.7;margin-top:14px;min-height:2.8em}
.gallery-thumbnails{display:flex;gap:10px;overflow-x:auto;overscroll-behavior-inline:contain;padding:5px 4px 9px;margin:4px -4px 0;scrollbar-width:thin;scrollbar-color:#b6b3ae transparent}
.gallery-thumbnail{flex:0 0 72px;aspect-ratio:1;border:1px solid #d9d6d1;border-radius:8px;background:#eeece8;overflow:hidden;padding:3px;transition:border-color .15s ease}
.gallery-thumbnail img{width:100%;height:100%;object-fit:contain;border-radius:5px}
.gallery-thumbnail[aria-current=true]{border:2px solid var(--ink);padding:2px;background:#fff}
.gallery-thumbnail:hover{opacity:1;border-color:var(--ink)}
.gallery-sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
body:has(.gallery-lightbox[open]){overscroll-behavior:none}
dialog.gallery-lightbox{width:min(1100px,calc(100vw - 48px));height:min(920px,calc(100dvh - 48px));max-width:none;max-height:none;border:1px solid #d6d4ce;border-radius:16px;padding:0;background:var(--paper);box-shadow:0 20px 80px #0005;overflow:hidden}
.gallery-lightbox[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:0}
.gallery-lightbox::backdrop{background:rgba(24,25,23,.82)}
.gallery-lightbox-head{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:14px 20px;border-bottom:1px solid var(--line);font-size:14px}
.gallery-close,.gallery-lightbox-footer button{display:grid;place-items:center;width:44px;height:44px;flex-shrink:0;background:transparent;border:1px solid #bebeb5;border-radius:50%;font-size:20px}
.gallery-close:hover,.gallery-lightbox-footer button:hover{background:#e6e5df}
.gallery-lightbox-stage{min-height:0;padding:12px 24px;touch-action:pan-y pinch-zoom}
.gallery-lightbox-stage img{width:100%;height:100%;object-fit:contain}
.gallery-lightbox-footer{padding:14px 24px;display:flex;align-items:center;justify-content:space-between;gap:20px;border-top:1px solid var(--line)}
.gallery-lightbox-footer>div{text-align:center;max-width:720px}
.gallery-lightbox-footer p{font-size:13px;line-height:1.6}
.gallery-lightbox-footer span{display:block;font-size:11px;color:var(--muted);margin-top:4px;font-variant-numeric:tabular-nums}
@media(max-width:760px){.catalog-detail .product-photo-gallery{position:static}.gallery-thumbnail{flex-basis:60px}.gallery-thumbnails{gap:8px}.gallery-caption{margin-top:12px;min-height:0;margin-bottom:10px}.gallery-zoom-hint,.gallery-count{bottom:12px;padding:10px 12px;font-size:11px}.gallery-zoom-hint{inset-inline-start:12px}.gallery-count{left:12px}dialog.gallery-lightbox{width:100vw;height:100dvh;border:0;border-radius:0;margin:0}.gallery-lightbox-head{padding:10px 16px;padding-top:max(10px,env(safe-area-inset-top));font-size:12px}.gallery-lightbox-stage{padding:12px}.gallery-lightbox-footer{padding:12px 16px;padding-bottom:max(12px,env(safe-area-inset-bottom));gap:12px}.gallery-lightbox-footer p{font-size:12px}}
@media(prefers-reduced-motion:reduce){.gallery-open img,.gallery-thumbnail{transition:none}}
