/* ==========================================================================
   AgriLink Rwanda — Design System
   Palette: forest green (#1F4D36), leaf green (#4C9A5B), harvest gold (#E8A93A),
            soil brown (#6B4226), warm cream (#FAF6EC), charcoal (#22281F)
   Type: Fraunces (display, characterful serif) + Inter (body/UI)
   Signature: terraced-hillside divider motif, referencing Rwanda's "thousand hills"
   ========================================================================== */

:root {
  --forest: #1F4D36;
  --forest-dark: #12331F;
  --leaf: #4C9A5B;
  --leaf-light: #7FC08A;
  --gold: #E8A93A;
  --gold-dark: #C98A1F;
  --soil: #6B4226;
  --cream: #FAF6EC;
  --cream-deep: #F1EAD7;
  --charcoal: #22281F;
  --muted: #6B7566;
  --white: #FFFFFF;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-soft: 0 8px 24px rgba(31, 77, 54, 0.08);
  --shadow-lift: 0 16px 40px rgba(31, 77, 54, 0.14);
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--cream);
  color: var(--charcoal);
  line-height: 1.6;
}

h1, h2, h3, h4, .agri-display {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--forest-dark);
}

a { color: var(--forest); text-decoration: none; }
a:hover { color: var(--leaf); }

/* ---------------- Navbar ---------------- */
.agri-navbar {
  background: linear-gradient(180deg, var(--forest-dark) 0%, var(--forest) 100%);
  padding: 0.85rem 0;
  box-shadow: var(--shadow-soft);
}
.agri-brand {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--white) !important;
}
.agri-brand-accent { color: var(--gold); }
.agri-logo { filter: drop-shadow(0 0 6px rgba(232,169,58,0.5)); }
.agri-navbar .nav-link {
  color: rgba(255,255,255,0.85) !important;
  font-weight: 500;
  padding: 0.5rem 0.9rem !important;
}
.agri-navbar .nav-link:hover { color: var(--gold) !important; }
.agri-cart-badge { background: var(--gold); color: var(--forest-dark); font-weight: 700; margin-left: 4px; }
.agri-btn-outline {
  border: 1.5px solid rgba(255,255,255,0.6);
  color: var(--white) !important;
  border-radius: 999px;
  padding: 0.4rem 1.1rem;
  font-weight: 500;
}
.agri-btn-outline:hover { background: rgba(255,255,255,0.12); }
.agri-btn-solid {
  background: var(--gold);
  color: var(--forest-dark) !important;
  border-radius: 999px;
  padding: 0.4rem 1.1rem;
  font-weight: 600;
  border: none;
}
.agri-btn-solid:hover { background: #f3ba54; }

/* ---------------- Buttons (global) ---------------- */
.btn-agri-primary {
  background: var(--leaf);
  border: none;
  color: var(--white);
  font-weight: 600;
  border-radius: 999px;
  padding: 0.6rem 1.6rem;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn-agri-primary:hover { background: var(--forest); color: var(--white); transform: translateY(-1px); }
.btn-agri-gold {
  background: var(--gold);
  border: none;
  color: var(--forest-dark);
  font-weight: 700;
  border-radius: 999px;
  padding: 0.6rem 1.6rem;
}
.btn-agri-gold:hover { background: var(--gold-dark); color: var(--white); }
.btn-agri-outline {
  background: transparent;
  border: 1.5px solid var(--forest);
  color: var(--forest);
  font-weight: 600;
  border-radius: 999px;
  padding: 0.55rem 1.5rem;
}
.btn-agri-outline:hover { background: var(--forest); color: var(--white); }

/* ---------------- Hero ---------------- */
.agri-hero {
  background: radial-gradient(ellipse at top right, #2A5D42 0%, var(--forest-dark) 60%);
  color: var(--white);
  padding: 5rem 0 7rem;
  position: relative;
  overflow: hidden;
}
.agri-hero .eyebrow {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  font-size: 0.8rem;
}
.agri-hero h1 {
  color: var(--white);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.1;
}
.agri-hero p.lead { color: rgba(255,255,255,0.82); font-size: 1.15rem; }
.agri-hero-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 2.5rem;
}
.agri-hero-stats .stat-num {
  font-family: 'Fraunces', serif;
  font-size: 2rem;
  color: var(--gold);
  font-weight: 700;
  display: block;
}
.agri-hero-stats .stat-label {
  color: rgba(255,255,255,0.65);
  font-size: 0.85rem;
}

/* Signature: terraced hillside divider — echoes Rwanda's "land of a thousand hills" */
.agri-terraces {
  position: relative;
  height: 64px;
  margin-top: -1px;
}
.agri-terraces svg { display: block; width: 100%; height: 100%; }

/* ---------------- Cards ---------------- */
.agri-card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid rgba(31,77,54,0.08);
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  overflow: hidden;
  height: 100%;
}
.agri-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.agri-card .card-img-wrap {
  aspect-ratio: 4/3;
  background: var(--cream-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.agri-card .card-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.agri-card .card-body { padding: 1.1rem 1.2rem 1.3rem; }
.agri-price { color: var(--forest); font-weight: 700; font-family: 'Fraunces', serif; font-size: 1.25rem; }
.agri-unit { color: var(--muted); font-size: 0.85rem; font-weight: 400; }
.agri-farmer-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--cream-deep);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
}
.badge-category {
  background: rgba(76,154,91,0.12);
  color: var(--forest);
  font-weight: 600;
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.75rem;
}

/* ---------------- Sections ---------------- */
.agri-section { padding: 4rem 0; }
.agri-section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 0.4rem;
}
.agri-section-sub { color: var(--muted); margin-bottom: 2.2rem; }

