/* zoom.css - product picture gallery + zoom (external file: CSP style-src 'self'). Loaded after /printables/product.css. */
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.pfig{max-width:420px}
.pzoom{position:relative;display:block;overflow:hidden;cursor:zoom-in;line-height:0}
.pzoom:focus-visible{outline:3px solid var(--accent2,#2f6b4f);outline-offset:-3px}
.pimg-main{aspect-ratio:auto;object-fit:contain}
.pzoom-lens{position:absolute;inset:0;background-repeat:no-repeat;background-color:#fff;opacity:0;pointer-events:none;cursor:zoom-in}
.pzoom-lens.on{opacity:1}
.pzoom-hint{position:absolute;right:8px;bottom:8px;padding:4px 10px;border-radius:999px;background:rgba(20,30,25,.78);color:#fff;font-size:.8rem;line-height:1.4;pointer-events:none}
.pgal{list-style:none;margin:0;padding:10px;display:flex;gap:8px;overflow-x:auto;border-top:1px solid var(--line,#d9e2dc);background:var(--card,#fff)}
.pgal li{flex:0 0 auto}
.pgal a{display:block;width:64px;height:64px;border:2px solid var(--line,#d9e2dc);border-radius:8px;overflow:hidden;background:#eef2ee}
.pgal a[aria-current]{border-color:var(--accent2,#2f6b4f)}
.pgal a:focus-visible{outline:3px solid var(--accent2,#2f6b4f);outline-offset:2px}
.pgal img{display:block;width:100%;height:100%;object-fit:cover}
@media (min-width:720px){.pgal a{width:72px;height:72px}}

/* full-screen viewer: native <dialog>, closed unless JS opens it */
.pviewer{width:100vw;max-width:none;height:100vh;height:100dvh;max-height:none;margin:0;padding:0;border:0;background:#111;color:#fff}
.pviewer[open]{display:grid;grid-template-rows:auto minmax(0,1fr);grid-template-columns:minmax(0,1fr)}
.pviewer::backdrop{background:rgba(0,0,0,.85)}
.pviewer-bar{display:flex;align-items:center;gap:10px;padding:8px 12px;background:#000}
.pviewer-count{margin-right:auto;font-size:.95rem}
.pviewer button{min-width:44px;min-height:44px;padding:0 14px;border:1px solid #fff;border-radius:8px;background:#222;color:#fff;font:inherit;font-weight:700;cursor:pointer}
.pviewer button:hover{background:#3a3a3a}
.pviewer button:focus-visible{outline:3px solid #ffd54a;outline-offset:2px}
.pviewer button[hidden]{display:none}
.pviewer-stage{position:relative;min-height:0;overflow:auto;display:flex;align-items:center;justify-content:center;touch-action:pan-x pan-y pinch-zoom}
.pviewer-img{display:block;max-width:100%;max-height:calc(100vh - 62px);max-height:calc(100dvh - 62px);width:auto;height:auto;margin:auto;object-fit:contain;background:#fff;cursor:zoom-in;touch-action:pan-x pan-y pinch-zoom}
.pviewer-stage.is-zoomed{display:block}
.pviewer-stage.is-zoomed .pviewer-img{max-width:none;max-height:none;cursor:zoom-out}
.pviewer.loading .pviewer-stage::after{content:"Loading picture";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);padding:6px 14px;border-radius:8px;background:#000;font-size:.9rem}
.pviewer-prev,.pviewer-next{position:absolute;top:50%;margin-top:-22px;z-index:2}
.pviewer-prev{left:10px}
.pviewer-next{right:10px}
@media (prefers-reduced-motion:no-preference){.pzoom-lens{transition:opacity .12s ease}}
@media (prefers-reduced-motion:reduce){.pzoom-lens,.pviewer *{transition:none;animation:none;scroll-behavior:auto}}
@media (hover:none){.pzoom-lens{display:none}}
