@import url("fonts.css");

:root {
  --c-green: oklch(0.30 0.045 155);
  --c-olive: oklch(0.50 0.07 110);
  --c-cream: oklch(0.97 0.014 75);
  --c-beige: oklch(0.92 0.02 70);
  --c-sand: oklch(0.87 0.035 62);
  --c-terracotta: oklch(0.58 0.13 40);
  --c-white: oklch(0.995 0.004 75);
  --c-wood: oklch(0.50 0.055 45);
  --c-graphite: oklch(0.26 0.01 260);
  --c-ink: oklch(0.24 0.02 150);
  --f-head: 'Lora', Georgia, 'Times New Roman', serif;
  --f-body: 'Work Sans', 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-body);
  color: var(--c-ink);
  background: var(--c-cream);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
input, select, textarea, button { font-family: var(--f-body); }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* Top bar */
.topbar {
  background: var(--c-green);
  color: var(--c-white);
  font-size: 13px;
  text-align: center;
  padding: 7px 16px;
}

/* Header */
.site-header {
  background: var(--c-white);
  border-bottom: 1px solid var(--c-beige);
  position: sticky;
  top: 0;
  z-index: 40;
}
.site-header .wrap {
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 20px; height: 20px;
  background: var(--c-terracotta);
  border-radius: 0 50% 0 50%;
  transform: rotate(45deg);
  display: inline-block;
}
.logo-text {
  font-family: var(--f-head);
  font-size: 24px;
  font-weight: 600;
  color: var(--c-green);
  letter-spacing: 0.3px;
}
.main-nav { display: flex; gap: 20px; flex-wrap: wrap; flex: 1; }
.main-nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--c-ink);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.main-nav a.active { color: var(--c-green); border-bottom-color: var(--c-terracotta); }
.header-actions { display: flex; align-items: center; gap: 16px; }
.header-actions a { position: relative; font-size: 14px; color: var(--c-ink); }
.cart-link {
  font-weight: 600;
  color: var(--c-green);
  background: var(--c-beige);
  padding: 8px 14px;
  border-radius: 4px;
}
.badge {
  position: absolute; top: -8px; right: -14px;
  background: var(--c-terracotta); color: var(--c-white);
  font-size: 10px; border-radius: 8px; padding: 1px 5px;
}
.cart-link .badge { right: -8px; }

main { flex: 1; }

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--c-beige) 0%, var(--c-cream) 100%);
  padding: 56px 24px;
}
.hero-grid {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 40px; align-items: center;
}
.hero-text { text-align: left; }
.hero h1 {
  font-family: var(--f-head); font-size: clamp(32px, 5vw, 54px);
  font-weight: 600; color: var(--c-green); margin: 0 0 18px; line-height: 1.15;
}
.hero p { font-size: 18px; color: var(--c-wood); max-width: 560px; margin: 0 0 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-photo {
  border-radius: 8px; overflow: hidden; aspect-ratio: 4/3;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--c-green); color: var(--c-white); }
.btn-secondary { background: var(--c-white); color: var(--c-green); border-color: var(--c-green); }
.btn-accent { background: var(--c-terracotta); color: var(--c-white); }
.btn-outline { background: var(--c-white); border-color: var(--c-beige); color: var(--c-green); }
.btn-sm { padding: 9px 14px; font-size: 13px; border-radius: 4px; }
.btn-block { display: block; text-align: center; width: 100%; }

/* Sections */
section.page-section { max-width: 1240px; margin: 0 auto; padding: 56px 24px; }
section.page-section.tight { padding: 40px 24px; }
.section-white { background: var(--c-white); }
.section-beige { background: var(--c-beige); }
h2.section-title {
  font-family: var(--f-head); font-size: 30px; color: var(--c-green);
  text-align: center; margin: 0 0 32px;
}
h2.section-title.left { text-align: left; font-size: 28px; }

