/* ============================================
   Astrolaabh · The Vault - stone catalogue
   Self-contained: own tokens, header, filters, grid.
   ============================================ */
:root {
  --bone: #f1efe8;
  --paper: #f6f4ec;
  --ink-dark: #20251a;
  --ink: #ece7da;
  --gold: #a1793a;
  --gold-bright: #c9a24b;
  --sage: #5b634a;
  --madder: #b23a2a;
  --hair: rgba(32, 37, 26, 0.12);
  --hair-gold: rgba(161, 121, 58, 0.28);
  --font-display: "Sesbania", "Manrope", "Avenir Next", -apple-system, sans-serif;
  --font-ui: "Geist", "Avenir Next", -apple-system, sans-serif;
  --pad-x: clamp(1.25rem, 5vw, 4.5rem);
  --nav-h: 74px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bone);
  color: var(--ink-dark);
  font-family: var(--font-ui);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }

/* ============ Page head (dark banner over the hero video) ============ */
.vault-head {
  position: relative;
  overflow: hidden;
  background: #171b12;
  padding: clamp(3.5rem, 9vh, 7rem) var(--pad-x) clamp(3rem, 6vh, 4.5rem);
}
.vault-head-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
/* darken only the left and right edges; keep the centre clear so the video gems show through */
.vault-head-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(20, 24, 16, 0.9) 0%, rgba(20, 24, 16, 0.35) 20%, transparent 40%, transparent 60%, rgba(20, 24, 16, 0.35) 80%, rgba(20, 24, 16, 0.9) 100%),
    linear-gradient(0deg, rgba(20, 24, 16, 0.12), transparent 45%);
}
.vault-head-inner { position: relative; z-index: 2; }
.vault-head-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem 4rem;
  flex-wrap: wrap;
  max-width: 1600px;
  margin: 0 auto;
}
.vault-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--font-ui);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin: 0 0 1.25rem;
}
.vault-eyebrow::before {
  content: "";
  width: 2.5rem;
  height: 1px;
  background: rgba(201, 162, 75, 0.5);
}
.vault-head h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.4rem, 4.6vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: 0.005em;
  color: var(--ink);
  margin: 0;
}
.vault-head-aside {
  max-width: 21rem;
  padding-bottom: 0.35rem;
}
.vault-note {
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: rgba(236, 231, 218, 0.72);
  margin: 0 0 1.4rem;
}
.vault-head-links {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  align-items: flex-start;
}
.vault-head-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid rgba(236, 231, 218, 0.35);
  transition: color 0.2s ease, border-color 0.2s ease, gap 0.25s var(--ease);
}
.vault-head-links a i { font-size: 0.8em; color: var(--gold-bright); }
.vault-head-links a:hover { color: var(--gold-bright); border-color: var(--gold-bright); gap: 0.8rem; }

/* ============ Sticky top filter bar ============ */
.vault-toolbar {
  position: sticky;
  top: var(--nav-h);
  z-index: 40;
  background: rgba(241, 239, 232, 0.85);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}
.tb-inner {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 1.5vw, 1.5rem);
  max-width: 1600px;
  margin: 0 auto;
  padding: 0.8rem var(--pad-x);
}
.tb-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex: 1 1 auto;
  min-width: 0;
}
.tb-right {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-left: auto;
  flex: none;
}

/* dropdown trigger + popover */
.tb-drop { position: relative; }
.tb-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 38px;
  padding: 0 0.95rem;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: rgba(246, 244, 236, 0.5);
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  color: var(--ink-dark);
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.tb-trigger i {
  font-size: 0.7rem;
  color: rgba(32, 37, 26, 0.5);
  transition: transform 0.3s var(--ease);
}
.tb-trigger:hover { border-color: var(--hair-gold); }
.tb-trigger:focus-visible { outline: 2px solid rgba(161, 121, 58, 0.4); outline-offset: 2px; }
.tb-drop.open .tb-trigger { border-color: var(--gold); }
.tb-drop.open .tb-trigger i { transform: rotate(180deg); }
.tb-drop.is-set .tb-trigger {
  border-color: var(--gold);
  background: rgba(161, 121, 58, 0.08);
  color: var(--gold);
}
.tb-drop.is-set .tb-trigger i { color: var(--gold); }

