/* Charlbeck Jewellers — animated product page
   Editorial morphing product stage. Loaded on top of site.css.
   The stage is a dark square object inset from the viewport; the media canvas
   fills it and the persistent interface floats above, so cards travel behind the
   title and enquiry controls exactly as in the reference language. */

:root {
  --product-black: #0e0e0c;
  --product-black-soft: #141310;
  --product-charcoal: #28251f;
  --product-ivory: #f3f0e8;
  --product-ivory-muted: rgba(243, 240, 232, 0.68);
  --product-line: rgba(243, 240, 232, 0.16);
  --product-line-strong: rgba(243, 240, 232, 0.28);
  --product-champagne: #b6a581;

  --product-card-gap: clamp(9px, 0.9vw, 16px);
  /* Square, edge-to-edge — matches the sharp editorial language of the rest of
     the site (site.css uses no rounded corners). */
  --product-radius: 0px;
  --product-card-radius: 0px;
}

/* ---------- Opening experience ---------- */
.product-experience {
  padding: clamp(74px, 9vh, 108px) clamp(16px, 1.8vw, 30px) clamp(14px, 1.5vw, 24px);
  background: var(--paper);
}

.product-stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  min-height: max(720px, calc(100svh - clamp(90px, 11vh, 132px)));
  border-radius: var(--product-radius);
  background: var(--product-black);
  color: var(--product-ivory);
}

/* the morphing cards live here and may travel edge-to-edge */
.product-motion-canvas {
  position: absolute;
  inset: clamp(10px, 1vw, 18px);
  z-index: 1;
}

/* soft floor gradient so the persistent copy stays legible over any card */
.product-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(14,14,12,0) 52%, rgba(14,14,12,0.62) 100%),
    linear-gradient(90deg, rgba(14,14,12,0.34) 0%, rgba(14,14,12,0) 34%);
}

/* ---------- Morphing cards ---------- */
.product-card {
  position: absolute;
  overflow: hidden;
  border-radius: var(--product-card-radius);
  will-change: transform;
  backface-visibility: hidden;
}
.product-card[hidden] { display: none; }

.product-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  background: var(--product-black-soft);
}
.product-media img,
.product-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.03) brightness(0.97);
}
/* the decorative macro crop of the primary image reads tighter */
.product-card[data-card="detail"] .product-media img { transform: scale(1.42); }

.product-copy-card {
  position: absolute;
  inset: 0;
  background: var(--product-charcoal);
  color: var(--product-ivory);
  border-radius: inherit;
  padding: clamp(18px, 2vw, 34px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(12px, 1.6vw, 22px);
}
.product-copy-card .cc-eyebrow {
  font-size: 9px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--product-champagne);
}
.product-copy-card .cc-head {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(19px, 1.9vw, 30px); line-height: 1.16; letter-spacing: -.01em;
  color: var(--product-ivory);
}
.product-copy-card .cc-body {
  font-size: clamp(12.5px, 0.95vw, 14.5px); line-height: 1.72;
  color: var(--product-ivory-muted); max-width: 34ch;
}
.product-copy-card .cc-list { margin: 0; display: grid; gap: 6px; }
.product-copy-card .cc-list div {
  font-size: clamp(12.5px, 0.95vw, 14.5px); line-height: 1.6; color: var(--product-ivory);
}
.product-copy-card .cc-list .cc-k {
  display: block; font-size: 8.5px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--product-ivory-muted); margin-bottom: 1px;
}

/* the full-stage editorial statement, revealed by a left→right mask */
.product-statement {
  position: absolute;
  left: clamp(20px, 3vw, 54px);
  top: clamp(84px, 20vh, 210px);
  z-index: 6;
  margin: 0;
  max-width: 16ch;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(26px, 4.4vw, 66px); line-height: 1.02; letter-spacing: -.02em;
  text-transform: uppercase;
  color: var(--product-ivory);
  clip-path: inset(0 100% 0 0);
  pointer-events: none;
}
.product-statement span { display: block; }

