/* ============================================================
   TEIMOOR JAAFAR · shop.css
   The Collection: editorial asymmetric wall, filter toolbar,
   dark sourcing panel, assurance strip, sell band.
   ============================================================ */

/* ---------- utilities ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- 1. PAGE HERO ---------- */
.shop-hero__meta {
  margin-top: clamp(20px, 2.6vw, 32px);
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--muted); font-variant-numeric: tabular-nums;
}
.shop-hero__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(10, 186, 181, 0.10);
  flex: 0 0 auto;
}

/* ---------- 2. TOOLBAR ---------- */
.toolbar {
  background: var(--ink);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.toolbar__inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(16px, 2vw, 24px) var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px 32px; flex-wrap: wrap;
}
.toolbar__filters { display: flex; gap: 10px; flex-wrap: wrap; }

.chip {
  font-size: 12.5px; letter-spacing: 0.02em; color: var(--bone-2);
  border: 1px solid var(--line); border-radius: 100px;
  padding: 9px 20px;
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.chip:hover { border-color: var(--accent); color: var(--accent-deep); }
.chip.is-active { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.chip.is-active:hover { color: var(--ink); }

.toolbar__right {
  display: flex; align-items: center; gap: clamp(18px, 3vw, 36px);
  margin-left: auto;
}
.toolbar__count {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.toolbar__sort { display: inline-flex; align-items: center; gap: 12px; }
.toolbar__sort > span {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
}
.toolbar__sort select {
  appearance: none; -webkit-appearance: none;
  background-color: transparent;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%237C7468' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
  border: 1px solid var(--line); border-radius: 100px;
  padding: 9px 38px 9px 18px;
  font-size: 12.5px; letter-spacing: 0.02em; color: var(--bone);
  cursor: pointer;
  transition: border-color .35s var(--ease);
}
.toolbar__sort select:hover { border-color: var(--accent); }
@media (pointer: coarse) {
  /* 16px stops iOS zooming the page when the select is focused */
  .toolbar__sort select { font-size: 16px; }
}

/* ---------- 3. THE COLLECTION WALL ---------- */
.wall-sec {
  position: relative;
  padding: clamp(64px, 9vw, 140px) 0 clamp(96px, 13vw, 200px);
}
.wall {
  max-width: var(--maxw); margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid; grid-template-columns: 1fr;
  row-gap: clamp(56px, 12vw, 90px);
}

/* tile anatomy */
.wall__tile { position: relative; min-width: 0; }

.wall__frame {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 4 / 5;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 3px;
}
.wall__photo {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: clamp(18px, 3vw, 46px);
  transition: transform 1.6s var(--ease);
}

/* the "lift off the tray" layer: cutout floating on ivory */
.wall__lift {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center;
  background: var(--ink);
  opacity: 0;
  transition: opacity .65s var(--ease);
  pointer-events: none;
}
.wall__cut {
  position: relative; z-index: 2;
  height: 82%; width: auto;
  transform: translateY(14px) scale(0.97);
  transition: transform 1.1s var(--ease);
  filter: drop-shadow(0 22px 20px rgba(26, 20, 10, 0.16));
}
.wall__lift-shadow {
  position: absolute; z-index: 1;
  left: 50%; bottom: 7%;
  width: 52%; height: 7%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(26, 20, 10, 0.30), transparent 68%);
  filter: blur(6px);
  transform: translateX(-50%) scale(0.72);
  opacity: 0;
  transition: transform 1.1s var(--ease), opacity .8s var(--ease);
}

/* meta: roman numeral + hairline + maison, then model / ref / buy row */
.wall__meta { padding-top: 18px; transition: opacity .5s var(--ease); }
.wall__rule { display: flex; align-items: center; gap: 14px; }
.wall__no {
  font-family: var(--serif); font-style: italic;
  font-size: 15px; color: var(--gold);
  min-width: 1.5em; flex: 0 0 auto;
}
.wall__hair { flex: 1 1 auto; height: 1px; background: var(--line); }
.wall__maison {
  font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted); flex: 0 0 auto;
}
.wall__model {
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.08; letter-spacing: -0.015em;
  margin: 14px 0 6px; font-weight: 400;
}
.wall__model a { transition: opacity .35s var(--ease); }
.wall__model a:hover { opacity: 0.68; }
.wall__ref {
  font-size: 12px; letter-spacing: 0.05em;
  color: var(--muted-2); font-variant-numeric: tabular-nums;
}
.wall__buy {
  margin-top: 14px;
  display: flex; align-items: baseline; justify-content: space-between; gap: 18px;
}
.wall__price {
  font-family: var(--serif);
  font-size: clamp(17px, 1.7vw, 22px);
  color: var(--bone); font-variant-numeric: tabular-nums;
}
.wall__view {
  position: relative; flex: 0 0 auto;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--bone); padding: 4px 0;
}
.wall__view::before {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--line);
}
.wall__view::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--ease);
}
.wall__view:hover::after,
.wall__view:focus-visible::after { transform: scaleX(1); transform-origin: left; }

