/* ==========================================================================
   CW Coffee — storefront styles
   Design notes
   - Palette taken from the CW Coffee logo and business card: near-white and
     cream surfaces, espresso-brown type, the deep "Always Organic" green for
     actions, and the logo's bright lime used only as a thin accent.
   - Type: Zilla Slab (self-hosted, OFL) for headings, prices and labels —
     it sits close to the logo's slab lettering; system sans for body text.
   - Every coffee is organic and gets the same lighter roast, so the site
     sells by ORIGIN: kraft bag-label product cards lead with the origin and
     flavor notes, and product pages carry a full origin profile.
   ========================================================================== */

@font-face { font-family: "Zilla Slab"; src: url("../fonts/zilla-slab-regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Zilla Slab"; src: url("../fonts/zilla-slab-italic.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Zilla Slab"; src: url("../fonts/zilla-slab-semibold.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --cream: #f8f4ec;
  --paper: #fffdf9;
  --espresso: #241509;
  --roast: #4a3326;
  --muted: #776354;
  --kraft: #c9a574;
  --kraft-light: #ece0cb;
  --line: #e7dccb;
  --moss: #2f5a1e;        /* "Always Organic" green — buttons, links, accents */
  --moss-dark: #213f15;
  --moss-tint: #ebf2e2;
  --lime: #6cf800;        /* logo "C" — thin decorative accents only, never text */
  --cherry: #a11d2a;      /* ripe coffee cherry */
  --stamp: #8c2f1c;
  --ok: #2f5a1e;
  --warn-bg: #fff4d9;

  --serif: "Zilla Slab", "Rockwell", "Roboto Slab", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --r-sm: 4px;
  --r-md: 10px;
  --shadow: 0 1px 0 rgba(43, 26, 18, .06), 0 8px 24px -16px rgba(43, 26, 18, .35);
  --container: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cream); color: var(--espresso);
  font: 16px/1.6 var(--sans); text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--moss-dark); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--espresso); }
:focus-visible { outline: 3px solid var(--moss); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.005em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--espresso); color: #fff; padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }

