/* Desktop: use original header flex layout (no positional changes) */
@media (min-width: 600px) {
  header { display: flex; align-items: center; justify-content: flex-start; padding: 0 32px; height: 60px; }
  nav.site-nav, nav { display: flex; align-items: center; gap: 18px; }
  nav.site-nav { margin-left: auto !important; } /* push nav to the right */
  .header-actions { display: inline-flex; align-items: center; gap: 8px; margin-left: 12px; }
}

/* (no desktop change for product tabs here) */
  /* Limit product count per section on phones to avoid very long pages */
  .product-list-row .product-card:nth-child(n+5) { display: none !important; }

  /* Section header: center title, description, and view-all */
  .section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
  }
  .section-header h3 { margin: 0; text-align: center; }
  .section-header p { margin-top: 4px; text-align: center; }
  .section-view-all { margin-top: 6px; }
  .section-view-all {
    font-size: 12px; color: #205e37; text-decoration: none; padding: 4px 8px;
    border: 1px solid #e5e7eb; border-radius: 12px; background: #fff;
  }
  .section-view-all:hover { background: #f3f4f6; }
/* Ultra-small phones: shrink features text/icon further */
@media (max-width: 360px) {
  .feature-icon { font-size: 24px; }
  .feature-box .feature-text strong { font-size: 0.85rem; }
  .feature-box .feature-text { font-size: 0.75rem; }
}
/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Larger phones: widen features to 3-up grid */
@media (min-width: 430px) and (max-width: 599px) {
  .features-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
  .feature-box { padding: 12px 10px; }
}

/* ===================== Responsive Header/Nav ===================== */
/* Small phones: use dropdown */
@media (max-width: 599px) {
  header { padding: 0 16px; position: relative; z-index: 1001; justify-content: flex-start; }
  .logo { height: 40px; }
  /* push burger to the right, keep notifications next to it */
  .mobile-nav-toggle { margin-left: auto; }
  .header-actions { display: inline-flex; align-items: center; gap: 8px; margin-left: 8px; }
  nav.site-nav { display: none !important; }
  nav.site-nav.open {
    display: flex !important;
    position: absolute;
    top: 60px;
    left: 12px;
    right: 12px;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 2000; /* above hero */
  }
  nav.site-nav.open a { padding: 10px 8px; font-size: 14px; border-radius: 8px; }
  nav.site-nav.open a.active, nav.site-nav.open a:hover { background: #f3f4f6; }

  .mobile-nav-toggle {
    display: inline-flex !important; /* override later global rule */
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #f8fafb;
    color: #184f20;
    cursor: pointer;
    position: relative;
    z-index: 2100; /* above hero and nav */
    pointer-events: auto;
  }

  /* --- Mobile polish: hero --- */
  .hero { padding: 16px 0 8px 0; border-radius: 0 0 20px 20px; }
  .hero-slider { min-height: 240px; }
  .hero-img { height: 220px; min-height: 200px; width: 94vw; border-radius: 16px; }
  .hero-text h1 { font-size: 1.2rem; }
  .hero-text p { font-size: .95rem; }
  .hero-nav { width: 38px; height: 38px; }
  .hero-nav i { font-size: 14px; }
  .hero-dots { bottom: 8px; gap: 8px; }
  .hero-dot { width: 8px; height: 8px; }

  /* --- Mobile polish: features (2-up grid, compact) --- */
  .features-row { 
    width: 100% !important; 
    padding: 12px 10px !important; 
    margin: 8px auto 12px auto !important; 
    gap: 8px !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .feature-box { 
    min-width: 0 !important; 
    max-width: none !important; 
    width: 100% !important; 
    padding: 10px 10px !important; 
    border-radius: 10px !important; 
    gap: 6px !important; 
    flex: initial !important;
  }
  .feature-icon { font-size: 28px; margin-bottom: 4px; }
  .feature-box .feature-text strong { font-size: 0.9rem; }
  .feature-box .feature-text { font-size: 0.8rem; }
  .feature-box:not(:last-child) { border-right: none; }

  /* --- Mobile polish: products (2-up grid, compact cards) --- */
  .products-section { margin: 12px 0 24px 0; padding: 0 10px; }
  .products-main-title { font-size: 1.2rem; margin-bottom: 8px; }
  .product-nav-tabs { gap: 6px; margin-bottom: 8px; }
  .product-nav-tabs > * { font-size: 11px; padding: 6px 10px; }
  .product-row-container { padding: 0; }
  /* Turn list into grid on phones */
  .product-list-row { 
    display: grid !important; 
    grid-template-columns: repeat(2, minmax(140px, 1fr)); 
    gap: 8px; 
    margin: 10px 0 14px 0; 
    padding: 0 2px; 
  }
  .product-card { 
    width: 100% !important; 
    min-width: 0 !important; 
    height: 190px; 
    padding: 8px 8px 10px 8px; 
    border-radius: 10px; 
  }
  .product-card img { width: 84px; height: 84px; }
  .product-info { gap: 4px; min-height: 72px; }
  .product-info h3 { font-size: 0.9rem; }
  .modern-cart-btn { width: 100%; max-width: none; padding: 6px 8px; font-size: 0.8rem; }
  /* Hide side scroll arrows on phones when using grid */
  .scroll-btn { display: none !important; }
  /* Safe bottom spacing so FABs don't overlap */
  .products-section:last-of-type { padding-bottom: 64px; }
}

/* Tablets (600px–900px): show tabs inline with wrapping, no burger */
@media (min-width: 600px) and (max-width: 900px) {
  header { padding: 0 16px; }
  .logo { height: 44px; }
  .mobile-nav-toggle { display: none !important; }
  nav.site-nav { display: flex; flex-wrap: wrap; gap: 12px; }
  nav.site-nav a { padding: 6px 8px; font-size: 13px; }
}

body {
    font-family: Arial, sans-serif;
    background: #fff;
    color: #222;
}

html, body { overflow-x: hidden; }

.top-bar {
    background: #184f20;
    color: #fff;
    font-size: 11px;
    padding: 4px 0 4px 8px;
    display: flex;
    align-items: center;
}
.top-icons { margin-right: 16px; }
.top-icons .icon { margin-left: 12px; font-size: 16px; }
header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 32px;
    height: 60px;
}
.mobile-nav-toggle { display: none; }
.logo-section { display: flex; align-items: center; }
.logo { height: 48px; margin-right: 12px; }
.brand-name { font-weight: 600; font-size: 15px; letter-spacing: 1px; }
nav { display: flex; align-items: center; gap: 18px; margin-left: 16px; }
.header-actions { margin-left: 0; }
nav a {
    color: #222;
    text-decoration: none;
    font-size: 12px;
    padding: 0 6px;
    font-weight: 400;
    transition: color 0.2s;
}
nav a.active, nav a:hover { color: #184f20; font-weight: 700; }
.category-nav {
    background: #4a7c59;
    display: flex;
    justify-content: center;
    padding: 23px 40px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
}

.hero {
  width: 100%;
  background: #222;
  padding: 0;
}
.hero-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}
.features-row {
  display: flex;
  justify-content: center;
  background: #fff;
  padding: 64px 0 48px 0; 
  width: 95%;
  flex-wrap: wrap;
  margin: 120px auto 60px auto;
  gap: 30px; 
  margin-bottom: 200px;
}

.feature-box {
  background: #fff;
  border: 1.5px solid #e0e0e0;
  border-right: none;
  flex: 1 1 0;
  min-width: 220px; 
  max-width: 360px; 
  padding: 48px 32px 40px 32px; 
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  border-radius: 20px;  
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 20px;  
  transition: box-shadow 0.2s, transform 0.2s;
}
.feature-box:not(:last-child) {
  border-right: 1.5px solid #e0e0e0;
}
.feature-box:hover {
  box-shadow: 0 10px 36px rgba(0,0,0,0.10);
  transform: translateY(-5px) scale(1.04);
}

.feature-box:not(:last-child) {
  border-right: 1.5px solid #e0e0e0;
}

.feature-icon{ 
  font-size: 64px; /* ⬅️ This controls the size of the icon */
  color: #000000 !important;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-box p, .feature-box span, .feature-box div {
  margin: 0;
  color: #222;
  line-height: 1.6;
  font-weight: 400;
}

.products-title {
  text-align: center;
  font-size: 2rem;
  margin: 40px 0 32px 0;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 100px; 
  
}
.product-categories-row {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  
}

/* --- Product section tabs: limit our adjustments to phones only --- */
@media (max-width: 600px) {
  .product-nav-tabs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    gap: 8px;
    justify-content: center;
    align-items: center;
    margin: 8px 0 12px 0;
    padding: 4px 6px;
  }
  .product-nav-tabs .tab-btn {
    appearance: none;
    border: 1px solid #e5e7eb;
    background: #f3f4f6;
    color: #1f2937;
    border-radius: 9999px;
    padding: 6px 12px;
    height: 34px;
    line-height: 1;
    font-size: 12.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: background .2s, color .2s, box-shadow .2s, border-color .2s;
  }
  .product-nav-tabs .tab-btn:hover { background: #eef2f7; }
  .product-nav-tabs .tab-btn:focus { outline: none; box-shadow: 0 0 0 3px rgba(32,94,55,0.18); }
  .product-nav-tabs .tab-btn.active {
    background: #2f6b44;
    color: #fff;
    border-color: #2f6b44;
    box-shadow: 0 2px 8px rgba(32,94,55,0.18);
  }
}

.category-card {
  position: relative;
  width: 300px;
  height: 200px;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;   /* vertically center */
  justify-content: center; /* horizontally center */
}

.category-card img {
  width: auto;
  height: 100%;
  object-fit: fill;
  display: block;
}

.category-card span {
  position: absolute;
  z-index: 2;
  color: white;
  font-size: 24px;
  font-weight: bold;
  text-align: center;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}



footer {
  background: #0a3c17;
  color: #fff;
  padding: 32px 0 0 0;
  margin-top: 60px;
  /* ensure consistent box sizing and flow on small screens */
  box-sizing: border-box;
}

/* Keep social icons visually same but center on small screens */
.footer-social {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  margin-left: 16px;
  margin-bottom: 12px;
}
/* keep existing look for buttons */
.footer-social .footer-btn { 
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: none; padding: 8px; border-radius: 50%; transition: background 0.2s;
  text-decoration: none;
}
.footer-social .footer-btn .icon {
  color: #000 !important;
  font-size: 24px;
  transition: color 0.2s;
}

/* Footer columns layout: keep desktop look but allow wrapping */
.footer-columns {
  display: flex;
  justify-content: center;
  gap: 80px;
  padding: 0 0 32px 0;
  flex-wrap: wrap;           /* allow wrapping on narrow screens */
  align-items: flex-start;   /* align column tops when wrapping */
  box-sizing: border-box;
}

/* Preserve heading style */
.footer-columns h4 {
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
}

/* Make link list responsive:
   - Desktop: original multi-column down-fill grid
   - Narrow: switch to single column list for readability
*/
.footer-columns ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  display: grid;
  grid-template-rows: repeat(4, auto);
  grid-auto-flow: column;
  column-gap: 24px;
  row-gap: 6px;
}

/* small improvement to ensure contrast remains consistent */
.footer-columns li { color: #e0e0e0; }

/* ===== Responsive tweaks for footer (safe, non-destructive) ===== */

/* Tablet and narrow desktops */
@media (max-width: 900px) {
  footer {
    padding: 28px 16px 20px; /* reduce padding */
  }
  .footer-social {
    margin-left: 0;
    justify-content: center;
  }
  .footer-columns {
    gap: 40px;
    padding-bottom: 24px;
  }
  /* Switch the link grid to flow by rows (single column per block) for readability */
  .footer-columns ul {
    grid-auto-flow: row;
    grid-template-rows: none;
    column-gap: 12px;
  }
}

/* Mobile phones */
@media (max-width: 600px) {
  footer {
    padding: 20px 12px 18px;
  }
  .footer-social {
    width: 100%;
    justify-content: center;
    margin-bottom: 14px;
  }
  .footer-columns {
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding-bottom: 18px;
  }
  .footer-columns > div, /* each column wrapper if present */
  .footer-columns ul {
    width: 100%;
    max-width: 360px;
    box-sizing: border-box;
    text-align: center;
  }
  /* turn the list into a simple vertical list */
  .footer-columns ul {
    display: block;
  }
  .footer-columns ul li {
    display: block;
    margin: 6px 0;
  }
}

/* Very small phones */
@media (max-width: 420px) {
  footer { padding: 16px 10px 14px; }
  .footer-social .footer-btn { padding: 6px; }
  .footer-social .footer-btn .icon { font-size: 20px; }
  .footer-columns { gap: 14px; }
  .footer-columns h4 { font-size: 14px; }
  .footer-columns ul li { font-size: 13px; }
}

/* Accessibility: ensure focus styles remain visible in footer controls */
.footer-social .footer-btn:focus,
.footer-columns a:focus {
  outline: 3px solid rgba(255,255,255,0.12);
  outline-offset: 4px;
}

/* ================= Footer alignment fixes (override) ================= */
/* Desktop: evenly spaced responsive grid */
@media (min-width: 901px) {
  .footer-columns {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(200px, 1fr)) !important;
    gap: 32px !important;
    align-items: start !important;
    justify-items: start !important;
  }
  .footer-columns ul {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
  }
  .footer-columns h4 { margin-bottom: 8px !important; }
}

/* Tablets */
@media (min-width: 600px) and (max-width: 900px) {
  .footer-columns {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(160px, 1fr)) !important;
    gap: 24px !important;
    align-items: start !important;
    justify-items: center !important;
  }
  .footer-columns > div { width: 100%; max-width: 260px; }
  .footer-columns ul { display: flex !important; flex-direction: column !important; gap: 6px !important; }
}

/* Phones */
@media (max-width: 599px) {
  .footer-columns {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    justify-items: stretch !important;
  }
  .footer-columns > div {
    width: 100%;
    max-width: 100%;
    text-align: left !important;
    padding: 0 16px;
  }
  .footer-columns > div:not(:last-child) {
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 10px;
  }
  .footer-columns h4 { margin: 0 0 6px 0 !important; }
  .footer-columns ul {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
  }
}