/* ============================================================
   Dia-Co Holiday Catalog — styled with the Dia-Co Design System
   (Instrument Sans / Geist / Geist Mono; ink-navy + warm-ivory
   grounds; garnet + deep-teal accents; burnished-gold sparingly;
   flat, square, ruled — no shadows, no gradients, no radius).
   ============================================================ */

:root {
  --ink: #1c2b3a;        /* ink-navy — headings, rules, dark ground */
  --ivory: #f7f3ec;      /* warm-ivory — page ground */
  --white: #ffffff;      /* card/frame fill on ivory */
  --garnet: #7a2e2e;     /* the one CTA / key-stat accent */
  --teal: #1f5f5b;       /* secondary / technical accent */
  --gold: #b08d4f;       /* burnished-gold — rules & labels on navy, used sparingly */
  --text: #2c3d4e;       /* body copy on ivory */
  --text-2: #4a5a6a;     /* secondary / fine print on ivory */
  --label: #7a6a50;      /* label-bronze — quiet mono captions on ivory */
  --on-navy-muted: #cfc9be;
  --rule: #dcd4c4;       /* hairline on ivory */
  --rule-navy: #3a4b5c;  /* hairline on navy */

  --font-display: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Geist", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, Menlo, monospace;

  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  background: var(--ivory);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
}

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.022em;
  text-wrap: balance;
  color: var(--ink);
  margin: 0;
}

/* ---------- Header (Masthead) ---------- */
header.site {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 40;
  background: var(--ink);
}
header.site::before {
  content: "";
  display: block;
  height: 6px;
  background: var(--gold);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  max-width: 1280px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.brand-mark {
  /* The full-color "DC" mark (not the garnet wordmark — its dark-red
     "DIA-CO, INC." text fails contrast on this navy header) at a fixed
     header height. */
  height: 34px;
  width: 34px;
  object-fit: contain;
  flex: none;
}
.brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.brand .display {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ivory);
}
.brand .eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.cart-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--ivory);
  border: none;
  border-radius: 0;
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
}
.cart-btn:hover { background: var(--white); }
.cart-count {
  background: var(--garnet);
  color: var(--ivory);
  border-radius: 0;
  min-width: 20px;
  height: 20px;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  font-variant-numeric: tabular-nums;
}

/* ---------- Filters (left sidebar) ---------- */
.browse-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}
@media (max-width: 760px) {
  .browse-layout { grid-template-columns: 1fr; gap: 24px; }
}

.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: sticky;
  top: calc(96px + env(safe-area-inset-top, 0px));
}

/* On mobile the filter list moves behind a collapsible "Filters" toggle
   instead of sitting open above the grid — otherwise a shopper on a phone
   has to scroll past every checkbox before seeing a single product. */
.filter-toggle-btn {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 13px 16px;
  border: 1px solid var(--ink);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  margin-bottom: 18px;
}
.filter-toggle-btn .chev { flex-shrink: 0; transition: transform 0.15s ease; }
.filter-toggle-btn.open .chev { transform: rotate(180deg); }

@media (max-width: 760px) {
  .filter-toggle-btn { display: flex; }
  .filter-bar {
    position: static;
    display: none;
    margin-bottom: 22px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--ink);
  }
  .filter-bar.mobile-open { display: flex; }
  /* Bigger tap targets for checkboxes and pills once they're the primary
     touch surface, without changing the tighter desktop density. */
  .filter-check-row { padding: 10px 2px; font-size: 14px; }
  .filter-check-row input[type="checkbox"] { width: 18px; height: 18px; }
}

