/* ===
   QORI SILVER - Andean Parchment v4
   Light editorial. Premium jewelry aesthetic.
   Gold + dark brown on warm cream. Dark footer.
   === */

/* -- DESIGN TOKENS -- */
:root {
  /* Andean Parchment surfaces */
  --page:         #F6EFE3;   /* main background - aged parchment */
  --surface:      #FFFCF8;   /* white-ish for elevated cards */
  --surface2:     #EDE5D4;   /* deeper cream for alt sections */
  --surface3:     #E4D9C4;   /* band / border backgrounds */

  /* Text - dark warm brown */
  --ink:          #1C1208;
  --ink2:         rgba(28, 18, 8, 0.65);
  --ink3:         rgba(28, 18, 8, 0.40);
  --ink4:         rgba(28, 18, 8, 0.18);

  /* Gold - deeper for light backgrounds */
  --gold:         #9E7418;
  --gold-lt:      #B8922A;
  --gold-bright:  #C9A84C;
  --gold-line:    rgba(158, 116, 24, 0.20);
  --gold-line2:   rgba(158, 116, 24, 0.35);
  --gold-dim:     rgba(158, 116, 24, 0.10);

  /* Footer (stays dark) */
  --footer-bg:    #1C1208;
  --footer-text:  rgba(246, 239, 227, 0.72);
  --footer-head:  #B8922A;

  /* Supporting Andean accent */
  --teal:         #1D8A7A;
  --teal-lt:      #2A9E8C;
  --silver:       #7A8C9E;
  --crimson:      #A0321E;
  --crimson-lt:   #C84830;
  --jade-lt:      #3A8040;

  /* Legacy aliases - used by inline HTML styles */
  --dark:         #1C1208;
  --dark2:        #2A1A0A;
  --dark3:        #3A2410;
  --dark4:        #140E06;
  --cream:        #F6EFE3;
  --cream2:       rgba(246,239,227,0.75);
  --cream3:       rgba(246,239,227,0.45);
  --cobalt:       #1A5AA0;
  --cobalt-lt:    #4A90D9;
  --jade:         #2E7D32;
  --terracotta:   #C0612B;
  --terracotta-lt:#E8845A;
  --purple:       #6A3DB8;
  --purple-lt:    #A47ED6;
}

/* -- RESET -- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--page);
  color: var(--ink);
  font-family: 'Cormorant Garamond', serif;
  overflow-x: hidden;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { text-decoration: none; }

/* Eliminate 300ms tap delay on all interactive elements */
a, button, [data-tab-target], [data-cart-open], [data-cart-close],
[data-add-to-cart], [data-cart-checkout], [data-cart-clear] {
  touch-action: manipulation;
}

/* -- TYPOGRAPHY -- */
.sec-label {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem !important;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--gold) !important;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.sec-label::before {
  content: '';
  display: block;
  width: 28px; height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}

.sec-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(2rem, 3.2vw, 3rem);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.sec-title em {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 0.88em;
  color: var(--gold) !important;
  letter-spacing: 0.01em;
}

.body-txt {
  font-size: 1rem;
  font-weight: 300;
  line-height: 2;
  color: var(--ink2);
  margin-bottom: 1.5rem;
}

/* -- BUTTONS -- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--ink);
  color: var(--cream);
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 1rem 2.4rem;
  transition: background 0.3s, transform 0.2s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { background: var(--gold); transform: translateY(-2px); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink2);
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--gold-line2);
  padding-bottom: 3px;
  transition: color 0.3s, border-color 0.3s;
  background: none;
  cursor: pointer;
}
.btn-ghost:hover { color: var(--gold); border-color: var(--gold); }

.view-all {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink3);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  transition: color 0.3s;
  border-bottom: 1px solid var(--gold-line);
  padding-bottom: 2px;
}
.view-all:hover { color: var(--gold); border-color: var(--gold); }

.link-arrow {
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: color 0.3s;
}
.link-arrow::after { content: '->'; }
.link-arrow:hover { color: var(--ink); }

/* ===
   NAVBAR
   === */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem clamp(1.5rem, 5vw, 4rem);
  background: var(--surface);
  border-bottom: 1px solid var(--gold-line);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 20px rgba(28,18,8,0.07);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  letter-spacing: 0.25em;
  color: var(--gold);       /* QORI = gold */
  font-weight: 400;
}
.logo span { color: #8A9EAE; font-weight: 600; }  /* SILVER = metallic silver */

/* Footer logo override - on dark bg */
.ft-brand .logo { color: #F4EDE2; }
.ft-brand .logo span { color: var(--gold-bright); }

/* Condor icon beside logo text */
.logo-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink2);
  transition: color 0.3s;
  position: relative;
  padding-bottom: 4px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.3s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }

