/* tajdīd — fine jewelry, renewed
   minimal + elegant: ivory, charcoal, muted gold */

:root {
  --ivory: #faf8f4;
  --cream: #f3efe8;
  --charcoal: #1f1d1a;
  --ink: #3a372f;
  --gold: #a8854b;
  --gold-soft: #c4a877;
  --line: #e4ddd0;
  --header-bg: rgba(250, 248, 244, 0.95);
  --glow-blend: multiply;
  --logo-invert: 0;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
}

/* ---------- dark theme ----------
   palette swaps via variables: "charcoal" becomes a light ink, "ivory" a near-black,
   gold brightens, glow blend flips to screen, and the dark logo inverts to ivory. */
:root[data-theme="dark"] {
  --ivory: #26221b;   /* page bg — warm charcoal, softer than black */
  --cream: #2f2a22;   /* raised panels */
  --charcoal: #f1ece3; /* headings / "dark" text → warm ivory */
  --ink: #cec7ba;     /* body text */
  --gold: #cdb285;
  --gold-soft: #ddc296;
  --line: #463f34;
  --header-bg: rgba(38, 34, 27, 0.92);
  --glow-blend: screen;
  --logo-invert: 1;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ivory: #26221b;
    --cream: #2f2a22;
    --charcoal: #f1ece3;
    --ink: #cec7ba;
    --gold: #cdb285;
    --gold-soft: #ddc296;
    --line: #463f34;
    --header-bg: rgba(38, 34, 27, 0.92);
    --glow-blend: screen;
    --logo-invert: 1;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-weight: 300;
  background: var(--ivory);
  color: var(--ink);
  line-height: 1.7;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

/* don't force lowercase on what customers type */
input, textarea, select, option { text-transform: none; }

img { max-width: 100%; display: block; }

a { color: var(--gold); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.7; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--charcoal);
  line-height: 1.2;
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* ---------- header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.logo {
  font-family: var(--serif);
  font-size: 1.7rem;
  color: var(--charcoal);
  letter-spacing: 0.04em;
}

.logo span { color: var(--gold); }

/* logo asset is swapped per theme in main.js (setLogos) — no CSS filter, which avoided a
   compositing bug where the filtered image vanished over the animating hero glows. */
.logo-img { height: 54px; width: auto; display: block; }

.logo-img-light { height: 60px; width: auto; margin-bottom: 0.8rem; }

.hero-logo {
  width: min(320px, 65vw);
  height: auto;
  display: block;
  margin: 0 auto;
}

nav ul {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

nav a {
  color: var(--ink);
  font-size: 0.8rem;
  text-transform: lowercase;
  letter-spacing: 0.18em;
}

nav a.active { color: var(--gold); }

/* dark-mode toggle (injected into the nav) */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.8rem;
  text-transform: lowercase;
  letter-spacing: 0.18em;
  padding: 0;
}
.theme-toggle:hover { color: var(--gold); }
.theme-toggle svg { width: 1.05em; height: 1.05em; }

.menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--charcoal);
  cursor: pointer;
}

/* mobile-only quick shortcut to the account, sits beside the hamburger */
.header-actions { display: flex; align-items: center; gap: 1.5rem; }
.account-icon {
  display: none;
  align-items: center;
  color: var(--charcoal);
}
.account-icon svg { width: 23px; height: 23px; }
.account-icon:hover { color: var(--gold); opacity: 1; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(170deg, var(--cream) 0%, var(--ivory) 60%);
  border-bottom: 1px solid var(--line);
  padding: 4rem 1.5rem;
  overflow: hidden;
}

/* ambient motion: soft warm light pools drifting like candlelight on metal */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-bg .glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.9;
  mix-blend-mode: var(--glow-blend);
}