.tb-pop {
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 0;
  z-index: 30;
  min-width: 200px;
  background: var(--paper);
  border: 1px solid var(--hair-gold);
  border-radius: 8px;
  padding: 0.5rem;
  box-shadow: 0 24px 50px -24px rgba(32, 37, 26, 0.5);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.3s var(--ease);
}
.tb-drop.open .tb-pop { opacity: 1; transform: none; pointer-events: auto; }
.tb-drop--right .tb-pop { left: auto; right: 0; }
.tb-pop-range { min-width: 264px; padding: 1.1rem 1.1rem 0.95rem; }

.tb-opt {
  display: block;
  width: 100%;
  text-align: left;
  background: none; border: 0; cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 300;
  color: rgba(32, 37, 26, 0.72);
  padding: 0.5rem 0.7rem;
  border-radius: 5px;
  transition: background 0.18s ease, color 0.18s ease;
}
.tb-opt:hover { background: rgba(161, 121, 58, 0.08); color: var(--ink-dark); }
.tb-opt.is-active { color: var(--ink-dark); font-weight: 400; }

/* multi-select groups: a real checkbox square before each option */
.tb-drop:not([data-drop="sort"]) .tb-opt {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.tb-drop:not([data-drop="sort"]) .tb-opt::before {
  content: "";
  flex: none;
  width: 17px; height: 17px;
  border-radius: 4px;
  border: 1px solid rgba(161, 121, 58, 0.5);
  background: transparent center / 11px no-repeat;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}
.tb-drop:not([data-drop="sort"]) .tb-opt.is-active::before {
  background-color: var(--gold);
  border-color: var(--gold);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.4l2.4 2.4 5.6-6.2' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Sort stays single-select: a trailing tick, no checkbox */
.tb-drop[data-drop="sort"] .tb-opt.is-active::after {
  content: "\2713";
  float: right;
  color: var(--gold);
  font-size: 0.75rem;
  line-height: 1.3;
}
/* gem colour dot inside the Stone dropdown options */
.tb-pop-stone .tb-opt {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.tb-gem {
  width: 20px; height: 20px;
  border-radius: 50%;
  flex: none;
  background: var(--paper) center / 76% no-repeat;
  border: 1px solid var(--hair-gold);
}
.tb-pop-stone .tb-opt.is-active::after { float: none; margin-left: auto; }

.tb-clear {
  background: none; border: 0; cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--gold);
  padding: 0 0 0.15rem;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
  transition: border-color 0.2s ease;
}
.tb-clear:hover { border-bottom-color: var(--gold); }

.results-count {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: rgba(32, 37, 26, 0.55);
  margin: 0;
  white-space: nowrap;
}
.results-count b { color: var(--ink-dark); font-weight: 500; }

/* ---------- selected-filter chip row ---------- */
.tb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 var(--pad-x) 0.85rem;
}
.tb-chips[hidden] { display: none; }
.tb-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.55rem 0.32rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 75, 0.5);
  background: linear-gradient(120deg, rgba(201, 162, 75, 0.22), rgba(201, 162, 75, 0.1));
  color: #7d5a24;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.tb-chip i {
  font-size: 0.7rem;
  color: rgba(125, 90, 36, 0.6);
  transition: color 0.2s ease;
}
.tb-chip:hover {
  border-color: var(--gold);
  background: linear-gradient(120deg, rgba(201, 162, 75, 0.34), rgba(201, 162, 75, 0.18));
  color: #5f4417;
}
.tb-chip:hover i { color: #5f4417; }

/* ---------- dual-handle range control (lives inside the range popovers) ---------- */
.f-range { padding-top: 0.1rem; }
.fr-slider {
  position: relative;
  height: 18px;
  margin: 0.2rem 1px 1rem;
}
/* thin resting track */
.fr-slider::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  transform: translateY(-50%);
  background: var(--hair-gold);
}
/* gold selected segment */
.fr-fill {
  position: absolute;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background: var(--gold);
  pointer-events: none;
}
.fr-slider input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 18px;
  margin: 0;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
  background: none;
  pointer-events: none; /* thumbs re-enable below */
  outline: none;
  z-index: 3;
}
.fr-slider input[type="range"]::-webkit-slider-runnable-track { background: none; height: 18px; }
.fr-slider input[type="range"]::-moz-range-track { background: none; }
.fr-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  margin-top: 2.5px; /* centres the 13px thumb on the 18px track */
  border-radius: 50%;
  background: var(--bone);
  border: 1.5px solid var(--gold);
  box-shadow: 0 1px 5px rgba(32, 37, 26, 0.28);
  cursor: grab;
  pointer-events: auto;
  transition: transform 0.25s var(--ease), border-color 0.2s ease;
}
.fr-slider input[type="range"]::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--bone);
  border: 1.5px solid var(--gold);
  box-shadow: 0 1px 5px rgba(32, 37, 26, 0.28);
  cursor: grab;
  pointer-events: auto;
  transition: transform 0.25s var(--ease), border-color 0.2s ease;
}
.fr-slider input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.18); border-color: var(--gold-bright); }
.fr-slider input[type="range"]::-moz-range-thumb:hover { transform: scale(1.18); border-color: var(--gold-bright); }
.fr-slider input[type="range"]:active::-webkit-slider-thumb { cursor: grabbing; }
.fr-slider input[type="range"]:active::-moz-range-thumb { cursor: grabbing; }
.fr-slider input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(161, 121, 58, 0.22); }
.fr-slider input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px rgba(161, 121, 58, 0.22); }