.nav-cart {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--surface);
  background: var(--ink);
  padding: 0.65rem 1.5rem;
  font-weight: 700;
  transition: background 0.3s, transform 0.2s;
}
.nav-cart:hover { background: var(--gold); transform: translateY(-1px); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--gold-line2);
  color: var(--ink);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.35rem 0.65rem;
}

/* Groups hamburger (top) + cart (bottom) on mobile */
.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* ===
   HERO
   === */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--page);
}

/* Full-bleed background video */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  z-index: 0;
}

/* Parchment gradient overlay - opaque on left (text), clears on right (video) */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    108deg,
    rgba(246,239,227,0.97) 0%,
    rgba(246,239,227,0.93) 30%,
    rgba(246,239,227,0.78) 48%,
    rgba(246,239,227,0.48) 65%,
    rgba(246,239,227,0.22) 82%,
    rgba(246,239,227,0.10) 100%
  );
}

.hero-stripes { display: none; }

.hero-content {
  position: relative;
  z-index: 2;
  padding: 8rem clamp(1.5rem, 5vw, 4rem) 6rem;
  max-width: 580px;
}

/* Hide the SVG placeholder - real video is now the visual */
.hero-medallion { display: none; }

.eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 40px; height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}

h1 {
  font-family: 'Cinzel', serif;
  font-size: clamp(3rem, 6.5vw, 5.5rem);
  font-weight: 600;
  line-height: 1.04;
  color: var(--ink);
  letter-spacing: -0.02em;
}
h1 em {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.7rem, 3.5vw, 3rem);
  color: var(--gold);
  letter-spacing: 0.01em;
  line-height: 1.35;
  margin-top: 0.4rem;
}

.hero-desc {
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.95;
  color: var(--ink2);
  margin: 2rem 0 2.8rem;
  max-width: 440px;
}

.cta-row { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }

.hero-medallion {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  width: min(38vw, 420px);
  height: min(38vw, 420px);
  opacity: 0.10;
  pointer-events: none;
  filter: blur(0.5px);
}

/* ===
   TICKER
   === */
.ticker {
  display: flex;
  overflow: hidden;
  background: var(--ink);
  border-top: none;
  border-bottom: none;
}

.ticker-seg {
  flex: 1;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  border-right: 1px solid rgba(246,239,227,0.08);
}
.ticker-seg:last-child { border-right: none; }

.tick-dot {
  width: 4px !important;
  height: 4px !important;
  border-radius: 50% !important;
  background: var(--gold-bright) !important;
  flex-shrink: 0;
  transform: none !important;
}

.tick-label {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(246,239,227,0.80) !important;
  white-space: nowrap;
}

/* ===
   PAGE TABS
   === */
.page-tabs {
  display: flex;
  background: var(--surface);
  border-bottom: 2px solid var(--gold-line);
  position: sticky;
  top: 66px;
  z-index: 90;
  box-shadow: 0 2px 12px rgba(28,18,8,0.06);
}
.page-tab {
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink3);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 1.1rem 2.5rem;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s;
  margin-bottom: -2px;
}
.page-tab:hover { color: var(--ink); }
.page-tab.active { color: var(--gold); border-bottom-color: var(--gold); }

.tab-section { display: none; min-width: 0; }
.tab-section.active { display: block; min-width: 0; }

/* Shorten long tab label on small phones */
.tab-short { display: none; }
@media (max-width: 520px) {
  .tab-full { display: none; }
  .tab-short { display: inline; }
}

/* ===
   LIGHTBOX
   === */
.lightbox {
  display: none;
  position: fixed; inset: 0;
  background: rgba(28,18,8,0.92);
  z-index: 500;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: zoom-out;
}
.lightbox.open { display: flex; }

