:root {
  /* Colors */
  --primary: hsl(120, 39%, 30%);       /* #2F6B2F */
  --primary-foreground: hsl(0, 0%, 100%);
  --secondary: hsl(120, 50%, 93%);     /* #E6F6E6 */
  --secondary-foreground: hsl(120, 39%, 20%);
  --accent: hsl(45, 90%, 68%);         /* #F6D365 */
  --accent-foreground: hsl(217, 41%, 10%);
  --muted: hsl(120, 20%, 96%);         /* #F4FDF4 */
  --muted-foreground: hsl(217, 20%, 40%);
  --background: hsl(0, 0%, 100%);
  --foreground: hsl(217, 41%, 10%);    /* #0F1724 */
  --border: hsl(120, 10%, 90%);
  --card: hsl(0, 0%, 100%);
  
  /* Typography */
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-heading: 'Montserrat', system-ui, sans-serif;

  /* Spacing & Layout */
  --container-padding: 1rem;
  --section-spacing: 5rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--foreground);
}

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

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

/* Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.section {
  padding-top: var(--section-spacing);
  padding-bottom: var(--section-spacing);
}

.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-muted { color: var(--muted-foreground); }
.bg-muted { background-color: var(--muted); }
.bg-white { background-color: #fff; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-8 { gap: 2rem; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .md\:flex-row { flex-direction: row; }
  .md\:text-left { text-align: left; }
  .md\:block { display: block; }
  .md\:hidden { display: none; }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
  .lg\:block { display: block; }
}

/* Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  font-weight: 600;
  transition: all 0.2s;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
}
.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-accent {
  background-color: var(--accent);
  color: var(--accent-foreground);
  box-shadow: var(--shadow-lg);
}
.btn-accent:hover {
  background-color: #f7db80; /* lighter accent */
}

.btn-outline {
  border: 2px solid currentColor;
  background: transparent;
}
.btn-outline:hover {
  background-color: rgba(255,255,255,0.1);
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-accent {
  background-color: var(--accent);
  color: var(--accent-foreground);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: all 0.3s;
  padding: 1.5rem 0;
  background: transparent;
}
.header .container {
  position: relative;
}
.header.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 0.75rem 0;
  box-shadow: var(--shadow-sm);
  color: var(--foreground);
}
.header:not(.scrolled) {
  color: white;
}
.header-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}
.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-link:hover {
  color: var(--accent);
}
.header.scrolled .nav-link:hover {
  color: var(--primary);
}

/* Mobile Menu */
.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  color: inherit;
  transition: background-color 0.2s, border-color 0.2s;
  background: transparent;
}
.mobile-toggle:hover {
  background-color: rgba(255,255,255,0.1);
}
.mobile-toggle .icon-close { display: none; }
.mobile-toggle.is-open .icon-menu { display: none; }
.mobile-toggle.is-open .icon-close { display: inline-flex; }
.header.scrolled .mobile-toggle {
  border-color: var(--border);
}
.header.scrolled .mobile-toggle:hover {
  background-color: var(--muted);
}

/* Mobile menu - hidden by default on all screens */
.mobile-menu {
  display: none;
}

/* Desktop: Show desktop nav, hide mobile menu and toggle */
.desktop-nav {
  display: flex;
}

/* Tablet adjustments */
@media (max-width: 900px) and (min-width: 769px) {
  .nav-list {
    gap: 1rem;
  }
  .nav-link {
    font-size: 0.875rem;
  }
}

@media (max-width: 768px) {
  /* Mobile: Hide desktop nav, show toggle button */
  .header-nav.desktop-nav { 
    display: none !important; 
  }
  .mobile-toggle { 
    display: flex !important; 
  }
  
  /* Mobile menu styling */
  .mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    color: var(--foreground);
    border-top: 1px solid var(--border);
    z-index: 100;
  }
  .mobile-menu .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin: 0;
    padding: 0;
  }
  .mobile-menu.active { 
    display: block !important; 
  }
  .mobile-menu .shop-now-btn {
    width: 100%;
    justify-content: center;
    margin-top: 0.5rem;
  }
  .mobile-menu .nav-link {
    width: 100%;
    padding: 0.5rem 0;
    display: block;
  }
}

/* Hero */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  overflow: hidden;
  padding-top: 80px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: -2;
  transform: scale(1.05); /* Slight zoom for parallax feel */
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent, rgba(0,0,0,0.3));
  z-index: -1;
}
.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  margin-bottom: 1.5rem;
}
.hero p {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  max-width: 600px;
  margin: 0 auto 2rem;
  opacity: 0.9;
}

/* Value Props */
.feature-card {
  padding: 2rem;
  border-radius: var(--radius-lg);
  background-color: rgba(47, 107, 47, 0.05); /* primary with opacity */
  transition: all 0.3s;
}
.feature-card:hover {
  background-color: rgba(47, 107, 47, 0.1);
  transform: translateY(-5px);
}
.feature-icon {
  width: 3.5rem;
  height: 3.5rem;
  background-color: rgba(47, 107, 47, 0.1);
  color: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

/* Product Cards */
.product-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-5px);
}
.product-image {
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1rem;
  position: relative;
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.product-card:hover .product-image img {
  transform: scale(1.05);
}
.product-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: rgba(255,255,255,0.9);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.product-price {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.25rem;
}

/* Farm Timeline */
.timeline-item {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  opacity: 0; /* Animated in JS */
  transform: translateY(20px);
  transition: all 0.6s ease-out;
}
.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}
.timeline-icon {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  background-color: var(--accent);
  color: var(--accent-foreground);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Accordion */
.accordion-item {
  border-bottom: 1px solid var(--border);
}
.accordion-trigger {
  width: 100%;
  text-align: left;
  padding: 1.5rem 0;
  font-weight: 600;
  font-size: 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.accordion-trigger::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 300;
}
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  color: var(--muted-foreground);
}
.accordion-item.active .accordion-content {
  max-height: 200px; /* Arbitrary limit for animation */
  padding-bottom: 1.5rem;
}
.accordion-item.active .accordion-trigger::after {
  content: '-';
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (min-width: 768px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
}
.gallery-item {
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  position: relative;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.gallery-item:hover img {
  transform: scale(1.1);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  padding: 1rem;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.modal {
  background: white;
  width: 100%;
  max-width: 500px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.3s;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-overlay.open .modal {
  transform: translateY(0);
}
.modal-header {
  padding: 1.5rem;
  background: var(--muted);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.modal-close {
  font-size: 1.5rem;
  line-height: 1;
  opacity: 0.5;
}
.modal-close:hover { opacity: 1; }
.form-group {
  margin-bottom: 1rem;
}
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.form-input, .form-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
}
.form-input:focus, .form-textarea:focus {
  outline: 2px solid var(--primary);
  border-color: transparent;
}

/* Footer */
footer {
  background-color: var(--foreground);
  color: white;
  padding: 4rem 0;
}
footer a:hover {
  color: var(--accent);
}
