/* ============================================================
   Smart Farmer Marketplace — Modern Design System
   Inspired by goGreen, Growzo & FarmDirect
   Vibrant emerald & organic green palette, clean card surfaces,
   modern sans-serif typography, rounded geometry & micro-interactions.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Brand Green Palette */
  --primary:        #15803d;  /* Emerald 700 - trustworthy, vibrant green */
  --primary-hover:  #166534;  /* Emerald 800 */
  --primary-light:  #dcfce7;  /* Emerald 100 - soft mint */
  --primary-subtle: #f0fdf4;  /* Emerald 50 */
  --primary-dark:   #0f391e;  /* Deep forest green */
  --accent-lime:    #84cc16;  /* Fresh energetic lime */
  --accent-gold:    #f59e0b;  /* Warm golden harvest / stars */
  --accent-orange:  #ea580c;  /* Warm farm orange */
  --danger:         #ef4444;  /* Crimson alert */
  --danger-light:   #fee2e2;
  
  /* Neutral surfaces */
  --bg-main:        #f8faf8;  /* Clean slightly tinted organic background */
  --card-bg:        #ffffff;
  --card-border:    #e5e9e5;
  --card-hover:     #eef3ee;
  
  /* Text */
  --text-main:      #111827;  /* High contrast readable ink */
  --text-muted:     #64748b;  /* Slate secondary */
  --text-light:     #94a3b8;
  
  /* Radii & Shadows */
  --radius-sm:      8px;
  --radius-md:      14px;
  --radius-lg:      20px;
  --radius-xl:      28px;
  --radius-full:    9999px;
  
  --shadow-sm:      0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md:      0 4px 16px -2px rgba(21, 128, 61, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-lg:      0 12px 28px -6px rgba(21, 128, 61, 0.12), 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-xl:      0 20px 38px -8px rgba(15, 57, 30, 0.18);
  
  --transition:     all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.55;
  font-size: 15px;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.25;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

img {
  max-width: 100%;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ============================================================
   CONTAINER & LAYOUT
   ============================================================ */
.wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-spacing {
  padding: 56px 0;
}

/* ============================================================
   TOP BAR & NAVIGATION
   ============================================================ */
.top-announcement {
  background: var(--primary-dark);
  color: #e2f0d9;
  font-size: 12.5px;
  font-weight: 500;
  padding: 7px 0;
  text-align: center;
}
.top-announcement span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.site-nav {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 20px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.brand-icon-box {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), #22c55e);
  color: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(22, 163, 74, 0.35);
  font-size: 18px;
}

.brand-tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #16a34a;
  background: var(--primary-light);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  margin-left: 4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  font-size: 14.5px;
  font-weight: 600;
  color: #334155;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background: var(--primary-subtle);
}

.nav-badge {
  background: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
}

.nav-badge.gold {
  background: var(--accent-gold);
}

.nav-cta-btn {
  background: var(--primary);
  color: white;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 12px rgba(21, 128, 61, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav-cta-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(21, 128, 61, 0.25);
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 18px rgba(21, 128, 61, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--primary-light);
  color: var(--primary);
}
.btn-secondary:hover {
  background: #c3f6d5;
  color: var(--primary-hover);
}

.btn-outline {
  background: transparent;
  border-color: #cbd5e1;
  color: #334155;
}
.btn-outline:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: var(--text-main);
}

.btn-outline-primary {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}
.btn-outline-primary:hover {
  background: var(--primary-subtle);
}

.btn-danger {
  background: var(--danger);
  color: white;
}
.btn-danger:hover {
  background: #dc2626;
}

.btn-danger-outline {
  background: transparent;
  border-color: #fca5a5;
  color: var(--danger);
}
.btn-danger-outline:hover {
  background: var(--danger-light);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

.btn-lg {
  padding: 13px 26px;
  font-size: 16px;
}

.btn-block {
  width: 100%;
}

/* ============================================================
   HERO SECTION (Inspired by Image 1 & 2)
   ============================================================ */
.hero-wrapper {
  background: linear-gradient(180deg, #ecfdf5 0%, #f8faf8 100%);
  padding: 48px 0 56px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--card-border);
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid #bbf7d0;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}

.hero-pill-badge .avatar-cluster {
  display: flex;
  margin-right: 4px;
}
.hero-pill-badge .avatar-cluster img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid white;
  margin-left: -6px;
  object-fit: cover;
}
.hero-pill-badge .avatar-cluster img:first-child {
  margin-left: 0;
}

.hero-title {
  font-size: 3.2rem;
  letter-spacing: -0.03em;
  color: var(--primary-dark);
  margin-bottom: 18px;
  line-height: 1.12;
}

.hero-title .highlight {
  color: var(--primary);
  position: relative;
  display: inline-block;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: #475569;
  max-width: 580px;
  margin-bottom: 28px;
  line-height: 1.6;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.hero-stats-banner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  background: white;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  box-shadow: var(--shadow-sm);
  max-width: 540px;
}

.hero-stat-item h4 {
  font-size: 1.45rem;
  color: var(--primary);
  margin-bottom: 2px;
}
.hero-stat-item p {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Hero Gallery Grid (Reference Image 1: 4 photos) */
.hero-photos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 36px;
}

.hero-photo-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 170px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}
.hero-photo-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.hero-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.hero-photo-card:hover img {
  transform: scale(1.06);
}
.hero-photo-tag {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  text-align: center;
}

/* ============================================================
   VALUE PROPOSITION BANNER (Reference Image 1)
   ============================================================ */
.value-props-banner {
  background: linear-gradient(135deg, var(--primary-dark), #14532d);
  color: white;
  border-radius: var(--radius-xl);
  padding: 36px 40px;
  margin: 40px 0 60px;
  box-shadow: var(--shadow-xl);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
}

.value-props-headline {
  font-size: 2rem;
  color: white;
  margin-bottom: 12px;
}

.value-props-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.value-step-box {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 16px;
  backdrop-filter: blur(8px);
}
.value-step-icon {
  font-size: 24px;
  margin-bottom: 8px;
  color: var(--accent-lime);
}
.value-step-box h4 {
  color: white;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}
.value-step-box p {
  color: #cbd5e1;
  font-size: 12px;
}

/* ============================================================
   CATEGORIES WITH REAL IMAGES (Reference Image 2)
   ============================================================ */
.categories-container {
  margin-bottom: 50px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-head-title {
  font-size: 1.85rem;
  color: var(--primary-dark);
}
.section-head-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 18px;
}

.category-card {
  background: white;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.category-card:hover, .category-card.active {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  background: var(--primary-subtle);
}

.category-img-wrap {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 12px;
  border: 3px solid white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  background: #f1f5f9;
}
.category-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.category-card:hover .category-img-wrap img {
  transform: scale(1.1);
}

.category-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.category-card .cat-count {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
}

/* ============================================================
   SEARCH & FILTER BAR
   ============================================================ */
.filter-search-bar {
  background: white;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 30px;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.search-input-wrapper svg {
  color: var(--primary);
  flex-shrink: 0;
}
.search-input-wrapper input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 14.5px;
  color: var(--text-main);
  background: transparent;
}

.filter-select {
  border: 1px solid var(--card-border);
  background: #f8fafc;
  border-radius: var(--radius-full);
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: #334155;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}
.filter-select:hover, .filter-select:focus {
  border-color: var(--primary);
}

/* Category Filter Chips */
.chips-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.chip {
  background: white;
  border: 1px solid var(--card-border);
  padding: 7px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: var(--transition);
}
.chip:hover {
  background: #f1f5f9;
  color: var(--text-main);
}
.chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(21, 128, 61, 0.25);
}

/* ============================================================
   PRODUCT CARDS (WITH REAL IMAGES & ZERO ICONS)
   ============================================================ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 50px;
}

.product-card {
  background: white;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #bbf7d0;
}

.product-img-box {
  position: relative;
  height: 200px;
  background: #f1f5f9;
  overflow: hidden;
}

.product-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.product-card:hover .product-img-box img {
  transform: scale(1.08);
}

.product-badge-fresh {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(21, 128, 61, 0.9);
  backdrop-filter: blur(4px);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.product-wishlist-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 17px;
  color: #94a3b8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  z-index: 2;
}
.product-wishlist-btn:hover {
  transform: scale(1.12);
  color: #ef4444;
}
.product-wishlist-btn.active {
  color: #ef4444;
  background: #fee2e2;
}

.product-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.product-category-tag {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-stock-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: #f1f5f9;
  color: #475569;
}
.product-stock-pill.low {
  background: #fef3c7;
  color: #b45309;
}

.product-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
  line-height: 1.3;
}

.product-farmer-tag {
  font-size: 12.5px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
}

.product-rating-box {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: #64748b;
  margin-bottom: 14px;
}
.product-stars {
  color: var(--accent-gold);
  letter-spacing: 1px;
  font-size: 14px;
}

.product-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--card-border);
}

.product-price-box {
  display: flex;
  flex-direction: column;
}
.product-price {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-dark);
}
.product-unit {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.product-action-btns {
  display: flex;
  gap: 6px;
}

/* ============================================================
   FARMER STORIES SPOTLIGHT (Reference Image 2 & 5)
   ============================================================ */
.farmers-section {
  background: white;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 40px;
  margin-bottom: 60px;
}

.farmer-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.farmer-card {
  background: var(--bg-main);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  gap: 16px;
  align-items: center;
  transition: var(--transition);
}
.farmer-card:hover {
  transform: translateY(-3px);
  border-color: #86efac;
  box-shadow: var(--shadow-md);
  background: white;
}

.farmer-portrait {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #22c55e;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.farmer-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.farmer-info h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 3px;
}
.farmer-info p.location {
  font-size: 12.5px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 4px;
}
.farmer-info p.bio {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ============================================================
   MODALS (Edit Product, Product Details, Checkout)
   FIXED: Proper display toggling & clean layout
   ============================================================ */
.modal-overlay {
  display: none; /* Hidden by default */
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
  display: flex !important;
}

.modal-dialog {
  background: white;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--radius-xl);
  padding: 30px;
  position: relative;
  box-shadow: var(--shadow-xl);
  animation: scaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-dialog.large {
  max-width: 780px;
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #64748b;
  cursor: pointer;
  transition: var(--transition);
}
.modal-close-btn:hover {
  background: #e2e8f0;
  color: var(--text-main);
  transform: rotate(90deg);
}

.modal-header {
  margin-bottom: 20px;
  padding-right: 30px;
}
.modal-header h3 {
  font-size: 1.5rem;
  color: var(--primary-dark);
}
.modal-header p {
  font-size: 13.5px;
  color: var(--text-muted);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ============================================================
   FORMS & INPUTS
   ============================================================ */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text-main);
  font-size: 14px;
  transition: var(--transition);
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.12);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
}

/* Image Upload & Preset Selector Component */
.image-upload-zone {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.image-upload-zone:hover {
  border-color: var(--primary);
  background: var(--primary-subtle);
}

.image-preview-box {
  width: 100%;
  height: 180px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 12px;
  border: 1px solid var(--card-border);
  background: #f1f5f9;
  position: relative;
}
.image-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preset-images-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 8px 0;
  margin-top: 8px;
}
.preset-thumb {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
  transition: var(--transition);
}
.preset-thumb:hover, .preset-thumb.active {
  border-color: var(--primary);
  transform: scale(1.06);
}
.preset-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================================
   FARMER DASHBOARD SHELL & KPIS
   ============================================================ */
.dashboard-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.dashboard-sidebar {
  background: #0d381e;
  color: white;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
}

.dashboard-sidebar .brand-logo {
  color: white;
  margin-bottom: 32px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
}
.sidebar-link:hover, .sidebar-link.active {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}
.sidebar-link svg {
  width: 18px;
  height: 18px;
}

.dashboard-main {
  background: var(--bg-main);
  padding: 36px 40px;
  overflow-y: auto;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}

.kpi-card {
  background: white;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 18px;
  transition: var(--transition);
}
.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kpi-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.kpi-icon-wrap.green {
  background: var(--primary-light);
  color: var(--primary);
}
.kpi-icon-wrap.gold {
  background: #fef3c7;
  color: #b45309;
}
.kpi-icon-wrap.blue {
  background: #dbeafe;
  color: #1d4ed8;
}
.kpi-icon-wrap.red {
  background: var(--danger-light);
  color: var(--danger);
}

.kpi-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}
.kpi-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ============================================================
   TABLES (Products & Orders)
   ============================================================ */
.table-card {
  background: white;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 32px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.modern-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.modern-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 14px 18px;
  border-bottom: 1px solid var(--card-border);
}

.modern-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--card-border);
  font-size: 14px;
  color: var(--text-main);
  vertical-align: middle;
}

