/* ================================
   Global Food Agro Website Styles
   ================================

   INDEX:
   1. Root & Global Styles
   2. Header
      2.1 Brand & Hamburger
      2.2 Header Right / CTA
   3. Drawer (Sidebar) & Overlay
   4. Hero Section
   5. Categories Section
      5.1 Category Grid / Card
   6. Products Section
      6.1 Product Grid / Card
   7. Footer
   8. Utilities & Responsive
   ================================
*/

/* ==============================
   1. Root & Global Styles
   ============================== */
:root{
  --green-1: #2E7D32;     /* deep green from logo */
  --green-2: #4CAF50;     /* lighter green */
  --blue-1: #1976D2;      /* deep logo blue */
  --blue-2: #2196F3;      /* bright logo blue */
  --accent: #FFD54F;      /* accent / highlight */
  --bg: #f9fdf9;
  --card-radius: 12px;
  --header-height: 72px;  /* default, will be updated via JS to real height */
  --transition: 0.28s ease;
}

* { box-sizing: border-box; }
html,body { height: 100%; }
body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: #222;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  padding-top: var(--header-height); /* ensures content not hidden by fixed header */
}

/* small helper container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px;
}

/* link resets */
a { color: inherit; text-decoration: none; }
a:focus { outline: 3px solid rgba(25,118,210,0.18); outline-offset: 2px; }

/* ==============================
   2. Header
   ============================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  background: linear-gradient(90deg, var(--green-1) 0%, var(--blue-1) 100%);
  color: #fff;
  z-index: 1200;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  transition: background var(--transition), box-shadow var(--transition);
}

/* header left block (hamburger + brand) */
.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

/* ==============================
   2.1 Brand & Hamburger
   ============================== */

/* Hamburger - three lines */
.menu-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
  align-items: center;
  transition: transform var(--transition);
}
.menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background: #fff;
  border-radius: 2px;
  transform-origin: center;
  transition: all var(--transition);
}

/* Hamburger -> X when open */
.menu-toggle.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.menu-toggle.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0.2);
}
.menu-toggle.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}
.brand-logo {
  height: 40px;
  width: 40px;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  padding: 4px;
}
.brand-name {
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 700;
  white-space: nowrap; /* keep company name inline on left */
  line-height: 1;
  color: #fff;
}

/* Ensure header text is always visible - allow wrapping if needed and adjust height via JS */
.brand, .brand-name { min-width: 0; }

/* ==============================
   2.2 Header Right / CTA
   ============================== */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-cta {
  display: inline-block;
  padding: 8px 14px;
  background: linear-gradient(90deg,var(--blue-2),var(--blue-1));
  color: #fff;
  border-radius: 10px;
  font-weight: 600;
  box-shadow: 0 6px 12px rgba(25,118,210,0.18);
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
}
.btn-cta:hover { transform: translateY(-3px); opacity: 0.98; }

/* ==============================
   3. Drawer (Sidebar) & Overlay
   ============================== */
.drawer {
  position: fixed;
  top: 0;
  left: -300px; /* hidden by default */
  height: 100%;
  width: 300px;
  max-width: 83%;
  background: linear-gradient(180deg, var(--blue-1), var(--green-1));
  color: #fff;
  padding: 24px;
  transition: left 0.32s cubic-bezier(.2,.9,.2,1);
  z-index: 1250;
  overflow-y: auto;
  box-shadow: 6px 0 18px rgba(0,0,0,0.16);
}
.drawer.open { left: 0; }

.drawer nav a {
  display: block;
  margin: 14px 0;
  font-size: 17px;
  color: #fff;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background var(--transition), transform var(--transition);
}
.drawer nav a:hover {
  background: rgba(255,255,255,0.08);
  transform: translateX(6px);
}

/* overlay that fades in when drawer open */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
  z-index: 1240;
}
.drawer.open ~ .drawer-overlay,
.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ==============================
   4. Hero Section
   ============================== */