/* --------------------------------------------------------------- banners */
.test-banner { background: var(--stamp); color: #fff; text-align: center; font-size: .85rem; padding: 6px 12px; }
.announcement { background: var(--moss); color: #fff; text-align: center; font-size: .92rem; padding: 8px 12px; }

/* ---------------------------------------------------------------- header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header::before { content: ""; display: block; height: 3px; background: linear-gradient(90deg, var(--moss) 0 70%, var(--lime)); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 70px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--espresso); }
.brand-mark { width: 40px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 1.45rem; }
.brand-promise { font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--moss); margin-top: 3px; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { padding: 8px 12px; border-radius: var(--r-sm); text-decoration: none; color: var(--roast); font-weight: 500; }
.site-nav a:hover { background: var(--cream); color: var(--espresso); }
.site-nav a.active { color: var(--espresso); box-shadow: inset 0 -2px 0 var(--kraft); }
.nav-cart { display: inline-flex; align-items: center; gap: 6px; }
.cart-count { background: var(--moss); color: #fff; border-radius: 999px; font-size: .75rem; min-width: 22px; height: 22px; display: inline-grid; place-items: center; padding: 0 6px; font-weight: 600; }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; position: relative; }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; display: block; width: 22px; height: 2px; background: var(--espresso); position: absolute; left: 11px; transition: transform .2s; }
.nav-toggle-bar { top: 21px; }
.nav-toggle-bar::before { top: -7px; left: 0; }
.nav-toggle-bar::after { top: 7px; left: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 8px var(--gutter) 16px; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 8px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .site-nav a.active { box-shadow: inset 3px 0 0 var(--kraft); }
}

/* --------------------------------------------------------------- flashes */
.flashes { margin: 16px 0 0; display: grid; gap: 8px; }
.flash { padding: 12px 14px; border-radius: var(--r-sm); border-left: 4px solid; background: var(--paper); }
.flash-success { border-color: var(--ok); background: #f0f5ec; }
.flash-error { border-color: var(--stamp); background: #fbefe9; }
.flash-info { border-color: var(--kraft); background: var(--warn-bg); }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 1rem/1.2 var(--sans); padding: 11px 20px; border-radius: 6px; cursor: pointer;
  border: 2px solid var(--moss); background: transparent; color: var(--moss-dark); text-decoration: none;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--moss-tint); color: var(--moss-dark); }
.btn-primary { background: var(--moss); color: #fff; }
.btn-primary:hover { background: var(--moss-dark); border-color: var(--moss-dark); color: #fff; }
.btn-ghost { border-color: var(--kraft); color: var(--roast); }
.btn-ghost:hover { background: var(--kraft-light); color: var(--espresso); }
.btn-danger { border-color: var(--stamp); background: var(--stamp); color: #fff; }
.btn-danger:hover { background: #6f2416; color: #fff; }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; }
.btn-small { padding: 6px 12px; font-size: .875rem; }
.btn-block { width: 100%; }
.btn-grow { flex: 1; }
.btn[disabled], .btn.is-busy { opacity: .6; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; color: var(--moss-dark); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font: inherit; }
.link-arrow { font-weight: 600; color: var(--moss-dark); text-decoration: underline; text-decoration-color: var(--kraft); text-decoration-thickness: 2px; }

/* ------------------------------------------------------------------- hero */
.hero { padding: clamp(32px, 6vw, 72px) 0; background: linear-gradient(var(--paper), var(--cream)); border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); line-height: 1.05; margin-bottom: .35em; }
.eyebrow { font-family: var(--serif); font-style: italic; color: var(--moss); font-size: 1.1rem; margin-bottom: .35em; }
.lead { font-size: 1.15rem; color: var(--roast); max-width: 38em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero-media img { width: 100%; border-radius: var(--r-md); }
@media (max-width: 820px) { .hero-inner { grid-template-columns: 1fr; } .hero-media { order: -1; } }

/* Brand hero: logo lockup + "Always Organic", coffee plant down the right edge (as on the business card) */
.hero-brand { position: relative; overflow: hidden; background: radial-gradient(ellipse at 30% 40%, #fff 0, #fffefb 45%, var(--cream) 100%); }
.hero-brand .hero-inner { position: relative; z-index: 1; grid-template-columns: 1.1fr .9fr; }
.hero-plant { position: absolute; top: 0; right: 0; height: 100%; width: auto; max-width: none; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 35%); mask-image: linear-gradient(90deg, transparent 0, #000 35%); }
.hero-promise { width: clamp(170px, 22vw, 240px); height: auto; margin: 0 0 10px -6px; }
.hero-brand h1 { color: var(--espresso); }
.hero-brand .hero-media { display: grid; place-items: center; padding-right: clamp(0px, 9vw, 150px); }
.hero-logo { width: 100%; max-width: 380px; height: auto; border-radius: 0 !important; filter: drop-shadow(0 10px 18px rgba(36, 21, 9, .10)); }
@media (max-width: 1100px) { .hero-plant { opacity: .35; } }
@media (max-width: 820px) {
  .hero-brand .hero-inner { grid-template-columns: 1fr; }
  .hero-plant { display: none; }
  .hero-brand .hero-media { padding-right: 0; }
  .hero-logo { max-width: 230px; }
}

/* --------------------------------------------------------------- sections */
.section { padding: clamp(40px, 6vw, 72px) 0; }
.section-tight { padding-top: 24px; }
.section-tint { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.page-header { padding: clamp(32px, 5vw, 56px) 0 8px; }
.page-header .lead { margin-top: .4em; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.steps { background: var(--cream); border: 1px solid var(--line); border-radius: var(--r-md); padding: 24px; }
.steps-title { margin-bottom: 16px; }
.step-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.step-list li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; }
.step-list p { margin: 2px 0 0; color: var(--muted); }
.step-num { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--moss); color: var(--moss); display: grid; place-items: center; font-family: var(--serif); font-weight: 600; }
.steps-more { margin: 16px 0 0; }
.cta-box { text-align: center; padding: 40px var(--gutter); border: 2px dashed var(--kraft); border-radius: var(--r-md); background: var(--paper); }
.cta-box p { color: var(--muted); }

/* ---------------------------------------------------- product card (label) */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: clamp(16px, 2.5vw, 28px); }
.product-card { background: var(--kraft-light); border-radius: var(--r-sm); position: relative; box-shadow: var(--shadow); }
.product-card::before { /* crimped bag top */
  content: ""; display: block; height: 10px; border-radius: var(--r-sm) var(--r-sm) 0 0;
  background: repeating-linear-gradient(90deg, var(--kraft) 0 6px, #bf9a67 6px 8px);
}
.product-card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; padding: 14px; }
.product-card-media { position: relative; background: var(--paper); border-radius: 2px; aspect-ratio: 4 / 3.4; overflow: hidden; display: grid; place-items: center; }
.product-card-img { width: 100%; height: 100%; object-fit: cover; }
.product-card-img.is-placeholder { object-fit: contain; padding: 12px; }
.product-card-body { background: var(--paper); margin-top: 12px; padding: 14px 16px 16px; border: 1px solid var(--kraft); border-radius: 2px; flex: 1; display: flex; flex-direction: column; }
.product-card-title { font-size: 1.35rem; margin: 2px 0 2px; }
.product-card-notes { font-family: var(--serif); font-style: italic; color: var(--roast); margin: 0 0 6px; }
.product-card-desc { color: var(--muted); font-size: .92rem; margin-bottom: 12px; }
.product-card-foot { margin-top: auto; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; border-top: 1px dashed var(--kraft); padding-top: 10px; }
.product-card-link:hover .product-card-title { text-decoration: underline; text-decoration-color: var(--kraft); text-underline-offset: 4px; }
.price { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; }
.sold-out { color: var(--stamp); font-weight: 600; font-size: .9rem; }

/* Store-wide tags: "Always Organic" + the one roast level */
.coffee-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.coffee-tags.compact { margin: 2px 0 8px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px 4px 9px; border-radius: 999px; font-size: .8rem; font-weight: 700; letter-spacing: .02em; }
.tag-organic { background: var(--moss); color: #fff; }
.tag-organic .leaf { width: 13px; height: 13px; fill: var(--lime); }
.tag-roast { background: #f6ead8; color: var(--roast); border: 1px solid #e4cfae; }
.roast-dot { width: 10px; height: 10px; border-radius: 50%; background: #b98a57; box-shadow: inset -2px -2px 0 rgba(0,0,0,.12); display: inline-block; flex: none; }

/* Origin + flavor notes */
.origin-line { font-size: .76rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--moss); margin: 0 0 2px; }
.origin-line-lg { font-size: .85rem; }
.flavor-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 6px 0 10px; }
.flavor-chips li { font-family: var(--serif); font-style: italic; font-size: .95rem; padding: 2px 11px; border-radius: 999px; background: var(--moss-tint); color: var(--moss-dark); border: 1px solid #d3e2c4; }
.card-stamp { position: absolute; top: 10px; left: 10px; background: rgba(47, 90, 30, .94); color: #fff; font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 4px 9px; border-radius: 3px; }
.card-facts { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .82rem; color: var(--muted); margin: -4px 0 12px; }
.card-facts span + span::before { content: "·"; margin-right: 12px; color: var(--kraft); }

/* ---------------------------------------------------------------- filters */
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.chip { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--kraft); text-decoration: none; color: var(--roast); background: var(--paper); font-size: .92rem; }
.chip.active, .chip:hover { background: var(--espresso); border-color: var(--espresso); color: #fff; }
.empty-state { text-align: center; padding: 48px 16px; background: var(--paper); border: 1px dashed var(--kraft); border-radius: var(--r-md); }

/* --------------------------------------------------------- product detail */
.breadcrumbs { font-size: .9rem; color: var(--muted); margin-bottom: 16px; }
.breadcrumbs span { margin: 0 4px; }
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 56px); align-items: start; }
@media (max-width: 820px) { .product-detail { grid-template-columns: 1fr; } }
.product-main-image { background: var(--kraft-light); border-radius: var(--r-md); overflow: hidden; aspect-ratio: 1; display: grid; place-items: center; }
.pd-img { width: 100%; height: 100%; object-fit: cover; }
.pd-img.is-placeholder { object-fit: contain; padding: 32px; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.thumb { width: 72px; height: 72px; padding: 0; border: 2px solid var(--line); border-radius: var(--r-sm); overflow: hidden; cursor: pointer; background: var(--paper); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.active { border-color: var(--moss); }
.product-info h1 { margin: 8px 0 4px; }
.tasting { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--roast); }
.pd-price { font-family: var(--serif); font-size: 2rem; font-weight: 600; margin: 8px 0 16px; }
.buy-form { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px; margin-bottom: 24px; }
.option-group { margin-bottom: 16px; }
.option-label { font-weight: 600; margin-bottom: 8px; }
.option-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { font: 500 .95rem var(--sans); padding: 9px 16px; border-radius: 6px; border: 1.5px solid var(--kraft); background: var(--cream); color: var(--espresso); cursor: pointer; }
.opt:hover { border-color: var(--roast); }
.opt[aria-pressed="true"] { background: var(--espresso); border-color: var(--espresso); color: #fff; }
.opt.is-unavailable { color: var(--muted); text-decoration: line-through; border-style: dashed; }
.combo-note { color: var(--stamp); font-size: .92rem; }
.qty-row { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; }
.qty { display: inline-flex; border: 1.5px solid var(--kraft); border-radius: 6px; overflow: hidden; background: #fff; }
.qty input[type=number] { width: 52px; padding: 8px 4px; border-radius: 0; border: 0; text-align: center; font: 600 1rem var(--sans); -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty-btn { width: 40px; border: 0; background: var(--cream); font-size: 1.2rem; cursor: pointer; color: var(--espresso); }
.qty-btn:hover { background: var(--kraft-light); }
.added-note { margin: 12px 0 0; padding: 10px 12px; background: #f0f5ec; border-radius: var(--r-sm); color: var(--ok); font-weight: 600; }
.sold-out-box { padding: 14px; border: 1px dashed var(--stamp); color: var(--stamp); border-radius: var(--r-sm); }
.pd-facts { padding-left: 1.1em; color: var(--roast); }
.pd-flavor { margin: 4px 0 6px; }
.pd-flavor .option-label { font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 2px; }
.pd-flavor .flavor-chips li { font-size: 1.05rem; padding: 4px 14px; }
.pd-short { color: var(--roast); font-size: 1.05rem; }

/* Product page: the story + origin profile card */
.origin-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(24px, 5vw, 56px); align-items: start; }
@media (max-width: 860px) { .origin-layout { grid-template-columns: 1fr; } .origin-card { order: -1; } }
.origin-text h2:first-child { margin-top: 0; }
.origin-card { position: sticky; top: 96px; background: var(--paper); border: 1px solid var(--kraft); border-top: 6px solid var(--moss); border-radius: var(--r-sm); padding: 20px 22px; box-shadow: var(--shadow); }
@media (max-width: 860px) { .origin-card { position: static; } }
.origin-card-kicker { font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--moss); margin: 0; }
.origin-card-title { font-size: 1.6rem; margin: 2px 0 12px; }
.origin-facts { margin: 0; }
.origin-facts > div { display: grid; grid-template-columns: 7.5em 1fr; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--kraft); }
.origin-facts dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding-top: 2px; }
.origin-facts dd { margin: 0; font-family: var(--serif); font-size: 1.05rem; }
.origin-card-note { margin: 12px 0 0; font-size: .9rem; }

/* ------------------------------------------------------------------ forms */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: clamp(16px, 3vw, 24px); margin-bottom: 20px; }
fieldset.card { min-width: 0; }
legend { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; padding: 0 6px; margin-left: -6px; }
.field { margin-bottom: 14px; min-width: 0; }
.field label { display: block; font-weight: 600; margin-bottom: 5px; font-size: .95rem; }
.optional { font-weight: 400; color: var(--muted); font-size: .85rem; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=password], input[type=search], input:not([type]), select, textarea {
  width: 100%; font: 1rem/1.4 var(--sans); padding: 10px 12px; border: 1.5px solid #d4c3aa; border-radius: 6px; background: #fff; color: var(--espresso);
}
input:focus, select:focus, textarea:focus { border-color: var(--moss); outline: 2px solid rgba(47, 90, 30, .25); outline-offset: 0; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--stamp); }
.field-error { color: var(--stamp); font-size: .88rem; margin: 5px 0 0; }
.hint { color: var(--muted); font-size: .85rem; margin: 5px 0 0; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 14px; }
.check { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; font-weight: 400; }
.check input { margin-top: 5px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.note-box { background: var(--warn-bg); border-left: 3px solid var(--kraft); padding: 10px 12px; border-radius: var(--r-sm); margin: 8px 0; }
.inline-form { display: inline; }

/* ---------------------------------------------------------------- content */
.prose { font-size: 1.05rem; }
.prose h2 { margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.guide-dl { margin: 12px 0 20px; display: grid; gap: 2px; }
.guide-dl > div { display: grid; grid-template-columns: 9.5em 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.guide-dl dt { font-family: var(--serif); font-weight: 600; color: var(--moss-dark); }
.guide-dl dd { margin: 0; }
@media (max-width: 560px) { .guide-dl > div { grid-template-columns: 1fr; gap: 2px; } }
.guide-table, .items-table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: .97rem; }
.guide-table th, .guide-table td, .items-table th, .items-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.guide-table th, .items-table th { font-size: .85rem; color: var(--muted); font-weight: 600; }
.items-table .num, .num { text-align: right; white-space: nowrap; }
.items-table tfoot td { border: 0; padding: 4px 8px; color: var(--roast); }
.items-table .total-row td { border-top: 2px solid var(--espresso); font-weight: 700; color: var(--espresso); padding-top: 10px; }
.items-table tr.unavailable td { color: var(--muted); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.badge-warn { background: #fbefe9; color: var(--stamp); }
.legal mark { background: var(--warn-bg); padding: 0 3px; border-radius: 2px; }
.review-note { background: var(--warn-bg); border: 1px solid var(--kraft); padding: 12px 14px; border-radius: var(--r-sm); font-size: .95rem; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 24px; align-items: start; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card { padding: 24px; border: 1px solid var(--kraft); border-radius: var(--r-md); background: var(--kraft-light); }
.contact-card address, .site-footer address { font-style: normal; }
.contact-card address p, .site-footer address p { margin: 0 0 1em; }
.contact-logo { width: 54px; height: auto; margin-bottom: 10px; }
.about-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(24px, 5vw, 56px); align-items: start; }
@media (max-width: 820px) { .about-layout { grid-template-columns: 1fr; } }
.about-photo { margin: 0; position: relative; }
.about-photo img:first-child { width: 100%; border-radius: var(--r-md); box-shadow: var(--shadow); }
.about-promise { position: absolute; right: -8px; bottom: -18px; width: 46%; background: rgba(255, 253, 249, .92); padding: 8px 10px; border-radius: var(--r-md); }
.error-page { padding: 32px 0; }

/* ------------------------------------------------------------------- cart */
.cart-layout, .checkout-layout { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; }
@media (max-width: 900px) { .cart-layout, .checkout-layout { grid-template-columns: 1fr; } }
.cart-lines { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 20px; }
.cart-line { display: grid; grid-template-columns: 76px 1fr auto auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-thumb { width: 76px; height: 76px; border-radius: var(--r-sm); overflow: hidden; background: var(--kraft-light); display: block; }
.cart-img { width: 100%; height: 100%; object-fit: cover; }
.cart-img.is-placeholder { object-fit: contain; padding: 6px; }
.cart-line-name { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; color: var(--espresso); text-decoration: none; }
.cart-line-info p { margin: 0; }
.cart-line-qty { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cart-line-qty input[type=number] { width: 70px; text-align: center; }
.cart-line-total { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; min-width: 80px; text-align: right; }
@media (max-width: 560px) {
  .cart-line { grid-template-columns: 64px 1fr; }
  .cart-thumb { width: 64px; height: 64px; }
  .cart-line-qty { grid-column: 2; flex-direction: row; justify-content: flex-start; gap: 12px; }
  .cart-line-total { grid-column: 2; text-align: left; }
}
.cart-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0 8px; flex-wrap: wrap; }
.summary { position: sticky; top: 88px; }
.summary h2 { font-size: 1.35rem; }
.summary-list { margin: 0 0 16px; }
.summary-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.summary-list dt { color: var(--roast); }
.summary-list dd { margin: 0; text-align: right; }
.summary-list .total-row { border-top: 2px solid var(--espresso); margin-top: 6px; padding-top: 10px; font-weight: 700; font-size: 1.1rem; }
.summary-list .total-row dt { color: var(--espresso); }
.summary-items { list-style: none; padding: 0; margin: 0 0 12px; border-bottom: 1px solid var(--line); }
.summary-items li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: .95rem; }
.clear-cart { margin-top: 8px; }

/* --------------------------------------------------------------- checkout */
.method-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.method-option { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid var(--kraft); border-radius: var(--r-md); background: #fff; cursor: pointer; }
.method-option:has(input:checked) { border-color: var(--moss); background: var(--moss-tint); box-shadow: inset 0 0 0 1px var(--moss); }
.method-option input { margin-top: 5px; accent-color: var(--moss); }
.method-option.compact { margin-bottom: 8px; }
.method-body { display: flex; flex-direction: column; gap: 2px; }

/* ------------------------------------------------------------ confirmation */
.confirm-hero { text-align: center; padding: 24px 0; }
.confirm-hero.compact { padding: 8px 0; }
.check { }
.confirm-hero .check { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; background: var(--moss); color: #fff; display: grid; place-items: center; font-size: 2rem; }
.spinner { width: 44px; height: 44px; margin: 0 auto 16px; border-radius: 50%; border: 4px solid var(--kraft-light); border-top-color: var(--moss); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 0); background: var(--espresso); color: #fff; padding: 12px 18px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.25); z-index: 50; max-width: calc(100% - 32px); animation: toast-in .25s ease-out; }
.toast a { color: var(--kraft-light); font-weight: 600; margin-left: 8px; }
@keyframes toast-in { from { transform: translate(-50%, 12px); opacity: 0; } }

/* ------------------------------------------------------------------ pills */
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--kraft-light); color: var(--roast); white-space: nowrap; }
.pill-p-paid, .pill-f-completed, .pill-e-sent, .pill-i-applied { background: #e3eedc; color: #2d5228; }
.pill-f-shipped, .pill-f-ready_for_pickup { background: #dfe8f3; color: #23466e; }
.pill-p-pending, .pill-f-new, .pill-e-pending, .pill-i-confirmation_sent { background: var(--warn-bg); color: #7a5300; }
.pill-f-processing, .pill-e-sending { background: #ece4f4; color: #4b2c6e; }
.pill-f-on_hold, .pill-e-failed { background: #fde9d7; color: #8a4b0b; }
.pill-p-failed, .pill-f-canceled, .pill-e-dead, .pill-i-rejected, .pill-p-refunded, .pill-p-partially_refunded { background: #fbe4de; color: var(--stamp); }

/* ----------------------------------------------------- staff action pages */
.staff-page { background: var(--cream); }
.staff-wrap { max-width: 520px; margin: 0 auto; padding: 20px 16px 40px; }
.staff-brand { display: flex; align-items: center; gap: 8px; font-family: var(--serif); font-weight: 600; color: var(--roast); }
.staff-title { font-size: 1.8rem; margin: 12px 0 14px; }
.staff-subtitle { font-size: 1.2rem; margin: 20px 0 10px; }
.staff-order { background: var(--paper); border: 1px solid var(--line); border-left: 6px solid var(--kraft); border-radius: var(--r-sm); padding: 16px; margin-bottom: 18px; }
.staff-order p { margin: 0 0 6px; }
.staff-order-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.staff-order-number { font-family: var(--serif); font-weight: 600; font-size: 1.5rem; }
.staff-items { margin: 8px 0; padding-left: 1.1em; }
.staff-form { margin-top: 12px; }
.staff-actions { display: grid; gap: 10px; }
.staff-foot { margin-top: 32px; text-align: center; }
.maintenance-page main { padding: 15vh 16px; }
.maintenance-page img { margin: 0 auto 16px; }

/* ----------------------------------------------------------------- footer */
.site-footer { margin-top: 48px; background: var(--espresso); color: #e9dcc8; padding: 48px 0 24px; }
.site-footer a { color: #f3e7d4; }
.site-footer .muted { color: #b9a58f; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 24px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { font-family: var(--serif); font-weight: 600; font-size: 1.4rem; color: #fff; margin-bottom: 4px; display: flex; align-items: center; gap: 10px; }
.footer-brand img { width: 34px; height: auto; }
.footer-promise { font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #a8d98a; margin-bottom: 8px; }
.footer-heading { font-family: var(--serif); font-weight: 600; color: #fff; margin-bottom: 8px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer-base { border-top: 1px solid rgba(255,255,255,.12); margin-top: 32px; padding-top: 16px; font-size: .85rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .site-header, .site-footer, .test-banner, .announcement, .toast { display: none; }
}

/* ------------------------------------------------------ homepage: origins */
.origins-intro { max-width: 46em; }
.origin-list { list-style: none; padding: 0; margin: 24px 0 8px; display: flex; flex-wrap: wrap; gap: 12px; }
.origin-list a { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border: 1.5px solid var(--kraft); border-radius: var(--r-md); background: #fff; text-decoration: none; color: var(--espresso); font-family: var(--serif); font-weight: 600; font-size: 1.2rem; }
.origin-list a:hover { border-color: var(--moss); background: var(--moss-tint); }
.origin-pin { width: 12px; height: 12px; border-radius: 50%; background: var(--cherry); box-shadow: 0 0 0 3px #f6dadd; }
.origin-banner { font-family: var(--serif); font-weight: 600; font-size: clamp(1.3rem, 2.6vw, 1.75rem); color: var(--espresso); margin: 20px 0 8px; }
.profile-points { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 28px; }
.profile-points > div { background: var(--cream); border: 1px solid var(--line); border-left: 4px solid var(--moss); border-radius: var(--r-sm); padding: 16px 18px; }
.profile-points h3 { margin-bottom: .3em; }
.profile-points p { margin: 0; color: var(--muted); }

/* ------------------------------------------------ homepage: promises */
.promise-stack { display: grid; gap: 16px; }
.promise-card { border-radius: var(--r-md); padding: 22px 24px; border: 1px solid var(--line); background: var(--paper); }
.promise-card p { margin-bottom: .6em; }
.promise-organic { background: linear-gradient(135deg, #fff 0, var(--moss-tint) 100%); border-color: #d3e2c4; }
.promise-organic img { width: 180px; height: auto; margin: -6px 0 8px -6px; }
.promise-organic p { font-size: 1.1rem; color: var(--moss-dark); margin: 0; }
.promise-roast h3 { display: flex; align-items: center; gap: 10px; }
.promise-roast .roast-dot { width: 14px; height: 14px; }