.fr-fields {
  display: flex;
  align-items: flex-end;
  gap: 0.65rem;
}
.fr-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}
.fr-label {
  font-family: var(--font-ui);
  font-size: 0.5625rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(32, 37, 26, 0.45);
}
.fr-box {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  border-bottom: 1px solid var(--hair);
  padding: 0.1rem 0 0.35rem;
  transition: border-color 0.2s ease;
}
.fr-box:focus-within { border-color: var(--gold); }
.fr-cur {
  font-style: normal;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: rgba(32, 37, 26, 0.45);
}
.fr-box input {
  width: 100%;
  min-width: 0;
  background: none;
  border: 0;
  outline: none;
  padding: 0;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: var(--ink-dark);
  font-variant-numeric: tabular-nums;
}
.fr-sep {
  font-family: var(--font-ui);
  font-size: 0.6875rem;
  color: rgba(32, 37, 26, 0.4);
  padding-bottom: 0.4rem;
  flex: none;
}

/* ============ Full-width results ============ */
.vault-results {
  max-width: 1600px;
  margin: 0 auto;
  padding: clamp(2rem, 4.5vh, 3.25rem) var(--pad-x) 7rem;
}
.stone-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(2.25rem, 3vw, 3.25rem) clamp(1.25rem, 1.8vw, 2.25rem);
}