/* feathered consultation supporting copy (reserved; consult card carries this copy) */
.product-feather {
  display: none;
  position: absolute;
  left: clamp(20px, 3vw, 54px);
  bottom: clamp(96px, 16vh, 190px);
  z-index: 6;
  margin: 0;
  max-width: 34ch;
  font-size: clamp(13px, 1.1vw, 16px); line-height: 1.7;
  color: var(--product-ivory);
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 66%, transparent 84%);
          mask-image: linear-gradient(90deg, #000 0%, #000 66%, transparent 84%);
  -webkit-mask-size: 220% 100%; mask-size: 220% 100%;
  -webkit-mask-position: 120% 0; mask-position: 120% 0;
  pointer-events: none;
}

/* ---------- Persistent interface ---------- */
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.product-persistent-interface {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(16px, 2vw, 30px) clamp(18px, 2.2vw, 34px);
}
.product-persistent-interface a,
.product-persistent-interface button { pointer-events: auto; }

/* framed header bar */
.pui-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pui-back {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 16px; border-radius: 0;
  background: rgba(243,240,232,0.06); border: 1px solid var(--product-line);
  color: var(--product-ivory);
  font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; white-space: nowrap;
  transition: background .2s ease, border-color .2s ease;
}
.pui-back:hover { background: rgba(243,240,232,0.12); border-color: var(--product-line-strong); }
.pui-back-arrow { font-size: 13px; line-height: 1; }
.pui-controls { display: flex; align-items: center; gap: 8px; }
.pui-icon {
  width: 40px; height: 40px; border-radius: 0;
  display: grid; place-items: center;
  background: rgba(243,240,232,0.06); border: 1px solid var(--product-line);
  color: var(--product-ivory); cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.pui-icon:hover { background: rgba(243,240,232,0.12); border-color: var(--product-line-strong); }
.pui-icon svg { width: 16px; height: 16px; display: block; }
.pui-icon .ico-play { display: none; }
.pui-icon[data-paused="true"] .ico-play { display: block; }
.pui-icon[data-paused="true"] .ico-pause { display: none; }
.pui-contact {
  height: 40px; padding: 0 clamp(16px, 1.4vw, 22px); border-radius: 0; border: 0;
  background: var(--product-black-soft); color: var(--product-ivory);
  font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; white-space: nowrap; cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.pui-contact:hover { background: var(--product-ivory); color: var(--product-black); }
.pui-icon:focus-visible, .pui-contact:focus-visible, .pui-back:focus-visible {
  outline: 2px solid var(--product-champagne); outline-offset: 3px;
}

/* framed footer bar */
.pui-bottom {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: clamp(16px, 2.4vw, 44px);
}
.pui-brand {
  margin: 0; font-family: var(--serif); font-weight: 400;
  font-size: clamp(20px, 2.1vw, 30px); letter-spacing: .01em; line-height: 1.1;
  color: var(--product-ivory);
  max-width: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pui-tagline {
  margin: 0; max-width: 46ch;
  font-size: clamp(11px, 0.9vw, 13px); line-height: 1.65; color: var(--product-ivory-muted);
}
.pui-actions { display: inline-flex; align-items: stretch; gap: 8px; justify-self: end; }
.pui-explore, .pui-actions .cta-arrow {
  background: var(--product-ivory); color: var(--product-black);
  border: 0; cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.pui-explore {
  border-radius: 0; padding: 0 clamp(18px, 1.6vw, 26px); height: 50px;
  display: inline-flex; align-items: center;
  font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; white-space: nowrap;
}
.pui-actions .cta-arrow { width: 50px; height: 50px; border-radius: 0; display: grid; place-items: center; }
.pui-actions .cta-arrow svg { width: 17px; height: 17px; transition: transform .22s ease; }
.pui-explore:hover, .pui-actions .cta-arrow:hover { background: var(--product-black-soft); color: var(--product-ivory); }
.pui-actions .cta-arrow:hover svg { transform: translateX(3px); }
.pui-explore:focus-visible, .pui-actions .cta-arrow:focus-visible {
  outline: 2px solid var(--product-champagne); outline-offset: 3px;
}
.pui-explore .cta-short { display: none; }

/* scroll cue into the stable content */
.product-scrollcue {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  margin: clamp(20px, 3vh, 40px) auto 0;
  font-size: 9px; letter-spacing: .24em; text-transform: uppercase; color: var(--label);
}
.product-scrollcue .rule { width: 1px; height: 34px; background: var(--hairline-strong); opacity: .4;
  animation: cbCue 2.4s cubic-bezier(.16,1,.3,1) infinite; }

/* ---------- Stable content below the fold ---------- */
.product-detail { padding: clamp(64px, 10vh, 130px) var(--gutter) clamp(76px, 12vh, 170px); }
.product-detail-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(34px, 6vw, 90px); align-items: start; max-width: 1180px; margin: 0 auto;
}
.product-breadcrumb {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: clamp(16px, 2vw, 24px);
  font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: var(--label);
}
.product-breadcrumb a { color: var(--label); border-bottom: 1px solid transparent; transition: color .25s ease, border-color .25s ease; }
.product-breadcrumb a:hover { color: var(--ink); border-bottom-color: var(--underline); }
.product-breadcrumb .sep { opacity: .5; }
.product-overview .eyebrow { margin-bottom: clamp(12px, 1.6vw, 18px); }
.product-overview .lede { margin-top: clamp(16px, 2.4vh, 26px); max-width: 46ch; }
.product-detail-actions { margin-top: clamp(28px, 4vh, 44px); display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; }

/* ---------- Metal colour switcher ---------- */
.product-variants { margin-top: clamp(26px, 3.6vh, 40px); }
.product-variants .pv-label {
  margin: 0 0 clamp(12px, 1.6vh, 16px);
  font-size: 9px; letter-spacing: .22em; text-transform: uppercase; color: var(--label);
}
.pv-swatches { display: flex; flex-wrap: wrap; gap: 10px 12px; }
.pv-swatch {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 15px 8px 9px; border-radius: 0;
  background: transparent; border: 1px solid var(--hairline);
  cursor: pointer; color: var(--ink);
  font-size: 11.5px; letter-spacing: .02em; line-height: 1;
  transition: border-color .28s ease, background .28s ease, transform .28s cubic-bezier(.16,1,.3,1);
  -webkit-tap-highlight-color: transparent;
}
.pv-disc {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  box-shadow: inset 0 0 0 1px rgba(20,17,14,.14), 0 1px 2px rgba(20,17,14,.14);
}
.pv-swatch .pv-name { white-space: nowrap; }
.pv-swatch:hover { border-color: var(--underline); transform: translateY(-1px); }
.pv-swatch:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.pv-swatch.is-active { border-color: var(--ink); background: rgba(20,17,14,.04); }
.pv-swatch.is-active .pv-disc { box-shadow: inset 0 0 0 1px rgba(20,17,14,.2), 0 0 0 2px var(--ink); }
.pv-swatch.is-static { cursor: default; opacity: .5; }
.pv-swatch.is-static:hover { transform: none; border-color: var(--hairline); }
@media (prefers-reduced-motion: reduce) {
  .pv-swatch { transition: none; }
  .pv-swatch:hover { transform: none; }
}

.product-gallery-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin-top: clamp(26px, 3.6vh, 40px); }
.product-gallery-strip button {
  position: relative; padding: 0; border: 0; cursor: pointer; overflow: hidden;
  aspect-ratio: 1/1; border-radius: 0; background: var(--well);
}
.product-gallery-strip img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.product-gallery-strip button:hover img { transform: scale(1.04); }

/* related products */
.product-related { padding: 0 var(--gutter) clamp(76px, 12vh, 170px); }
.product-related .rel-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: clamp(20px, 3vw, 44px); max-width: 1180px; margin: clamp(30px, 4vh, 50px) auto 0;
}
.product-related .rel-card .media { aspect-ratio: 4/5; border-radius: 0; }
.product-related .rel-card .cat { margin: 12px 0 0; font-size: 9px; letter-spacing: .22em; text-transform: uppercase; color: var(--label); }
.product-related .rel-card .title { margin: 6px 0 0; font-family: var(--serif); font-size: clamp(16px,1.4vw,20px); line-height: 1.28; }

/* ---------- Enquiry drawer ---------- */
.product-drawer[hidden] { display: none; }
.product-drawer {
  position: fixed; inset: 0; z-index: 120;
  display: flex; justify-content: flex-end;
}
.product-drawer .drawer-scrim {
  position: absolute; inset: 0; background: rgba(14,14,12,0.5);
  opacity: 0; transition: opacity .4s ease;
}
.product-drawer[data-open="true"] .drawer-scrim { opacity: 1; }
.product-drawer .drawer-panel {
  position: relative; width: min(460px, 100%); height: 100%; overflow-y: auto;
  background: var(--paper-bright); color: var(--ink);
  padding: clamp(28px, 4vw, 52px) clamp(24px, 3vw, 46px);
  transform: translateX(100%); transition: transform .5s cubic-bezier(.16,1,.3,1);
  box-shadow: -20px 0 60px rgba(14,14,12,0.18);
}
.product-drawer[data-open="true"] .drawer-panel { transform: translateX(0); }
.drawer-panel .drawer-close {
  position: absolute; top: clamp(18px, 2.4vw, 28px); right: clamp(18px, 2.4vw, 28px);
  background: transparent; border: 0; cursor: pointer;
  font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--label);
}
.drawer-panel .drawer-close:hover { color: var(--ink); }
.drawer-panel .drawer-context {
  margin: clamp(16px, 2.4vh, 26px) 0 clamp(24px, 3.4vh, 36px);
  padding: 14px 16px; border: 1px solid var(--hairline); border-radius: 0;
  display: flex; gap: 14px; align-items: center;
}
.drawer-panel .drawer-context img { width: 54px; height: 54px; object-fit: cover; border-radius: 0; }
.drawer-panel .drawer-context .dc-title { font-family: var(--serif); font-size: 16px; line-height: 1.25; }
.drawer-panel .drawer-context .dc-sub { margin-top: 3px; font-size: 11.5px; color: var(--text-3); }
.drawer-panel .field { margin-bottom: clamp(20px, 3vh, 28px); }
.drawer-panel .field .err { display: none; margin-top: 7px; font-size: 11px; color: #a4442f; letter-spacing: .02em; }
.drawer-panel .field.invalid input,
.drawer-panel .field.invalid textarea { border-bottom-color: #a4442f; }
.drawer-panel .field.invalid .err { display: block; }
.drawer-panel .drawer-submit { margin-top: clamp(8px, 1.4vh, 14px); }
.drawer-panel .drawer-tel { margin-top: clamp(20px, 3vh, 28px); font-size: 13px; color: var(--text-3); }
.drawer-panel .drawer-tel a { border-bottom: 1px solid var(--underline); padding-bottom: 1px; }
.drawer-panel .drawer-success { display: none; }
.product-drawer[data-state="success"] .drawer-form { display: none; }
.product-drawer[data-state="success"] .drawer-success { display: block; animation: cbShow 500ms ease both; }

/* ---------- Fullscreen gallery ---------- */
.product-lightbox[hidden] { display: none; }
.product-lightbox {
  position: fixed; inset: 0; z-index: 130;
  background: rgba(10,10,9,0.96); color: var(--product-ivory);
  display: grid; grid-template-rows: auto 1fr auto; opacity: 0; transition: opacity .35s ease;
}
.product-lightbox[data-open="true"] { opacity: 1; }
.product-lightbox .lb-bar { display: flex; align-items: center; justify-content: space-between;
  padding: clamp(16px, 2.4vw, 26px) clamp(18px, 3vw, 34px); }
.product-lightbox .lb-count { font-size: 11px; letter-spacing: .2em; color: var(--product-ivory-muted); }
.product-lightbox .lb-close { background: transparent; border: 0; color: var(--product-ivory);
  cursor: pointer; font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; }
.product-lightbox .lb-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; overflow: hidden; padding: 0 clamp(18px, 6vw, 90px); }
.product-lightbox .lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 0; }
.product-lightbox .lb-nav { position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 0; background: rgba(243,240,232,0.08);
  border: 1px solid var(--product-line); color: var(--product-ivory); cursor: pointer; display: grid; place-items: center; }
