/* ==========================================================================
   Nourishing Nations — design system
   Palette taken from the brand mark: deep leaf green, clay red, crown gold,
   sitting on a warm paper cream.
   ========================================================================== */

:root {
  --green-900: #0e2f1c;
  --green-800: #163f26;
  --green-700: #1e5631;
  --green-600: #2a7342;
  --green-100: #e4efe6;

  --red-700: #8f1b13;
  --red-600: #b02020;
  --red-100: #f7e3e0;

  --gold-600: #c9931b;
  --gold-500: #e0a91e;
  --gold-200: #f6e3ad;

  --navy-900: #12184f;

  --cream:     #fbf7f0;
  --cream-2:   #f3ece0;
  --paper:     #ffffff;

  --ink:       #1c1a17;
  --ink-2:     #4a453d;
  --ink-3:     #7a736a;
  --line:      #e6ded1;

  --radius-sm: 10px;
  --radius:    18px;
  --radius-lg: 28px;

  --shadow-sm: 0 1px 2px rgba(28, 26, 23, .06), 0 2px 8px rgba(28, 26, 23, .05);
  --shadow:    0 2px 6px rgba(28, 26, 23, .06), 0 12px 32px rgba(28, 26, 23, .08);
  --shadow-lg: 0 8px 20px rgba(28, 26, 23, .10), 0 32px 64px rgba(28, 26, 23, .14);

  --header-h: 74px;
  --wrap: 1240px;

  --font-display: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------------------------------------------------------------- reset */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: clip;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

/* height:auto is load-bearing: without it a width-constrained image keeps the
   height from its HTML attribute and stretches. Class rules that set a real
   height (.brand img, .card-media img, …) still win on specificity. */
img { max-width: 100%; height: auto; display: block; }

a { color: var(--green-700); text-decoration: none; }
a:hover { color: var(--red-600); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 .5em;
  color: var(--green-900);
}

h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--green-800); color: #fff; padding: .8rem 1.2rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------------------------------------------------------------- layout */

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2.5rem, 760px); margin-inline: auto; }

.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section--tight { padding: clamp(2rem, 4vw, 3rem) 0; }

.eyebrow {
  font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--red-600); margin: 0 0 .7rem;
}

.lede { font-size: 1.1rem; color: var(--ink-2); max-width: 60ch; }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap; margin-bottom: 2rem;
}
.section-head h2 { margin: 0; }

/* ---------------------------------------------------------------- buttons */

.btn {
  --btn-bg: var(--green-700);
  --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 600; line-height: 1;
  padding: .95rem 1.6rem;
  border: 1px solid transparent; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  cursor: pointer; text-align: center;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
  box-shadow: var(--shadow-sm);
}
.btn:hover { color: var(--btn-fg); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn[disabled], .btn.is-busy { opacity: .55; pointer-events: none; transform: none; }

.btn--gold  { --btn-bg: var(--gold-500); --btn-fg: var(--green-900); }
.btn--red   { --btn-bg: var(--red-600); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--green-800); border-color: var(--green-700); box-shadow: none; }
.btn--ghost:hover { background: var(--green-100); }
.btn--light { --btn-bg: #fff; --btn-fg: var(--green-900); }
.btn--block { width: 100%; }
.btn--lg    { padding: 1.15rem 2.2rem; font-size: 1.05rem; }
.btn--sm    { padding: .6rem 1.1rem; font-size: .88rem; }

/* ---------------------------------------------------------------- header */

.announce {
  background: var(--green-900);
  color: var(--gold-200);
  font-size: .78rem;
  letter-spacing: .06em;
  text-align: center;
  padding: .58rem 1rem;
}
.announce span { opacity: .95; }

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: transparent;
  transition: box-shadow .25s var(--ease);
}
/* The frosted panel lives here rather than on .site-header, because a
   backdrop-filter on an element makes it the containing block for any
   position:fixed descendant — which would trap the mega menu inside the header. */
.site-header::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: rgba(251, 247, 240, .92);
  backdrop-filter: saturate(1.5) blur(16px);
  -webkit-backdrop-filter: saturate(1.5) blur(16px);
  border-bottom: 1px solid var(--line);
}
.site-header.is-stuck { box-shadow: 0 6px 24px rgba(28, 26, 23, .07); }