.lightbox-inner {
  position: relative;
  max-width: 90vw; max-height: 90vh;
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-img {
  max-width: 88vw; max-height: 88vh;
  object-fit: contain;
  display: block;
  box-shadow: 0 20px 80px rgba(0,0,0,0.6);
}
.lightbox-close {
  position: absolute;
  top: -2.8rem; right: 0;
  background: none;
  border: 1px solid rgba(244,237,226,0.3);
  color: rgba(244,237,226,0.85);
  font-size: 1.3rem;
  width: 38px; height: 38px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s, color 0.2s;
}
.lightbox-close:hover { border-color: rgba(244,237,226,0.7); color: #fff; }
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: rgba(244,237,226,0.12);
  border: 1px solid rgba(244,237,226,0.22);
  color: rgba(244,237,226,0.85);
  font-size: 1.8rem;
  width: 3.2rem; height: 3.2rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(244,237,226,0.22); }
.lightbox-prev { left: -4.5rem; }
.lightbox-next { right: -4.5rem; }

/* Product images show zoom cursor */
.piece-img img, .shop-img img { cursor: zoom-in; }
/* Placeholder SVG (no images): fill the container absolutely */
.piece-img > svg, .shop-img > svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ===
   FEATURED PIECES
   === */
.pieces {
  background: var(--page);
  padding: 7rem clamp(1.5rem, 5vw, 4rem);
}

.pieces-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 4rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--gold-line);
}

.pieces-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
  min-width: 0;
}

.pieces-grid > .piece {
  min-width: 0;
}

.piece { cursor: pointer; }

/* Product image frames match site parchment so letterboxing blends in */
.piece-img {
  background: var(--page);
  /* padding-top creates the aspect ratio - works on all browsers including iOS Safari.
     aspect-ratio on a block with only abs-positioned children collapses to 0 in Safari. */
  display: block;
  width: 100%;
  max-width: 100%;
  height: 0;
  padding-top: 100%; /* 1:1 square */
  margin-bottom: 1.4rem;
  overflow: hidden;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  position: relative;
  border: 1px solid var(--gold-line) !important;
  border-bottom: none !important;
  box-shadow: 0 2px 16px rgba(28,18,8,0.06);
  min-width: 0;
}
.piece:hover .piece-img {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(28,18,8,0.14);
  border-color: var(--gold-line2) !important;
}

.piece-cat {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem !important;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold) !important;
  margin-bottom: 0.45rem;
}

.piece-name {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
  line-height: 1.45;
}

.piece-price {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
}

.piece-mat {
  font-size: 0.78rem;
  font-weight: 300;
  color: var(--ink3);
  margin-top: 0.2rem;
}

.piece-photos {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.72rem;
  color: var(--ink3);
  opacity: 0.7;
  transition: opacity 0.2s;
}
.piece-photos:hover { opacity: 1; color: var(--gold); }

.piece-add {
  margin-top: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem 1rem;
  min-height: 46px;
  border: 1px solid var(--gold-line2);
  background: transparent;
  color: var(--ink2);
  font-family: 'Cinzel', serif;
  font-size: 0.63rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, color 0.25s;
}
.piece-add:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--cream);
}

.piece.is-soldout .piece-name,
.shop-card.is-soldout .piece-name,
.product-detail.is-soldout h1 { color: var(--ink3); }
.piece.is-soldout .piece-img,
.shop-card.is-soldout .piece-img,
.shop-card.is-soldout .shop-img,
.product-detail.is-soldout .product-detail__gallery { filter: saturate(0.5) brightness(0.9); }

.soldout-note {
  margin-top: 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink3);
  font-family: 'Cinzel', serif;
  font-size: 0.63rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.soldout-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--crimson-lt);
  box-shadow: 0 0 0 3px rgba(200,72,48,0.15);
}
.piece-add:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  border-color: rgba(200,72,48,0.25);
  color: var(--ink3);
}

/* ===
   STORY / ABOUT
   === */
.story {
  background: var(--surface2);
  padding: 7rem clamp(1.5rem, 5vw, 4rem);
  border-top: 1px solid var(--gold-line);
  border-bottom: 1px solid var(--gold-line);
}

.story-inner { max-width: 1160px; margin: 0 auto; min-width: 0; }

.story-grid {
  margin-top: 3.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
  min-width: 0;
}

.story-card {
  background: var(--surface);
  border: 1px solid var(--gold-line);
  padding: 2.5rem 2.2rem;
  transition: border-color 0.3s, box-shadow 0.3s;
  box-shadow: 0 2px 12px rgba(28,18,8,0.05);
  min-width: 0;
}
.story-card:hover {
  border-color: var(--gold-line2);
  box-shadow: 0 8px 30px rgba(28,18,8,0.10);
}

