/* =========================================================
   Farm2Flake — Main Site Styles
   ========================================================= */

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

:root {
  /* Color system */
  --green-50:  #f0faf2;
  --green-100: #d9f2de;
  --green-200: #aee0b8;
  --green-400: #63e281;
  --green-500: #3a9e53;
  --green-600: #2d8042;
  --green-700: #1f5c2e;
  --green-800: #0c411d;
  --earth-100: #f5f0e8;
  --earth-200: #e8dcc8;
  --earth-400: #6c5133;
  --earth-600: #3e2307;
  --neutral-50:  #fafafa;
  --neutral-100: #f5f5f5;
  --neutral-200: #e8e8e8;
  --neutral-400: #9e9e9e;
  --neutral-600: #616161;
  --neutral-800: #212121;
  --electirc-green: #99e17a;
  --light-green: #c8f7b3;
  --white: #ffffff;
  --wa-green: #25d366;

  --font-body: 'Inter', system-ui, sans-serif;
  --font-heading: 'Playfair Display', Georgia, serif;

  /* Spacing (8px base) */
  --sp-1: 8px; --sp-2: 16px; --sp-3: 24px; --sp-4: 32px;
  --sp-5: 40px; --sp-6: 48px; --sp-8: 64px; --sp-10: 80px;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.08);
  --shadow-md: 0 6px 24px rgba(0,0,0,.12);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.16);
  --transition: 0.25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--neutral-800);
  background: var(--light-green);
}

img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), transform var(--transition),
              box-shadow var(--transition);
}
.btn:focus-visible { outline: 3px solid var(--green-400); outline-offset: 3px; }

.btn-primary {
  background: linear-gradient(165deg, var(--green-500), var(--light-green));
  color: var(--earth-600);
  box-shadow: 0 4px 16px rgba(72, 186, 100, 0.35);
}
.btn-primary:hover {
  background: linear-gradient(165deg, var(--green-400), var(--green-500));
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(58,158,83,.45);
}

.btn-outline {
  background: transparent;
  color: var(--earth-600);
  border-color: rgba(255,255,255,.7);
}
.btn-outline:hover {
  background: rgba(255,255,255,.15);
  border-color: var(--white);
}

.btn-wa {
  background: var(--wa-green);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(37,211,102,.35);
}
.btn-wa:hover {
  background: #1ebe5d;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37,211,102,.45);
}

/* ----- Navbar ----- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition);
}
.navbar.scrolled {
  background: rgba(255,255,255,.97);
  box-shadow: var(--shadow-sm);
}
.navbar.scrolled .nav-links a { color: var(--neutral-800); }
.navbar.scrolled .nav-links a:hover { color: var(--green-500); }
.navbar.scrolled .brand-name { color: var(--green-700); }

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--sp-3);
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-leaf { font-size: 1.4rem; }
.brand-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  transition: color var(--transition);
}

.nav-links {
  display: flex;
  gap: var(--sp-4);
}
.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  color: rgba(255,255,255,.9);
  transition: color var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 2px;
  background: var(--green-400);
  transition: width var(--transition);
  border-radius: 2px;
}
.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after { width: 100%; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}
.navbar.scrolled .hamburger span { background: var(--neutral-800); }

.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--white);
  padding: var(--sp-2) var(--sp-3);
  border-top: 1px solid var(--neutral-200);
}
.mobile-menu.open { display: flex; }
.mob-link {
  padding: 12px 0;
  font-weight: 500;
  color: var(--neutral-800);
  border-bottom: 1px solid var(--neutral-100);
  transition: color var(--transition);
}
.mob-link:hover { color: var(--green-500); }

/* ----- Hero ----- */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--sp-6);
  padding: 100px var(--sp-3) var(--sp-8);
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
}

/* full-bleed background */
.hero::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 100vh;
  background: linear-gradient(135deg, var(--green-600) 25%, var(--green-400) 60%, var(--light-green) 90%);
  z-index: -1;
}

.hero-content { color: var(--earth-600); }

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35);
  color: var(--green-50);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: var(--sp-3);
  backdrop-filter: blur(4px);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.6rem, 5vw, 4rem);
  line-height: 1.1;
  margin-bottom: var(--sp-3);
  color: var(--green-400);
}
.hero-title span {
  color: var(--green-50);
}

.hero-tagline {
  font-size: 1.1rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
  max-width: 480px;
  margin-bottom: var(--sp-4);
}