.filter-section {
  border-top: 1px solid var(--rule);
  padding: 16px 0;
}
.filter-section:first-child { border-top: none; padding-top: 0; }
.filter-section-head {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--label);
  margin-bottom: 10px;
}
.filter-checklist {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 220px;
  /* `scroll` (not `auto`) plus the custom bar below keeps the scrollbar
     visible at rest, so a longer list doesn't look complete until you
     happen to drag or hover it. */
  overflow-y: scroll;
  scrollbar-width: thin;
  scrollbar-color: var(--rule-navy) transparent;
}
.filter-checklist::-webkit-scrollbar { width: 6px; }
.filter-checklist::-webkit-scrollbar-track { background: transparent; }
.filter-checklist::-webkit-scrollbar-thumb { background: var(--rule-navy); border-radius: 0; }
.filter-check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 2px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}
.filter-check-row.disabled {
  color: var(--label);
  cursor: not-allowed;
  opacity: 0.5;
}
.filter-check-row.disabled input[type="checkbox"] { cursor: not-allowed; }
.filter-check-row input[type="checkbox"] {
  accent-color: var(--ink);
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  cursor: pointer;
}
.filter-check-row .fc-label { flex: 1; }
.filter-check-row .fc-count {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--label);
}
.filter-clear-btn {
  margin-top: 14px;
  background: none;
  border: 1px solid var(--garnet);
  color: var(--garnet);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 12px;
  cursor: pointer;
  width: 100%;
}
.filter-clear-btn:hover { background: rgba(122, 46, 46, 0.06); }

/* ---------- Layout ---------- */
main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 90px;
}
.browse-main { min-width: 0; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  color: var(--text-2);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.crumb-link {
  background: none;
  border: none;
  font-family: inherit;
  font-size: inherit;
  color: var(--text-2);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.crumb-link:hover { color: var(--ink); }
.crumb-sep { color: var(--rule); }
.crumb-current { color: var(--ink); }

.text-link {
  display: block;
  margin: 36px auto 0;
  background: none;
  border: none;
  color: var(--label);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 6px 0;
  text-align: center;
}
.text-link:hover { color: var(--ink); }

/* ---------- Home ---------- */
/* Four real product shots across the top of the page, framed as a single
   ruled block (hairline "grout" between cells, thin gold rule beneath) —
   the same flat/square/no-shadow treatment as the rest of the site, just
   applied to photography instead of copy. */
.home-collage {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: var(--ink);
  border-bottom: 3px solid var(--gold);
  margin: 4px 0 32px;
}
.home-collage-cell {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--ivory);
}
.home-collage-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 640px) {
  .home-collage { grid-template-columns: repeat(2, 1fr); }
}

.home-hero {
  text-align: center;
  max-width: 620px;
  margin: 12px auto 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.home-hero .eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--label);
}
.home-hero h1 {
  font-size: clamp(28px, 4vw, 42px);
}
.home-hero p {
  font-family: var(--font-body);
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 14px;
  margin: 48px 0 22px;
}
/* Targets the section-header right after the hero text specifically (not
   ":first-of-type", which matches the first <div> among ALL of #home-root's
   children — and stopped being this one the moment .home-collage became
   the new first div ahead of .home-hero). */
.home-hero + .section-header { margin-top: 0; }
.sh-number {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--gold);
}
.sh-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 25px;
  letter-spacing: -0.022em;
  color: var(--ink);
  margin: 0;
}

.home-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 20px;
  margin-bottom: 12px;
}
@media (max-width: 640px) {
  /* Same reasoning as the product grid: two smaller tiles per row instead
     of one full-width tile so a shopper can scan categories faster. */
  .home-tile-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .home-tile-bar { padding: 9px 10px; gap: 2px; }
  .home-tile-title { font-size: 12.5px; }
  .home-tile-count { font-size: 9px; }
}
.home-tile {
  background: var(--white);
  /* Soft ivory-toned hairline (--rule), not the heavy navy --ink outline —
     the white card already reads against the ivory page without a dark
     frame around every tile. */
  border: 1px solid var(--rule);
  padding: 0;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  font-family: inherit;
  overflow: hidden;
}
.home-tile:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.home-tile-media {
  aspect-ratio: 4 / 5;
  background: var(--ivory);
  overflow: hidden;
  position: relative;
}
.home-tile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}
.home-tile:hover .home-tile-media img { transform: scale(1.035); }
.home-tile-media svg {
  width: 34%;
  height: 34%;
  opacity: 0.35;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--label);
}
.home-tile-bar {
  background: var(--ink);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.home-tile-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: -0.01em;
  color: var(--ivory);
}
.home-tile-count {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-navy-muted);
}

.results-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 18px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
@media (max-width: 640px) {
  /* Two columns of compact cards instead of one huge card per screen —
     shoppers can scan and compare designs without endless scrolling. */
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-body { padding: 10px 10px 12px; gap: 4px; }
  .card-name { font-size: 13px; }
  .card-collections { font-size: 9px; letter-spacing: 0.06em; }
  .card-price { font-size: 12.5px; }
  .card-price .from { font-size: 10px; }
  .badge-multi { font-size: 9px; padding: 3px 6px; }
}