.hero-bg .g1 {
  width: 52vw; height: 52vw;
  background: radial-gradient(circle, rgba(184,150,86,0.85), transparent 66%);
  top: -12%; left: -10%;
}
.hero-bg .g2 {
  width: 48vw; height: 48vw;
  background: radial-gradient(circle, rgba(168,133,75,0.8), transparent 68%);
  bottom: -16%; right: -12%;
}
.hero-bg .g3 {
  width: 42vw; height: 42vw;
  background: radial-gradient(circle, rgba(212,184,130,0.75), transparent 64%);
  top: 28%; left: 36%;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-bg .g1 { animation: drift1 11s ease-in-out infinite alternate; }
  .hero-bg .g2 { animation: drift2 14s ease-in-out infinite alternate; }
  .hero-bg .g3 { animation: drift3 9s ease-in-out infinite alternate; }
  @keyframes drift1 {
    0%   { transform: translate(0,0) scale(1); }
    100% { transform: translate(46%, 34%) scale(1.45); }
  }
  @keyframes drift2 {
    0%   { transform: translate(0,0) scale(1.05); opacity: 0.85; }
    100% { transform: translate(-42%, -28%) scale(1.5); opacity: 1; }
  }
  @keyframes drift3 {
    0%   { transform: translate(0,0) scale(1); opacity: 0.75; }
    100% { transform: translate(-52%, 30%) scale(0.7); opacity: 0.45; }
  }
}

/* real video alternative (used if you swap in <video class="hero-bg">) */
video.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.btn-hero {
  margin-top: 0.4rem;
  background: var(--gold-soft);
  color: #1a1814;            /* stays dark on the gold in both themes */
  border-color: var(--gold-soft);
  box-shadow: 0 6px 22px rgba(168, 133, 75, 0.28);
}

.btn-hero:hover {
  background: var(--charcoal);
  border-color: var(--charcoal);
  color: var(--ivory);
  box-shadow: 0 8px 26px rgba(31, 29, 26, 0.28);
}

.hero h1 {
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 400;
}

.hero .tagline {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  text-transform: lowercase;
  letter-spacing: 0.35em;
  color: var(--gold);
  margin: 1.2rem 0 2.4rem;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 2.6rem;
  border: 1px solid var(--charcoal);
  color: var(--charcoal);
  font-size: 0.78rem;
  text-transform: lowercase;
  letter-spacing: 0.22em;
  transition: all 0.25s;
}

.btn:hover { background: var(--charcoal); color: var(--ivory); opacity: 1; }

.btn-gold { border-color: var(--gold); color: var(--gold); }
.btn-gold:hover { background: var(--gold); color: var(--ivory); }

/* ---------- sections ---------- */
section { padding: 5rem 0; }

.section-title {
  text-align: center;
  font-size: 2.1rem;
  margin-bottom: 0.6rem;
}

.section-sub {
  text-align: center;
  font-size: 0.8rem;
  text-transform: lowercase;
  letter-spacing: 0.25em;
  color: var(--gold);
  margin-bottom: 3rem;
}

/* Arabic script is cursive — letter-spacing/word-spacing breaks the joins between
   letters (the "gaps"), so always reset spacing on Arabic text wherever it appears. */
.ar, .ar-word, [lang="ar"] { letter-spacing: normal; word-spacing: normal; }