/* hover lift (fine pointers only): studio JPG zooms while the
   cutout crossfades in, floating over ivory with a contact shadow */
@media (hover: hover) and (pointer: fine) {
  .wall__frame:hover .wall__photo { transform: scale(1.06); }
  .wall__frame:hover .wall__lift { opacity: 1; }
  .wall__frame:hover .wall__cut { transform: translateY(0) scale(1); }
  .wall__frame:hover .wall__lift-shadow { transform: translateX(-50%) scale(1); opacity: 1; }
  /* caption and price only fade slightly; text never moves */
  .wall__frame:hover + .wall__meta { opacity: 0.72; }
}
/* keyboard parity, any device */
.wall__frame:focus-visible .wall__photo { transform: scale(1.06); }
.wall__frame:focus-visible .wall__lift { opacity: 1; }
.wall__frame:focus-visible .wall__cut { transform: translateY(0) scale(1); }
.wall__frame:focus-visible .wall__lift-shadow { transform: translateX(-50%) scale(1); opacity: 1; }

/* ---- editorial asymmetric layout (desktop) ---- */
@media (min-width: 640px) and (max-width: 899px) {
  .wall { grid-template-columns: 1fr 1fr; column-gap: clamp(18px, 3vw, 32px); row-gap: clamp(48px, 8vw, 72px); }
  .wall__tile:nth-child(even) { margin-top: clamp(36px, 7vw, 64px); }
}
@media (min-width: 900px) {
  .wall {
    grid-template-columns: repeat(12, 1fr);
    column-gap: clamp(20px, 3vw, 48px);
    row-gap: clamp(90px, 10vw, 170px);
  }
  .wall__tile:nth-child(4n + 1) { grid-column: 1 / span 7; }
  .wall__tile:nth-child(4n + 2) { grid-column: 9 / span 4; margin-top: clamp(70px, 9vw, 150px); }
  .wall__tile:nth-child(4n + 3) { grid-column: 2 / span 5; }
  .wall__tile:nth-child(4n + 4) { grid-column: 8 / span 5; margin-top: clamp(48px, 6vw, 110px); }

  .wall__tile:nth-child(4n + 1) .wall__frame { aspect-ratio: 5 / 4; }
  .wall__tile:nth-child(4n + 2) .wall__frame { aspect-ratio: 3 / 4; }
  .wall__tile:nth-child(4n + 3) .wall__frame { aspect-ratio: 3 / 4; }
  .wall__tile:nth-child(4n + 4) .wall__frame { aspect-ratio: 5 / 4; }
}

/* ---- JS-driven entrance pre-states ----
   Applied ONLY once shop.js arms the wall (motion allowed, GSAP loaded),
   so no-JS and reduced-motion users always see everything. */
html.js .wall.is-armed .wall__tile:not(.is-revealed) .wall__frame { clip-path: inset(12% 8% 12% 8%); }
html.js .wall.is-armed .wall__tile:not(.is-revealed) .wall__photo { transform: scale(1.12); }
html.js .wall.is-armed .wall__tile:not(.is-revealed) .wall__meta { opacity: 0; transform: translateY(16px); }
/* mute CSS transitions while GSAP owns these properties */
html.js .wall.is-armed .wall__tile:not(.is-live) .wall__photo,
html.js .wall.is-armed .wall__tile:not(.is-live) .wall__meta { transition: none; }

@media (prefers-reduced-motion: reduce) {
  html.js .wall.is-armed .wall__tile:not(.is-revealed) .wall__frame { clip-path: none !important; }
  html.js .wall.is-armed .wall__tile:not(.is-revealed) .wall__photo { transform: none !important; }
  html.js .wall.is-armed .wall__tile:not(.is-revealed) .wall__meta { opacity: 1 !important; transform: none !important; }
}

/* ---------- 4. SEEKING (dark sourcing panel) ---------- */
.seeking {
  position: relative; overflow: hidden;
  background: #14171A;
  padding: clamp(88px, 12vw, 180px) 0;
}
.seeking__inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid; grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(44px, 7vw, 110px); align-items: center;
}
.seeking .eyebrow { color: var(--tiffany-soft); }
.seeking h2 {
  color: #fff;
  font-size: clamp(30px, 4.6vw, 64px);
  max-width: 15ch; line-height: 1.06;
}
.seeking .word--em { color: var(--tiffany-soft); }
.seeking__copy > p:last-child {
  margin-top: 26px;
  color: rgba(255, 255, 255, 0.76);
  max-width: 44ch;
  font-size: clamp(15px, 1.2vw, 17px); line-height: 1.7;
}
.seeking__act {
  display: flex; flex-direction: column; align-items: flex-start; gap: 16px;
}
.seeking__act .btn { width: min(100%, 320px); }

