/* =====================================================
   DESIGN TOKENS
   ===================================================== */
:root {
  --color-primary: #16803A;
  --color-primary-dark: #0B5428;
  --color-primary-light: #EAF7EE;
  --color-white: #FFFFFF;
  --color-text: #17201A;
  --color-gray-light: #F5F7F5;
  --color-border: #E1E7E2;
  --color-accent: #E8A33D; /* subtle agricultural gold, used sparingly */
  --color-soil: #6B4A2E;   /* stamp / perforation accent, used sparingly */

  --font-base: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Sora', var(--font-base);
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 3px rgba(23, 32, 26, 0.08);
  --shadow-md: 0 6px 20px rgba(23, 32, 26, 0.08);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 40px;
  --space-6: 64px;
}

* { box-sizing: border-box; }

/* Make Bootstrap's own "primary" color (used for focus rings, checked
   radios/checkboxes, links, etc.) match our green theme instead of its
   default blue. */
:root,
[data-bs-theme="light"] {
  --bs-primary: var(--color-primary);
  --bs-primary-rgb: 22, 128, 58;
  --bs-link-color: var(--color-primary);
  --bs-link-color-rgb: 22, 128, 58;
  --bs-link-hover-color: var(--color-primary-dark);
  --bs-link-hover-color-rgb: 11, 84, 40;
}

body {
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.6;
}

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

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

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =====================================================
   BUTTONS — premium look: soft gradient, deeper shadow,
   a slight lift on hover, crisp press feedback on click.
   !important is used here because Bootstrap's own button
   classes ship hardcoded blue colors that don't reference
   our theme variables, so a normal cascade override isn't
   reliable enough.
   ===================================================== */
