/* ============================================================
   CEDAR LANE — design system
   Warm homey kitchen: sage green + cream, Nunito + Zilla Slab.
   Vanilla CSS, mobile-first. WCAG AA contrast throughout.
   ============================================================ */
:root {
  --cream: #FAF6EC;
  --paper: #FFFDF7;
  --herb: #33402A;          /* body text / dark bands */
  --herb-deep: #28331F;
  --sage: #6F855C;
  --sage-dark: #4A5F3B;     /* primary buttons */
  --sage-pale: #E9EFE0;
  --honey: #B97B14;         /* prices, text-safe on cream */
  --honey-bright: #D9982B;  /* badges */
  --line: #E4D9C1;
  --muted: #5C5B50;
  --shadow-soft: 0 10px 30px rgba(51, 64, 42, .12);
  --shadow-card: 0 6px 18px rgba(51, 64, 42, .10);
  --r-card: 22px;
  --r-btn: 16px;
  --r-img: 16px;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-accent: "Zilla Slab", Georgia, serif;
  --sidebar-w: 264px;
  --container: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--herb);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sage-dark); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--herb); }

/* focus visibility (keyboard nav) */
:focus-visible { outline: 3px solid var(--honey-bright); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, h4 { font-weight: 800; line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.25rem; }
.kicker {
  font-family: var(--font-accent); font-style: italic; font-weight: 600;
  color: var(--sage); font-size: 1.05rem; margin: 0 0 .5rem; display: block;
}
.lede { font-size: 1.12rem; color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* ---------- layout with left sidebar ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
  background: var(--paper); border-right: 2px solid var(--line);
  display: flex; flex-direction: column; z-index: 60;
  padding: 1.4rem 1.3rem;
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--herb); }
.brand-mark {
  width: 46px; height: 46px; border-radius: 14px; background: var(--sage-dark);
  display: grid; place-items: center; color: var(--cream); flex: none;
}
.brand-mark svg { width: 28px; height: 28px; }
.brand-name { font-weight: 800; font-size: 1.3rem; line-height: 1.1; }
.brand-sub { font-family: var(--font-accent); font-style: italic; font-size: .85rem; color: var(--sage); }

.side-nav { margin: 1.6rem 0; display: flex; flex-direction: column; gap: .15rem; overflow-y: auto; }
.side-nav .nav-label {
  font-family: var(--font-accent); font-style: italic; color: var(--sage);
  font-size: .92rem; margin: .9rem 0 .3rem;
}
.side-nav a.nav-link {
  display: flex; align-items: baseline; gap: .6rem; text-decoration: none;
  color: var(--herb); font-weight: 700; padding: .5rem .6rem; border-radius: 12px;
}
.side-nav a.nav-link .num { font-family: var(--font-accent); font-style: italic; font-weight: 600; color: var(--sage); font-size: .85rem; min-width: 1.6rem; }
.side-nav a.nav-link:hover, .side-nav a.nav-link[aria-current="page"] { background: var(--sage-pale); color: var(--herb); }
.side-foot { margin-top: auto; border-top: 2px dashed var(--line); padding-top: 1rem; font-size: .88rem; color: var(--muted); }
.side-foot a { color: var(--sage-dark); font-weight: 700; }

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.wrap { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; width: 100%; }
section.block { padding: 5.5rem 0; }
section.block.tight { padding: 3.5rem 0; }

/* mobile top bar */
.topbar {
  display: none; position: sticky; top: 0; z-index: 55;
  background: var(--paper); border-bottom: 2px solid var(--line);
  padding: .7rem 1rem; align-items: center; gap: .8rem;
}
.topbar .brand-name { font-size: 1.15rem; }
.icon-btn {
  background: var(--paper); border: 2px solid var(--line); border-radius: 12px;
  width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; color: var(--herb);
}
.icon-btn:hover { border-color: var(--sage); }
.cart-btn { position: relative; margin-left: auto; }
.cart-count {
  position: absolute; top: -6px; right: -6px; background: var(--honey-bright); color: var(--herb-deep);
  font-size: .72rem; font-weight: 800; min-width: 22px; height: 22px; border-radius: 999px;
  display: grid; place-items: center; padding: 0 5px;
}
.cart-count[hidden] { display: none; }

