:root {
  --wheat-50: #fdf9f0;
  --wheat-100: #f7ecd3;
  --wheat-400: #d9a441;
  --wheat-500: #c98b28;
  --wheat-600: #a86f1c;
  --brown-800: #3a2c1c;
  --brown-900: #241a10;
  --green-600: #4d7c3f;
  --green-700: #3d6331;
  --ink: #2b2620;
  --muted: #736b5e;
  --line: #e8dfcc;
  --surface: #ffffff;
  --surface-alt: #fbf5e9;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(58, 44, 28, 0.08);
  --shadow-lg: 0 16px 40px rgba(58, 44, 28, 0.14);
  --font-head: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  margin: 0 0 0.5em;
  color: var(--brown-900);
}

p { margin: 0 0 1em; color: var(--muted); }

a { color: inherit; text-decoration: none; }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--wheat-500), var(--wheat-600));
  color: #fff;
  box-shadow: 0 6px 16px rgba(169, 111, 28, 0.35);
}
.btn-primary:hover { box-shadow: 0 10px 22px rgba(169, 111, 28, 0.45); }
.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.7);
  color: #fff;
}
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-block { width: 100%; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--brown-900);
}
.brand-icon { font-size: 1.6rem; }
.brand-text span { color: var(--wheat-600); }

.main-nav { display: flex; gap: 32px; }
.main-nav a {
  font-weight: 500;
  color: var(--ink);
  position: relative;
  padding: 4px 0;
}
.main-nav a:hover { color: var(--wheat-600); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.cart-btn {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.cart-btn:hover { background: var(--wheat-100); }
.cart-count {
  background: var(--green-600);
  color: #fff;
  border-radius: 999px;
  font-size: 0.75rem;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}
.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  padding: 120px 0 90px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,0.12), transparent 40%),
    linear-gradient(135deg, var(--brown-900), var(--brown-800) 45%, var(--wheat-600) 130%);
  z-index: -1;
}
.hero-content { text-align: center; max-width: 720px; margin: 0 auto; }
.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--wheat-100);
  margin-bottom: 10px;
}
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4rem);
  color: #fff;
  margin-bottom: 16px;
}
.hero-sub {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.88);
  margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Trust bar */
.trust-bar {
  background: var(--surface-alt);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  text-align: center;
}
.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--brown-800);
}
.trust-icon { font-size: 1.5rem; }

/* Sections */
.section { padding: 90px 0; }
.section.alt { background: var(--surface-alt); }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 48px; }
.section-head h2 { font-size: 2.2rem; }

/* Filter tabs */
.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.tab {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  padding: 10px 22px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--brown-800);
  transition: all 0.15s ease;
}
.tab:hover { background: var(--wheat-100); }
.tab.active {
  background: var(--brown-900);
  border-color: var(--brown-900);
  color: #fff;
}

/* Product grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--wheat-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 4px;
}
.product-card.blegtori .product-icon { background: #e6efe1; }
.product-name { font-size: 1.1rem; margin-bottom: 2px; }
.product-desc { font-size: 0.9rem; flex: 1; }
.product-price {
  font-weight: 700;
  color: var(--wheat-600);
  font-size: 1.05rem;
}
.product-price .unit { font-weight: 400; color: var(--muted); font-size: 0.85rem; }
.product-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.qty-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.qty-control button {
  background: var(--surface-alt);
  border: none;
  width: 32px;
  height: 32px;
  font-size: 1rem;
  cursor: pointer;
}
.qty-control input {
  width: 40px;
  text-align: center;
  border: none;
  font-weight: 600;
  -moz-appearance: textfield;
}
.qty-control input::-webkit-outer-spin-button,
.qty-control input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.add-btn {
  flex: 1;
  background: var(--green-600);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}
.add-btn:hover { background: var(--green-700); }
.add-btn.added { background: var(--brown-800); }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}
.about-map {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.contact-card {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 24px;
  text-align: center;
}
.contact-icon { font-size: 1.8rem; display: block; margin-bottom: 10px; }
.contact-card h3 { font-size: 1.05rem; }
.contact-card p { margin: 0; }

/* Footer */
.site-footer {
  background: var(--brown-900);
  color: rgba(255,255,255,0.75);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-brand { color: #fff; }
.footer-brand .brand-text span { color: var(--wheat-400); }
.site-footer p { margin: 0; font-size: 0.9rem; color: rgba(255,255,255,0.6); }

/* Cart Drawer */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(36, 26, 16, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 200;
}
.overlay.visible { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100%);
  height: 100%;
  background: #fff;
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: -12px 0 40px rgba(0,0,0,0.15);
}
.cart-drawer.open { transform: translateX(0); }

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
  flex-shrink: 0;
}
.cart-header h3 { margin: 0; }
.close-btn {
  background: var(--surface-alt);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
}