.story-card h3 {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--gold-line);
}

.story-card p {
  font-size: 0.97rem;
  font-weight: 300;
  line-height: 2.05;
  color: var(--ink2);
}
.story-card a { color: var(--gold); transition: color 0.2s; }
.story-card a:hover { color: var(--ink); }

/* ===
   LEGACY SECTIONS
   === */
.collections { background: var(--surface2); padding: 7rem clamp(1.5rem,5vw,4rem); }
.col-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 3.5rem; }
.col-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 1.5rem; min-width: 0; }
.col-card { position: relative; overflow: hidden; cursor: pointer; background: var(--surface); border: 1px solid var(--gold-line); min-width: 0; }
.col-card:hover .card-art { transform: scale(1.04); }
.col-card:hover .card-overlay { opacity: 1; }
.card-art { width: 100%; transition: transform 0.6s ease; display: flex; align-items: center; justify-content: center; }
.col-card.feat .card-art { aspect-ratio: 3/4.2; }
.col-card:not(.feat) .card-art { aspect-ratio: 3/3.8; }
.card-art svg { width: 100%; height: 100%; }
.card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(28,18,8,0.88) 0%, rgba(28,18,8,0.2) 55%, transparent 100%);
  opacity: 0.6; transition: opacity 0.4s;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 2rem;
}
.card-tag { font-size: 0.58rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold-bright); margin-bottom: 0.5rem; }
.card-name { font-family: 'Cinzel', serif; font-size: 1.3rem; font-weight: 600; color: #F6EFE3; margin-bottom: 0.3rem; }
.card-sub { font-size: 0.88rem; font-weight: 300; color: rgba(246,239,227,0.65); }
.card-btn { display: none; margin-top: 1rem; font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; border-bottom: 1px solid var(--gold-bright); padding-bottom: 2px; width: fit-content; color: var(--gold-bright); }
.col-card:hover .card-btn { display: block; }

.color-band { display: grid; grid-template-columns: repeat(6, 1fr); background: var(--surface3); }
.cb { padding: 3rem 1.5rem; display: flex; flex-direction: column; gap: 0.7rem; align-items: center; text-align: center; }
.cb-icon { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: 'Cinzel', serif; font-size: 0.62rem; letter-spacing: 0.1em; font-weight: 600; }
.cb-name { font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink2); }
.cb-price { font-size: 0.85rem; font-weight: 300; font-style: italic; color: var(--gold); }

.split { display: grid; grid-template-columns: 1fr 1fr; }
.split-visual { background: var(--surface2); display: flex; align-items: center; justify-content: center; padding: 4rem; min-height: 480px; border-right: 1px solid var(--gold-line); }
.split-text { background: var(--surface); padding: 6rem 5rem; display: flex; flex-direction: column; justify-content: center; }
blockquote { font-size: 1.4rem; font-style: italic; font-weight: 300; color: var(--ink); line-height: 1.85; margin: 1.8rem 0; padding-left: 1.6rem; border-left: 2px solid var(--gold); }

/* ===
   CART DRAWER
   === */
.muted { color: var(--ink3); }

.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(28,18,8,0.45);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 180;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed; top: 0; right: 0;
  height: 100dvh; width: min(420px, 92vw);
  background: var(--surface);
  border-left: 1px solid var(--gold-line2);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 200;          /* above navbar (100), tabs (90), everything */
  display: grid;
  grid-template-rows: auto 1fr auto;
  box-shadow: -4px 0 40px rgba(28,18,8,0.18);
  overflow: hidden;      /* nothing bleeds outside the drawer */
}
.cart-drawer.open { transform: translateX(0); }

/* Overlay must cover the entire viewport including the sticky navbar */
.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(28,18,8,0.45);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 199;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.cart-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem 1.5rem;
  border-bottom: 1px solid var(--gold-line);
}
.cart-title {
  font-family: 'Cinzel', serif;
  font-size: 0.82rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink);
  display: flex; align-items: center; gap: 0.8rem;
}
.cart-pill {
  background: var(--gold-dim);
  border: 1px solid var(--gold-line2);
  color: var(--gold);
  font-size: 0.68rem; padding: 0.12rem 0.55rem;
}
.cart-x {
  width: 38px; height: 38px;
  border: 1px solid var(--gold-line); background: transparent;
  color: var(--ink2); cursor: pointer; font-size: 1.2rem;
  transition: color 0.2s, border-color 0.2s;
}
.cart-x:hover { color: var(--ink); border-color: var(--gold); }

