/* ============================================================
   NOVELTY WOODWORKS — photo lightbox styles
   Pairs with gallery.js. Linked by any page with a gallery.

   index.html and products.html do not link styles.css, so every
   custom property here carries a literal fallback — the brand values
   from styles.css :root. Pages that do link styles.css still pick up
   the variables and stay in sync.
   ============================================================ */

/* ---------- any thumbnail that opens the lightbox ---------- */
.shot-open{display:block;width:100%;padding:0;border:0;background:none;cursor:zoom-in;
  position:relative;font:inherit;color:inherit;text-align:left;}
.shot-open:focus-visible{outline:2px solid var(--brown,#6E4A2B);outline-offset:-2px;}
/* inside a product card's fixed-ratio art box the button must fill it,
   otherwise the image sizes to its own ratio and overflows the well */
.plan-art .shot-open,.prod-art .shot-open{height:100%;}
/* the caption sits over the button; let clicks fall through to it */
.shot-open + figcaption{pointer-events:none;}

.shot-badge{position:absolute;right:10px;bottom:10px;display:inline-flex;align-items:center;gap:6px;
  font-family:var(--sans,'Inter',system-ui,sans-serif);font-weight:600;font-size:11px;letter-spacing:.09em;
  text-transform:uppercase;color:var(--cream,#F4EFE4);background:rgba(42,36,32,.78);
  padding:6px 11px;border-radius:100px;backdrop-filter:blur(2px);}
.gallery figure:hover .shot-badge,.plan:hover .shot-badge,.shot-open:hover .shot-badge{background:var(--brown,#6E4A2B);}

/* ---------- lightbox ---------- */
.lb{position:fixed;inset:0;z-index:200;display:flex;align-items:center;justify-content:center;
  background:rgba(20,17,15,.94);padding:clamp(44px,6vw,64px) clamp(12px,4vw,72px);}
.lb[hidden]{display:none;}
.lb-stage{margin:0;display:flex;flex-direction:column;align-items:center;gap:14px;max-width:100%;max-height:100%;}
.lb-stage img,.lb-stage video{max-width:100%;max-height:calc(100vh - 190px);width:auto;height:auto;display:block;
  border-radius:var(--radius,3px);background:var(--espresso,#2A2420);box-shadow:0 30px 70px -30px rgba(0,0,0,.9);}
.lb-stage img[hidden],.lb-stage video[hidden]{display:none;}
.lb-cap{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;justify-content:center;text-align:center;}
.lb-cap b{font-family:var(--serif,'Playfair Display',Georgia,serif);font-weight:700;font-size:17px;color:var(--cream,#F4EFE4);}
.lb-cap span{font-family:var(--sans,'Inter',system-ui,sans-serif);font-size:13px;letter-spacing:.09em;
  text-transform:uppercase;color:rgba(244,239,228,.6);}
.lb button{position:absolute;border:1px solid rgba(244,239,228,.28);background:rgba(42,36,32,.55);
  color:var(--cream,#F4EFE4);border-radius:100px;cursor:pointer;display:flex;align-items:center;
  justify-content:center;transition:background .15s ease,border-color .15s ease;
  font-family:var(--sans,'Inter',system-ui,sans-serif);line-height:1;}
.lb button:hover{background:var(--brown,#6E4A2B);border-color:var(--brown,#6E4A2B);}
.lb button:focus-visible{outline:2px solid var(--tan,#A9855A);outline-offset:3px;}
.lb-close{top:16px;right:16px;width:44px;height:44px;font-size:26px;}
.lb-prev,.lb-next{top:50%;transform:translateY(-50%);width:52px;height:52px;font-size:30px;padding-bottom:4px;}
.lb-prev{left:clamp(8px,2vw,26px);}
.lb-next{right:clamp(8px,2vw,26px);}
.lb-thumbs{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;max-width:min(760px,100%);}
.lb-thumbs button{position:relative;width:52px;height:40px;padding:0;overflow:hidden;
  border-radius:var(--radius,3px);opacity:.5;}
/* mark the video thumbnail with a play glyph */
.lb-thumbs button.is-video::after{content:'\25B6';position:absolute;inset:0;display:flex;align-items:center;
  justify-content:center;font-size:14px;color:var(--cream,#F4EFE4);background:rgba(20,17,15,.42);
  text-shadow:0 1px 3px rgba(0,0,0,.7);}
.lb-thumbs button[aria-current="true"]{opacity:1;border-color:var(--tan,#A9855A);}
.lb-thumbs img{width:100%;height:100%;object-fit:cover;display:block;}
@media(max-width:600px){
  .lb{padding:56px 8px 12px;}
  .lb-stage img,.lb-stage video{max-height:calc(100vh - 210px);}
  .lb-prev,.lb-next{width:44px;height:44px;font-size:26px;}
  .lb-thumbs{display:none;}
}
@media(prefers-reduced-motion:reduce){
  .gallery figure,.gallery figure:hover{transition:none;transform:none;}
}