.cart-body { padding: 20px 24px; }
.cart-empty { text-align: center; padding: 60px 0; color: var(--muted); }
.muted { color: var(--muted); font-size: 0.9rem; }

.cart-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.cart-item {
  position: relative;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 44px 14px 14px;
}
.cart-item-name { font-weight: 600; margin-bottom: 2px; }
.cart-item-meta { font-size: 0.85rem; color: var(--muted); margin-bottom: 10px; }
.cart-item-remove {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: #b3452f;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
}
.cart-item-remove:hover { background: #fbe3dd; }
.cart-item-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}
.cart-item-qty button {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
}
.cart-item-qty button:hover { background: var(--wheat-100); }
.cart-item-qty span { min-width: 30px; text-align: center; font-weight: 600; }

.cart-footer {
  border-top: 1px solid var(--line);
  padding: 20px 24px 28px;
  background: var(--surface-alt);
  flex-shrink: 0;
}
.order-form { display: flex; flex-direction: column; gap: 14px; }
.order-form label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brown-800);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.order-form input, .order-form textarea {
  font: inherit;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  resize: vertical;
}
.order-form input:focus, .order-form textarea:focus {
  outline: none;
  border-color: var(--wheat-500);
  box-shadow: 0 0 0 3px rgba(217, 164, 65, 0.25);
}
.form-msg { min-height: 20px; font-size: 0.9rem; font-weight: 600; margin: 8px 0 0; text-align: center; }
.form-msg.success { color: var(--green-700); }
.form-msg.error { color: #b3452f; }

/* Homepage category teaser */
.category-teaser-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}
.category-teaser-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 28px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: block;
}
.category-teaser-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.category-teaser-icon { font-size: 2.4rem; display: block; margin-bottom: 12px; }
.category-teaser-card h3 { margin-bottom: 6px; }
.category-teaser-card p { margin-bottom: 14px; }
.category-teaser-link { font-weight: 700; color: var(--wheat-600); }
.teaser-cta { text-align: center; }

/* Products page hero */
.page-hero {
  padding: 70px 0 40px;
  background: linear-gradient(135deg, var(--brown-900), var(--brown-800) 60%, var(--wheat-600) 140%);
  color: #fff;
  text-align: center;
}
.page-hero h1 { color: #fff; }
.hero-sub-dark { color: rgba(255,255,255,0.85); max-width: 560px; margin: 0 auto; }
.main-nav a.active-link { color: var(--wheat-600); }

/* Products page toolbar */
.products-page-section { padding-top: 50px; }
.products-toolbar { margin-bottom: 24px; }
.search-box {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
}
.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.6;
}
.search-box input {
  width: 100%;
  font: inherit;
  padding: 13px 16px 13px 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-alt);
}
.search-box input:focus {
  outline: none;
  border-color: var(--wheat-500);
  box-shadow: 0 0 0 3px rgba(217, 164, 65, 0.25);
}

.subcategory-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.subtab {
  background: transparent;
  border: 1px solid var(--line);
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  transition: all 0.15s ease;
}
.subtab:hover { border-color: var(--wheat-500); color: var(--brown-800); }
.subtab.active {
  background: var(--wheat-500);
  border-color: var(--wheat-500);
  color: #fff;
  font-weight: 600;
}

.results-info { text-align: center; color: var(--muted); font-size: 0.9rem; margin-bottom: 24px; }
.no-results { text-align: center; padding: 40px 0; color: var(--muted); }

.load-more-wrap { text-align: center; margin-top: 36px; }
.btn-outline-dark {
  background: transparent;
  border: 2px solid var(--brown-900);
  color: var(--brown-900);
}
.btn-outline-dark:hover { background: var(--brown-900); color: #fff; }

@media (max-width: 640px) {
  .category-teaser-grid { grid-template-columns: 1fr; }
}

/* Responsive */
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .main-nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 20px 24px;
    gap: 18px;
    border-bottom: 1px solid var(--line);
    transform: translateY(-140%);
    transition: transform 0.25s ease;
    z-index: 99;
  }
  .main-nav.open { transform: translateY(0); }
  .hamburger { display: block; }
}