/* ============ Stone card ============ */
.stone-card { position: relative; }
.stone-card-link {
  text-decoration: none;
  display: block;
  transition: transform 0.5s var(--ease);
}
.stone-card-link:hover { transform: translateY(-4px); }
/* notch removed - clean standard card */
.soc-notch { display: none; }
.soc-media {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--hair);
  border-radius: 14px;
  overflow: hidden;
  /* mandala texture field, with a subtle per-gem tint glow at the crown */
  background:
    radial-gradient(120% 80% at 50% 18%, var(--glow, rgba(201, 162, 75, 0.22)) 0%, rgba(23, 27, 18, 0) 60%),
    url("assets/consult-card-bg.jpg") center / cover;
  display: grid;
  place-items: center;
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}
.stone-card-link:hover .soc-media {
  border-color: rgba(32, 37, 26, 0.2);
  box-shadow: 0 20px 40px -26px rgba(32, 37, 26, 0.35);
}
.soc-media img {
  width: 60%;
  height: auto;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.16));
  transition: transform 0.6s var(--ease);
  z-index: 1;
}
.stone-card-link:hover .soc-media img { transform: scale(1.05); }
/* photographic card fill (dark-ground pukhraj photo) */
.soc-media img.soc-img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
}
.stone-card:has(.soc-img-cover) .soc-media { background: #20251a; }
/* hover video: crossfades in over the still gem */
.soc-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.5s var(--ease);
}
.stone-card-link:hover .soc-video { opacity: 1; }
/* small varied badge, top-left of the media */
.soc-tag {
  position: absolute;
  top: 0.85rem; left: 0.85rem;
  z-index: 2;
  font-family: var(--font-ui);
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  border: 1px solid transparent;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.soc-tag-quiet {
  color: rgba(32, 37, 26, 0.55);
  background: rgba(246, 244, 236, 0.65);
  border-color: rgba(32, 37, 26, 0.1);
  font-weight: 500;
  letter-spacing: 0.2em;
}
.soc-tag-scarce {
  color: #8a5a1f;
  background: rgba(201, 162, 75, 0.18);
  border-color: rgba(161, 121, 58, 0.42);
}
.soc-tag-deal {
  color: #f2dca6;
  background: rgba(201, 162, 75, 0.22);
  border-color: rgba(201, 162, 75, 0.55);
}
/* certification seal, top-right; tooltip allowed to overflow the media */
.soc-cert {
  position: absolute;
  top: 0.7rem; right: 0.7rem;
  z-index: 3;
  display: grid;
  place-items: center;
  cursor: help;
}
.soc-cert-img {
  width: 20px;
  height: auto;
  display: block;
  filter: drop-shadow(0 1px 3px rgba(20, 24, 16, 0.4));
  transition: transform 0.2s ease;
}
.soc-cert:hover .soc-cert-img,
.soc-cert:focus-visible .soc-cert-img { transform: scale(1.08); }
.soc-cert:focus-visible { outline: none; }
.soc-cert-tip {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 5;
  width: max-content;
  max-width: 190px;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  background: #20251a;
  color: var(--ink);
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 0.6875rem;
  line-height: 1.35;
  letter-spacing: 0.01em;
  text-align: left;
  box-shadow: 0 14px 30px -14px rgba(20, 24, 16, 0.6);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.soc-cert-tip::before {
  content: "";
  position: absolute;
  bottom: 100%; right: 9px;
  border: 5px solid transparent;
  border-bottom-color: #20251a;
}
.soc-cert:hover .soc-cert-tip,
.soc-cert:focus .soc-cert-tip,
.soc-cert:focus-visible .soc-cert-tip {
  opacity: 1;
  transform: none;
}
/* eyebrow row: planet left, ratti pushed right */
.soc-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 1.25rem 0 0.4rem;
}
.soc-planet {
  font-family: var(--font-ui);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0;
  display: flex; align-items: center; gap: 0.45rem;
  white-space: nowrap;
}
.soc-planet .glyph { font-size: 0.9rem; opacity: 0.85; }
.soc-ratti {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 400;
  color: rgba(32, 37, 26, 0.55);
  letter-spacing: 0.01em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
/* carat is the primary weight — carries the visual weight over ratti */
.soc-carat {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-dark);
  letter-spacing: 0.01em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
/* primary line: English gem name, full width; Vedic name as a quiet subtitle */
.soc-name {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink-dark);
  margin: 0 0 0.6rem;
}
.soc-sub {
  display: block;
  margin-top: 0.1rem;
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  color: rgba(32, 37, 26, 0.5);
}
/* meta row: origin left, cut/carat right */
.soc-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.7rem;
}
.soc-origin {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink-dark);
}
.soc-origin i { display: none; }
.soc-origin::before {
  content: "Origin";
  font-size: 0.56rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(32, 37, 26, 0.4); flex: none;
}
.soc-cut {
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 0.75rem;
  letter-spacing: 0.01em;
  color: rgba(32, 37, 26, 0.55);
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
/* closing row: price left, quiet View affordance right, over a hairline */
.soc-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--hair);
}
.soc-price {
  font-family: var(--font-ui);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink-dark);
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.soc-was {
  font-weight: 400;
  font-size: 0.8125rem;
  color: rgba(32, 37, 26, 0.42);
  text-decoration: line-through;
  margin-right: 0.5rem;
  font-variant-numeric: tabular-nums;
}
.soc-view {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.95rem;
  border: 1px solid rgba(91, 99, 74, 0.5);
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sage);
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.stone-card-link:hover .soc-view {
  background: rgba(91, 99, 74, 0.1);
  border-color: var(--sage);
}
.soc-view i { display: none; }

