:root {
  --navy: #1b2a4a;
  --navy-deep: #14203a;
  --cream: #f5edd8;
  --cream-soft: #faf5e6;
  --red: #b23a2f;
  --red-deep: #8f2c23;
  --ink: #1b2a4a;
  --muted: #5b6478;
  --line: rgba(27, 42, 74, 0.15);
  --shadow: 0 10px 30px rgba(20, 32, 58, 0.12);
  --radius: 14px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .brand-name {
  font-family: "Fraunces", Georgia, serif;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }

/* ---------- HEADER ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem clamp(1rem, 4vw, 3rem);
  background: rgba(245, 237, 216, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 0.6rem; }
.brand-seal { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.brand-name { font-size: 1.15rem; font-weight: 700; color: var(--navy); }
.nav { display: flex; gap: 1.5rem; font-weight: 500; font-size: 0.95rem; margin-left: auto; }
.nav a { color: var(--navy); opacity: 0.8; transition: opacity 0.2s; }
.nav a:hover { opacity: 1; color: var(--red); }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s;
  border: 2px solid transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--red); color: var(--cream-soft); box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--red-deep); }
.btn-ghost { color: var(--navy); border-color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: var(--cream-soft); }

/* ---------- HERO ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 6rem) clamp(1rem, 4vw, 3rem);
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--red);
  margin-bottom: 1rem;
}
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 600;
  color: var(--navy);
  text-wrap: balance; /* keeps lines even — no orphaned "chaos" */
  max-width: 20ch;
}
.lede { font-size: 1.15rem; color: var(--muted); margin: 1.5rem 0 2rem; max-width: 32ch; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.tagline {
  margin-top: 2.5rem;
  font-family: "Fraunces", serif;
  font-style: italic;
  letter-spacing: 0.05em;
  color: var(--navy);
  opacity: 0.7;
}

.hero-art {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, #6d4aa8, #4a2d7a);
}
.hero-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-fallback {
  position: absolute; inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--cream-soft);
  text-align: center;
}
.art-fallback span { font-size: 2.5rem; }
.art-fallback code { background: rgba(0,0,0,0.25); padding: 0.1rem 0.4rem; border-radius: 6px; }
.hero-art.art-missing img { display: none; }
.hero-art.art-missing .art-fallback { display: flex; }

/* ---------- SECTIONS ---------- */
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 600;
  color: var(--navy);
  text-align: center;
}
.section-title.left { text-align: left; }
.section-sub { text-align: center; color: var(--muted); margin-top: 0.5rem; margin-bottom: 2.5rem; }

.products { max-width: 1200px; margin: 0 auto; padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 4vw, 3rem); }

/* ---------- PRODUCT CARDS ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.product-card {
  background: var(--cream-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 14px rgba(20, 32, 58, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.product-img {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--navy), var(--navy-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.product-img::after {
  content: attr(data-label);
  color: rgba(245, 237, 216, 0.55);
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 1.1rem;
}
.product-card--premium .product-img {
  background: linear-gradient(135deg, #6d4aa8, #b23a2f);
}
.product-body { padding: 1.4rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; position: relative; }
.product-body h3 { font-size: 1.4rem; color: var(--navy); }
.fit { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--red); font-weight: 600; }
.desc { color: var(--muted); font-size: 0.95rem; flex: 1; }
.price { font-size: 1.3rem; font-weight: 700; color: var(--navy); margin-top: 0.5rem; }
.price span { font-size: 0.85rem; font-weight: 500; color: var(--muted); }
.btn-buy {
  background: var(--navy); color: var(--cream-soft); text-align: center; margin-top: 0.3rem;
}
.btn-buy:hover { background: var(--navy-deep); }
.btn-buy-alt { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-buy-alt:hover { background: var(--navy); color: var(--cream-soft); }
.ribbon {
  position: absolute; top: -0.8rem; right: 1.4rem;
  background: var(--red); color: var(--cream-soft);
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  padding: 0.3rem 0.7rem; border-radius: 999px; box-shadow: var(--shadow);
}

/* ---------- WHY ---------- */
.why { background: var(--navy); color: var(--cream-soft); padding: clamp(3rem, 6vw, 5rem) clamp(1rem, 4vw, 3rem); }
.why .section-title { color: var(--cream-soft); }
.feature-grid {
  max-width: 1000px; margin: 2.5rem auto 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem;
}
.feature h4 { font-size: 1.2rem; color: var(--cream); margin-bottom: 0.4rem; }
.feature h4::before { content: "◆"; color: var(--red); margin-right: 0.5rem; }
.feature p { color: rgba(245, 237, 216, 0.78); font-size: 0.95rem; }