.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; gap: 1.5rem;
}

/* --- brand. Never constrain both axes: the mark is 863x777. */
.brand { display: flex; align-items: center; gap: .65rem; margin-right: auto; text-decoration: none; }
.brand img { height: 46px; width: auto; }
.brand-name {
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  line-height: 1.06; color: var(--green-900); letter-spacing: -.015em;
}
.brand-name span { display: block; }

/* --- nav */
.nav { display: flex; align-items: center; gap: .35rem; }

.nav-item { display: flex; }

.nav-link {
  display: inline-flex; align-items: center; gap: .35rem;
  font: inherit; font-size: .92rem; font-weight: 600; letter-spacing: .01em;
  color: var(--ink); background: none; border: 0; cursor: pointer;
  padding: .55rem .9rem; border-radius: 999px;
  text-decoration: none;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.nav-link:hover { background: var(--green-100); color: var(--green-900); }
.nav-link[aria-current="page"] { color: var(--green-800); }
.nav-link[aria-current="page"]::after {
  content: ""; position: absolute; left: .9rem; right: .9rem; bottom: .28rem;
  height: 2px; border-radius: 2px; background: var(--gold-500);
}
.nav-link .chev { transition: transform .22s var(--ease); opacity: .6; }
.nav-trigger[aria-expanded="true"] { background: var(--green-100); color: var(--green-900); }
.nav-trigger[aria-expanded="true"] .chev { transform: rotate(180deg); }

/* --- mega menu */
.mega {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 48px rgba(28, 26, 23, .12);
  z-index: 59;
  animation: megaIn .2s var(--ease);
}
/* Opacity only: a transform here would leave the panel mis-positioned if the
   animation is ever paused (background tabs, reduced-motion). */
@keyframes megaIn { from { opacity: 0; } to { opacity: 1; } }
.mega[hidden] { display: none; }
.mega-inner { padding: 2rem 0 2.2rem; }
.mega-cols { display: grid; grid-template-columns: 1.6fr .9fr; gap: 3rem; }

.mega-label {
  font-size: .68rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  color: var(--red-600); margin: 0 0 .9rem;
}

.mega-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; grid-template-columns: 1fr 1fr; }
.mega-list a {
  display: grid; grid-template-columns: 1fr auto; align-items: baseline; column-gap: .6rem;
  padding: .7rem .85rem; border-radius: 12px; text-decoration: none; color: var(--ink);
  transition: background .16s var(--ease);
}
.mega-list a:hover { background: var(--cream-2); color: var(--ink); }
.mega-name { font-weight: 600; font-size: .96rem; color: var(--green-900); }
.mega-meta {
  font-size: .7rem; font-weight: 700; color: var(--ink-3);
  background: var(--cream-2); border-radius: 999px; padding: .1rem .5rem;
}
.mega-list a:hover .mega-meta { background: var(--paper); }
.mega-tag { grid-column: 1 / -1; font-size: .8rem; color: var(--ink-3); margin-top: .1rem; }

.mega-side { border-left: 1px solid var(--line); padding-left: 2.2rem; }
.mega-all {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 700; font-size: .95rem; color: var(--green-800); text-decoration: none;
}
.mega-all svg { transition: transform .2s var(--ease); }
.mega-all:hover svg { transform: translateX(4px); }