.modern-table tr:hover td {
  background: #fbfdfb;
}

.table-prod-cell {
  display: flex;
  align-items: center;
  gap: 14px;
}
.table-prod-img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #f1f5f9;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
}
.status-badge.placed {
  background: #e0f2fe;
  color: #0369a1;
}
.status-badge.confirmed {
  background: #fef3c7;
  color: #b45309;
}
.status-badge.packed {
  background: #fae8ff;
  color: #86198f;
}
.status-badge.shipped {
  background: #ede9fe;
  color: #6d28d9;
}
.status-badge.delivered {
  background: #dcfce7;
  color: #15803d;
}

/* Order timeline step progress tracker */
.order-steps-tracker {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.order-step-pill {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: #f1f5f9;
  color: #64748b;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.order-step-pill.completed {
  background: #dcfce7;
  color: #15803d;
}
.order-step-pill.current {
  background: var(--primary);
  color: white;
}

/* ============================================================
   CART & ORDER SUMMARY
   ============================================================ */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: flex-start;
}

.cart-item-card {
  background: white;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 16px;
  transition: var(--transition);
}
.cart-item-card:hover {
  border-color: #cbd5e1;
}

.cart-item-info {
  display: flex;
  align-items: center;
  gap: 16px;
}
.cart-item-img {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: #f1f5f9;
}