/* ---------- ABOUT ---------- */
.about {
  max-width: 1000px; margin: 0 auto;
  padding: clamp(3rem, 6vw, 5rem) clamp(1rem, 4vw, 3rem);
  display: grid; grid-template-columns: 200px 1fr; gap: 3rem; align-items: center;
}
.about-seal { width: 100%; max-width: 200px; border-radius: 50%; box-shadow: var(--shadow); }
.about-copy p { color: var(--muted); margin-top: 1rem; }
.about-copy a { color: var(--red); font-weight: 600; text-decoration: underline; }

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--navy-deep); color: rgba(245, 237, 216, 0.7);
  padding: 2.5rem clamp(1rem, 4vw, 3rem); text-align: center; font-size: 0.85rem;
}
.foot-brand { font-family: "Fraunces", serif; font-size: 1rem; color: var(--cream); margin-bottom: 1rem; }
.disclaimer { max-width: 70ch; margin: 0 auto 1rem; line-height: 1.5; opacity: 0.85; }
.copyright { opacity: 0.7; }

.nav a.active { color: var(--red); opacity: 1; }

/* ---------- SUB-PAGE (color browse) ---------- */
.subhero {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 3rem) clamp(1rem, 4vw, 3rem) 0.5rem;
}
.back-link { font-weight: 600; font-size: 0.9rem; color: var(--red); }
.back-link:hover { text-decoration: underline; }
.subhero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 600;
  color: var(--navy);
  margin-top: 0.6rem;
}
.subhero p { color: var(--muted); margin-top: 0.6rem; max-width: 54ch; }
.subhero strong { color: var(--navy); }

.finish-filter {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.2rem clamp(1rem, 4vw, 3rem) 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.pill {
  border: 1px solid var(--line);
  background: var(--cream-soft);
  color: var(--navy);
  border-radius: 999px;
  padding: 0.4rem 1.05rem;
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.pill:hover { border-color: var(--navy); }
.pill.active { background: var(--navy); color: var(--cream-soft); border-color: var(--navy); }
.swatch-finish {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
  color: var(--red);
}

.color-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem clamp(1rem, 4vw, 3rem) 3.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.5rem;
}
.swatch-card {
  background: var(--cream-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 14px rgba(20, 32, 58, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}
.swatch-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.swatch-img {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--swatch, #ccc);
  display: flex;
  align-items: center;
  justify-content: center;
}
.swatch-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.swatch-img.no-img img { display: none; }
.swatch-tag { display: none; color: #fff; font-weight: 600; font-size: 1.1rem; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45); }
.swatch-img.no-img .swatch-tag { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; }
.swatch-img.no-img .swatch-tag::after {
  content: "📷 photo soon"; font-size: 0.7rem; font-weight: 500; opacity: 0.85;
}
.swatch-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: 0.5rem; }
.swatch-body h3 { font-size: 1.2rem; color: var(--navy); display: flex; align-items: center; gap: 0.55rem; }
.swatch-dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.18); flex: none; }
.swatch-body .price { font-size: 1.1rem; }
.swatch-body .btn-buy { text-align: center; margin-top: 0.2rem; }

/* ---------- CART ---------- */
.cart-btn {
  position: relative; background: none; border: none; cursor: pointer;
  font-size: 1.35rem; line-height: 1; padding: 0.3rem; margin-left: 1.2rem;
}
.cart-count {
  position: absolute; top: -4px; right: -7px; background: var(--red); color: #fff;
  font-family: "Inter", sans-serif; font-size: 0.68rem; font-weight: 700;
  min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
}
.cart-backdrop {
  position: fixed; inset: 0; background: rgba(20, 32, 58, 0.45);
  opacity: 0; pointer-events: none; transition: opacity 0.25s; z-index: 90;
}
.cart-backdrop.show { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(380px, 90vw);
  background: var(--cream-soft); box-shadow: -10px 0 40px rgba(20, 32, 58, 0.2);
  transform: translateX(100%); transition: transform 0.28s ease; z-index: 100;
  display: flex; flex-direction: column;
}
.cart-drawer.show { transform: translateX(0); }
.cart-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 1.3rem; border-bottom: 1px solid var(--line);
}
.cart-head h3 { font-size: 1.3rem; color: var(--navy); }
.cart-x { background: none; border: none; font-size: 1.7rem; line-height: 1; cursor: pointer; color: var(--muted); }
.cart-items { flex: 1; overflow-y: auto; padding: 0.4rem 1.3rem; }
.cart-empty { color: var(--muted); text-align: center; padding: 2.5rem 0; }
.cart-row {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center;
  gap: 0.8rem; padding: 0.9rem 0; border-bottom: 1px solid var(--line);
}
.cart-row-main strong { display: block; color: var(--navy); font-size: 0.96rem; }
.cart-row-color { font-size: 0.8rem; color: var(--muted); }
.cart-qty { display: flex; align-items: center; gap: 0.5rem; }
.cart-qty button {
  width: 26px; height: 26px; border: 1px solid var(--line); background: var(--cream);
  border-radius: 6px; cursor: pointer; font-size: 1rem; color: var(--navy);
}
.cart-row-price { font-weight: 600; color: var(--navy); font-size: 0.92rem; }
.cart-foot { border-top: 1px solid var(--line); padding: 1.2rem 1.3rem; }
.cart-sub { display: flex; justify-content: space-between; align-items: baseline; color: var(--navy); }
.cart-sub strong { font-size: 1.25rem; }
.cart-note { font-size: 0.78rem; color: var(--muted); margin: 0.4rem 0 1rem; }
.cart-checkout { width: 100%; }
.cart-checkout:disabled { opacity: 0.45; cursor: not-allowed; }
.cart-clear {
  display: block; width: 100%; margin-top: 0.6rem; padding: 0.4rem;
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 0.82rem; text-decoration: underline;
}
.cart-clear:hover { color: var(--red); }