/* drawer overlay (mobile menu + cart share pattern) */
.scrim { position: fixed; inset: 0; background: rgba(40, 51, 31, .5); z-index: 70; opacity: 0; pointer-events: none; transition: opacity .25s; }
.scrim.open { opacity: 1; pointer-events: auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-body); font-weight: 800; font-size: 1rem;
  border-radius: var(--r-btn); padding: .85rem 1.6rem; cursor: pointer;
  text-decoration: none; border: 2px solid transparent; transition: transform .12s, box-shadow .12s, background .15s;
}
.btn-primary { background: var(--sage-dark); color: #fff; box-shadow: 0 3px 0 var(--herb-deep); }
.btn-primary:hover { background: #3E5230; color: #fff; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--herb-deep); }
.btn-secondary { background: var(--paper); color: var(--sage-dark); border-color: var(--sage); box-shadow: 0 3px 0 var(--sage-pale); }
.btn-secondary:hover { background: var(--sage-pale); color: var(--herb); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; }
.btn-sm { padding: .55rem 1rem; font-size: .92rem; }

/* ---------- hero ---------- */
.hero { background: linear-gradient(180deg, var(--sage-pale) 0%, var(--cream) 100%); border-bottom: 2px solid var(--line); }
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center; padding: 4.5rem 0; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.6rem; }
.hero-badges { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.4rem; }
.pill {
  font-size: .85rem; font-weight: 800; background: var(--paper); border: 2px solid var(--line);
  border-radius: 999px; padding: .3rem .9rem; color: var(--sage-dark);
}
.hero-card {
  background: var(--paper); border: 2px solid var(--line); border-radius: 28px;
  padding: 1.2rem; box-shadow: var(--shadow-soft); transform: rotate(1.5deg);
}
.hero-card img { border-radius: var(--r-img); border: 2px solid var(--line); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.hero-card figcaption { padding: .9rem .4rem .3rem; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.hero-card .t { font-weight: 800; }
.hero-card .p { font-weight: 800; color: var(--honey); white-space: nowrap; }
.recipe-note {
  font-family: var(--font-accent); font-style: italic; color: var(--sage);
  background: var(--paper); border: 2px dashed var(--line); border-radius: var(--r-card);
  padding: 1rem 1.3rem; margin-top: 1.2rem; font-size: 1rem;
}

/* ---------- meal moment strip ---------- */
.moments { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.1rem; margin-top: 2rem; }
.moment {
  background: var(--paper); border: 2px solid var(--line); border-radius: var(--r-card);
  padding: 1.3rem 1.1rem; text-decoration: none; color: var(--herb); display: flex; flex-direction: column; gap: .35rem;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.moment:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); border-color: var(--sage); }
.moment .m-ico { font-size: 1.9rem; line-height: 1; }
.moment .m-title { font-weight: 800; font-size: 1.02rem; }
.moment .m-for { font-family: var(--font-accent); font-style: italic; font-size: .88rem; color: var(--sage); }
.moment .m-sub { font-size: .87rem; color: var(--muted); }

/* ---------- product cards ---------- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; margin-top: 2rem; }
.card {
  background: var(--paper); border: 2px solid var(--line); border-radius: var(--r-card);
  overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: var(--herb);
  transition: transform .18s, box-shadow .18s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.card-img { position: relative; overflow: hidden; border-bottom: 2px solid var(--line); }
.card-img img { width: 100%; aspect-ratio: 1/1; object-fit: cover; transition: transform .3s; }
.card:hover .card-img img { transform: scale(1.05); }
.card-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.card-kicker { font-family: var(--font-accent); font-style: italic; color: var(--sage); font-size: .9rem; font-weight: 600; }
.card-title { font-weight: 800; font-size: 1.02rem; line-height: 1.35; }
.card-price { font-weight: 800; font-size: 1.15rem; color: var(--honey); }
.card-avail { font-size: .85rem; color: var(--muted); margin-top: auto; padding-top: .4rem; }
.card-peek {
  position: absolute; left: 50%; bottom: .8rem; transform: translate(-50%, 8px); opacity: 0;
  background: var(--herb); color: #fff; font-weight: 800; font-size: .85rem;
  padding: .45rem 1rem; border-radius: 999px; transition: opacity .2s, transform .2s; white-space: nowrap;
}
.card:hover .card-peek, .card:focus-visible .card-peek { opacity: 1; transform: translate(-50%, 0); }

/* ---------- story / trust / guides ---------- */
.story { background: var(--paper); border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); }
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.pullquote {
  font-family: var(--font-accent); font-style: italic; font-size: 1.5rem; line-height: 1.45;
  color: var(--sage-dark); border-left: 5px solid var(--honey-bright);
  padding: .4rem 0 .4rem 1.4rem; margin: 1.4rem 0;
}
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; margin-top: 2rem; }
.trust-card { background: var(--paper); border: 2px solid var(--line); border-radius: var(--r-card); padding: 1.5rem 1.3rem; }
.trust-card .t-ico { font-size: 2rem; }
.trust-card h3 { margin: .6rem 0 .3rem; font-size: 1.08rem; }
.trust-card p { margin: 0; color: var(--muted); font-size: .95rem; }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 2rem; }
.guide-card {
  background: var(--paper); border: 2px solid var(--line); border-radius: var(--r-card);
  padding: 1.5rem 1.4rem; text-decoration: none; color: var(--herb); display: flex; flex-direction: column; gap: .4rem;
  transition: transform .18s, box-shadow .18s;
}
.guide-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.guide-card .g-tag { font-family: var(--font-accent); font-style: italic; color: var(--sage); font-size: .9rem; }
.guide-card h3 { font-size: 1.12rem; line-height: 1.35; }
.guide-card p { color: var(--muted); font-size: .93rem; margin: 0; }
.guide-card .g-more { font-weight: 800; color: var(--sage-dark); margin-top: .6rem; font-size: .95rem; }