.btn {
  border-radius: var(--radius-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.65rem 1.6rem;
  transition: background-color 0.2s ease, border-color 0.2s ease,
              box-shadow 0.2s ease, transform 0.15s ease;
}

.btn-primary {
  background: linear-gradient(180deg, #1B8F41 0%, var(--color-primary) 55%, var(--color-primary-dark) 100%) !important;
  border-color: var(--color-primary-dark) !important;
  color: #fff !important;
  box-shadow: 0 3px 10px rgba(11, 84, 40, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #1C9846 0%, #147336 55%, var(--color-primary-dark) 100%) !important;
  border-color: var(--color-primary-dark) !important;
  box-shadow: 0 6px 16px rgba(11, 84, 40, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}
.btn-primary:focus,
.btn-primary:focus-visible {
  background: linear-gradient(180deg, #1B8F41 0%, var(--color-primary) 55%, var(--color-primary-dark) 100%) !important;
  border-color: var(--color-primary-dark) !important;
  box-shadow: 0 0 0 0.2rem rgba(22, 128, 58, 0.35) !important;
}
.btn-primary:active,
.btn-primary.active,
.btn-check:checked + .btn-primary,
.btn-check:active + .btn-primary {
  background: var(--color-primary-dark) !important;
  border-color: var(--color-primary-dark) !important;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.25) !important;
  transform: translateY(0);
}
.btn-primary:disabled {
  background: #9CC4A9 !important;
  border-color: #9CC4A9 !important;
  box-shadow: none;
}

.btn-outline-primary {
  color: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
  background-color: transparent !important;
}
.btn-outline-primary:hover {
  background-color: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22, 128, 58, 0.22);
}
.btn-outline-primary:focus,
.btn-outline-primary:focus-visible {
  box-shadow: 0 0 0 0.2rem rgba(22, 128, 58, 0.3) !important;
}
.btn-outline-primary:active,
.btn-outline-primary.active,
.btn-check:checked + .btn-outline-primary,
.btn-check:active + .btn-outline-primary {
  background-color: var(--color-primary-dark) !important;
  border-color: var(--color-primary-dark) !important;
  color: #fff !important;
}

/* Catch-all: any remaining focus ring on any button (secondary,
   light, icon buttons, etc.) should still be green, never blue. */
.btn:focus,
.btn:focus-visible,
.btn.focus,
.btn-check:focus + .btn {
  box-shadow: 0 0 0 0.2rem rgba(22, 128, 58, 0.35) !important;
}

/* When a button is stretched to match a neighboring input's height
   (e.g. the newsletter form, "Subscribe" next to the email field),
   center its label properly instead of letting it sit at the top. */
.btn.h-100 {
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.btn-loading::after {
  content: "";
  position: absolute;
  width: 16px; height: 16px;
  top: 50%; left: 50%;
  margin: -8px 0 0 -8px;
  border: 2px solid rgba(255,255,255,0.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* =====================================================
   FORM CONTROLS — radios, checkboxes, inputs
   Bootstrap defaults to blue for checked/focused states;
   force green to match the site theme.
   ===================================================== */
.form-check-input:checked,
.form-check-input[type="radio"]:checked,
.form-check-input[type="checkbox"]:checked {
  background-color: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
}
.form-check-input:focus {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 0.2rem rgba(22, 128, 58, 0.25) !important;
}
.form-check-input:checked:focus {
  box-shadow: 0 0 0 0.2rem rgba(22, 128, 58, 0.35) !important;
}
.form-check-input:active {
  filter: none;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 0.2rem rgba(22, 128, 58, 0.15) !important;
}

/* Many radio buttons / checkboxes on this site (shop sidebar filters,
   "remember me" on login, admin forms) are plain native inputs with
   no Bootstrap class on them at all — .form-check-input rules above
   never touch them. accent-color is the correct, class-independent
   way to theme native form controls, so it's the real fix for those. */
input[type="radio"],
input[type="checkbox"] {
  accent-color: var(--color-primary);
}

/* =====================================================
   SMOOTH TRANSITIONS — applied site-wide to interactive elements
   ===================================================== */
a,
.main-nav a,
.header-icon-btn,
.header-icon-btn svg,
.site-footer a,
.btn,
.btn-outline-primary,
.form-check-input,
.form-control,
.form-select,
.cart-badge {
  transition: background-color 0.2s ease, border-color 0.2s ease,
              color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease,
              opacity 0.2s ease;
}

/* =====================================================
   HEADER
   ===================================================== */
.announcement-bar {
  background: var(--color-primary-dark);
  color: var(--color-white);
  font-size: 0.85rem;
  text-align: center;
  padding: 6px 0;
}

.site-header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 2px 10px rgba(23, 32, 26, 0.04);
}

.site-header .header-inner {
  min-height: 92px;
  flex-wrap: nowrap;
}

.site-header .logo {
  font-weight: 800;
  font-size: 1.65rem;
  color: var(--color-primary-dark);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Smaller screens: the logo, search box, and icon cluster all have to
   share one line, so scale things down instead of letting them wrap. */
@media (max-width: 767px) {
  .site-header .header-inner {
    min-height: 72px;
  }
  .site-header .logo {
    font-size: 1.2rem;
  }
  .header-icon-btn {
    padding: 8px;
  }
}
@media (max-width: 359px) {
  .site-header .logo {
    font-size: 1.05rem;
  }
}

.main-nav a {
  font-weight: 600;
  font-size: 0.97rem;
  padding: 0.85rem 1.05rem;
  color: var(--color-text);
}
.main-nav a:hover { color: var(--color-primary); }

.header-icon-btn {
  position: relative;
  color: var(--color-text);
  padding: 10px;
}
.header-icon-btn svg { width: 24px; height: 24px; }
.cart-badge {
  position: absolute;
  top: -2px; right: -2px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.65rem;
  border-radius: 50%;
  min-width: 16px;
  height: 16px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
}

/* =====================================================
   HERO — full-bleed background image/video with overlay
   Markup: <section class="hero"> > .hero-media (img + optional
   video) + .hero-overlay, then a .container > .hero-content
   with the heading/CTA text sitting on top.
   ===================================================== */
.hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
  isolation: isolate;
}

/* image + video both fill the section as a full-bleed background */
.hero-media {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}
.hero-media-img,
.hero-media-video {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* image is the always-available base layer; video (if configured) plays on top of it */
.hero-media-img { z-index: 0; }
.hero-media-video { z-index: 1; }

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  background: linear-gradient(115deg,
    rgba(6, 46, 22, 0.90) 0%,
    rgba(8, 60, 29, 0.70) 42%,
    rgba(11, 84, 40, 0.38) 72%,
    rgba(11, 84, 40, 0.22) 100%);
}

.hero .container {
  position: relative;
  z-index: 3;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(6px);
  color: #EAF7EE;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: var(--space-3);
}

.hero-content {
  max-width: 640px;
  padding: var(--space-6) 0;
}
.hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.3);
}
.hero-content p.lead {
  color: rgba(255, 255, 255, 0.94);
  max-width: 520px;
  font-size: 1.12rem;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.25);
}
.hero .btn-outline-light {
  border-width: 1.5px;
}
.hero .btn-outline-light:hover {
  color: var(--color-primary-dark);
}
.hero .btn-outline-light:focus,
.hero .btn-outline-light:focus-visible,
.hero .btn-outline-light:active {
  box-shadow: 0 0 0 0.2rem rgba(22, 128, 58, 0.45) !important;
}

/* =====================================================
   ACCORDION (FAQ page) — Bootstrap tints the open panel
   header light blue by default; use our light green instead.
   ===================================================== */
.accordion-button:not(.collapsed) {
  background-color: var(--color-primary-light) !important;
  color: var(--color-primary-dark) !important;
  box-shadow: none !important;
}
.accordion-button:focus {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 0.2rem rgba(22, 128, 58, 0.2) !important;
}
.accordion-button::after {
  /* Bootstrap's chevron icon is baked-in as a blue SVG; recolor it green via filter. */
  filter: invert(28%) sepia(59%) saturate(1094%) hue-rotate(93deg) brightness(93%) contrast(92%);
}

@media (max-width: 767px) {
  .hero { min-height: 480px; }
  /* Skip the heavy video on small / metered connections — the poster image already
     covers the same area, so the banner still looks intentional, just lighter. */
  .hero-media-video { display: none; }
}

/* =====================================================
   TRUST STRIP
   ===================================================== */
.trust-strip {
  background: var(--color-gray-light);
  padding: var(--space-4) 0;
}
.trust-item { display: flex; align-items: center; gap: 10px; }
.trust-item .icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* =====================================================
   SECTION TITLES
   ===================================================== */
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--color-primary-dark);
  margin-bottom: var(--space-1);
  letter-spacing: -0.01em;
}
.section-subtitle { color: #5B6862; margin-bottom: var(--space-4); }

/* "Best Sellers" heading on the homepage has no subtitle under it,
   so it was sitting right on top of the product cards below. */
#best-sellers .section-title { margin-bottom: var(--space-4); }

/* =====================================================
   CATEGORY CARDS
   ===================================================== */
.category-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  background: #fff;
  border: 1px solid var(--color-border);
  height: 100%;
}
.category-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.category-card .cat-img { height: 150px; object-fit: cover; width: 100%; }
.category-card .body { padding: var(--space-3); }

