/* FarmWild MT — design system
   Palette drawn from the farm's photography: olive green, cream, sunset terracotta. */
:root {
  --cream: #faf7f0;
  --cream-dark: #f1ebdd;
  --ink: #2f3327;
  --ink-soft: #5c6150;
  --olive: #6b7a44;
  --olive-dark: #4f5c31;
  --terracotta: #c2643f;
  --terracotta-dark: #a04e2e;
  --pink: #e9cfc4;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 2px 14px rgba(47, 51, 39, 0.10);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin-bottom: 1em; }
a { color: var(--olive-dark); }
img { max-width: 100%; display: block; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ---------- announcement banner ---------- */
.banner {
  background: var(--olive-dark);
  color: var(--cream);
  text-align: center;
  padding: 9px 16px;
  font-size: 0.92rem;
}
.banner a { color: var(--pink); }

/* ---------- header ---------- */
header.site {
  background: var(--cream);
  border-bottom: 1px solid var(--cream-dark);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav-wrap {
  max-width: 1100px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.logo {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 700;
  color: var(--ink); text-decoration: none;
  letter-spacing: 0.01em;
}
.logo span { color: var(--olive); }
nav.main { display: flex; gap: 26px; align-items: center; }
nav.main a {
  color: var(--ink); text-decoration: none; font-size: 0.98rem; font-weight: 500;
  padding: 4px 0; border-bottom: 2px solid transparent;
}
nav.main a:hover, nav.main a[aria-current="page"] { border-bottom-color: var(--terracotta); }
.cart-link { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.cart-count {
  background: var(--terracotta); color: #fff; border-radius: 999px;
  font-size: 0.72rem; min-width: 19px; height: 19px; line-height: 19px;
  text-align: center; padding: 0 4px; display: none;
}
.cart-count.show { display: inline-block; }
.menu-btn { display: none; background: none; border: none; font-size: 1.7rem; color: var(--ink); cursor: pointer; }

@media (max-width: 780px) {
  .menu-btn { display: block; }
  nav.main {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--cream); border-bottom: 1px solid var(--cream-dark);
    flex-direction: column; padding: 18px 20px; gap: 16px; align-items: flex-start;
  }
  nav.main.open { display: flex; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 66vh; display: flex; align-items: center;
  justify-content: center; text-align: center; color: #fff; overflow: hidden;
}
.hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: rgba(38, 34, 24, 0.38); }
.hero .inner { position: relative; z-index: 2; padding: 60px 20px; max-width: 760px; }
.hero h1 { text-shadow: 0 2px 18px rgba(0,0,0,0.45); }
.hero p { font-size: 1.15rem; text-shadow: 0 1px 10px rgba(0,0,0,0.5); margin-top: 12px; }

.btn {
  display: inline-block; background: var(--terracotta); color: #fff;
  padding: 12px 28px; border-radius: 999px; text-decoration: none;
  font-weight: 600; font-size: 1rem; border: none; cursor: pointer;
  transition: background 0.15s;
}
.btn:hover { background: var(--terracotta-dark); }
.btn.ghost { background: transparent; border: 2px solid #fff; }
.btn.ghost:hover { background: rgba(255,255,255,0.15); }
.btn.olive { background: var(--olive); }
.btn.olive:hover { background: var(--olive-dark); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---------- sections ---------- */
section.pad { padding: 64px 0; }
section.pad.tight { padding: 40px 0; }
.section-title { text-align: center; margin-bottom: 36px; }
.section-title .kicker {
  color: var(--terracotta); text-transform: uppercase; letter-spacing: 0.14em;
  font-size: 0.8rem; font-weight: 700; display: block; margin-bottom: 6px;
}

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); text-decoration: none; color: var(--ink);
  display: flex; flex-direction: column;
}
.card img { height: 210px; object-fit: cover; width: 100%; }
.card .body { padding: 18px 20px 22px; }
.card .body p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.card h3 { margin-bottom: 6px; }

.hours-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.hours-item {
  background: var(--white); border-radius: var(--radius); padding: 22px 24px;
  box-shadow: var(--shadow); border-top: 4px solid var(--olive);
}
.hours-item h3 { color: var(--olive-dark); margin-bottom: 4px; }
.hours-item .status { font-weight: 600; }
.hours-item .note { color: var(--ink-soft); font-size: 0.92rem; }

.crew { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.crew figure { text-align: center; }
.crew img {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.crew figcaption { margin-top: 12px; }
.crew figcaption strong { font-family: var(--font-display); font-size: 1.1rem; display: block; }
.crew figcaption span { color: var(--ink-soft); font-size: 0.92rem; }
.crew .placeholder {
  width: 100%; aspect-ratio: 1; border-radius: var(--radius);
  background: var(--cream-dark); display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft); font-size: 3rem;
}

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 780px) { .split { grid-template-columns: 1fr; } }

/* ---------- store ---------- */
.store-layout { display: grid; grid-template-columns: 230px 1fr; gap: 36px; align-items: start; }
@media (max-width: 860px) { .store-layout { grid-template-columns: 1fr; } }
.cat-nav { position: sticky; top: 90px; }
.cat-nav h3 { margin-bottom: 10px; }
.cat-nav ul { list-style: none; }
.cat-nav li { margin: 2px 0; }
.cat-nav a {
  text-decoration: none; color: var(--ink-soft); font-size: 0.95rem;
  display: block; padding: 4px 10px; border-radius: 8px;
}
.cat-nav a:hover { background: var(--cream-dark); color: var(--ink); }
.cat-nav a.active { background: var(--olive); color: #fff; }
.cat-nav ul ul { margin-left: 14px; }
@media (max-width: 860px) {
  .cat-nav { position: static; }
  .cat-nav ul { display: flex; flex-wrap: wrap; gap: 6px; }
  .cat-nav ul ul { display: contents; }
}

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 22px; }
.product {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column; position: relative;
}
.product img { aspect-ratio: 1; object-fit: cover; width: 100%; background: var(--cream-dark); }
.product .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product h3 { font-size: 1rem; font-family: var(--font-body); font-weight: 600; }
.product .price { color: var(--olive-dark); font-weight: 700; }
.product select {
  padding: 7px 10px; border-radius: 8px; border: 1px solid var(--cream-dark);
  font-family: inherit; font-size: 0.9rem; background: var(--cream);
}
.product .add {
  margin-top: auto; background: var(--olive); color: #fff; border: none;
  padding: 9px 14px; border-radius: 999px; font-weight: 600; cursor: pointer; font-size: 0.92rem;
}
.product .add:hover { background: var(--olive-dark); }
.product .add[disabled] { background: var(--cream-dark); color: var(--ink-soft); cursor: not-allowed; }
.sold-out-badge {
  position: absolute; top: 12px; left: 12px; background: var(--ink);
  color: #fff; font-size: 0.75rem; padding: 4px 10px; border-radius: 999px; font-weight: 600;
}

/* ---------- cart drawer ---------- */
.cart-drawer {
  position: fixed; top: 0; right: -420px; width: min(400px, 100vw); height: 100vh;
  background: var(--white); z-index: 200; box-shadow: -4px 0 24px rgba(0,0,0,0.18);
  transition: right 0.25s ease; display: flex; flex-direction: column;
}
.cart-drawer.open { right: 0; }
.cart-drawer header {
  padding: 18px 22px; border-bottom: 1px solid var(--cream-dark);
  display: flex; justify-content: space-between; align-items: center;
}
.cart-drawer .items { flex: 1; overflow-y: auto; padding: 14px 22px; }
.cart-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--cream-dark); }
.cart-item img { width: 58px; height: 58px; object-fit: cover; border-radius: 8px; }
.cart-item .info { flex: 1; font-size: 0.92rem; }
.cart-item .qty { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.cart-item .qty button {
  width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--cream-dark);
  background: var(--cream); cursor: pointer; font-size: 0.95rem; line-height: 1;
}
.cart-item .remove { background: none; border: none; color: var(--terracotta); cursor: pointer; font-size: 0.8rem; }
.cart-drawer footer { padding: 18px 22px; border-top: 1px solid var(--cream-dark); }
.cart-drawer .total { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 12px; }
.cart-drawer .checkout-note { font-size: 0.85rem; color: var(--ink-soft); margin-top: 10px; }
.drawer-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--ink); }
.cart-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 150;
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.cart-overlay.show { opacity: 1; pointer-events: auto; }