/* ---------- CONFIRMATION PAGE ---------- */
.confirm { max-width: 600px; margin: 0 auto; padding: clamp(3rem, 8vw, 6rem) 1.5rem; text-align: center; }
.confirm-seal {
  width: 72px; height: 72px; border-radius: 50%; background: var(--red); color: #fff;
  font-size: 2.2rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem;
}
.confirm h1 { font-size: clamp(2rem, 5vw, 3rem); color: var(--navy); }
.confirm p { color: var(--muted); margin: 1.2rem 0 2rem; font-size: 1.1rem; }
.confirm .tagline { margin-top: 2.5rem; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { order: -1; aspect-ratio: 16 / 11; }
  .nav { display: none; }
  .about { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}

/* ---------- STOCK STATES (cart.js + stock.json) ---------- */
.swatch-card.sold-out { opacity: 0.72; }
.swatch-card.sold-out .swatch-img { filter: grayscale(0.85); }
.btn.btn-soldout,
.btn-buy:disabled {
  background: var(--muted);
  border-color: var(--muted);
  color: var(--cream-soft);
  cursor: not-allowed;
  box-shadow: none;
}
.stock-note {
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--red-deep);
}
.cart-qty button:disabled { opacity: 0.35; cursor: not-allowed; }

/* ---------- VOLUME PRICING (cart.js fills [data-volume-strip]/[data-volume-hint]) ---------- */
.tier-strip {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.1rem clamp(1rem, 4vw, 3rem) 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}
.tier-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--red);
  margin-right: 0.3rem;
}
.tier-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--cream-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.35rem 0.9rem;
  line-height: 1.25;
}
.tier-qty { font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.tier-price { font-weight: 700; color: var(--navy); font-size: 0.95rem; }
.tier-note { flex-basis: 100%; font-size: 0.8rem; color: var(--muted); }
.bulk-hint { font-size: 0.85rem; font-weight: 600; color: var(--red-deep); }
.bulk-hint:empty { display: none; }
.cart-upsell {
  margin: 0.7rem 0 0.2rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--red-deep);
  background: rgba(178, 58, 47, 0.07);
  border: 1px dashed rgba(178, 58, 47, 0.35);
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
}

/* ---------- FREE SHIPPING (announce bar + drawer progress) ---------- */
.announce-bar {
  background: var(--navy-deep);
  color: var(--cream);
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.45rem 1rem;
}
.ship-progress { margin-bottom: 0.9rem; }
.ship-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(27, 42, 74, 0.12);
  overflow: hidden;
}
.ship-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--red);
  transition: width 0.3s ease;
}
.ship-progress.unlocked .ship-bar span { background: #3e8e5a; }
.ship-msg { font-size: 0.8rem; color: var(--muted); margin-top: 0.35rem; }
.ship-progress.unlocked .ship-msg { color: #2e6b44; }