.cart-body { padding: 1.2rem 1.5rem; overflow: auto; }
.cart-items { display: grid; gap: 1rem; }

.cart-item {
  background: var(--page);
  border: 1px solid var(--gold-line);
  padding: 1rem 1rem;
  display: grid; gap: 0.8rem;
}
.cart-item-name { font-family: 'Cinzel', serif; font-size: 0.85rem; letter-spacing: 0.08em; color: var(--ink); }
.cart-item-meta { font-size: 0.85rem; color: var(--ink3); }
.cart-item-controls { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.qty-btn {
  width: 36px; height: 36px;
  border: 1px solid var(--gold-line); background: transparent;
  color: var(--ink); cursor: pointer; font-size: 1rem;
  transition: border-color 0.2s;
}
.qty-btn:hover { border-color: var(--gold); }
.qty { min-width: 20px; text-align: center; color: var(--gold); font-style: italic; }
.remove-btn {
  margin-left: auto; border: none; background: transparent;
  color: var(--ink3); cursor: pointer;
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.6rem;
  transition: color 0.2s;
}
.remove-btn:hover { color: var(--crimson-lt); }

.cart-empty { padding: 2rem 0; }
.cart-empty-title { font-family: 'Cinzel', serif; letter-spacing: 0.1em; margin-bottom: 0.5rem; color: var(--ink); }
.cart-empty-sub { color: var(--ink3); font-size: 0.92rem; }

.cart-foot {
  border-top: 1px solid var(--gold-line);
  padding: 1.2rem 1.5rem 1.5rem;
  display: grid; gap: 1rem;
}
.cart-row { display: flex; justify-content: space-between; align-items: center; }
.cart-actions { display: flex; gap: 0.8rem; align-items: center; justify-content: space-between; }
.cart-actions .btn-primary { width: 100%; justify-content: center; }
.cart-clear { border-bottom: none; color: var(--ink3); }
.cart-clear:hover { color: var(--ink2); }

.stripe-mode-badge {
  font-size: 0.6rem; letter-spacing: 0.15em; text-transform: uppercase;
  font-family: 'Cinzel', serif;
  border: 1px solid var(--gold-line); padding: 0.4rem 0.6rem;
  width: fit-content; color: var(--ink3);
}
.stripe-mode-badge.is-test { color: var(--crimson-lt); border-color: rgba(200,72,48,0.35); background: rgba(200,72,48,0.06); }
.stripe-mode-badge.is-live { color: var(--jade-lt); border-color: rgba(58,128,64,0.35); background: rgba(58,128,64,0.06); }

/* ===
   CHECKOUT MODAL
   === */
.checkout-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(28,18,8,0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem; z-index: 300;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.checkout-modal { width: min(560px, 96vw); background: var(--surface); border: 1px solid var(--gold-line2); box-shadow: 0 20px 60px rgba(28,18,8,0.20); }
.checkout-modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.3rem 1.5rem;
  border-bottom: 1px solid var(--gold-line);
}
.checkout-modal-title { font-family: 'Cinzel', serif; font-size: 0.85rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink); }
.checkout-close {
  width: 38px; height: 38px;
  border: 1px solid var(--gold-line); background: transparent;
  color: var(--ink2); cursor: pointer; font-size: 1.2rem;
  transition: border-color 0.2s, color 0.2s;
}
.checkout-close:hover { border-color: var(--gold); color: var(--ink); }
.checkout-modal-body { padding: 1.5rem; }
.checkout-total {
  margin-top: 0.8rem;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.9rem 1rem;
  border: 1px solid var(--gold-line);
  background: var(--page);
}
.checkout-fields { margin-top: 1.2rem; display: grid; gap: 0.9rem; }
.checkout-fields label { display: grid; gap: 0.4rem; font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink3); }
.checkout-fields input {
  padding: 0.82rem 0.9rem;
  background: var(--page);
  border: 1px solid var(--gold-line);
  color: var(--ink); outline: none;
  font-size: 16px; font-family: 'Cormorant Garamond', serif;
  transition: border-color 0.2s;
}
.checkout-fields input:focus { border-color: var(--gold); }
.checkout-cta { margin-top: 1.3rem; width: 100%; justify-content: center; }
.checkout-note { margin-top: 0.8rem; color: var(--ink3); font-size: 0.9rem; }