.card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 0;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.card:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.card-media {
  aspect-ratio: 1;
  background: var(--ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--label);
  font-size: 12px;
  position: relative;
}
.card-media svg { width: 38%; height: 38%; opacity: 0.4; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.badge-multi {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--ink);
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  color: var(--ivory);
}
.card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}
.card-collections {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--label);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-name {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-price {
  margin-top: auto;
  padding-top: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--teal);
}
.card-price .from {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-2);
  font-size: 11.5px;
  margin-right: 4px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-2);
  font-family: var(--font-body);
}

/* ---------- Detail view ---------- */
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 44px;
}
@media (max-width: 760px) {
  .detail-grid { grid-template-columns: 1fr; gap: 28px; }
}

.gallery-main {
  aspect-ratio: 1;
  background: var(--ivory);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--label);
  font-family: var(--font-body);
  font-size: 13px;
  flex-direction: column;
  gap: 8px;
}
.gallery-main svg { width: 28%; height: 28%; opacity: 0.35; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-main div { max-width: 74%; text-align: center; line-height: 1.5; }
.gallery-main.clickable { cursor: zoom-in; }

/* ---------- Lightbox (full-size photo viewer) ---------- */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 43, 58, 0.94);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-img {
  max-width: min(88vw, 920px);
  max-height: 86vh;
  width: auto;
  height: auto;
  object-fit: contain;
  background: var(--ivory);
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: var(--ivory);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}
.lightbox-close:hover { color: var(--gold); }
.lightbox-counter {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--on-navy-muted);
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--ivory);
  cursor: pointer;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-nav:hover { color: var(--gold); }
.lightbox-prev { left: 8px; }
.lightbox-next { right: 8px; }
@media (max-width: 640px) {
  .lightbox-close { top: 10px; right: 14px; font-size: 28px; }
  .lightbox-nav { padding: 8px; }
  .lightbox-counter { bottom: 14px; }
}
.gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.thumb {
  width: 56px;
  height: 56px;
  border-radius: 0;
  border: 1px solid var(--ink);
  background: var(--ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--label);
  cursor: pointer;
  overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.active {
  box-shadow: inset 0 0 0 2px var(--garnet);
  border-color: var(--garnet);
}

.detail-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--label);
  margin-bottom: 8px;
}
.detail-name {
  font-size: 30px;
  margin-bottom: 12px;
}
.detail-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 0;
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
}

.option-block {
  border-top: 1px solid var(--rule);
  padding: 18px 0;
}
.option-block .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--label);
  margin-bottom: 12px;
  display: block;
}
.spec-block { border-top: none; padding-top: 8px; }

.swatch-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.swatch {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 9px 14px;
  border-radius: 0;
  border: 1px solid var(--ink);
  background: var(--white);
  cursor: pointer;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.swatch .dot {
  width: 12px; height: 12px; border-radius: 50%;
  border: 1px solid rgba(28, 43, 58, 0.3);
}
.swatch.active {
  border-color: var(--ink);
  color: var(--ivory);
  background: var(--ink);
}
.swatch:disabled { opacity: 0.4; cursor: not-allowed; }

.stone-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* "Other Options in This Family" strip — wraps to as many lines as it needs
   rather than scrolling, so every option stays visible at a glance. For a
   large size × shape family (see familySizeShapeGrid in app.js), this is
   split into a size row and a shape row instead of one long flat list. */
.sibling-row {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 7px;
}
.sibling-row + .sub-label { margin-top: 14px; }
.sub-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--label);
  margin-bottom: 8px;
  display: block;
}
.sibling-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 7px 11px;
  border-radius: 0;
  border: 1px solid var(--rule-navy);
  background: var(--white);
  cursor: pointer;
  color: var(--text-2);
  white-space: nowrap;
}
.sibling-chip:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--ivory);
}
.sibling-chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--ivory);
}
.sibling-chip:disabled {
  cursor: not-allowed;
  opacity: 0.35;
  border-style: dashed;
}
.sibling-chip:disabled:hover {
  border-color: var(--rule-navy);
  color: var(--text-2);
  background: var(--white);
}