/* ---------- product grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2.5rem;
}

.card { text-align: center; }

.card .ph {
  aspect-ratio: 4 / 5;
  background: linear-gradient(145deg, var(--cream), #e9e2d4);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold-soft);
  margin-bottom: 1.1rem;
  transition: transform 0.3s;
}

.card:hover .ph { transform: translateY(-4px); }

.card img.photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--line);
  margin-bottom: 1.1rem;
  display: block;
  transition: transform 0.3s;
}

.card:hover img.photo { transform: translateY(-4px); }

.split img.photo-tall {
  width: 100%;
  max-width: 440px;
  margin-inline: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid var(--line);
  display: block;
}

.masonry img {
  width: 100%;
  display: block;
  break-inside: avoid;
  margin-bottom: 1.5rem;
  border: 1px solid var(--line);
}

.card h3 { font-size: 1.15rem; font-weight: 500; }

.card .ar {
  font-family: "Amiri", var(--serif);
  font-size: 0.95em;
  color: var(--gold);
  margin-inline-start: 0.35rem;
}

.stock-note {
  font-size: 0.72rem;
  text-transform: lowercase;
  letter-spacing: 0.14em;
  margin: -0.3rem 0 0.8rem;
}

.stock-note.ready { color: #5d7a52; }
.stock-note.mto { color: var(--gold-soft); }

.shop-production-note {
  text-align: center;
  font-size: 0.85rem;
  font-style: italic;
  font-family: var(--serif);
  color: var(--ink);
  margin: -1.5rem 0 2.5rem;
}

.card a.card-link { display: block; color: inherit; }
.card a.card-link:hover { opacity: 1; }
.card a.card-link:hover h3 { color: var(--gold); }

.card .price {
  color: var(--gold);
  font-size: 0.9rem;
  margin: 0.3rem 0 0.8rem;
}

/* ---------- product detail page ---------- */
.product {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3.5rem;
  align-items: start;
}