/* =====================================================
   PRODUCT CARDS — "Seed Packet" signature system
   Stamped badge + dashed tear-perforation, like a printed
   seed packet / fertilizer bag label.
   ===================================================== */
.product-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
  height: 100%;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  position: relative;
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.product-card .img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--color-gray-light);
}
.product-card .img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.35s ease;
}
.product-card:hover .img-wrap img { transform: scale(1.06); }

/* rotated ink-stamp badge, like a rubber stamp on a packet */
.product-card .stamp {
  position: absolute; top: 12px; left: -6px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  transform: rotate(-8deg);
  background: rgba(255,255,255,0.92);
}
.product-card .stamp--sale { color: var(--color-accent); border-color: var(--color-accent); }
.product-card .stamp--organic { color: var(--color-primary); border-color: var(--color-primary); }
.product-card .stamp--bestseller { color: var(--color-soil); border-color: var(--color-soil); }
.product-card .stamp--oos { color: #7A7A7A; border-color: #B5B5B5; }

.product-card .quick-actions {
  position: absolute; top: 10px; right: 10px;
  display: flex; flex-direction: column; gap: 6px;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.product-card:hover .quick-actions { opacity: 1; transform: translateX(0); }
.product-card .quick-actions button {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: none;
  background: #fff;
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
}

/* dashed tear-perforation between image and info, like a packet tear-line */
.product-card .tear-line {
  position: relative;
  height: 1px;
  border-top: 1.5px dashed var(--color-border);
  margin: 0 var(--space-3);
}
.product-card .tear-line::before,
.product-card .tear-line::after {
  content: "";
  position: absolute;
  top: -6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--color-gray-light);
}
.product-card .tear-line::before { left: -18px; }
.product-card .tear-line::after { right: -18px; }

.product-card .body { padding: var(--space-3); }
.product-card .cat-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #7A8880;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.product-card .name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  margin: 4px 0 6px;
  line-height: 1.3;
}
.product-card .sku-line {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #9AA79F;
  margin-bottom: 6px;
}
.product-card .price-row { display: flex; align-items: baseline; gap: 8px; }
.product-card .price-final {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--color-primary-dark);
}
.product-card .price-regular {
  font-family: var(--font-mono);
  text-decoration: line-through;
  color: #9AA79F;
  font-size: 0.8rem;
}