/* Customization Options (size + design modification request) */
.cust-field { margin-bottom: 16px; }
.cust-field:last-of-type { margin-bottom: 12px; }
.cust-select,
.cust-textarea {
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 10px 12px;
  width: 100%;
  max-width: 320px;
}
.cust-textarea {
  max-width: 100%;
  min-height: 72px;
  resize: vertical;
  font-family: var(--font-body);
}
.cust-note {
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-2);
  border-left: 2px solid var(--gold);
  padding-left: 12px;
}

.stone-pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.stone-pill {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 8px 12px;
  border-radius: 0;
  border: 1px solid var(--ink);
  background: var(--white);
  cursor: pointer;
  color: var(--text);
}
.stone-pill.active {
  background: var(--ink);
  color: var(--ivory);
  border-color: var(--ink);
}
/* Birthstone month — a quiet caption next to the stone name, replacing the
   old "$150/ct stones" price-tier group headers. */
.stone-pill .stone-month {
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--label);
  margin-left: 6px;
}
.stone-pill.active .stone-month { color: var(--on-navy-muted); }
.stone-pill.has-photo { position: relative; padding-right: 20px; }
.stone-pill .photo-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  margin-left: 6px;
  vertical-align: middle;
}
.stone-pill.active .photo-dot { background: var(--ivory); }

/* Color-stone picker: its own labeled block, set apart from the Lab Grown /
   Natural / Color Stone row above with real spacing — that row and the
   stone list used to butt up against each other with no breathing room. */
.cs-block { margin-top: 22px; }

.cs-dropdown { position: relative; max-width: 320px; }
.cs-dropdown-trigger {
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 10px 12px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  text-align: left;
}
.cs-dropdown-value { display: flex; align-items: baseline; gap: 6px; }
.cs-dropdown-value.cs-placeholder { color: var(--text-2); }
.cs-dropdown-chev { flex: none; color: var(--text-2); display: flex; }
.cs-dropdown-chev.open { transform: rotate(180deg); }

.cs-dropdown-list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow-y: auto;
  background: var(--white);
  border: 1px solid var(--ink);
  list-style: none;
  margin: 0;
  padding: 0;
  box-shadow: 0 6px 16px rgba(28, 43, 58, 0.15);
}
.cs-dropdown-option {
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 6px;
  border-top: 1px solid var(--rule);
}
.cs-dropdown-option:first-child { border-top: none; }
.cs-dropdown-option:hover { background: var(--ivory); }
.cs-dropdown-option.active { background: var(--ink); color: var(--ivory); }
.cs-option-month {
  /* The birthstone month — parenthesized and italic, next to the stone
     name, the way a real <option> element can't render (no nested markup
     inside <option> is styled by any browser), which is why this is a
     custom dropdown instead of a native <select>. */
  font-style: italic;
  color: var(--text-2);
  font-size: 12.5px;
}
.cs-dropdown-option.active .cs-option-month { color: var(--on-navy-muted); }
.cs-dropdown-option .photo-dot {
  /* Same shape as .stone-pill .photo-dot, but this dot lives in a plain
     flex row instead of a pill, so it needs its own full size/shape rule
     rather than inheriting one scoped to .stone-pill. */
  display: inline-block;
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-left: auto;
  background: var(--teal);
}
.cs-dropdown-option.active .photo-dot { background: var(--ivory); }