.product-gallery { display: flex; flex-direction: column; gap: 1rem; }
.product-gallery .main {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--line);
}
.product-thumbs { display: flex; gap: 0.8rem; }
.product-thumbs img {
  width: 84px; height: 84px;
  object-fit: cover;
  border: 1px solid var(--line);
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.product-thumbs img:hover, .product-thumbs img.active { opacity: 1; border-color: var(--gold); }

.product-info { padding-top: 0.5rem; }
.breadcrumb {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin-bottom: 1.4rem;
}
.breadcrumb a { color: var(--ink); }
.product-info h1 { font-size: 2.4rem; margin-bottom: 0.4rem; }
.product-info .ar { font-family: "Amiri", serif; color: var(--gold); font-size: 0.9em; margin-inline-start: 0.4rem; }
.product-price { color: var(--gold); font-size: 1.2rem; margin-bottom: 1.2rem; }
.product-desc { margin-bottom: 1.6rem; max-width: 46ch; }
.product-actions { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.6rem; }
.product-meta {
  border-top: 1px solid var(--line);
  margin-top: 1.6rem; padding-top: 1.4rem;
  font-size: 0.85rem;
}
.product-meta dt { color: var(--gold); letter-spacing: 0.12em; font-size: 0.72rem; margin-bottom: 0.2rem; }
.product-meta dd { margin: 0 0 1rem; }

/* "add to order" and everything below it in serif (Cormorant Garamond) */
.product-actions .btn {
  font-family: var(--serif);
  font-size: 1rem;
  letter-spacing: 0.06em;
}
.notify-box p { font-family: var(--serif); font-size: 1rem; }
.notify-box .inline-form input[type=email] { font-family: var(--serif); font-size: 1rem; }
.notify-box .inline-form button {
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

/* wishlist heart */
.wishlist-btn {
  background: none;
  border: 1px solid var(--line);
  width: 46px; height: 46px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  transition: all 0.2s;
  flex: none;
}
.wishlist-btn:hover { border-color: var(--gold); color: var(--gold); }
.wishlist-btn svg { width: 20px; height: 20px; }
.wishlist-btn.saved { color: var(--gold); border-color: var(--gold); background: var(--cream); }
.wishlist-btn.saved svg { fill: var(--gold); }

/* small heart on shop cards */
.card-wish {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(250,248,244,0.85);
  border: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  z-index: 3;
  transition: all 0.2s;
}
.card-wish svg { width: 16px; height: 16px; }
.card-wish:hover { color: var(--gold); }
.card-wish.saved { color: var(--gold); }
.card-wish.saved svg { fill: var(--gold); }
.card { position: relative; }

/* notify-me + newsletter forms */
.inline-form { display: flex; gap: 0.5rem; max-width: 420px; }
.inline-form input[type=email] { flex: 1; padding: 0.7rem 0.9rem; }
.inline-form button {
  border: 1px solid var(--gold-soft);
  background: var(--gold-soft);
  color: var(--charcoal);
  padding: 0 1.3rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.inline-form button:hover { background: var(--charcoal); border-color: var(--charcoal); color: var(--ivory); }

.notify-box {
  background: var(--cream);
  border: 1px solid var(--line);
  padding: 1.2rem 1.4rem;
  margin-top: 0.5rem;
}
.notify-box p { font-size: 0.85rem; margin-bottom: 0.7rem; }

/* newsletter band in footer */
.newsletter {
  border-top: 1px solid #38352f;
  padding: 2rem 0 0;
  margin-bottom: 2rem;
  text-align: center;
}
.newsletter h4 { color: var(--gold-soft); margin-bottom: 0.4rem; }
.newsletter p { font-size: 0.85rem; margin-bottom: 1rem; color: #b8b2a6; }
.newsletter .inline-form { margin: 0 auto; }
.newsletter input[type=email] {
  background: #2a2722;
  border: 1px solid #46423a;
  color: var(--ivory);
}

/* saved-pieces page empty state */
.saved-empty { text-align: center; padding: 3rem 0; color: var(--ink); }

/* ---------- category filter ---------- */
.filters {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.filters button {
  background: none;
  border: 1px solid var(--line);
  padding: 0.5rem 1.4rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  text-transform: lowercase;
  letter-spacing: 0.18em;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s;
}

.filters button.active,
.filters button:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- split section (about teaser) ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.split .ph-tall {
  aspect-ratio: 4 / 5;
  background: linear-gradient(160deg, var(--cream), #e6ddcc);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold-soft);
}

.split h2 { font-size: 2rem; margin-bottom: 1.2rem; }
.split p { margin-bottom: 1.2rem; }

/* intentional empty state for the founder portrait until a real photo is added */
.portrait-placeholder {
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse at center, rgba(255,255,255,0.5), transparent 70%),
    linear-gradient(160deg, var(--cream), #e6ddcc);
  background-blend-mode: screen, normal;
  position: relative;
}

.portrait-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("images/icon-512.png") center/34% no-repeat;
  opacity: 0.12;
}

/* ---------- forms ---------- */
form { max-width: 620px; margin: 0 auto; }

.field { margin-bottom: 1.5rem; }

label {
  display: block;
  font-size: 0.75rem;
  text-transform: lowercase;
  letter-spacing: 0.18em;
  margin-bottom: 0.5rem;
  color: var(--charcoal);
}

input:not([type="checkbox"]):not([type="radio"]), textarea, select {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  background: #fff;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--gold);
}

/* ---------- faq ---------- */
details {
  border-bottom: 1px solid var(--line);
  padding: 1.2rem 0;
}

summary {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--charcoal);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

summary::after { content: "+"; color: var(--gold); font-size: 1.3rem; }
details[open] summary::after { content: "\2212"; }

details p { padding-top: 0.8rem; max-width: 60ch; }

/* ---------- lookbook ---------- */
.masonry {
  columns: 3;
  column-gap: 1.5rem;
}

.masonry .tile {
  break-inside: avoid;
  margin-bottom: 1.5rem;
  background: linear-gradient(150deg, var(--cream), #e9e2d4);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold-soft);
}

.tile.t1 { aspect-ratio: 3/4; }
.tile.t2 { aspect-ratio: 1/1; }
.tile.t3 { aspect-ratio: 4/5; }

/* ---------- footer ---------- */
footer {
  background: var(--charcoal);
  color: #b8b2a6;
  padding: 3.5rem 0 2rem;
  margin-top: 2rem;
  font-size: 0.85rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

footer .logo { color: var(--ivory); margin-bottom: 0.8rem; display: block; }

.ig-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  margin-top: 0.6rem;
  color: var(--gold-soft);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}
.ig-link:hover { color: var(--ivory); opacity: 1; }

/* icon inherits link color and matches the text height */
.ig-icon { width: 1em; height: 1em; flex: none; }

/* inline variant on the contact page */
.ig-inline { display: inline-flex; align-items: center; gap: 0.35em; }

footer h4 {
  font-size: 0.72rem;
  text-transform: lowercase;
  letter-spacing: 0.2em;
  color: var(--gold-soft);
  margin-bottom: 1rem;
  font-weight: 400;
}

footer ul { list-style: none; }
footer li { margin-bottom: 0.5rem; }
footer a { color: #b8b2a6; }
footer a:hover { color: var(--ivory); opacity: 1; }

.copyright {
  border-top: 1px solid #38352f;
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

/* ---------- motion & interactivity ---------- */
@media (prefers-reduced-motion: no-preference) {
  @keyframes riseIn {
    from { opacity: 0; transform: translateY(26px); }
    to   { opacity: 1; transform: none; }
  }

  .hero-logo     { animation: riseIn 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero .tagline { animation: riseIn 1.1s 0.25s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero .btn     { animation: riseIn 1.1s 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

  .reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  .reveal.in { opacity: 1; transform: none; }

  /* gold shimmer sweep on buttons */
  .btn { position: relative; overflow: hidden; }
  .btn::after {
    content: "";
    position: absolute;
    top: 0; height: 100%;
    left: -80%; width: 50%;
    background: linear-gradient(105deg, transparent, rgba(255,255,255,0.5), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
    pointer-events: none;
  }
  .btn:hover::after { left: 130%; }
}

/* hover photo cross-fade (js wraps imgs with data-alt) */
.swap { position: relative; overflow: hidden; }
.swap .alt-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
  margin: 0;
}
.swap:hover .alt-photo { opacity: 1; }

/* slow marquee band */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
  background: var(--ivory);
}

.marquee-track {
  display: flex;
  width: max-content;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--gold);
  white-space: nowrap;
}

/* two identical groups; each ends with one trailing gap so a -50% shift
   lands exactly one period later — seamless loop, no white void */
.marquee-group {
  display: flex;
  gap: 3.5rem;
  padding-right: 3.5rem;
}

.marquee-track .ar-word { font-family: "Amiri", serif; font-style: normal; }

@media (prefers-reduced-motion: no-preference) {
  .marquee-track { animation: drift 60s linear infinite; }
  @keyframes drift { to { transform: translateX(-50%); } }
}

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .menu-btn { display: block; }
  .account-icon { display: inline-flex; }   /* shortcut appears beside the hamburger */

  nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ivory);
    border-bottom: 1px solid var(--line);
    display: none;
  }

  nav.open { display: block; }

  nav ul {
    flex-direction: column;
    gap: 0;
    padding: 1rem 1.5rem;
  }

  nav li { border-bottom: 1px solid var(--line); }
  nav li:last-child { border-bottom: none; }
  nav a { display: block; padding: 0.9rem 0; }

  /* the injected dark-mode toggle matches the nav items' spacing in the dropdown */
  .nav-theme { padding: 0.3rem 0; }
  .nav-theme .theme-toggle { padding: 0.9rem 0; width: 100%; }

  .split { grid-template-columns: 1fr; gap: 2.5rem; }
  .split .btn { display: block; width: fit-content; margin-inline: auto; }
  .masonry { columns: 2; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  section { padding: 3.5rem 0; }

  /* product detail stacks to one column */
  .product { grid-template-columns: 1fr; gap: 2rem; }
  .product-info h1 { font-size: 2rem; }
  .product-thumbs img { width: 70px; height: 70px; }

  /* email-capture forms wrap instead of overflowing */
  .inline-form { flex-wrap: wrap; }
  .inline-form input[type=email] { flex: 1 1 100%; }
  .inline-form button { flex: 1 1 100%; padding: 0.7rem 1.3rem; }
}

@media (max-width: 480px) {
  .masonry { columns: 1; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1.2rem; }
  .hero-logo { width: min(280px, 72vw); }
  .card-wish { width: 30px; height: 30px; }
}

/* ---------- cart icon (header) ---------- */
.cart-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: var(--charcoal);
}
.cart-icon svg { width: 22px; height: 22px; }
.cart-icon:hover { color: var(--gold); opacity: 1; }
.cart-count {
  position: absolute;
  top: -7px;
  right: -9px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--gold);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 400;
  line-height: 16px;
  text-align: center;
}

/* on desktop, cluster nav + cart to the right of the logo */
@media (min-width: 761px) {
  .header-inner { justify-content: flex-start; }
  nav { order: 2; margin-left: auto; }
  .header-actions { order: 3; margin-left: 1.6rem; }
  /* the icon-button's box sits a hair high next to the text links — nudge it onto the line */
  .nav-theme .theme-toggle { transform: translateY(2px); }
}

/* ---------- cart page ---------- */
.cart-wrap { max-width: 1000px; }
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2.5rem;
  margin-top: 2rem;
  align-items: start;
}
.cart-empty { color: var(--ink); padding: 2rem 0; }
.cart-row {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 1.2rem;
  align-items: center;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--line);
}
.cart-thumb img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 2px;
}
.cart-row-info h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--charcoal);
  margin: 0 0 0.2rem;
}
.cart-row-info .ar { color: var(--gold); font-size: 0.95rem; }
.cart-row-info .price { color: var(--ink); font-size: 0.85rem; margin: 0 0 0.6rem; }
.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 2px;
}
.qty button {
  width: 30px;
  height: 30px;
  background: none;
  border: none;
  color: var(--ink);
  font-size: 1rem;
  cursor: pointer;
}
.qty button:hover { color: var(--gold); }
.qty span { min-width: 26px; text-align: center; font-size: 0.9rem; color: var(--charcoal); }
.cart-row-end { text-align: right; }
.cart-line { font-family: var(--serif); font-size: 1.1rem; color: var(--charcoal); margin: 0 0 0.4rem; }
.cart-remove {
  background: none;
  border: none;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  cursor: pointer;
  opacity: 0.7;
}
.cart-remove:hover { color: var(--gold); opacity: 1; }
.cart-summary {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1.6rem;
  position: sticky;
  top: 90px;
}
.cart-totals .row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--ink);
  padding: 0.4rem 0;
}
.cart-totals .row.muted { color: var(--gold); }
.cart-totals .row.total {
  border-top: 1px solid var(--line);
  margin-top: 0.5rem;
  padding-top: 0.8rem;
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--charcoal);
}
.checkout-go { width: 100%; text-align: center; margin-top: 1.2rem; }
.cart-note { font-size: 0.72rem; color: var(--ink); opacity: 0.8; margin-top: 0.8rem; text-align: center; }

