/* Pets Elite website: the product-page gallery (A643 item 2, A647; pk2, 16 Nov 2026). With gallery.js; load after pe.css.
   It uses pe.css's own tokens (--ink, --paper, --line, --red, --sans …) and keeps the gallery's look: the main picture,
   the thumbnails, the light tile. Added: an enlarge button over the picture, previous / next, a scrolling thumbnail row
   for eight or more photos, and the viewer (dialog .glb). */

/* the thumbnails: one row that scrolls sideways when there are many (eight panels on a box), never wraps the page wider */
.gal--live .gal__thumbs{overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity;scrollbar-width:thin;padding:6px;margin:-6px}   /* room for the pressed border and the focus ring inside the scroller */
.gal--live .gal__thumbs button{flex:0 0 auto;scroll-snap-align:start}
.gal--live .gal__thumbs button:focus-visible{outline:3px solid var(--blue,#003da6);outline-offset:2px}

/* the enlarge button lies over the main picture */
.gal__open{position:absolute;inset:0;z-index:2;display:block;width:100%;height:100%;padding:0;border:0;background:transparent;cursor:zoom-in;border-radius:inherit}
.gal__open:focus-visible{outline:3px solid var(--blue,#003da6);outline-offset:-3px}
.gal__hint{position:absolute;right:12px;bottom:12px;display:inline-flex;align-items:center;gap:6px;padding:7px 11px;border-radius:999px;
  background:rgba(255,255,255,.92);color:var(--ink,#2B2419);font:700 12.5px/1 var(--sans,Arial,sans-serif);box-shadow:0 4px 14px rgba(43,36,25,.14)}
@media (hover:hover) and (pointer:fine){.gal__hint span{display:none}.gal__hint{padding:8px}}
.gal__step{position:absolute;top:50%;z-index:3;width:40px;height:40px;margin-top:-20px;display:grid;place-items:center;padding:0;border:1px solid var(--line,#E9E2D5);
  border-radius:50%;background:rgba(255,255,255,.94);color:var(--ink,#2B2419);cursor:pointer;box-shadow:0 4px 14px rgba(43,36,25,.12);opacity:0;transition:opacity .18s}
.gal__step--prev{left:10px}.gal__step--next{right:10px}
.gal__main:hover .gal__step,.gal__step:focus-visible,.gal__main:focus-within .gal__step{opacity:1}
.gal__step:focus-visible{outline:3px solid var(--blue,#003da6);outline-offset:2px}
@media (hover:none){.gal__step{opacity:1;width:36px;height:36px;margin-top:-18px}}
.gal__sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.gal--live .gal__main{touch-action:pan-y}   /* a sideways swipe changes the photo; up and down still scroll the page */

/* the viewer */
html.glb-open{overflow:hidden}
.glb{position:fixed;inset:0;width:100%;max-width:none;height:100%;max-height:none;margin:0;padding:0;border:0;background:#18140E;color:#fff;
  font-family:var(--sans,Arial,sans-serif);overflow:hidden}
.glb::backdrop{background:rgba(24,20,14,.6)}
.glb[open]{display:grid;grid-template-rows:auto 1fr auto}
.glb__bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:calc(10px + env(safe-area-inset-top,0px)) 14px 10px}
.glb__count{margin:0;font:700 14px/1 var(--sans,Arial,sans-serif);letter-spacing:.02em;min-height:1em}
.glb__tools{display:flex;gap:8px}
.glb__btn,.glb__nav{display:grid;place-items:center;width:44px;height:44px;padding:0;border:1px solid rgba(255,255,255,.28);border-radius:50%;
  background:rgba(255,255,255,.1);color:#fff;cursor:pointer}
.glb__btn:hover,.glb__nav:hover{background:rgba(255,255,255,.2)}
.glb__btn:disabled{opacity:.35;cursor:default}
.glb__btn:focus-visible,.glb__nav:focus-visible{outline:3px solid var(--gold,#d7a461);outline-offset:2px}
.glb__stage{position:relative;overflow:hidden;display:grid;place-items:center;touch-action:none;cursor:zoom-in;min-height:0;padding:8px 64px}
.glb.is-zoomed .glb__stage{cursor:grab}
.glb.is-zoomed .glb__stage:active{cursor:grabbing}
.glb__img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:10px;background:#fff;user-select:none;-webkit-user-drag:none;
  transform-origin:50% 50%;transition:transform .18s ease-out;will-change:transform}
.glb.is-zoomed .glb__img{transition:none}
.glb.is-loading .glb__img{opacity:.35}
.glb__nav{position:absolute;top:50%;margin-top:-22px;z-index:2}
.glb__nav--prev{left:12px}.glb__nav--next{right:12px}
.glb__nav[hidden]{display:none}
.glb__cap{margin:0;padding:10px 18px calc(14px + env(safe-area-inset-bottom,0px));text-align:center;font-size:14px;line-height:1.45;color:rgba(255,255,255,.86)}
@media (max-width:640px){
  .glb__stage{padding:4px 0}
  .glb__nav{top:auto;bottom:calc(52px + env(safe-area-inset-bottom,0px));margin-top:0;background:rgba(24,20,14,.6)}
  .glb__cap{padding-left:64px;padding-right:64px;font-size:13px}
}
@media (prefers-reduced-motion:reduce){.glb__img,.gal__step{transition:none}}