/* ---------- forms ---------- */
form.std { display: grid; gap: 16px; max-width: 560px; }
form.std label { font-weight: 600; font-size: 0.94rem; }
form.std input, form.std textarea {
  width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid #d8d2c2;
  font-family: inherit; font-size: 1rem; background: var(--white); margin-top: 5px;
}
form.std input:focus, form.std textarea:focus { outline: 2px solid var(--olive); border-color: transparent; }
.form-status { font-weight: 600; }
.form-status.ok { color: var(--olive-dark); }
.form-status.err { color: var(--terracotta-dark); }

/* ---------- chat widget ---------- */
.chat-fab {
  position: fixed; bottom: 22px; right: 22px; z-index: 300;
  background: var(--olive-dark); color: #fff; border: none; border-radius: 999px;
  padding: 14px 22px; font-size: 0.98rem; font-weight: 600; cursor: pointer;
  box-shadow: 0 4px 18px rgba(0,0,0,0.25); font-family: inherit;
}
.chat-panel {
  position: fixed; bottom: 84px; right: 22px; z-index: 300;
  width: min(370px, calc(100vw - 32px)); height: 480px; max-height: calc(100vh - 120px);
  background: var(--white); border-radius: 16px; box-shadow: 0 8px 40px rgba(0,0,0,0.3);
  display: none; flex-direction: column; overflow: hidden;
}
.chat-panel.open { display: flex; }
.chat-panel header {
  background: var(--olive-dark); color: #fff; padding: 14px 18px;
  display: flex; justify-content: space-between; align-items: center;
}
.chat-panel header h3 { font-size: 1.05rem; }
.chat-panel header button { background: none; border: none; color: #fff; font-size: 1.3rem; cursor: pointer; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 85%; padding: 9px 13px; border-radius: 14px; font-size: 0.92rem; white-space: pre-wrap; }
.chat-msg.bot { background: var(--cream-dark); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg.user { background: var(--olive); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-input { display: flex; border-top: 1px solid var(--cream-dark); }
.chat-input input {
  flex: 1; border: none; padding: 13px 14px; font-family: inherit; font-size: 0.95rem; background: transparent;
}
.chat-input input:focus { outline: none; }
.chat-input button {
  background: none; border: none; color: var(--olive-dark); font-weight: 700;
  padding: 0 16px; cursor: pointer; font-family: inherit; font-size: 0.95rem;
}

/* ---------- footer ---------- */
footer.site {
  background: var(--ink); color: var(--cream); margin-top: 70px; padding: 46px 0 30px;
}
footer.site .cols {
  max-width: 1100px; margin: 0 auto; padding: 0 20px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px;
}
footer.site h4 { margin-bottom: 10px; color: var(--pink); }
footer.site a { color: var(--cream); text-decoration: none; }
footer.site a:hover { text-decoration: underline; }
footer.site ul { list-style: none; }
footer.site li { margin: 5px 0; font-size: 0.95rem; }
footer.site .fine {
  text-align: center; margin-top: 34px; font-size: 0.82rem; color: #9aa08e;
}

/* page hero (short) */
.page-hero {
  position: relative; min-height: 34vh; display: flex; align-items: flex-end; color: #fff; overflow: hidden;
}
.page-hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(38,34,24,0.05), rgba(38,34,24,0.55)); }
.page-hero .inner { position: relative; z-index: 2; padding: 40px 20px; max-width: 1100px; margin: 0 auto; width: 100%; }

.notice {
  background: var(--pink); border-radius: var(--radius); padding: 16px 20px;
  color: var(--ink); font-size: 0.98rem;
}