/* ============ Consultation promo cell ============
   A dark sage "counsel" moment woven into the grid,
   set on the same mandala texture as the homepage consult card. */
.promo-card {
  position: relative;
  grid-column: span 2; /* wide landscape panel: two stone-card columns */
  display: grid;
  grid-template-columns: 1fr 42%;
  align-items: stretch;
  min-height: 0;
  aspect-ratio: 1.6 / 1; /* roughly the height of one stone card */
  border-radius: 14px;
  border: 1px solid rgba(161, 121, 58, 0.35);
  background-color: #f3ead2;
  background-image:
    linear-gradient(105deg, rgba(246, 240, 224, 0.55) 0%, rgba(246, 240, 224, 0.15) 55%, rgba(246, 240, 224, 0) 100%),
    url("assets/offer-bg.png");
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.promo-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.7rem;
  padding: clamp(1.5rem, 3vw, 2.75rem);
}
.promo-media {
  position: relative;
  overflow: hidden;
}
.promo-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* soft blend of the photo into the mandala on its left edge */
.promo-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(243, 234, 210, 0.85), transparent 34%);
  pointer-events: none;
}
/* pill CTA, consistent with the homepage dark-card buttons */
.promo-cta {
  align-self: flex-start;
  margin-top: 0.7rem;
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 1.4rem;
  border-radius: 999px;
  background: rgba(32, 37, 26, 0.04);
  border: 1px solid rgba(32, 37, 26, 0.28);
  color: var(--ink-dark);
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.promo-cta:hover {
  background: rgba(32, 37, 26, 0.08);
  border-color: rgba(161, 121, 58, 0.6);
}
.promo-eyebrow {
  font-family: var(--font-ui);
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0;
}
.promo-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.45rem, 1.9vw, 1.8rem);
  line-height: 1.1;
  color: var(--ink-dark);
  margin: 0;
  max-width: 14ch;
}
.promo-sub {
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 0.85rem;
  line-height: 1.55;
  color: rgba(32, 37, 26, 0.68);
  margin: 0;
  max-width: 26ch;
}

/* empty state */
.stone-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 5rem 1rem;
  color: rgba(32, 37, 26, 0.55);
  font-family: var(--font-display);
  font-size: 1.5rem;
}
.stone-empty button {
  display: inline-block;
  margin-top: 1rem;
  background: none; border: 0; cursor: pointer;
  font-family: var(--font-ui); font-size: 0.9375rem;
  color: var(--gold);
  border-bottom: 1px solid var(--gold);
}