.qty-counter {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-full);
  background: #f8fafc;
  overflow: hidden;
}
.qty-counter button {
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  color: #334155;
  transition: var(--transition);
}
.qty-counter button:hover {
  background: #e2e8f0;
}
.qty-counter span {
  padding: 0 10px;
  font-weight: 700;
  font-size: 13.5px;
}

.order-summary-card {
  background: white;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 14px;
  color: #475569;
  border-bottom: 1px dashed #f1f5f9;
}
.summary-row.total {
  border-top: 1px solid var(--card-border);
  border-bottom: none;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  padding-top: 16px;
  margin-top: 6px;
}

/* ============================================================
   REVIEWS & RATINGS COMPONENT
   ============================================================ */
.reviews-container {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--card-border);
}

.review-item {
  background: #f8fafc;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 12px;
}

.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.star-rating-selector {
  display: flex;
  gap: 4px;
  margin: 8px 0 14px;
}
.star-btn {
  background: transparent;
  border: none;
  font-size: 26px;
  cursor: pointer;
  color: #cbd5e1;
  transition: var(--transition);
}
.star-btn.active, .star-btn:hover {
  color: var(--accent-gold);
}

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: white;
  padding: 12px 22px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
}

#toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #0f2d18;
  color: #cbd5e1;
  padding: 48px 0 24px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}