/* ===
   SHOP PAGE
   === */
.shop-hero {
  background: var(--surface2);
  padding: 6rem clamp(1.5rem,5vw,4rem) 3rem;
  border-bottom: 1px solid var(--gold-line);
}

.shop {
  background: var(--page);
  padding: 4rem clamp(1.5rem,5vw,4rem) 7rem;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.2rem;
  max-width: 1200px;
  margin: 0 auto;
  min-width: 0;
}

.shop-card {
  background: var(--surface);
  border: 1px solid var(--gold-line);
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
  box-shadow: 0 2px 12px rgba(28,18,8,0.05);
  min-width: 0;
}
.shop-card:hover {
  border-color: var(--gold-line2);
  box-shadow: 0 8px 30px rgba(28,18,8,0.10);
}

.shop-img {
  background: var(--page);
  display: block;
  width: 100%;
  max-width: 100%;
  height: 0;
  padding-top: 100%; /* 1:1 - same padding-top technique as .piece-img */
  position: relative;
  overflow: hidden;
  min-width: 0;
}

/* -- CAROUSEL -- */
.shop-img[data-carousel],
.piece-img[data-carousel] {
  display: block;
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
/* Track: absolutely positioned - its height = piece-img height.
   NO overflow:hidden here - when the track transforms, its clip rect moves
   with it, making slides 2+ permanently invisible. piece-img clips instead. */
.shop-img[data-carousel] > .carousel-track,
.piece-img[data-carousel] > .carousel-track {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
}
/* Track itself: flex row of slides */
.carousel-track {
  display: flex;
  width: 100%;
  height: 100%; /* = track's absolute height = piece-img height */
  transition: transform 0.38s ease;
  will-change: transform;
}
/* Slides: absolutely positioned so height comes directly from top:0/bottom:0,
   not from flex percentage resolution (which is buggy on iOS Safari).
   left:N*100% is set inline per-slide in products.js. */
.carousel-slide {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
  overflow: hidden;
}
/* Images: scale to show the full photo inside the frame (no cropping). */
.carousel-slide img,
.shop-img > img,
.piece-img > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.carousel-prev,
.carousel-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 2;
  background: rgba(246,239,227,0.88);
  border: 1px solid var(--gold-line2);
  color: var(--ink);
  font-size: 1.3rem; line-height: 1;
  width: 2.4rem; height: 2.4rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s;
  touch-action: manipulation;
}
.shop-img:hover .carousel-prev,
.shop-img:hover .carousel-next,
.piece-img:hover .carousel-prev,
.piece-img:hover .carousel-next { opacity: 1; }
.carousel-prev { left: 0; }
.carousel-next { right: 0; }

.carousel-dots {
  position: absolute; bottom: 0.65rem; left: 50%; transform: translateX(-50%);
  z-index: 2; display: flex; gap: 0.4rem;
}
.carousel-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(28,18,8,0.2); border: none; cursor: pointer; padding: 0; transition: background 0.2s; }
.carousel-dot.active { background: var(--gold); }

@media (hover: none) and (pointer: coarse) {
  .carousel-prev, .carousel-next { opacity: 0.88; width: 2.8rem; height: 2.8rem; font-size: 1.4rem; }
}

.shop-meta { padding: 1.5rem 1.4rem 1.8rem; }

/* ===
   SEO - breadcrumbs, product detail pages, visible brand line
   === */