/* ============ Responsive ============ */
@media (max-width: 1240px) {
  .stone-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .tb-inner { flex-wrap: wrap; }
  .tb-filters { flex-wrap: wrap; }
  .tb-right { margin-left: 0; width: 100%; justify-content: space-between; }
  .stone-grid { grid-template-columns: repeat(2, 1fr); }
  .promo-card { aspect-ratio: 2 / 1; }
  .vault-head-aside { padding-bottom: 0; }
}
@media (max-width: 560px) {
  .stone-grid { grid-template-columns: 1fr; }
  .promo-card { grid-column: span 1; aspect-ratio: 1.4 / 1; grid-template-columns: 1fr; }
  .promo-media { display: none; }
  .vault-head { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .soc-video { display: none; }
}


/* ============ Floating search / ask bar (ported from the homepage) ============ */
.ai-bar {
  position: fixed;
  left: 50%;
  bottom: clamp(1.25rem, 3vh, 2rem);
  transform: translateX(-50%) translateY(140%);
  z-index: 90;
  width: min(440px, calc(100vw - 2.5rem));
  padding: 0.5rem;
  border-radius: 999px;
  background: rgba(34, 32, 27, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  backdrop-filter: blur(16px) saturate(1.1);
  box-shadow:
    0 20px 50px -20px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  opacity: 0;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.7s ease, width 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    border-radius 0.55s ease;
  backface-visibility: hidden;
}
.ai-bar.is-visible {
  transform: translateX(-50%) translateY(0) !important;
  opacity: 1 !important;
}

/* Expanded showcase state - inherits the translucent charcoal glass */
.ai-bar.expanded {
  width: min(560px, calc(100vw - 2.5rem));
  border-radius: 22px;
  padding: 0.6rem;
}

.ai-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Hamburger menu popover, anchored to the + button (bottom-left) */
.ai-chips {
  position: absolute;
  left: 0;
  bottom: calc(100% + 0.6rem);
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.5rem;
  border-radius: 18px;
  background: rgba(34, 32, 27, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  backdrop-filter: blur(16px) saturate(1.1);
  box-shadow: 0 24px 60px -22px rgba(0, 0, 0, 0.6);
  transform-origin: bottom left;
  animation: ai-chips-in 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.ai-chips[hidden] { display: none; }

.ai-menu-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  font-weight: 300;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.ai-menu-item i {
  font-size: 1.25rem;
  color: var(--gold-bright);
  flex: none;
}
.ai-menu-item:hover {
  background: rgba(220, 185, 104, 0.12);
  color: var(--gold-bright);
}

@keyframes ai-chips-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.ai-add.open { background: rgba(255, 255, 255, 0.16); }
.ai-add.open .icon-ask { display: none; }
.ai-add.open .icon-cue { display: block; }
.ai-add i { transition: transform 0.3s ease; }
.ai-bar.expanded .ai-pill { display: none; }

/* Suggestion panel */
.ai-suggest {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
}
.ai-bar.expanded .ai-suggest { display: flex; }

/* Search-focus popover: suggestions float above the pill, input stays */
.ai-bar.searching {
  border-radius: 26px;
}
.ai-bar.searching .ai-suggest {
  display: flex;
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 0.6rem);
  padding: 0.75rem;
  border-radius: 22px;
  background: rgba(34, 32, 27, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  backdrop-filter: blur(16px) saturate(1.1);
  box-shadow: 0 24px 60px -22px rgba(0, 0, 0, 0.6);
  animation: ai-chips-in 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-suggest-head {
  font-family: var(--font-ui);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin: 0 0 0.6rem 0.15rem;
}

.ai-thumbs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 0.4rem;
}

.ai-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  background: rgba(236, 231, 218, 0.94) center / cover no-repeat;
  border: 1px solid rgba(236, 231, 218, 0.12);
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}
.ai-thumb:hover {
  border-color: rgba(224, 200, 130, 0.55);
  box-shadow: 0 10px 28px -12px rgba(32, 37, 26, 0.4);
}

/* gem thumbs sit on a light card */
.ai-thumb.gem {
  background-size: 68%;
  background-position: center;
  transition: border-color 0.35s ease, box-shadow 0.35s ease,
    background-size 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    background-position 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.ai-thumb.gem:hover {
  background-size: 52%;
  background-position: center 22%;
}

/* name + price, revealed on hover */
.ai-thumb-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.1rem 0.5rem 0.6rem;
  background: linear-gradient(to top, rgba(243, 240, 231, 0.96) 55%, rgba(243, 240, 231, 0));
  text-align: center;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease 0.05s, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.05s;
}
.ai-thumb.gem .ai-thumb-info {
  background: none;
  padding-top: 0.4rem;
}
.ai-thumb:hover .ai-thumb-info {
  opacity: 1;
  transform: none;
}
.ai-thumb-info strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.8125rem;
  line-height: 1.15;
  color: var(--ink-dark);
  margin-bottom: 0.15rem;
}
.ai-thumb-info span {
  display: block;
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  color: #a1793a;
}

.ai-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.ai-action {
  flex: 1;
  text-align: center;
  padding: 0.85rem 1rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  font-weight: 400;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.16);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.ai-action:hover { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.32); }

.ai-close {
  flex: none;
}

.ai-btn {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.92);
  font-size: 1rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease,
    transform 0.3s ease, color 0.3s ease;
}
.ai-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}
.ai-send:hover { transform: translateY(-1px); }
.ai-home, .ai-home:hover, .ai-home:focus { text-decoration: none; }
.ai-home i { text-decoration: none; }