.footer-brand h3 {
  color: white;
  font-size: 1.4rem;
  margin-bottom: 10px;
}
.footer-brand p {
  font-size: 13.5px;
  color: #94a3b8;
  max-width: 320px;
  line-height: 1.6;
}

.footer-col h4 {
  color: white;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
}
.footer-col a {
  display: block;
  font-size: 13.5px;
  color: #94a3b8;
  margin-bottom: 8px;
}
.footer-col a:hover {
  color: #86efac;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: #64748b;
  flex-wrap: wrap;
  gap: 12px;
}

/* ============================================================
   RESPONSIVE STYLES
   ============================================================ */
@media (max-width: 900px) {
  .dashboard-shell {
    grid-template-columns: 1fr;
  }
  .dashboard-sidebar {
    padding: 16px 20px;
  }
  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .dashboard-main {
    padding: 24px 16px;
  }
  .cart-layout {
    grid-template-columns: 1fr;
  }
  .value-props-banner {
    grid-template-columns: 1fr;
  }
  .value-props-steps {
    grid-template-columns: 1fr;
  }
  .hero-photos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 2.2rem;
  }
  .nav-links {
    display: none; /* can be supplemented with mobile toggle */
  }
  .hero-stats-banner {
    grid-template-columns: 1fr;
  }
  .hero-photos-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