.hero-brand-line {
  font-family: 'Cinzel', serif;
  font-size: clamp(0.62rem, 1.4vw, 0.72rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.breadcrumbs {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.88rem;
  color: var(--ink3);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}
.breadcrumbs a {
  color: var(--teal);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.breadcrumbs a:hover { color: var(--ink); border-bottom-color: var(--gold-line2); }
.breadcrumbs span[aria-current="page"] { color: var(--ink2); font-weight: 500; }

.piece-name a,
a.piece-name-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--gold-line);
  transition: color 0.2s, border-color 0.2s;
}
.piece-name a:hover,
a.piece-name-link:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.shop-hero-intro,
.collection-seo-intro {
  max-width: 760px;
  margin-top: 1rem;
  font-size: 1.02rem;
  font-weight: 300;
  line-height: 1.85;
  color: var(--ink2);
}

.product-detail {
  background: var(--page);
  padding: 2rem clamp(1.2rem, 4vw, 4rem) 5rem;
  max-width: 1100px;
  margin: 0 auto;
}
.product-detail__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  min-width: 0;
}
.product-detail__gallery .piece-img {
  margin-bottom: 0;
  max-width: 100%;
}
.product-detail__body h1 {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 0.6rem;
}
.product-detail__meta {
  font-size: 0.82rem;
  color: var(--ink3);
  margin-bottom: 1.25rem;
}
.product-detail__price {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem;
  font-style: italic;
  color: var(--gold);
  margin-bottom: 1rem;
}
.product-detail__intro {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.9;
  color: var(--ink2);
  margin-bottom: 1.5rem;
}
.product-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.product-detail__back {
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink3);
  border-bottom: 1px solid var(--gold-line);
  padding-bottom: 2px;
}
.product-detail__back:hover { color: var(--gold); }

@media (max-width: 768px) {
  .product-detail__grid {
    grid-template-columns: 1fr;
  }
}

/* ===
   FOOTER - dark contrast base (classic premium pattern)
   === */
footer {
  background: var(--footer-bg);
  padding: 5.5rem clamp(1.5rem,5vw,4rem) 2.5rem;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 3rem;
}

.ft-brand .logo {
  display: flex;
  margin-bottom: 1.1rem;
  font-size: 1.15rem;
  color: #F6EFE3;
}
.ft-brand .logo span { color: var(--gold-bright); }
.ft-brand .logo-mark { opacity: 0.75; }

.ft-tag {
  font-size: 0.85rem; font-weight: 300; font-style: italic;
  color: var(--footer-text); max-width: 210px; line-height: 1.8;
}

.ft-col h4 {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--footer-head); margin-bottom: 1.3rem;
}