/* Idle cue (unused on the catalogue, kept for parity) */
.ai-cue {
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: clamp(0.9375rem, 1.4vw, 1.0625rem);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.ai-add .icon-cue { display: none; }

.ai-input-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
}

.ai-input {
  width: 100%;
  background: none;
  border: 0;
  outline: none;
  color: var(--ink);
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 0.9375rem; /* fixed - pill has fixed width, so text must not scale with vw */
  padding: 0 0.5rem;
}

/* Ghost placeholder */
.ai-ghost {
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  color: rgba(236, 231, 218, 0.55);
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 0.9375rem; /* fixed - matches .ai-input, consistent at any window width */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.ai-ghost.swap {
  opacity: 0;
  transform: translateY(-6px);
}
.ai-input:focus ~ .ai-ghost,
.ai-input:not(:placeholder-shown) ~ .ai-ghost {
  opacity: 0;
}
.ai-input.has-text ~ .ai-ghost { opacity: 0; }

@media (max-width: 560px) {
  .ai-bar { gap: 0.35rem; padding: 0.4rem; }
  .ai-btn { width: 42px; height: 42px; font-size: 1.125rem; }
}


/* ============ Design-library context bar ============ */
.vault-designctx {
  position: sticky;
  top: calc(var(--nav-h) + 58px); /* sits just under the filter toolbar */
  z-index: 38;
  background: rgba(91, 99, 74, 0.07);
  border-bottom: 1px solid var(--hair);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.vault-designctx[hidden] { display: none; }
.vdc-inner {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 1.5vw, 1.1rem);
  padding: 0.7rem var(--pad-x);
  flex-wrap: wrap;
}
.vdc-back {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--hair-gold);
  color: var(--sage);
  text-decoration: none;
  display: grid; place-items: center;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.vdc-back:hover { background: rgba(91, 99, 74, 0.12); border-color: var(--sage); color: var(--sage); }
.vdc-thumb {
  flex: none;
  width: 34px; height: 40px;
  border-radius: 5px;
  border: 1px solid var(--hair-gold);
  background: var(--paper) center / cover no-repeat;
}
.vdc-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.vdc-label {
  font-family: var(--font-ui);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage);
}
.vdc-text strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.15rem;
  color: var(--ink-dark);
}
.vdc-hint {
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 0.8125rem;
  color: rgba(32, 37, 26, 0.55);
  margin-left: auto;
}
.vdc-change {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  color: var(--sage);
  text-decoration: none;
  padding-bottom: 0.15rem;
  border-bottom: 1px solid var(--hair-gold);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.vdc-change:hover { color: var(--gold); border-color: var(--gold); }
.vdc-dismiss {
  flex: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 0;
  background: rgba(32, 37, 26, 0.06);
  color: rgba(32, 37, 26, 0.55);
  cursor: pointer;
  display: grid; place-items: center;
  font-size: 0.7rem;
  transition: background 0.2s ease, color 0.2s ease;
}
.vdc-dismiss:hover { background: rgba(178, 58, 42, 0.1); color: var(--madder); }
@media (max-width: 640px) {
  .vdc-hint { display: none; }
}
