:root {
  --bg: #fbf7ef;
  --surface: #ffffff;
  --ink: #2f2a22;
  --muted: #6e6455;
  --brand: #96561a;
  --brand-dark: #7c4510;
  --leaf: #5b7a3a;
  --line: #e8dfcf;
  --ok: #2f6a2b;
  --low: #8a5a10;
  --out: #a33b2f;
  --radius: 14px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}
a { color: var(--brand-dark); }
img { max-width: 100%; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* Header */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; flex-wrap: wrap; }
.logo { font-weight: 700; font-size: 1.2rem; text-decoration: none; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.logo span { color: var(--brand); }
.nav ul { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; flex-wrap: wrap; }
.nav ul a { text-decoration: none; color: var(--muted); font-weight: 500; }
.nav ul a:hover, .nav ul a.active { color: var(--brand-dark); }

/* Hero */
.hero { padding: 64px 0 48px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.15; margin: 0 0 16px; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero p { font-size: 1.15rem; color: var(--muted); max-width: 640px; }
.btn {
  display: inline-block; background: var(--brand); color: #fff; padding: 12px 22px;
  border-radius: 999px; text-decoration: none; font-weight: 600; margin: 8px 8px 0 0;
}
.btn:hover { background: var(--brand-dark); }
.btn.ghost { background: transparent; color: var(--brand-dark); border: 2px solid var(--brand); }

.page-head { padding: 40px 0 8px; }
.page-head h1 { margin: 0 0 8px; font-size: 2rem; }
.page-head p { color: var(--muted); margin: 0; }

section { padding: 32px 0; }
h2 { font-size: 1.6rem; margin: 0 0 16px; }

/* Cards */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 8px;
}
.card h3 { margin: 0; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.emoji { font-size: 2rem; }
.price { font-weight: 700; color: var(--ink); }
.tag {
  display: inline-block; font-size: 0.75rem; padding: 2px 10px; border-radius: 999px;
  background: #f1e6d3; color: var(--brand-dark); font-weight: 600; width: fit-content;
}

/* Stats strip */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-align: center; }
.stat b { display: block; font-size: 1.8rem; color: var(--brand); }

/* Availability table */
.filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.filters select, .filters input {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  font: inherit; color: var(--ink); min-width: 180px; flex: 1;
}
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
th { background: #f6efe2; font-size: 0.85rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
tr:last-child td { border-bottom: none; }
.status { font-weight: 600; font-size: 0.85rem; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.status.in { background: #e3f0df; color: var(--ok); }
.status.low { background: #fbefd8; color: var(--low); }
.status.out { background: #f7e0dc; color: var(--out); }
.empty { padding: 24px; text-align: center; color: var(--muted); }

/* Store cards */
.store .meta { font-size: 0.9rem; color: var(--muted); }
.store ul { margin: 4px 0 0; padding-left: 18px; color: var(--ink); font-size: 0.92rem; }

/* Form */
form { display: grid; gap: 14px; max-width: 560px; }
label { font-weight: 600; font-size: 0.92rem; }
form input, form textarea, form select {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; background: var(--surface); margin-top: 4px;
}
button.btn { border: none; cursor: pointer; font: inherit; font-weight: 600; }
.notice { background: #e3f0df; color: var(--ok); padding: 12px 16px; border-radius: 10px; display: none; }

.banner {
  background: #fff4e0; border: 1px dashed var(--brand); color: var(--brand-dark);
  padding: 10px 14px; border-radius: 10px; font-size: 0.9rem;
}

footer { margin-top: 48px; padding: 28px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--brand-dark); outline-offset: 2px; border-radius: 4px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Footer links ---------- */
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 0 0 10px; }
.footer-links a, .footer-links button {
  color: var(--muted); font: inherit; background: none; border: none; padding: 0; cursor: pointer; text-decoration: underline;
}
.footer-links a:hover, .footer-links button:hover { color: var(--brand-dark); }

/* ---------- Legal / text pages ---------- */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.3rem; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--ink); }
.prose ul { padding-left: 22px; }
.prose table { min-width: 0; }
.updated-on { color: var(--muted); font-size: 0.9rem; }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50;
  max-width: 720px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(47, 42, 34, .18); padding: 20px;
}
.cookie-banner h2 { font-size: 1.1rem; margin: 0 0 6px; }
.cookie-banner p { margin: 0 0 12px; color: var(--muted); font-size: 0.95rem; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cookie-actions .btn { margin: 0; padding: 10px 18px; }
.cookie-prefs { border-top: 1px solid var(--line); margin: 12px 0; padding-top: 12px; display: grid; gap: 10px; }
.cookie-prefs label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.cookie-prefs input { width: 18px; height: 18px; margin-top: 3px; flex: none; }
.cookie-prefs small { display: block; color: var(--muted); }
tbody th { background: none; text-transform: none; letter-spacing: 0; font-size: inherit; color: var(--ink); }
.card h2 { margin: 0; font-size: 1.15rem; }
.cookie-prefs[hidden] { display: none; }