/* newsletter recipe card */
.supper-card {
  background: var(--paper); border: 2px solid var(--line); border-radius: 28px;
  padding: 2.6rem; box-shadow: var(--shadow-soft); position: relative; overflow: hidden;
}
.supper-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 10px;
  background: repeating-linear-gradient(90deg, var(--sage) 0 26px, var(--honey-bright) 26px 52px, var(--sage-dark) 52px 78px);
}
.supper-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
.news-form { display: flex; gap: .7rem; margin-top: 1.2rem; }
.news-form input {
  flex: 1; font: inherit; padding: .85rem 1.1rem; border: 2px solid var(--line);
  border-radius: var(--r-btn); background: var(--cream); color: var(--herb);
}
.news-form input:focus { border-color: var(--sage); outline: none; }
.form-note { font-size: .88rem; color: var(--muted); margin-top: .7rem; }

/* ---------- footer ---------- */
.footer { background: var(--herb); color: #EFEAD8; margin-top: auto; }
.footer a { color: #EFEAD8; }
.footer a:hover { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 2.5rem; padding: 3.5rem 0 2.5rem; }
.foot-brand p { color: #CFC8AE; font-size: .95rem; }
.foot-contact { margin-top: 1rem; font-size: .93rem; line-height: 1.9; color: #EFEAD8; }
.foot-col h4 { font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; color: var(--honey-bright); margin-bottom: .9rem; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; font-size: .95rem; }
.foot-bar { border-top: 1px solid rgba(239,234,216,.25); padding: 1.2rem 0; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .88rem; color: #CFC8AE; }

/* ---------- collection pages ---------- */
.page-head { padding: 3.5rem 0 1rem; }
.toolbar {
  display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; margin: 1.8rem 0 0;
  background: var(--paper); border: 2px solid var(--line); border-radius: var(--r-card); padding: 1rem 1.2rem;
}
.toolbar label { font-weight: 800; font-size: .92rem; }
.toolbar select, .toolbar input[type="search"] {
  font: inherit; padding: .55rem .8rem; border: 2px solid var(--line); border-radius: 12px; background: var(--cream); color: var(--herb);
}
.toolbar .count { margin-left: auto; color: var(--muted); font-size: .92rem; font-weight: 700; }
.empty-note { background: var(--paper); border: 2px dashed var(--line); border-radius: var(--r-card); padding: 2.5rem; text-align: center; color: var(--muted); margin-top: 2rem; }

/* ---------- product detail ---------- */
.pd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; padding: 3rem 0; align-items: start; }
.gallery { position: sticky; top: 1.5rem; }
.gallery-main { background: var(--paper); border: 2px solid var(--line); border-radius: 28px; overflow: hidden; }
.gallery-main img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: .7rem; margin-top: .8rem; }
.thumbs button { border: 2px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--paper); padding: 0; cursor: pointer; }
.thumbs button[aria-selected="true"] { border-color: var(--sage-dark); }
.thumbs img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.pd-info .vendor { font-family: var(--font-accent); font-style: italic; color: var(--sage); font-weight: 600; }
.pd-price { font-size: 1.9rem; font-weight: 800; color: var(--honey); margin: .5rem 0; }
.pd-avail {
  display: inline-flex; align-items: center; gap: .5rem; background: var(--sage-pale);
  border: 2px solid var(--line); border-radius: 999px; padding: .4rem 1rem; font-weight: 700; font-size: .92rem; color: var(--sage-dark);
}
.variant-row { margin: 1.2rem 0; }
.variant-row label { font-weight: 800; display: block; margin-bottom: .4rem; }
.variant-row select { font: inherit; padding: .7rem 1rem; border: 2px solid var(--line); border-radius: 12px; background: var(--paper); min-width: 220px; }
.qty-row { display: flex; gap: .8rem; align-items: stretch; margin: 1.2rem 0; flex-wrap: wrap; }
.qty { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: var(--r-btn); background: var(--paper); overflow: hidden; }
.qty button { width: 44px; height: 100%; min-height: 52px; border: 0; background: none; font-size: 1.3rem; cursor: pointer; color: var(--sage-dark); font-weight: 800; }
.qty output { min-width: 44px; text-align: center; font-weight: 800; }
.ship-strip { background: var(--paper); border: 2px solid var(--line); border-radius: var(--r-card); padding: 1.2rem 1.4rem; margin-top: 1.4rem; font-size: .95rem; }
.ship-strip ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.ship-strip li { margin: .25rem 0; }
.pd-desc { margin-top: 1.6rem; }
.pd-desc h3 { font-size: 1.05rem; margin-top: 1.2rem; }
.pd-desc ul { padding-left: 1.3rem; }

/* ---------- policies (recipe-card narrative) ---------- */
.policy-hero { background: linear-gradient(180deg, var(--sage-pale), var(--cream)); border-bottom: 2px solid var(--line); padding: 3.5rem 0 2.5rem; }
.policy-body { max-width: 780px; margin: 0 auto; padding: 3rem 1.5rem 5rem; }
.policy-step {
  background: var(--paper); border: 2px solid var(--line); border-radius: var(--r-card);
  padding: 1.8rem; margin: 1.4rem 0; box-shadow: var(--shadow-card);
}
.policy-step h2 { font-size: 1.3rem; display: flex; gap: .8rem; align-items: baseline; }
.policy-step h2 .step-no { font-family: var(--font-accent); font-style: italic; color: var(--honey); font-size: 1.5rem; white-space: nowrap; }
.policy-step p { margin: .6rem 0 0; }
.policy-meta { color: var(--muted); font-size: .9rem; margin-top: 2.5rem; border-top: 2px dashed var(--line); padding-top: 1.2rem; }

/* ---------- faq / guides / misc ---------- */
.faq-item { background: var(--paper); border: 2px solid var(--line); border-radius: var(--r-card); margin: 0 0 1rem; overflow: hidden; }
.faq-item summary { cursor: pointer; padding: 1.2rem 1.5rem; font-weight: 800; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .plus { font-size: 1.4rem; color: var(--sage); font-weight: 800; flex: none; }
.faq-item .faq-a { padding: 0 1.5rem 1.4rem; color: var(--muted); }
.prose { max-width: 760px; }
.prose p { margin: 1rem 0; }
.prose h2 { margin-top: 2.2rem; font-size: 1.45rem; }
.article-meta { font-family: var(--font-accent); font-style: italic; color: var(--sage); margin-bottom: 1.5rem; }
.breadcrumb { font-size: .9rem; color: var(--muted); margin: 1.5rem 0 0; }
.breadcrumb a { color: var(--sage-dark); font-weight: 700; }

/* cart + checkout */
.cart-line { display: grid; grid-template-columns: 84px 1fr auto; gap: 1.1rem; align-items: center; background: var(--paper); border: 2px solid var(--line); border-radius: var(--r-card); padding: 1rem; margin-bottom: 1rem; }
.cart-line img { width: 84px; height: 84px; object-fit: cover; border-radius: 12px; border: 2px solid var(--line); }
.cart-summary { background: var(--paper); border: 2px solid var(--line); border-radius: var(--r-card); padding: 1.6rem; position: sticky; top: 1.5rem; }
.cart-summary .row { display: flex; justify-content: space-between; margin: .5rem 0; }
.cart-summary .total { font-size: 1.3rem; font-weight: 800; border-top: 2px dashed var(--line); padding-top: .8rem; margin-top: .8rem; }
.note-box { background: var(--sage-pale); border: 2px solid var(--line); border-radius: var(--r-card); padding: 1.2rem 1.4rem; margin: 1.2rem 0; }

/* cart drawer (right side) */
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 92vw); z-index: 80;
  background: var(--paper); border-left: 2px solid var(--line); transform: translateX(105%);
  transition: transform .28s ease; display: flex; flex-direction: column; padding: 1.3rem;
}
.cart-drawer.open { transform: none; }
.cart-drawer header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.cart-lines { flex: 1; overflow-y: auto; }

/* search */
.search-hero { padding: 3rem 0 1rem; }
.search-form { display: flex; gap: .7rem; margin: 1.4rem 0; max-width: 640px; }
.search-form input { flex: 1; font: inherit; padding: .9rem 1.2rem; border: 2px solid var(--line); border-radius: var(--r-btn); background: var(--paper); }

/* skip link */
.skip { position: absolute; left: -9999px; top: 0; background: var(--herb); color: #fff; padding: .7rem 1.2rem; z-index: 200; border-radius: 0 0 12px 0; font-weight: 800; }
.skip:focus { left: 0; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .moments { grid-template-columns: repeat(3, 1fr); }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .guide-grid { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-105%); transition: transform .28s ease; box-shadow: var(--shadow-soft); }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .topbar { display: flex; }
  .hero-inner { grid-template-columns: 1fr; padding: 3rem 0; }
  .hero-card { transform: none; max-width: 520px; }
  .story-grid, .supper-grid, .pd-grid { grid-template-columns: 1fr; }
  .gallery { position: static; }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .moments { grid-template-columns: repeat(2, 1fr); }
  .guide-grid, .trust-grid { grid-template-columns: 1fr; }
  .news-form, .search-form { flex-direction: column; }
  section.block { padding: 3.5rem 0; }
  .foot-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .thumbs { grid-template-columns: repeat(5, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