.mega-feature {
  display: flex; gap: .9rem; align-items: center; text-decoration: none;
  padding: .7rem; border: 1px solid var(--line); border-radius: 14px;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.mega-feature:hover { border-color: var(--green-600); box-shadow: var(--shadow-sm); }
.mega-feature img { width: 64px; height: auto; border-radius: 8px; flex: none; }
.mega-feature strong { display: block; font-size: .92rem; color: var(--green-900); line-height: 1.3; }
.mega-feature em { font-style: normal; font-size: .88rem; font-weight: 700; color: var(--red-600); }

/* --- header buttons */
.header-actions { display: flex; align-items: center; gap: .4rem; }

.icon-btn {
  position: relative;
  display: inline-grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid transparent; background: none; color: var(--ink);
  cursor: pointer; transition: background .18s var(--ease), border-color .18s var(--ease);
}
.icon-btn:hover { background: var(--green-100); border-color: var(--green-100); }

.cart-count {
  position: absolute; top: 1px; right: -1px;
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: var(--red-600); color: #fff; font-size: .68rem; font-weight: 800;
  display: grid; place-items: center; border: 2px solid var(--cream);
}
.cart-count[data-empty="1"] { display: none; }

.menu-toggle { display: none; }

/* ---------------------------------------------------------------- hero */

.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 88% 0%, rgba(224,169,30,.20), transparent 60%),
    radial-gradient(90% 80% at 0% 100%, rgba(30,86,49,.14), transparent 62%),
    var(--cream);
}
.hero-inner {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem);
  align-items: center; padding: clamp(3rem, 7vw, 6rem) 0;
}
.hero h1 { margin-bottom: 1rem; }
.hero h1 em { font-style: italic; color: var(--red-600); }
.hero .lede { font-size: 1.15rem; }
.hero-cta { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.8rem; }

.hero-art { position: relative; display: grid; place-items: center; }
.hero-art img { width: min(100%, 420px); filter: drop-shadow(0 24px 48px rgba(28,26,23,.18)); }
.hero-art::before {
  content: ""; position: absolute; inset: 8% 6%;
  border-radius: 50%; background: radial-gradient(circle, rgba(224,169,30,.28), transparent 68%);
}

.trust-row {
  display: flex; flex-wrap: wrap; gap: 1.4rem 2.4rem;
  border-top: 1px solid var(--line); padding: 1.1rem 0;
  font-size: .86rem; color: var(--ink-2);
}
.trust-row span { display: inline-flex; align-items: center; gap: .5rem; }
.trust-row svg { color: var(--green-600); flex: none; }

/* ---------------------------------------------------------------- category tiles */

.cat-grid {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.cat-tile {
  display: block; padding: 1.6rem 1.5rem; border-radius: var(--radius);
  background: var(--paper); border: 1px solid var(--line); color: var(--ink);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.cat-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--green-600); color: var(--ink); }
.cat-tile h3 { margin: 0 0 .3rem; font-size: 1.15rem; }
.cat-tile p { margin: 0; font-size: .9rem; color: var(--ink-3); }
.cat-tile .arrow { margin-top: 1rem; display: inline-block; color: var(--red-600); font-weight: 600; font-size: .88rem; }

/* ---------------------------------------------------------------- product grid */