/* Grids */
.grid-categories { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.grid-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.grid-teaser { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }

/* Category tile */
.category-tile {
  background: var(--c-white); border: 1px solid var(--c-beige); border-radius: 6px;
  overflow: hidden; text-align: center; display: block;
}
.category-tile .thumb { aspect-ratio: 4/3; overflow: hidden; }
.category-tile .thumb img { width: 100%; height: 100%; object-fit: cover; }
.category-tile .name {
  font-family: var(--f-head); font-size: 16px; font-weight: 600; color: var(--c-green);
  padding: 16px 12px;
}

/* Product card */
.product-card {
  background: var(--c-white); border: 1px solid var(--c-beige); border-radius: 6px;
  overflow: hidden; display: flex; flex-direction: column; height: 100%;
}
.product-card .thumb { aspect-ratio: 1; overflow: hidden; display: block; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card .brand { font-size: 11px; color: var(--c-wood); text-transform: uppercase; letter-spacing: 0.4px; }
.product-card .name { font-family: var(--f-head); font-size: 15px; font-weight: 600; color: var(--c-green); display: block; }
.product-card .weight { font-size: 12px; color: var(--c-wood); }
.product-card .spacer { flex: 1; }
.product-card .price-row { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.product-card .price { font-weight: 700; font-size: 17px; color: var(--c-terracotta); }
.product-card .fav { font-size: 18px; color: var(--c-terracotta); background: none; border: none; cursor: pointer; }
.product-card .add-btn {
  text-align: center; background: var(--c-green); color: var(--c-white);
  padding: 9px; border-radius: 4px; font-size: 13px; font-weight: 600; margin-top: 4px; border: none; cursor: pointer; width: 100%;
}

/* Recipe / magazine teaser card */
.teaser-card { background: var(--c-beige); border-radius: 6px; padding: 22px; display: block; }
.teaser-card.on-white { background: var(--c-white); border: 1px solid var(--c-beige); }
.teaser-card .kicker { font-size: 12px; color: var(--c-wood); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.teaser-card .title { font-family: var(--f-head); font-size: 18px; font-weight: 600; color: var(--c-green); margin-bottom: 8px; }
.teaser-card .excerpt { font-size: 14px; color: var(--c-ink); }

/* Article/list card */
.list-card {
  background: var(--c-white); border-radius: 6px; padding: 20px; display: block;
  border: 1px solid var(--c-beige); margin-bottom: 14px;
}
.list-card .title { font-family: var(--f-head); font-size: 17px; font-weight: 600; color: var(--c-green); margin-bottom: 6px; }
.list-card .excerpt { font-size: 14px; color: var(--c-wood); }

/* Breadcrumb */
.crumb { font-size: 13px; color: var(--c-wood); margin-bottom: 20px; }
.crumb a { color: var(--c-wood); }
.crumb a:hover { color: var(--c-green); }

/* Product detail */
.product-detail { max-width: 1100px; margin: 0 auto; padding: 40px 24px; }
.product-detail-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 40px; }
.product-photo { aspect-ratio: 1; border-radius: 6px; overflow: hidden; }
.product-photo img { width: 100%; height: 100%; object-fit: cover; }
.product-kicker { font-size: 13px; color: var(--c-wood); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.product-detail h1 { font-family: var(--f-head); font-size: 30px; color: var(--c-green); margin: 0 0 14px; }
.product-price { font-size: 28px; font-weight: 700; color: var(--c-terracotta); margin-bottom: 4px; }
.product-unit { font-size: 13px; color: var(--c-wood); margin-bottom: 20px; }
.product-actions { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.product-availability { font-size: 13px; color: var(--c-olive); margin-bottom: 24px; }
.product-facts { border-top: 1px solid var(--c-beige); padding-top: 20px; display: flex; flex-direction: column; gap: 14px; font-size: 14px; }
.product-facts strong { color: var(--c-green); }
.nutrition-table { margin-top: 40px; max-width: 460px; }
.nutrition-table h3 { font-family: var(--f-head); font-size: 18px; color: var(--c-green); margin-bottom: 12px; }
.nutrition-table table { width: 100%; font-size: 14px; border-collapse: collapse; }
.nutrition-table td { padding: 8px 0; border-bottom: 1px solid var(--c-beige); }
.nutrition-table td.val { text-align: right; }
.nutrition-table td.sub { padding-left: 16px; color: var(--c-wood); }
.brewing-note { margin-top: 20px; font-size: 14px; }
.brewing-note strong { color: var(--c-green); }
.related-block { margin-top: 56px; }
.related-block h3 { font-family: var(--f-head); font-size: 22px; color: var(--c-green); margin-bottom: 20px; }

/* Shop layout */
.shop-layout { max-width: 1240px; margin: 0 auto; padding: 40px 24px; display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 32px; }
.shop-sidebar .field { margin-bottom: 24px; }
.shop-sidebar label.field-title { font-family: var(--f-head); font-weight: 600; color: var(--c-green); margin-bottom: 10px; font-size: 15px; display: block; }
.input, select.input, textarea.input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--c-beige); border-radius: 4px;
  font-size: 14px; font-family: var(--f-body); box-sizing: border-box; background: var(--c-white); color: var(--c-ink);
}
.cat-links { display: flex; flex-direction: column; gap: 4px; margin-bottom: 24px; }
.cat-links a { font-size: 14px; padding: 7px 10px; border-radius: 4px; color: var(--c-ink); }
.cat-links a.active { background: var(--c-green); color: var(--c-white); font-weight: 600; }
.results-count { font-size: 14px; color: var(--c-wood); margin-bottom: 16px; }
.empty-note { padding: 48px; text-align: center; color: var(--c-wood); }

/* Cart */
.cart-page { max-width: 1000px; margin: 0 auto; padding: 40px 24px; }
.cart-line {
  display: grid; grid-template-columns: minmax(0,1fr) auto auto auto; align-items: center; gap: 16px;
  background: var(--c-white); border-radius: 6px; padding: 14px 18px; margin-bottom: 14px;
}
.cart-line .name { font-weight: 600; color: var(--c-green); }
.cart-line .meta { font-size: 13px; color: var(--c-wood); }
.qty-control { display: flex; align-items: center; gap: 8px; }
.qty-btn {
  width: 26px; height: 26px; border: 1px solid var(--c-beige); border-radius: 4px;
  display: flex; align-items: center; justify-content: center; background: var(--c-white); cursor: pointer;
}
.line-total { font-weight: 600; min-width: 90px; text-align: right; }
.remove-link { font-size: 13px; color: var(--c-terracotta); background: none; border: none; cursor: pointer; }
.cart-summary {
  background: var(--c-beige); border-radius: 6px; padding: 24px; max-width: 380px; margin-left: auto;
  display: flex; flex-direction: column; gap: 10px; font-size: 14px;
}
.cart-summary .row { display: flex; justify-content: space-between; }
.cart-summary .total-row { font-weight: 700; font-size: 16px; border-top: 1px solid var(--c-sand); padding-top: 10px; margin-top: 4px; }
.free-ship-note { font-size: 12px; color: var(--c-olive); }
.empty-cart { padding: 48px; text-align: center; color: var(--c-wood); background: var(--c-white); border-radius: 6px; }
.empty-cart a { color: var(--c-green); font-weight: 600; }

/* Checkout */
.checkout-page { max-width: 760px; margin: 0 auto; padding: 40px 24px; }
.checkout-steps { display: flex; gap: 6px; margin-bottom: 32px; }
.checkout-steps .step { flex: 1; text-align: center; padding: 8px 4px; font-size: 12px; font-weight: 600; border-bottom: 3px solid var(--c-beige); color: var(--c-wood); }
.checkout-steps .step.active, .checkout-steps .step.done { border-bottom-color: var(--c-green); }
.checkout-steps .step.active { color: var(--c-green); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .span2 { grid-column: span 2; }
.form-grid input, .form-grid textarea { padding: 11px; border: 1px solid var(--c-beige); border-radius: 4px; font-family: var(--f-body); }
.checkout-shipping-box {
  background: var(--c-white); border: 1px solid var(--c-green); border-radius: 6px; padding: 18px;
  display: flex; justify-content: space-between; align-items: center;
}
.payment-option {
  display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: 6px;
  background: var(--c-white); border: 1px solid var(--c-beige); cursor: pointer; margin-bottom: 10px;
}
.payment-option input[type="radio"] { width: 14px; height: 14px; accent-color: var(--c-green); }
.order-summary-box { background: var(--c-white); border-radius: 6px; padding: 20px; margin-bottom: 20px; }
.order-summary-box .row { display: flex; justify-content: space-between; padding: 6px 0; }
.order-summary-box .row.total { padding: 10px 0 0; border-top: 1px solid var(--c-beige); margin-top: 8px; font-weight: 700; }
.step-actions { margin-top: 24px; display: flex; justify-content: space-between; }
.confirm-box { text-align: center; padding: 40px; background: var(--c-white); border-radius: 6px; }
.confirm-box h1 { font-family: var(--f-head); font-size: 26px; color: var(--c-green); margin-bottom: 12px; }
.confirm-box p { color: var(--c-wood); margin-bottom: 6px; }

/* Account */
.account-page { max-width: 420px; margin: 0 auto; padding: 56px 24px; }
.tab-switch { display: flex; gap: 4px; margin-bottom: 24px; background: var(--c-beige); border-radius: 6px; padding: 4px; }
.tab-switch a { flex: 1; text-align: center; padding: 10px; border-radius: 4px; font-weight: 600; color: var(--c-wood); }
.tab-switch a.active { background: var(--c-white); color: var(--c-green); }
.stacked-form { display: flex; flex-direction: column; gap: 12px; }
.stacked-form input { padding: 12px; border: 1px solid var(--c-beige); border-radius: 4px; font-family: var(--f-body); }
.stacked-form label.checkbox { font-size: 13px; color: var(--c-wood); display: flex; gap: 8px; align-items: flex-start; }
.stacked-form label.checkbox input { margin-top: 2px; }

/* Favorites empty / generic empty */
.notice-box { padding: 48px; text-align: center; color: var(--c-wood); background: var(--c-white); border-radius: 6px; margin-bottom: 24px; }

/* Recipe / article detail */
.detail-page { max-width: 700px; margin: 0 auto; padding: 40px 24px; }
.detail-page.wide { max-width: 700px; }
.recipe-step { display: flex; gap: 14px; margin-bottom: 14px; }
.recipe-step .num {
  width: 28px; height: 28px; border-radius: 50%; background: var(--c-green); color: var(--c-white);
  display: flex; align-items: center; justify-content: center; font-weight: 600; flex-shrink: 0; font-size: 14px;
}

/* Simple text page (about, faq) */
.text-page { max-width: 700px; margin: 0 auto; padding: 56px 24px; }
.text-page h1 { font-family: var(--f-head); font-size: 30px; color: var(--c-green); margin: 0 0 20px; }
.text-page p { font-size: 16px; margin-bottom: 16px; }
.faq-item { background: var(--c-white); border: 1px solid var(--c-beige); border-radius: 6px; padding: 18px; margin-bottom: 12px; }
.faq-item .q { font-weight: 600; color: var(--c-green); margin-bottom: 6px; }
.faq-item .a { font-size: 14px; color: var(--c-ink); }

/* Legal layout */
.legal-layout { max-width: 1000px; margin: 0 auto; padding: 40px 24px; display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 32px; }
.legal-nav { display: flex; flex-direction: column; gap: 4px; }
.legal-nav a { font-size: 14px; padding: 8px 10px; border-radius: 4px; color: var(--c-ink); }
.legal-nav a.active { background: var(--c-green); color: var(--c-white); font-weight: 600; }
.legal-layout h1 { font-family: var(--f-head); font-size: 26px; color: var(--c-green); margin: 0 0 20px; }
.legal-section { margin-bottom: 18px; }
.legal-section h2 { font-weight: 600; color: var(--c-green); margin: 0 0 4px; font-size: 15px; }
.legal-section p { font-size: 14px; color: var(--c-ink); margin: 0; }

/* Footer */
.site-footer { background: var(--c-green); color: var(--c-cream); padding: 48px 24px 24px; margin-top: 40px; }
.footer-grid { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px; }
.footer-brand { font-family: var(--f-head); font-size: 20px; margin-bottom: 12px; }
.footer-tagline { font-size: 13px; opacity: 0.8; }
.footer-col-title { font-weight: 600; margin-bottom: 10px; font-size: 14px; }
.footer-links { display: flex; flex-direction: column; gap: 6px; font-size: 13px; opacity: 0.85; }
.footer-bottom {
  max-width: 1240px; margin: 32px auto 0; padding-top: 20px; border-top: 1px solid var(--c-olive);
  font-size: 12px; opacity: 0.75; display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between;
}

/* Cookie banner */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; background: var(--c-white); border-top: 1px solid var(--c-beige);
  padding: 18px 24px; box-shadow: 0 -4px 16px rgba(0,0,0,0.08); z-index: 100;
}
.cookie-banner .inner { max-width: 1100px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.cookie-banner .text { font-size: 13px; color: var(--c-ink); max-width: 560px; }
.cookie-banner .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cookie-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; z-index: 110; padding: 24px; }
.cookie-modal { background: var(--c-white); border-radius: 8px; padding: 28px; max-width: 460px; width: 100%; }
.cookie-modal h3 { font-family: var(--f-head); font-size: 20px; color: var(--c-green); margin: 0 0 16px; }
.cookie-cat-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--c-beige); }
.cookie-cat-row .label { font-weight: 600; font-size: 14px; }
.cookie-cat-row .desc { font-size: 12px; color: var(--c-wood); }
.toggle {
  width: 40px; height: 22px; border-radius: 12px; background: var(--c-sand); position: relative; flex-shrink: 0;
  display: block; border: none; cursor: pointer; padding: 0;
}
.toggle.on { background: var(--c-green); }
.toggle .dot { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--c-white); transition: left 0.15s; }
.toggle.on .dot { left: 20px; }
.cookie-modal-actions { display: flex; gap: 10px; margin-top: 20px; }

/* Utility */
.hidden { display: none !important; }
.form-message { background: var(--c-beige); padding: 24px; border-radius: 6px; margin-bottom: 24px; }
.form-message.error { background: #f8d7da; color: #842029; }

@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-text { text-align: center; margin: 0 auto; }
  .hero p { margin: 0 auto 32px; }
  .hero-actions { justify-content: center; }
  .product-detail-grid { grid-template-columns: 1fr; }
  .shop-layout, .legal-layout { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span2 { grid-column: span 1; }
}