/* add-to-cart button feedback */
.add-cart-btn.added { background: var(--gold-soft); border-color: var(--gold-soft); }

/* ---------- checkout page ---------- */
.checkout-wrap { max-width: 980px; }
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2.5rem;
  margin-top: 2rem;
  align-items: start;
}
.field-group { margin-bottom: 1.6rem; }
.field-group > label {
  display: block;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  color: var(--ink);
  margin-bottom: 0.7rem;
}
.checkout-submit { width: 100%; text-align: center; margin-top: 0.5rem; }
.checkout-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.checkout-message {
  font-size: 0.85rem;
  padding: 0.8rem 1rem;
  border-radius: 3px;
  margin: 0.5rem 0 1rem;
}
.checkout-message.error { background: rgba(168, 60, 50, 0.1); color: #a83c32; }
.checkout-secure {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: var(--ink);
  opacity: 0.8;
  margin-top: 1rem;
}
.checkout-aside {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1.6rem;
  position: sticky;
  top: 90px;
}
.checkout-aside h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--charcoal);
  margin: 0 0 1rem;
}
.sum-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--ink);
  padding: 0.45rem 0;
}
.sum-row.total {
  border-top: 1px solid var(--line);
  margin-top: 0.5rem;
  padding-top: 0.8rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--charcoal);
}
.confirm-body { max-width: 30rem; margin: 1rem auto 2rem; color: var(--ink); line-height: 1.7; }