.product-grid {
  display: grid; gap: 1.4rem;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .24s var(--ease), box-shadow .24s var(--ease), border-color .24s var(--ease);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: #d9cdb8; }

.card-media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--cream-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card-media img { transform: scale(1.045); }

.badge {
  position: absolute; top: .8rem; left: .8rem; z-index: 2;
  background: var(--gold-500); color: var(--green-900);
  font-size: .68rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
  padding: .34rem .7rem; border-radius: 999px;
}
.badge--sold { background: var(--ink); color: #fff; }
.badge--pod  { background: var(--green-700); color: #fff; }

.card-body { padding: 1.05rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.card-cat { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.card-title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; line-height: 1.25; margin: 0; }
.card-title a { color: var(--green-900); }
.card-title a::after { content: ""; position: absolute; inset: 0; }
.card-sub { font-size: .84rem; color: var(--ink-3); margin: 0; }
.card-foot { margin-top: auto; padding-top: .8rem; display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.price { font-weight: 700; font-size: 1.06rem; color: var(--green-800); }
.price s { color: var(--ink-3); font-weight: 400; font-size: .86rem; margin-right: .35rem; }

.card-add {
  position: relative; z-index: 3;
  border: 1px solid var(--green-700); background: transparent; color: var(--green-800);
  border-radius: 999px; padding: .48rem 1rem; font: inherit; font-size: .84rem; font-weight: 600;
  cursor: pointer; transition: background .18s var(--ease), color .18s var(--ease);
}
.card-add:hover { background: var(--green-700); color: #fff; }
.card-add[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------------------------------------------------------------- shop filters */

.filters { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 2rem; }
.chip {
  border: 1px solid var(--line); background: var(--paper); color: var(--ink-2);
  border-radius: 999px; padding: .5rem 1.05rem; font-size: .88rem; font-weight: 500;
  transition: all .18s var(--ease);
}
.chip:hover { border-color: var(--green-600); color: var(--green-800); }
.chip[aria-current="true"] { background: var(--green-800); border-color: var(--green-800); color: #fff; }

/* ---------------------------------------------------------------- product detail */

.pdp { display: grid; grid-template-columns: 1.02fr .98fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }

.pdp-media { position: sticky; top: calc(var(--header-h) + 1.5rem); }
.pdp-media img {
  width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.pdp h1 { margin-bottom: .4rem; }
.pdp-sub { font-size: 1.05rem; color: var(--ink-2); margin-bottom: 1.2rem; }
.pdp-price { font-size: 1.85rem; font-weight: 700; color: var(--green-800); margin-bottom: 1.4rem; }
.pdp-size { font-size: .9rem; color: var(--ink-3); }

.opt-label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .55rem; }
.size-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.4rem; }
.size-opt { position: relative; }
.size-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.size-opt span {
  display: block; min-width: 62px; text-align: center;
  border: 1px solid var(--line); background: var(--paper);
  border-radius: 10px; padding: .6rem .9rem; font-size: .9rem; font-weight: 600;
  transition: all .16s var(--ease);
}
.size-opt input:checked + span { border-color: var(--green-700); background: var(--green-100); color: var(--green-900); }
.size-opt input:focus-visible + span { outline: 3px solid var(--gold-500); outline-offset: 2px; }
.size-opt input:disabled + span { opacity: .4; text-decoration: line-through; cursor: not-allowed; }

.qty {
  display: inline-flex; align-items: center; border: 1px solid var(--line);
  background: var(--paper); border-radius: 999px; overflow: hidden;
}
.qty button {
  width: 42px; height: 46px; border: 0; background: none; font-size: 1.2rem;
  cursor: pointer; color: var(--ink-2);
}
.qty button:hover { background: var(--cream-2); }
.qty input {
  width: 46px; height: 46px; border: 0; text-align: center; font: inherit; font-weight: 600;
  background: none; -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.buy-row { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.6rem; }

.stock-note { font-size: .88rem; margin-bottom: 1.4rem; }
.stock-note.in   { color: var(--green-700); }
.stock-note.low  { color: var(--gold-600); }
.stock-note.out  { color: var(--red-600); }

.panel {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.4rem 1.5rem; margin-bottom: 1rem;
}
.panel h3 { font-size: 1rem; margin: 0 0 .7rem; }
.benefits { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.benefits li { position: relative; padding-left: 1.7rem; font-size: .94rem; color: var(--ink-2); }
.benefits li::before {
  content: ""; position: absolute; left: 0; top: .48em;
  width: 8px; height: 8px; border-radius: 50%; background: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(224,169,30,.22);
}

.disclaimer {
  font-size: .78rem; color: var(--ink-3); line-height: 1.55;
  border-left: 3px solid var(--line); padding-left: 1rem; margin-top: 1.5rem;
}

/* ---------------------------------------------------------------- cart */

.cart-layout { display: grid; grid-template-columns: 1.55fr .95fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }

.line {
  display: grid; grid-template-columns: 96px 1fr auto; gap: 1.1rem;
  padding: 1.2rem 0; border-bottom: 1px solid var(--line); align-items: center;
}
.line:first-child { border-top: 1px solid var(--line); }
.line-img { width: 96px; aspect-ratio: 4/5; object-fit: cover; border-radius: 12px; background: var(--cream-2); }
.line-name { font-family: var(--font-display); font-size: 1.02rem; font-weight: 600; margin: 0 0 .15rem; }
.line-name a { color: var(--green-900); }
.line-meta { font-size: .84rem; color: var(--ink-3); margin: 0 0 .6rem; }
.line-right { text-align: right; display: grid; gap: .5rem; justify-items: end; }
.line-total { font-weight: 700; color: var(--green-800); }
.link-danger { background: none; border: 0; padding: 0; font: inherit; font-size: .82rem; color: var(--ink-3); cursor: pointer; text-decoration: underline; }
.link-danger:hover { color: var(--red-600); }

.summary {
  position: sticky; top: calc(var(--header-h) + 1.5rem);
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.6rem;
}
.summary h2 { font-size: 1.2rem; margin: 0 0 1.1rem; }
.sum-row { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; font-size: .95rem; color: var(--ink-2); }
.sum-row.total {
  border-top: 1px solid var(--line); margin-top: .7rem; padding-top: .9rem;
  font-size: 1.25rem; font-weight: 700; color: var(--green-900);
}
.sum-note { font-size: .8rem; color: var(--ink-3); margin-top: .8rem; }

.empty { text-align: center; padding: 4rem 1rem; }
.empty img { width: 120px; margin: 0 auto 1.5rem; opacity: .8; }

/* ---------------------------------------------------------------- forms */

.field { margin-bottom: 1.05rem; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .35rem; color: var(--ink-2); }
.field .hint { font-size: .78rem; color: var(--ink-3); font-weight: 400; }

input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
input[type="number"], input[type="search"], select, textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: .78rem .95rem;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(42,115,66,.14);
}
input[aria-invalid="true"] { border-color: var(--red-600); }
textarea { min-height: 110px; resize: vertical; }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.row-3 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 0 1rem; }

/* ---------------------------------------------------------------- checkout */

.checkout-layout { display: grid; grid-template-columns: 1.25fr .9fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }

.step { margin-bottom: 2.2rem; }
.step-head { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.1rem; }
.step-num {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: var(--green-800); color: #fff;
  display: grid; place-items: center; font-size: .85rem; font-weight: 700;
}
.step-head h2 { margin: 0; font-size: 1.22rem; }

#card-container {
  border: 1px solid var(--line); border-radius: 12px; padding: .35rem .5rem;
  background: var(--paper); min-height: 92px;
}
#card-container.is-focused { border-color: var(--green-600); box-shadow: 0 0 0 3px rgba(42,115,66,.14); }

.wallets { display: grid; gap: .6rem; margin-bottom: 1.2rem; }
.wallets:empty { display: none; }
.wallet-divider {
  display: flex; align-items: center; gap: 1rem; margin: 1.4rem 0;
  color: var(--ink-3); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase;
}
.wallet-divider::before, .wallet-divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }

.pay-note {
  display: flex; align-items: center; gap: .5rem; justify-content: center;
  font-size: .82rem; color: var(--ink-3); margin-top: .9rem;
}

.alert { border-radius: 12px; padding: .9rem 1.1rem; font-size: .92rem; margin-bottom: 1.2rem; }
.alert--error { background: var(--red-100); color: var(--red-700); border: 1px solid #eec9c4; }
.alert--ok    { background: var(--green-100); color: var(--green-800); border: 1px solid #c9e0ce; }
.alert[hidden] { display: none; }

.mini-line { display: flex; gap: .85rem; align-items: center; padding: .6rem 0; }
.mini-line img { width: 54px; aspect-ratio: 4/5; object-fit: cover; border-radius: 8px; flex: none; }
.mini-line .n { font-size: .9rem; font-weight: 600; margin: 0; line-height: 1.3; }
.mini-line .m { font-size: .78rem; color: var(--ink-3); margin: 0; }
.mini-line .p { margin-left: auto; font-size: .9rem; font-weight: 600; white-space: nowrap; }

/* ---------------------------------------------------------------- confirmation */

.confirm-hero { text-align: center; padding: clamp(3rem, 8vw, 5rem) 0 2rem; }
.confirm-check {
  width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 1.5rem;
  background: var(--green-100); color: var(--green-700);
  display: grid; place-items: center;
}
.order-ref {
  display: inline-block; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  background: var(--paper); border: 1px dashed var(--green-600); color: var(--green-800);
  padding: .5rem 1.1rem; border-radius: 10px; font-size: 1.02rem; letter-spacing: .04em;
}

/* ---------------------------------------------------------------- mini cart drawer */

.drawer-backdrop {
  position: fixed; inset: 0; z-index: 90; background: rgba(14,47,28,.42);
  opacity: 0; pointer-events: none; transition: opacity .28s var(--ease);
  backdrop-filter: blur(2px);
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 91;
  width: min(420px, 100%); background: var(--cream);
  box-shadow: var(--shadow-lg);
  transform: translateX(100%); transition: transform .32s var(--ease);
  display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 1.4rem; border-bottom: 1px solid var(--line);
}
.drawer-head h2 { margin: 0; font-size: 1.15rem; }
.drawer-close { background: none; border: 0; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--ink-2); padding: .2rem .4rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: .5rem 1.4rem 1.4rem; }
.drawer-foot { border-top: 1px solid var(--line); padding: 1.2rem 1.4rem; background: var(--paper); }

/* ---------------------------------------------------------------- toast */

.toast {
  position: fixed; left: 50%; bottom: 1.6rem; z-index: 120;
  transform: translate(-50%, 140%);
  background: var(--green-900); color: var(--gold-200);
  padding: .85rem 1.4rem; border-radius: 999px; font-size: .92rem; font-weight: 500;
  box-shadow: var(--shadow-lg); transition: transform .34s var(--ease);
  max-width: calc(100% - 2rem); text-align: center;
}
.toast.show { transform: translate(-50%, 0); }
.toast.err { background: var(--red-700); color: #fff; }

/* ---------------------------------------------------------------- footer */

.site-footer {
  background: var(--green-900); color: #cfe0d3;
  padding: clamp(3rem, 6vw, 4.5rem) 0 2rem; margin-top: 4rem;
}
.footer-grid {
  display: grid; gap: 2.5rem;
  grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  padding-bottom: 2.5rem; border-bottom: 1px solid rgba(255,255,255,.12);
}
.site-footer h4 {
  font-family: var(--font-body); font-size: .78rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--gold-500); margin: 0 0 1rem;
}
.site-footer a { color: #cfe0d3; font-size: .93rem; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.site-footer li.muted { color: #8fae99; font-size: .88rem; }
.footer-brand img { height: 76px; width: auto; margin-bottom: 1rem; }
.footer-brand p { font-size: .9rem; color: #a9c2b0; max-width: 34ch; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding-top: 1.5rem; font-size: .82rem; color: #8fae99;
}
.footer-legal { font-size: .78rem; color: #7f9d89; line-height: 1.6; margin-top: 1.5rem; max-width: 70ch; }

/* ---------------------------------------------------------------- admin */

.admin-body { background: var(--cream-2); }
.admin-bar {
  background: var(--green-900); color: #fff; padding: .7rem 0;
  border-bottom: 3px solid var(--gold-500);
}
.admin-bar .wrap { display: flex; align-items: center; gap: .4rem; }
.admin-bar .wrap > strong { margin-right: .8rem; }

/* Nav items read as buttons, so the current page is obvious at a glance. */
.admin-bar a {
  display: inline-flex; align-items: center;
  color: #cfe0d3; font-size: .88rem; font-weight: 600; letter-spacing: .01em;
  padding: .5rem .95rem; border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}
.admin-bar a:hover {
  background: rgba(255, 255, 255, .10);
  border-color: rgba(255, 255, 255, .18);
  color: #fff;
}
.admin-bar a[aria-current="page"] {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: var(--green-900);
}
.admin-bar a:focus-visible { outline: 2px solid var(--gold-200); outline-offset: 2px; }

/* the two on the right are secondary: outlined, not filled */
.admin-bar .spacer { margin-left: auto; }
.admin-bar .spacer ~ a {
  border-color: rgba(255, 255, 255, .22);
  font-weight: 500;
}
.admin-bar .spacer ~ a:hover { border-color: rgba(255, 255, 255, .45); }

.admin-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.4rem; }

.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th {
  text-align: left; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3); padding: .6rem .7rem; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: .75rem .7rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:hover td { background: var(--cream); }
.table-scroll { overflow-x: auto; }

.pill {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; padding: .25rem .6rem; border-radius: 999px;
}
.pill--paid     { background: var(--green-100); color: var(--green-800); }
.pill--shipped  { background: #dbe7f7; color: #1c4a86; }
.pill--refunded { background: var(--red-100); color: var(--red-700); }
.pill--warn     { background: var(--gold-200); color: #7a5a06; }

.stat-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 1.6rem; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; }
.stat .k { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.stat .v { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; color: var(--green-900); line-height: 1.1; }

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1080px) {
  .hero-inner { grid-template-columns: 1fr; text-align: left; }
  .hero-art { order: -1; }
  .hero-art img { width: min(72%, 320px); }
  .pdp, .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
  .pdp-media, .summary { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .menu-toggle { display: inline-grid; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    max-height: calc(100vh - var(--header-h));
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 36px rgba(28, 26, 23, .12);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 1rem 1.5rem 2rem;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    /* Slides down rather than in from the side: an off-screen horizontal
       transform still counts towards scrollWidth and gives the page a
       phantom sideways scroll. */
    opacity: 0; transform: translateY(-10px);
    transition: opacity .22s var(--ease), transform .26s var(--ease), visibility .26s;
    z-index: 55; visibility: hidden; pointer-events: none;
  }
  .nav.open { opacity: 1; transform: none; visibility: visible; pointer-events: auto; }
  .nav-item { display: block; }
  .nav-link {
    width: 100%; justify-content: space-between;
    padding: 1rem .25rem; border-radius: 0;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-display); font-size: 1.25rem; font-weight: 600;
    color: var(--green-900);
  }
  .nav-link:hover { background: none; }
  .nav-link[aria-current="page"]::after { display: none; }
  /* the mega menu becomes a plain nested list on small screens */
  .mega {
    position: static; box-shadow: none; border: 0; animation: none;
    background: transparent;
  }
  .mega-inner { padding: .5rem 0 1rem; }
  .mega-inner.wrap { width: 100%; }
  .mega-cols { grid-template-columns: 1fr; gap: 1.2rem; }
  .mega-list { grid-template-columns: 1fr; }
  .mega-list a { padding: .6rem .25rem; }
  .mega-tag { display: none; }
  .mega-side { border-left: 0; padding-left: 0; }
  .mega-feature { display: none; }
  .brand-name { font-size: 1rem; }
  .brand img { height: 38px; }
  .row-2, .row-3 { grid-template-columns: 1fr; }
  .line { grid-template-columns: 72px 1fr; }
  .line-img { width: 72px; }
  .line-right { grid-column: 1 / -1; justify-items: start; text-align: left; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
  .card-body { padding: .85rem .9rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header, .site-footer, .drawer, .drawer-backdrop, .announce { display: none !important; }
}


/* ---------------------------------------------------------------- product video */

.media-stack { display: grid; gap: 1rem; }

.video-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0b0b0b;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.video-wrap video {
  display: block; width: 100%; height: auto;
  max-height: 78vh; object-fit: contain; background: #0b0b0b;
}
.video-label {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: .1rem;
}
.video-label svg { color: var(--red-600); }

/* play flag on a product card that has a video */
.badge--video {
  background: rgba(14, 47, 28, .82); color: #fff;
  display: inline-flex; align-items: center; gap: .32rem;
  backdrop-filter: blur(4px);
  left: auto; right: .8rem;
}

/* ---------------------------------------------------------------- coupon */

.coupon-box { margin: 1.1rem 0 .2rem; }
.coupon-row { display: flex; gap: .5rem; }
.coupon-row input {
  flex: 1; min-width: 0; text-transform: uppercase;
  letter-spacing: .06em; font-weight: 600;
}
.coupon-row input::placeholder { text-transform: none; letter-spacing: normal; font-weight: 400; }
.coupon-row .btn { flex: none; padding-inline: 1.1rem; }

.coupon-applied {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  background: var(--green-100); border: 1px solid #c9e0ce;
  border-radius: 12px; padding: .7rem .9rem; font-size: .9rem; color: var(--green-800);
}
.coupon-applied code {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700;
  background: var(--paper); border-radius: 6px; padding: .12rem .45rem;
}
.coupon-applied .link-danger { margin-left: auto; }

.sum-row.discount { color: var(--red-600); font-weight: 600; }

.coupon-msg { font-size: .84rem; margin: .55rem 0 0; }
.coupon-msg.err { color: var(--red-600); }

/* ---------------------------------------------------------------- category strip */

.cat-tile {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 190px;
}
.cat-tile-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  opacity: .5; transition: transform .5s var(--ease), opacity .3s var(--ease);
}
.cat-tile:hover .cat-tile-bg { transform: scale(1.06); opacity: .68; }
.cat-tile > * { position: relative; z-index: 1; }
.cat-tile .count {
  position: absolute; top: 1.1rem; right: 1.2rem; z-index: 2;
  font-size: .72rem; font-weight: 800; color: var(--ink-3);
}

/* ---------------------------------------------------------------- demo bar */
/* Only rendered when DEMO_MODE is on. Deliberately loud: a client preview must
   never be mistaken for the live shop. */

.demo-bar {
  display: flex; align-items: center; justify-content: center;
  gap: .6rem; flex-wrap: wrap;
  background: repeating-linear-gradient(45deg, #1c1a17, #1c1a17 12px, #241f18 12px, #241f18 24px);
  color: var(--gold-200);
  font-size: .78rem; text-align: center;
  padding: .5rem 1rem;
  border-bottom: 2px solid var(--gold-500);
}
.demo-bar strong {
  background: var(--gold-500); color: var(--green-900);
  border-radius: 999px; padding: .1rem .6rem;
  font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
}
.demo-bar span { opacity: .85; }

/* ---------------------------------------------------------------- journal */

.post-list { display: grid; gap: 1.6rem; }

.post-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem 1.9rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.post-card:hover { border-color: var(--green-600); box-shadow: var(--shadow-sm); }
.post-card h2, .post-card h3 { margin: .2rem 0 .6rem; font-size: 1.45rem; }
.post-card h3 { font-size: 1.15rem; }
.post-card h2 a, .post-card h3 a { color: var(--green-900); }
.post-card h2 a:hover, .post-card h3 a:hover { color: var(--red-600); }

.post-date {
  font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--red-600); margin: 0;
}
.post-excerpt { color: var(--ink-2); margin: 0 0 1rem; }

.post-more {
  display: inline-flex; align-items: center; gap: .45rem;
  font-weight: 600; font-size: .92rem; color: var(--green-800);
}
.post-more svg { transition: transform .2s var(--ease); }
.post-more:hover svg { transform: translateX(4px); }

/* the article body itself */
.prose { font-size: 1.05rem; color: var(--ink-2); }
.prose > *:first-child { margin-top: 0; }
.prose h2 { font-size: 1.6rem; margin: 2.4rem 0 .8rem; color: var(--green-900); }
.prose h3 { font-size: 1.2rem; margin: 2rem 0 .6rem; color: var(--green-900); }
.prose p { margin: 0 0 1.2rem; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose ul, .prose ol { margin: 0 0 1.4rem; padding-left: 1.3rem; display: grid; gap: .5rem; }
.prose li { padding-left: .2rem; }
.prose li::marker { color: var(--gold-600); }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose blockquote {
  margin: 1.6rem 0; padding: .2rem 0 .2rem 1.2rem;
  border-left: 3px solid var(--gold-500); color: var(--ink-2); font-style: italic;
}

/* ---------------------------------------------------------------- admin bar on small screens */
/* The bar is a single row of links. On a phone that row is wider than the
   screen, so let it wrap onto two lines and keep "View shop / Sign out"
   pushed to the end only while there is room for them there. */

@media (max-width: 860px) {
  .admin-bar { padding: .7rem 0; }
  .admin-bar .wrap {
    flex-wrap: wrap;
    gap: .35rem;
  }
  .admin-bar .wrap > strong {
    flex: 1 0 100%;
    font-size: .95rem !important;
    margin-bottom: .1rem;
  }
  /* ~44px tall: the minimum that is comfortable to hit with a thumb. */
  .admin-bar a { font-size: .84rem; padding: .72rem 1rem; }
  .admin-bar .spacer { display: none; }

  /* admin pages put two panels side by side; stack them instead */
  .admin-card { padding: 1.1rem; }
  main.wrap > div[style*="grid-template-columns"],
  form[style*="grid-template-columns"] {
    display: block !important;
  }
  main.wrap > div[style*="grid-template-columns"] > *,
  form[style*="grid-template-columns"] > * { margin-bottom: 1.2rem; }
}

@media (max-width: 520px) {
  .admin-bar .wrap { gap: .3rem; }
  .admin-bar a { font-size: .8rem; padding: .68rem .85rem; }
  .table { font-size: .85rem; }
}