.product-lightbox .lb-nav:hover { background: rgba(243,240,232,0.16); }
.product-lightbox .lb-prev { left: clamp(10px, 2vw, 26px); }
.product-lightbox .lb-next { right: clamp(10px, 2vw, 26px); }
.product-lightbox .lb-foot { padding: clamp(14px, 2vw, 22px); text-align: center;
  font-size: 12px; color: var(--product-ivory-muted); }

/* ---------- Mobile sticky action bar ---------- */
.product-actionbar { display: none; }

@media (max-width: 760px) {
  .product-experience { padding: clamp(64px, 8vh, 90px) 0 0; }
  .product-stage {
    border-radius: 0; min-height: max(560px, 86svh);
  }
  .product-motion-canvas { inset: clamp(8px, 2.4vw, 14px); }
  .product-persistent-interface { padding: clamp(14px, 4vw, 22px); }
  .pui-contact { display: none; }              /* enquiry handled by sticky bar */
  .pui-controls { gap: 6px; }
  .pui-bottom { grid-template-columns: auto auto; justify-content: space-between; gap: 12px; }
  .pui-tagline { display: none; }               /* keep the footer bar slim on mobile */
  .pui-actions { display: none; }               /* replaced by sticky bar on mobile */
  .pui-brand { font-size: clamp(20px, 6vw, 28px); }
  .product-statement { font-size: clamp(30px, 9vw, 52px); top: clamp(80px, 16vh, 160px); }

  .product-actionbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
    display: flex; gap: 10px; align-items: stretch;
    padding: 12px clamp(14px, 4vw, 20px);
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    background: color-mix(in oklab, var(--paper-bright) 88%, transparent);
    backdrop-filter: blur(12px); border-top: 1px solid var(--hairline);
  }
  .product-actionbar .ab-enquire {
    flex: 1; height: 50px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--ink); color: var(--paper); border: 0; cursor: pointer;
    border-radius: 0; font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  }
  .product-actionbar .ab-call {
    width: 50px; height: 50px; border-radius: 0; display: grid; place-items: center;
    background: transparent; border: 1px solid var(--control); color: var(--ink);
  }
  .product-actionbar .ab-call svg { width: 18px; height: 18px; }

  .product-drawer .drawer-panel { width: 100%; }
  .product-detail { padding-bottom: calc(clamp(76px,12vh,170px) + 70px); }
}

/* narrower still: shorten the CTA label */
@media (max-width: 1120px) and (min-width: 761px) {
  .pui-explore .cta-full { display: none; }
  .pui-explore .cta-short { display: inline; }
  .pui-tagline { max-width: 32ch; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .product-statement { clip-path: none !important; }
  .product-feather { -webkit-mask-image: none !important; mask-image: none !important; }
  .product-scrollcue .rule { animation: none; }
  .product-drawer .drawer-panel,
  .product-drawer .drawer-scrim,
  .product-lightbox { transition: none !important; }
}