.hero-cta {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-bottom: var(--sp-5);
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.stat { display: flex; flex-direction: column; }
.stat strong { font-size: 2rem; font-family: var(--font-heading); }
.stat span { font-size: 1rem; color: rgba(255, 255, 255, 0.7); }
.stat-divider { width: 1px; height: 40px; background: rgba(0, 0, 0, 0.3); }

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-image img {
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
  aspect-ratio: 4/3;
  animation: floatImg 6s ease-in-out infinite;
}

@keyframes floatImg {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

/* ----- Features Strip ----- */
.features-strip {
  background: var(--green-600);
  padding: var(--sp-4) var(--sp-3);
  display: flex;
  justify-content: center;
  gap: var(--sp-6);
  flex-wrap: wrap;
}
.feature {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}
.feat-icon { font-size: 1.4rem; }

/* ----- Section Helpers ----- */
.section-tag {
  display: inline-block;
  background: var(--green-700);
  color: var(--green-50);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 50px;
  margin-bottom: var(--sp-2);
}

.section-header {
  text-align: center;
  max-width: 620px;
  margin: 0 auto var(--sp-5);
}
.section-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: var(--earth-600);
  margin-bottom: var(--sp-1);
}
.section-header p {
  color: var(--neutral-800);
  font-size: 1rem;
}

/* ----- Search Bar ----- */
.search-bar {
  max-width: 480px;
  margin: 0 auto var(--sp-5);
  position: relative;
}
.search-bar input {
  width: 100%;
  padding: 14px 48px 14px 20px;
  border: 2px solid var(--neutral-200);
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--white);
}
.search-bar input:focus {
  border-color: var(--green-500);
  box-shadow: 0 0 0 4px rgba(58,158,83,.12);
}
.clear-btn {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  font-size: 1rem; color: var(--neutral-400);
  cursor: pointer;
  transition: color var(--transition);
  display: none;
}
.clear-btn.visible { display: block; }
.clear-btn:hover { color: var(--neutral-800); }

/* ----- Products Section ----- */
.products-section {
  padding: var(--sp-10) var(--sp-3);
  max-width: 1280px;
  margin: 0 auto;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: var(--sp-4);
}

/* ----- Product Card ----- */
.product-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--neutral-200);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--green-50);
}
.card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .card-image img { transform: scale(1.06); }

.card-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--green-500);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 50px;
}

.card-body {
  padding: var(--sp-3);
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-body h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--neutral-800);
  margin-bottom: 8px;
}
.card-body p {
  font-size: 0.88rem;
  color: var(--neutral-600);
  line-height: 1.6;
  flex: 1;
  margin-bottom: var(--sp-2);
  display: -webkit-box;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-price {
  font-weight: 600;
  color: var(--green-600);
  font-size: 1rem;
  margin-bottom: var(--sp-2);
}
.card-buy {
  display: block;
  width: 100%;
  padding: 11px;
  background: linear-gradient(135deg, var(--green-500), var(--green-600));
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  text-align: center;
}
.card-buy:hover {
  background: linear-gradient(135deg, var(--green-600), var(--green-700));
  transform: translateY(-1px);
}

.no-results {
  text-align: center;
  color: var(--neutral-400);
  font-size: 1rem;
  padding: var(--sp-8) 0;
}
.hidden { display: none !important; }

/* ----- About Section ----- */
.about-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-8);
  align-items: center;
  padding: var(--sp-10) var(--sp-3);
  max-width: 1280px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  margin-bottom: var(--sp-8);
}

.about-img img {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  object-fit: cover;
  aspect-ratio: 4/3;
}

.about-text h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 2.5vw, 2.4rem);
  color: var(--neutral-800);
  margin-bottom: var(--sp-2);
}
.about-text p {
  color: var(--neutral-700);
  margin-bottom: var(--sp-3);
  line-height: 1.75;
}

.about-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.about-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--neutral-700, #000000);
  font-weight: 500;
}
.check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  background: var(--green-800);
  color: var(--green-50);
  border-radius: 50%;
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* ----- Footer ----- */
.footer {
  background: var(--green-700);
  color: rgba(255,255,255,.85);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--sp-8) var(--sp-3);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--sp-6);
}

.footer-brand .brand { margin-bottom: var(--sp-2); }
.footer-brand .brand-name { color: var(--green-50); font-size: 2rem; }
.footer-brand p { font-size: 0.9rem; margin-bottom: var(--sp-3); }
.footer-brand-logo { display: flex; align-items: center; gap: 8px; margin-bottom: var(--sp-2); }

.footer-links h4, .footer-contact h4 {
  color: var(--earth-100);
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: var(--sp-2);
}
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--green-400); }

.footer-contact p {
  font-size: 1rem;
  margin-bottom: 6px;
  color: rgba(255,255,255,0.9);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  padding: var(--sp-3);
  font-size: 0.9rem;
  color: rgba(255,255,255,0.95);
}

/* ----- Responsive ----- */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero::before { position: absolute; height: 100%; }
  .hero { position: relative; }
  .hero-tagline { margin-inline: auto; }
  .hero-cta { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-image { display: none; }
  .about-section { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .features-strip { gap: var(--sp-3); }
  .footer-inner { grid-template-columns: 1fr; gap: var(--sp-4); }
  .hero { padding: 88px var(--sp-2) var(--sp-6); min-height: auto; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2.2rem; }
  .products-grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: center; }
  .hero-stats { gap: var(--sp-2); }
}