/* =====================================================
   MOBILE NAV (offcanvas) — logo up top, nav links, then
   a small footer block with address / phone / social links.
   ===================================================== */
.mobile-nav {
  width: 300px;
  background: var(--color-primary-light);
}
.mobile-nav-brand {
  background: var(--color-primary-dark);
  padding: var(--space-4) var(--space-3);
  border-bottom: none;
}
.mobile-nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: #fff;
}
.mobile-nav-links {
  padding: var(--space-2) 0;
}
.mobile-nav-links a {
  padding: 0.9rem var(--space-4);
  font-weight: 600;
  color: var(--color-text);
  border-bottom: 1px solid rgba(22, 128, 58, 0.14);
}
.mobile-nav-links a:hover {
  background: rgba(255, 255, 255, 0.6);
  color: var(--color-primary-dark);
}
.mobile-nav-footer {
  background: rgba(255, 255, 255, 0.55);
  border-top: 1px solid rgba(22, 128, 58, 0.14);
  padding: var(--space-4) var(--space-4) var(--space-5);
}
.mobile-nav-address {
  font-size: 0.88rem;
  color: #5B6862;
  margin-bottom: 6px;
}
.mobile-nav-phone {
  display: inline-block;
  font-weight: 700;
  color: var(--color-primary-dark);
}
.mobile-nav-social a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary);
}
.mobile-nav-social a:hover { color: var(--color-primary-dark); }

/* =====================================================
   FOOTER
   ===================================================== */
.site-footer {
  background: var(--color-primary-dark);
  color: #DCEBE1;
  padding: var(--space-6) 0 var(--space-3);
}
.site-footer h6 { color: #fff; font-weight: 700; margin-bottom: var(--space-3); }
.site-footer a { color: #C9DED2; }
.site-footer a:hover { color: #fff; }
.site-footer .bottom-bar {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  font-size: 0.85rem;
  color: #A8C2B3;
}

/* =====================================================
   WHATSAPP FLOAT
   ===================================================== */
.whatsapp-float {
  position: fixed;
  bottom: 20px; right: 20px;
  width: 56px; height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 1040;
  color: #fff;
  font-size: 1.5rem;
}

/* =====================================================
   EMPTY / SKELETON STATES
   ===================================================== */
.empty-state { text-align: center; padding: var(--space-6) var(--space-3); color: #5B6862; }
.skeleton {
  background: linear-gradient(90deg, #EEF2EF 25%, #E4EAE5 37%, #EEF2EF 63%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.4s ease infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-loading {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