.hero {
  padding: 48px 0 36px;
  background: linear-gradient(180deg, rgba(232,245,233,1), rgba(227,242,253,1));
  color: var(--green-1);
}
.hero-inner {
  text-align: center;
  padding: 36px 18px;
}
.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3.6vw, 40px);
  letter-spacing: -0.5px;
}
.hero-sub { margin: 0 0 18px; font-size: 16px; color: #27633a; }
.btn-primary {
  display: inline-block;
  background: linear-gradient(90deg, var(--blue-2), var(--green-2));
  color: #fff;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
  transition: transform var(--transition), box-shadow var(--transition);
}
.btn-primary:hover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(0,0,0,0.18); }

/* ==============================
   5. Categories Section
   ============================== */
.categories { padding: 28px 0; }
.categories h2 { text-align: center; margin-top: 6px; margin-bottom: 18px; }

/* 5.1 Category Grid / Card */
.category-grid {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
}
.category {
  background: #fff;
  border-radius: var(--card-radius);
  width: 160px;
  padding: 12px;
  text-align: center;
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
  border: 2px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.category img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
}
.category h3 { margin: 10px 0 0; font-size: 16px; }

/* hover */
.category:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 18px 36px rgba(0,0,0,0.12);
  border-color: linear-gradient(45deg,var(--blue-2),var(--green-2));
  border-color: var(--blue-2);
}

/* ==============================
   6. Products Section
   ============================== */
.products { padding: 28px 0; }
.products h2 { text-align: center; margin-top: 6px; margin-bottom: 18px; }

/* 6.1 Product Grid / Card */
.product-grid {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
}
.product-card {
  width: 200px;
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  border: 2px solid transparent;
  box-shadow: 0 6px 14px rgba(0,0,0,0.06);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.product-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
}
.product-card h3 { margin: 4px 0 0; font-size: 16px; }
.product-card .desc { color: #555; margin: 0; font-size: 14px; }
.product-bottom {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.price {
  font-weight: 700;
  color: var(--green-1);
}
.btn-small {
  background: linear-gradient(90deg, var(--blue-2), var(--blue-1));
  color: #fff;
  border: none;
  padding: 8px 10px;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 700;
  transition: transform var(--transition), box-shadow var(--transition);
}
.btn-small:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(25,118,210,0.16); }

/* product hover */
.product-card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 22px 40px rgba(0,0,0,0.14);
  border-color: var(--blue-1);
}

/* ==============================
   7. Footer
   ============================== */
footer {
  background: linear-gradient(90deg, var(--green-1), var(--blue-1));
  color: #fff;
  padding: 28px 18px;
  margin-top: 28px;
}
.footer-grid { display:flex; gap: 18px; justify-content: space-between; flex-wrap: wrap; }
.footer-contact p { margin: 8px 0; font-size: 15px; color: rgba(255,255,255,0.95); }
.footer-social p { margin: 0 0 8px 0; font-weight:700; }
.social-icons a img { width: 30px; height: 30px; object-fit: contain; margin-right: 8px; transition: transform var(--transition); }
.social-icons a:hover img { transform: scale(1.18); filter: drop-shadow(0 4px 10px rgba(0,0,0,0.18)); }

.footer-bottom { text-align:center; margin-top: 16px; opacity: 0.95; }

/* ==============================
   8. Utilities & Responsive
   ============================== */

/* small screens — stack and make header compact */
@media (max-width: 768px) {
  .container { padding: 14px; }
  .brand-logo { height: 36px; width: 36px; }
  .brand-name { font-size: 16px; }
  .btn-cta { display: none; } /* hide CTA on small screens to keep left aligned brand */
  .drawer { width: 260px; }
}

/* extra small — ensure items wrap nicely */
@media (max-width: 420px) {
  .brand-name { font-size: 14px; white-space: normal; } /* allow wrapping if extremely narrow */
  .site-header { padding: 10px; }
}

/* ensure focus states are visible */
button:focus, a:focus { outline: 3px solid rgba(33,150,243,0.18); outline-offset: 2px; border-radius: 8px; }