.agri-category-pill {
  display: block;
  text-align: center;
  background: var(--white);
  border: 1px solid rgba(31,77,54,0.1);
  border-radius: var(--radius-md);
  padding: 1.4rem 0.8rem;
  color: var(--forest-dark);
  font-weight: 600;
  transition: all 0.15s ease;
}
.agri-category-pill:hover {
  background: var(--forest);
  color: var(--white);
  transform: translateY(-3px);
}

/* ---------------- Forms ---------------- */
.agri-form-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 2.5rem;
  border: 1px solid rgba(31,77,54,0.08);
}
.form-label { font-weight: 600; color: var(--forest-dark); font-size: 0.9rem; }
.form-control, .form-select {
  border-radius: var(--radius-sm);
  border: 1.5px solid #E2DDCB;
  padding: 0.6rem 0.9rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--leaf);
  box-shadow: 0 0 0 3px rgba(76,154,91,0.15);
}

/* ---------------- Dashboard ---------------- */
.agri-stat-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border-left: 4px solid var(--leaf);
  box-shadow: var(--shadow-soft);
}
.agri-stat-card .stat-value {
  font-family: 'Fraunces', serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--forest-dark);
}
.agri-stat-card .stat-label { color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
.agri-sidebar {
  background: var(--forest-dark);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1rem;
  color: var(--white);
}
.agri-sidebar a {
  display: block;
  color: rgba(255,255,255,0.78);
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.2rem;
  font-weight: 500;
}
.agri-sidebar a:hover, .agri-sidebar a.active { background: rgba(255,255,255,0.1); color: var(--white); }

table.agri-table thead { background: var(--cream-deep); }
table.agri-table th { color: var(--forest-dark); font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; }
.status-pill { border-radius: 999px; padding: 0.25rem 0.75rem; font-size: 0.78rem; font-weight: 600; }
.status-pending { background: #FFF3D6; color: #97690C; }
.status-confirmed { background: #DCEEFF; color: #1C5C99; }
.status-shipped { background: #E7E0FF; color: #5B3FA6; }
.status-delivered { background: #DDF3E1; color: #1F7A3D; }
.status-cancelled { background: #FBDCDC; color: #A32424; }

/* ---------------- Footer ---------------- */
.agri-footer { background: var(--forest-dark); color: var(--white); }
.agri-footer-links a { color: rgba(255,255,255,0.7); }
.agri-footer-links li { margin-bottom: 0.5rem; }

/* ---------------- Misc ---------------- */
.agri-empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--muted);
}
.agri-empty-state .icon { font-size: 3rem; margin-bottom: 1rem; }

@media (max-width: 768px) {
  .agri-hero { padding: 3.5rem 0 5rem; text-align: center; }
  .agri-hero-stats { justify-content: center; }
  .agri-form-card { padding: 1.5rem; }
}