.ft-col ul { list-style: none; }
.ft-col li { margin-bottom: 0.65rem; }
.ft-col a {
  font-size: 0.85rem; font-weight: 300;
  color: var(--footer-text); transition: color 0.25s;
}
.ft-col a:hover { color: #F6EFE3; }

.ft-bottom {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(246,239,227,0.08);
  padding-top: 1.6rem; margin-top: 0.5rem;
  display: flex; justify-content: space-between; align-items: center;
}
.ft-copy { font-size: 0.72rem; font-weight: 300; color: rgba(246,239,227,0.22); }
.ft-copy.accent { color: rgba(184,146,42,0.4); }

/* ===
   RESPONSIVE - 1024px
   === */
@media (max-width: 1024px) {
  .col-grid { grid-template-columns: 1fr 1fr; }
  .col-card.feat { grid-column: 1 / -1; }
  .col-card.feat .card-art { aspect-ratio: 16/7; }
  .pieces-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
  .color-band { grid-template-columns: repeat(3, 1fr); }
  .hero-medallion { width: min(32vw, 320px); height: min(32vw, 320px); }
  .story-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===
   RESPONSIVE - 768px
   === */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface);
    padding: 1.8rem clamp(1.5rem,5vw,4rem);
    gap: 1.4rem;
    border-bottom: 1px solid var(--gold-line);
    box-shadow: 0 8px 24px rgba(28,18,8,0.10);
  }
  .nav-toggle { display: flex; align-items: center; justify-content: center; }

  /* -- Navbar mobile: logo left, nav-right stacked on right -- */
  .navbar { justify-content: flex-start; padding: 0.75rem 1rem; }
  .nav-right {
    margin-left: auto;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
  }
  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    padding: 0.2rem 0.45rem;
  }
  .nav-cart {
    font-size: 0.52rem;
    padding: 0.22rem 0.6rem;
    letter-spacing: 0.1em;
    transform: none !important; /* no lift on mobile - stays in navbar */
  }

  /* -- Hero: static Machu Picchu image replaces video -- */
  .hero-video { display: none; }
  .hero {
    background: var(--page)
      url('https://images.pexels.com/photos/28935309/pexels-photo-28935309.jpeg?auto=compress&cs=tinysrgb&w=800')
      center 30% / cover no-repeat;
    min-height: 80vh;
  }
  .hero-bg {
    background: linear-gradient(
      to bottom,
      rgba(246,239,227,0.90) 0%,
      rgba(246,239,227,0.78) 45%,
      rgba(246,239,227,0.90) 100%
    );
  }
  .hero-content { max-width: 100%; padding: 3.5rem clamp(1.5rem,5vw,4rem) 3rem; }
  h1 { font-size: clamp(2.8rem, 8vw, 4.5rem); }

  .page-tabs { top: 58px; }
  .page-tab { padding: 1rem 1.5rem; font-size: 0.62rem; }
  .lightbox-prev { left: -2.5rem; }
  .lightbox-next { right: -2.5rem; }
  .ticker { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .ticker::-webkit-scrollbar { display: none; }
  .ticker-seg { flex: 0 0 auto; min-width: max-content; }

  .pieces { padding: 5rem clamp(1.2rem,4vw,2rem); }
  .story { padding: 5rem clamp(1.2rem,4vw,2rem); }
  .shop-hero { padding: 5rem clamp(1.2rem,4vw,2rem) 2.5rem; }

  .pieces-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .story-grid { grid-template-columns: 1fr; gap: 1.2rem; }
  .col-grid { grid-template-columns: 1fr; }
  .col-card.feat .card-art { aspect-ratio: 4/3; }
  .color-band { grid-template-columns: repeat(2, 1fr); }
  .shop-grid { grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }

  .split { grid-template-columns: 1fr; }
  .split-visual { min-height: 280px; padding: 2.5rem; border-right: none; border-bottom: 1px solid var(--gold-line); }
  .split-text { padding: 3.5rem clamp(1.5rem,4vw,2.5rem); }

  .cart-drawer { width: min(460px, 100vw); }
  .cart-actions { flex-direction: column; }
  .cart-actions .btn-ghost, .cart-actions .btn-primary { width: 100%; justify-content: center; }
  .checkout-modal-overlay { align-items: flex-end; padding: 0.75rem; }
  .checkout-modal { width: min(560px, 100%); max-height: calc(100dvh - 1.5rem); overflow: auto; }
  .checkout-fields input { font-size: 16px; }

  footer { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .ft-brand { grid-column: 1 / -1; }
}

/* ===
   RESPONSIVE - 480px
   === */
@media (max-width: 480px) {
  h1 { font-size: clamp(2.4rem, 10vw, 3.2rem); }
  h1 em { font-size: clamp(1.4rem, 5.5vw, 1.9rem); }
  .hero { min-height: 70vh; }
  .hero-content { padding: 2.5rem 1.2rem 2.5rem; }
  .hero-desc { font-size: 1rem; }
  .cta-row { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .btn-primary, .btn-ghost { width: 100%; justify-content: center; }
  /* Lightbox arrows: move inside image so they're not cut off */
  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
  .lightbox-inner { max-width: 100vw; }

  .pieces { padding: 4rem 1.2rem; }
  .pieces-grid { grid-template-columns: 1fr; gap: 2rem; }
  /* Explicit height avoids padding-top % chain which Safari resolves unreliably.
     (100vw - 2.4rem) = card width on 1-column grid; 1.25 = 4:5 portrait ratio. */
  .piece-img { height: calc((100vw - 2.4rem) * 1.25); padding-top: 0; }
  .piece-add { min-height: 50px; font-size: 0.65rem; padding: 1rem; }

  .shop-grid { grid-template-columns: 1fr; }
  .shop-hero { padding: 5rem 1.2rem 2rem; }
  .shop { padding: 2.5rem 1.2rem 5rem; }

  .story { padding: 4rem 1.2rem; }
  .ticker-seg { padding: 1rem 1.5rem; }

  .cart-head, .cart-body, .cart-foot { padding-left: 1rem; padding-right: 1rem; }
  .cart-item-controls { gap: 0.5rem; }
  .qty-btn { width: 44px; height: 44px; }
  .checkout-modal-head { padding: 1rem 1.1rem; }
  .checkout-modal-body { padding: 1.1rem; }

  footer { grid-template-columns: 1fr; gap: 2rem; padding: 4rem 1.2rem 2rem; }
  .ft-bottom { flex-direction: column; gap: 0.6rem; text-align: center; }
  .color-band { grid-template-columns: repeat(2, 1fr); }
}