@media (max-width: 760px) {
  .cart-layout, .checkout-layout { grid-template-columns: 1fr; gap: 1.8rem; }
  .cart-summary, .checkout-aside { position: static; }
  .cart-row { grid-template-columns: 70px 1fr auto; gap: 0.9rem; }
  .cart-thumb img { width: 70px; height: 70px; }
}

/* ---------- discount code (checkout) ---------- */
.promo-row { display: flex; gap: 0.6rem; }
#promo-input {
  flex: 1;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--ivory);
  color: var(--charcoal);
  font-family: var(--sans);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
#promo-apply { padding: 0.7rem 1.4rem; white-space: nowrap; }
.promo-msg { font-size: 0.8rem; margin-top: 0.5rem; }
.promo-msg.ok { color: var(--gold); }
.promo-msg.error { color: #a83c32; }
.sum-row.discount { color: var(--gold); }

/* ---------- cookie consent bar ---------- */
.cookie-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 200;
  background: var(--header-bg, var(--cream));
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  padding: 1rem 1.5rem;
}
.cookie-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.9rem 1.6rem;
}
.cookie-text {
  flex: 1 1 340px;
  min-width: 0;
  font-size: clamp(0.78rem, 1.4vw, 0.9rem);
  color: var(--ink);
  margin: 0;
  line-height: 1.55;
}
/* category toggles stay hidden until "customize" is clicked */
.cookie-cats { flex: 1 1 100%; gap: 1rem 1.8rem; flex-wrap: wrap; }
.cookie-cats[hidden] { display: none; }
.cookie-cats:not([hidden]) { display: flex; }
.cookie-cat { font-size: 0.8rem; color: var(--ink); display: inline-flex; align-items: center; gap: 0.45rem; line-height: 1.3; }
.cookie-cat span { color: var(--gold); }
.cookie-cat input[type="checkbox"] { width: 16px; height: 16px; flex: 0 0 auto; margin: 0; accent-color: var(--gold); cursor: pointer; }
.cookie-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.cookie-bar .btn { padding: 0.55rem 1.2rem; font-size: 0.72rem; }