/* buttons tuned for the dark panel */
.btn--ivory { background: var(--ink); color: var(--bone); }
.btn--ivory::before { background: var(--accent); }
.btn--ivory:hover { color: #05332F; }

.btn--ghostdark { border: 1px solid rgba(255, 255, 255, 0.26); color: #fff; }
.btn--ghostdark::before { background: #fff; }
.btn--ghostdark:hover { color: #14171A; border-color: #fff; }

.seeking__wa {
  position: relative; margin-top: 8px; padding: 4px 0;
  font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.58);
  transition: color .4s var(--ease);
}
.seeking__wa::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--ease);
}
.seeking__wa:hover { color: #fff; }
.seeking__wa:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- 5. ASSURANCE STRIP ---------- */
.assure {
  background: #fff;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: clamp(76px, 10vw, 140px) 0;
}
.assure__inner { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.assure__title {
  font-size: clamp(26px, 3.6vw, 52px);
  max-width: 24ch;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.assure__rows { list-style: none; padding: 0; margin: 0; }
.assure__row {
  display: grid; grid-template-columns: 64px 0.9fr 1.4fr;
  gap: clamp(16px, 3vw, 56px); align-items: baseline;
  padding: clamp(22px, 3vw, 34px) 0;
  border-top: 1px solid var(--line);
}
.assure__row:last-child { border-bottom: 1px solid var(--line); }
.assure__no {
  font-family: var(--serif); font-size: 14px;
  color: var(--tiffany-deep); font-variant-numeric: tabular-nums;
}
.assure__row h3 {
  font-family: var(--sans); font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--bone);
}
.assure__row p { color: var(--muted); font-size: 15px; line-height: 1.65; max-width: 58ch; }

/* ---------- 6. SELL BAND ---------- */
.sellband { background: var(--ink-2); border-top: 1px solid var(--line-soft); }
.sellband__inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(52px, 7vw, 92px) var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  gap: 26px 44px; flex-wrap: wrap;
}
.sellband .eyebrow { margin-bottom: 16px; }
.sellband__title {
  font-size: clamp(24px, 3.4vw, 46px);
  max-width: 24ch; line-height: 1.12;
}

/* ---------- 7. RESPONSIVE ---------- */
@media (max-width: 900px) {
  .seeking__inner { grid-template-columns: 1fr; gap: clamp(36px, 8vw, 56px); }
}
@media (max-width: 768px) {
  .toolbar__inner { align-items: flex-start; }
  .toolbar__right { margin-left: 0; width: 100%; justify-content: space-between; }
}
@media (max-width: 700px) {
  .assure__row { grid-template-columns: 44px 1fr; row-gap: 8px; }
  .assure__row p { grid-column: 2; }
  .sellband__inner { flex-direction: column; align-items: flex-start; }
}

/* ---- wall counter: fixed Roman readout (desktop, motion-OK only) ---- */
.wall-counter {
  position: fixed; left: clamp(20px, 4vw, 56px); bottom: 30px; z-index: 30;
  display: flex; align-items: baseline; gap: 12px;
  font-family: var(--serif); color: var(--muted);
  font-variant-numeric: tabular-nums;
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.wall-counter.is-on { opacity: 1; transform: translateY(0); }
.wall-counter__cur { font-size: 20px; color: var(--bone); }
.wall-counter__sep { width: 26px; height: 1px; background: var(--gold); align-self: center; }
.wall-counter__total { font-size: 14px; }
@media (max-width: 1099px) { .wall-counter { display: none; } }

/* ============================================================
   SANDS RETHEME — centered collection hero + uniform grid
   ============================================================ */
.cpage-hero {
  max-width: 960px; margin: 0 auto; text-align: center;
  padding: clamp(120px, 16vh, 184px) var(--gutter) 0;
}
.crumbs--center { justify-content: center; }
.cpage-hero__title { font-size: clamp(42px, 7vw, 88px); font-weight: 600; letter-spacing: -0.02em; }
.cpage-hero__figure {
  max-width: min(780px, 100%); margin: clamp(26px, 4vw, 46px) auto 0;
  border-radius: 6px; overflow: hidden; aspect-ratio: 7 / 5; background: var(--ink-card);
}
.cpage-hero__figure img { width: 100%; height: 100%; object-fit: cover; }
.cpage-intro { max-width: 680px; margin: 0 auto; padding: clamp(26px, 4vw, 44px) var(--gutter) clamp(10px, 2vw, 20px); text-align: center; }
.cpage-intro h2 { font-size: clamp(20px, 2.6vw, 30px); margin-bottom: 12px; }
.cpage-intro p { color: var(--bone-2); font-size: 15px; line-height: 1.75; }

.grid-sec { padding: clamp(10px, 2vw, 24px) 0 clamp(48px, 6vw, 90px); }
.shop-grid { row-gap: clamp(34px, 4vw, 54px); }