@media (max-width: 760px) {
  .swatch { padding: 11px 16px; font-size: 12.5px; }
  .stone-pill { padding: 10px 14px; font-size: 12.5px; }
  .sibling-chip { padding: 9px 13px; }
  .cust-select { padding: 11px 12px; font-size: 14px; }
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-body);
  font-size: 13.5px;
  margin-top: 6px;
}
.spec-table tr { border-top: 1px solid var(--rule); }
.spec-table tr:first-child { border-top: none; }
.spec-table td {
  padding: 10px 0;
  vertical-align: top;
}
.spec-table td:first-child {
  color: var(--text-2);
  width: 44%;
  padding-right: 12px;
}
.spec-table td:last-child {
  font-family: var(--font-mono);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.price-box {
  border-top: 2px solid var(--ink);
  padding-top: 20px;
  margin-top: 20px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.price-value {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 500;
  /* Teal, not garnet — a price/CTA in this deep red reads as a stop or
     warning signal rather than "buy this". */
  color: var(--teal);
  font-variant-numeric: tabular-nums;
}
.price-note {
  font-family: var(--font-body);
  font-size: 11.5px;
  color: var(--text-2);
  margin-top: 4px;
}
.call-pricing {
  color: var(--teal);
  background: transparent;
  border: 1px solid var(--teal);
  border-radius: 0;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 13px;
  margin-top: 6px;
}

.btn-primary {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--teal);
  color: var(--ivory);
  border: none;
  border-radius: 0;
  padding: 14px 24px;
  cursor: pointer;
}
.btn-primary:hover { background: #184a46; }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-secondary {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: transparent;
  color: var(--teal);
  border: 1px solid var(--teal);
  border-radius: 0;
  padding: 12px 18px;
  cursor: pointer;
}
.btn-secondary:hover { background: rgba(31, 95, 91, 0.07); }

/* ---------- Order drawer ---------- */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 32, 45, 0.45);
  z-index: 60;
  display: flex;
  justify-content: flex-end;
}
.drawer {
  width: min(440px, 100%);
  background: var(--ivory);
  height: 100%;
  padding: 24px;
  overflow-y: auto;
  border-left: 1px solid var(--ink);
  display: flex;
  flex-direction: column;
}
.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 14px;
}
.drawer-head h3 { font-size: 20px; }
.drawer-close {
  background: none; border: none; font-size: 22px; cursor: pointer; color: var(--ink);
  line-height: 1;
}
.order-line {
  border-bottom: 1px solid var(--rule);
  padding: 14px 0;
  font-family: var(--font-body);
  font-size: 13.5px;
}
.order-line .ol-name {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 3px;
}
.order-line .ol-opts {
  font-family: var(--font-mono);
  color: var(--text-2);
  font-size: 11px;
  letter-spacing: 0.02em;
}
.order-line .ol-note {
  font-family: var(--font-body);
  color: var(--teal);
  font-size: 11.5px;
  margin-top: 5px;
}
.order-line .ol-price {
  font-family: var(--font-mono);
  color: var(--teal);
  font-variant-numeric: tabular-nums;
  margin-top: 6px;
}
.order-line .ol-remove {
  background: none; border: none; color: var(--garnet);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer; padding: 0; margin-top: 8px;
}
.order-total {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 500;
  padding: 16px 0;
  border-top: 2px solid var(--ink);
  margin-top: 12px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.order-summary-box {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 0;
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  white-space: pre-wrap;
  /* Tall enough that a normal-sized order shows in full without its own
     inner scroll — the drawer itself already scrolls as a whole, so a
     short inner max-height here just meant the summary looked cut off.
     Still capped so a very large order doesn't push the Send button
     off-screen with no scroll cue. */
  max-height: 420px;
  overflow-y: auto;
  margin: 12px 0;
  color: var(--text);
}
.hint {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-2);
  margin-top: 10px;
}
.checkout-back {
  background: none;
  border: none;
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  cursor: pointer;
  padding: 0;
}
.checkout-form { margin-top: 14px; }
.cust-select.field-invalid { border-color: var(--garnet); }
.cust-field-msg {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--garnet);
  margin-top: 4px;
}
.checkout-error {
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--garnet);
  border-left: 2px solid var(--garnet);
  padding-left: 10px;
  margin: 10px 0;
  line-height: 1.5;
}
.checkout-confirmed p {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  margin-top: 10px;
}
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--ivory);
  padding: 12px 22px;
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  z-index: 80;
}

/* ---------- Footer (ContactFooter) ---------- */
.site-footer {
  background: var(--ink);
  border-top: 1px solid var(--rule-navy);
  margin-top: 40px;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: center;
  justify-content: space-between;
}
.footer-brand {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ivory);
}
.footer-contact {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--gold);
}
@media (max-width: 760px) {
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
  .footer-contact { font-size: 11px; line-height: 1.6; }
}

@media (max-width: 480px) {
  .header-top { padding: 14px 16px; }
  main { padding: 20px 16px 90px; }
  .footer-inner { padding: 20px 16px; }
}

[hidden] { display: none !important; }