/* ---------- discount popup ---------- */
.promo-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(20, 18, 14, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.promo-popup {
  position: relative;
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 4px;
  max-width: 420px;
  width: 100%;
  padding: 2.4rem 2rem;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}
.promo-close {
  position: absolute;
  top: 0.6rem; right: 0.9rem;
  background: none; border: none;
  font-size: 1.6rem; line-height: 1;
  color: var(--ink); cursor: pointer;
  opacity: 0.6;
}
.promo-close:hover { opacity: 1; color: var(--gold); }
.promo-popup h2 { font-size: 1.9rem; margin: 0.3rem 0 0.8rem; color: var(--charcoal); }
.promo-sub { font-size: 0.9rem; color: var(--ink); line-height: 1.6; margin-bottom: 1.4rem; }
.promo-form { display: flex; flex-direction: column; gap: 0.7rem; }
.promo-form input {
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--sans);
  font-size: 0.95rem;
}
.promo-form .btn { width: 100%; text-align: center; margin-top: 0.2rem; }
.promo-consent { font-size: 0.68rem; color: var(--ink); opacity: 0.75; line-height: 1.4; margin: 0.5rem 0 0; }
.promo-result { font-size: 0.95rem; margin: 0.6rem 0 0; line-height: 1.5; }
.promo-result.ok { color: var(--gold); }
.promo-result.ok strong { font-size: 1.15rem; letter-spacing: 0.06em; }
.promo-result.error { color: #a83c32; }

@media (max-width: 480px) {
  .cookie-actions { width: 100%; }
  .cookie-bar .btn { flex: 1; }
  .promo-popup { padding: 2rem 1.4rem; }
}

/* ---------- certificate of authenticity (verify page) ---------- */
.verify-msg { color: var(--ink); }
.verify-card { border: 1px solid var(--line); border-radius: 4px; padding: 2rem; background: var(--cream); margin-top: 1.5rem; }
.verify-card.good { border-color: var(--gold-soft); }
.verify-card.bad { border-color: #a83c32; }
.verify-badge { font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.16em; text-transform: lowercase; margin: 0 0 0.6rem; }
.verify-card.good .verify-badge { color: var(--gold); }
.verify-card.bad .verify-badge { color: #a83c32; }
.verify-card h1 { font-size: 2rem; margin: 0 0 0.3rem; }
.verify-serial { color: var(--ink); font-size: 0.85rem; letter-spacing: 0.08em; margin: 0 0 1rem; }
.verify-prov { font-style: italic; color: var(--ink); margin-bottom: 1rem; }
.verify-owner { color: var(--gold); font-family: var(--serif); font-size: 1.2rem; margin: 0.5rem 0 1rem; }
.perks { margin-top: 1.5rem; border-top: 1px solid var(--line); padding-top: 1.2rem; }
.perks h3 { font-family: var(--serif); font-size: 1.2rem; color: var(--charcoal); margin: 0 0 0.8rem; }
.perks ul { list-style: none; padding: 0; }
.perks li { padding: 0.55rem 0; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 0.9rem; }
.perks li:last-child { border-bottom: none; }
.perks strong { color: var(--gold); }
.transfer-box { margin-top: 1.5rem; border-top: 1px solid var(--line); padding-top: 1.2rem; }
.verify-msg.small { font-size: 0.78rem; opacity: 0.8; margin-top: 0.5rem; }
.linklike { background: none; border: none; color: var(--gold); cursor: pointer; font: inherit; text-decoration: underline; padding: 0; }

/* ---------- accessibility ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 999;
  background: var(--charcoal);
  color: var(--ivory);
  padding: 0.7rem 1.2rem;
  font-size: 0.85rem;
  border-radius: 0 0 3px 0;
}
.skip-link:focus { left: 0; }
#main:focus { outline: none; }   /* programmatic focus target after skip — no ring needed */

/* a clear, consistent keyboard focus ring everywhere (mouse clicks unaffected) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
.thumb:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 2px;
}

/* keyboard-operable product thumbnails */
.product-thumbs .thumb { cursor: pointer; }

/* ---------- forced-colors / Windows high-contrast ---------- */
@media (forced-colors: active) {
  /* badges/states that were color-only need a non-color cue */
  .cart-count { border: 1px solid; }
  .thumb.active { outline: 2px solid; outline-offset: 1px; }
  .card-wish.saved, .wishlist-btn.saved { outline: 2px solid; border-radius: 4px; }
  /* buttons keep an explicit border so they don't flatten into text */
  .btn, .btn-hero, .add-cart-btn, .checkout-go, .checkout-submit,
  .cookie-bar .btn, .promo-form .btn { border: 1px solid; }
  .promo-popup, .cookie-bar { border: 1px solid; }
}

/* primary purchase CTAs — filled gold that flips to black on hover, matching the
   hero "shop the collection" button, for one consistent buy-flow feel */
.add-cart-btn,
.checkout-go,
.checkout-submit,
.split .btn {
  background: var(--gold-soft);
  border-color: var(--gold-soft);
  color: #1a1814;                 /* stays dark on the gold in both themes */
  box-shadow: 0 6px 22px rgba(168, 133, 75, 0.28);
}
.add-cart-btn:hover,
.checkout-go:hover,
.checkout-submit:hover,
.split .btn:hover {
  background: var(--charcoal);
  border-color: var(--charcoal);
  color: var(--ivory);
  box-shadow: 0 8px 26px rgba(31, 29, 26, 0.28);
}
/* keep the disabled checkout button from looking clickable */
.checkout-submit:disabled,
.checkout-submit:disabled:hover {
  background: var(--gold-soft);
  border-color: var(--gold-soft);
  color: #1a1814;
  box-shadow: none;
}
