@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
* { margin: 0; padding: 0; box-sizing: border-box; }

/* Chatbot button overrides - ensure circular buttons */
#chatbot-widget button {
  -webkit-appearance: none !important;
  appearance: none !important;
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}

#chatbot-widget .chat-image-btn,
#chatbot-widget .chat-send-btn {
  border-radius: 50% !important;
}

#chatbot-widget .chat-image-btn,
#chatbot-widget .chat-send-btn {
  width: 40px !important;
  height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#chatbot-widget .chat-image-btn {
  background: #f3f4f6 !important;
  color: #6b7280 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  flex-shrink: 0 !important;
}

#chatbot-widget .chat-image-btn:hover {
  background: #10b981 !important;
  color: white !important;
  transform: scale(1.05) !important;
}

#chatbot-widget .chat-send-btn {
  background: #4a7c59 !important;
  color: #fff !important;
  cursor: pointer !important;
  transition: background 0.2s !important;
  margin-left: 10px !important;
}

#chatbot-widget .chat-send-btn:hover {
  background: #205e37 !important;
}

#chatbot-widget .chat-minimize {
  background: none !important;
  border: none !important;
  color: #fff !important;
  cursor: pointer !important;
  padding: 5px !important;
  border-radius: 3px !important;
  transition: background 0.2s !important;
  width: auto !important;
  height: auto !important;
}

#chatbot-widget .chat-minimize:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}
html, body { height: 100%; }
body {
    font-family: 'Inter', 'Segoe UI', Roboto, Arial, sans-serif;
    background: #fff;
    color: #222;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.top-bar {
    background: #184f20;
    color: #fff;
    font-size: 11px;
    padding: 4px 0 4px 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.top-icons { margin-right: 16px; }
.top-icons .icon { margin-left: 12px; font-size: 16px; }
header {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* flow: Logo | ... | Nav | Actions */
    padding: 0 32px;
    height: 60px;
}
.mobile-nav-toggle { display: none; }
.header-actions { display: inline-flex; align-items: center; gap: 8px; margin-left: 8px; }
.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: auto; }
.header-actions { margin-left: 12px; }
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 !important;
    justify-content: center;
    padding: 0 8px;
    overflow-x: auto;
    scrollbar-width: thin;
    position: relative;
    z-index: 1;
    width: 100%;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 50px;
}

/* Force category navigation to always be visible regardless of zoom - DESKTOP ONLY */
@media (min-width: 601px) {
  body .category-nav,
  html body .category-nav {
      display: flex !important;
      visibility: visible !important;
      opacity: 1 !important;
  }

  body .category-nav .category-btn,
  html body .category-nav .category-btn {
      display: inline-block !important;
      visibility: visible !important;
      opacity: 1 !important;
  }
}
.category-btn {
    background: none;
    border: none;
    color: white;
    padding: 15px 28px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.category-btn.active, .category-btn:hover { background: #3a5c47; }
.category-btn:focus { outline: none; box-shadow: none; }

/* Mobile-only equal-width tabs and separators */
@media (max-width: 600px) {
  .category-nav { display: grid; grid-template-columns: repeat(4, 1fr); padding: 0; overflow-x: hidden; }
  .category-btn { height: 44px; display: flex; align-items: center; justify-content: center; padding: 0 12px; }
  .category-btn + .category-btn { border-left: 1px solid rgba(255,255,255,0.08); }
}
main {
    padding: 32px 0 0 0;
    min-height: 60vh;
    flex: 1 0 auto;
}
.product-grid {
    width: 95%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    background: #fff;
    padding: 2rem 0;
}
.product-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    padding: 12px 10px 14px 10px;
    text-align: center;
    min-height: 210px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    border: 1px solid #f2f2f2;
    position: relative;
}
.product-card:hover { transform: translateY(-5px); box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
.product-card.empty { background: transparent; border: none; box-shadow: none; }
.product-image { height: 130px; width: 100%; display: flex; align-items: center; justify-content: center; }
.product-image img { max-width: 110px; max-height: 110px; object-fit: contain; }
.product-name { font-size: 1rem; font-weight: 700; margin: 8px 0 4px 0; color: #263a29; letter-spacing: .3px; }
.product-price { font-size: 0.98rem; font-weight: 600; color: #184f20; margin-bottom: 4px; }
.add-to-cart-btn {
    background: #4a7c59;
    color: white;
    border: none;
    padding: 6px 18px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    margin-bottom: 6px;
    transition: background 0.3s;
}
.add-to-cart-btn:hover { background: #3a5c47; }

/* Modern Add button to match home.php */
.product-card button.modern-add-btn,
.product-card .modern-add-btn {
    background: linear-gradient(90deg, #4a7c59, #205e37) !important;
    color: #fff;
    border: none !important;
    border-radius: 24px;
    padding: 8px 16px !important;
    font-size: 0.90rem !important;
    font-weight: 600;
    margin-top: 6px;
    box-shadow: 0 2px 8px rgba(32,94,55,0.09) !important;
    cursor: pointer !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, filter 0.18s ease;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 120px;
    max-width: 150px;
    appearance: none;
    -webkit-appearance: none;
    text-decoration: none !important;
}
.product-card .modern-add-btn i { font-size: 0.95rem; line-height: 1; }
.product-card .modern-add-btn:hover { background: linear-gradient(90deg, #205e37, #4a7c59) !important; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(32,94,55,0.18) !important; }
.product-card .modern-add-btn:active { transform: translateY(0); filter: brightness(0.96); box-shadow: 0 3px 10px rgba(32,94,55,0.14); }
.product-card .modern-add-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(24,79,32,0.2), 0 6px 18px rgba(32,94,55,0.18); }
.product-card .modern-add-btn:disabled, .product-card .modern-add-btn[disabled] { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }

@media (max-width: 640px) {
  .product-card .modern-add-btn { min-width: 110px; padding: 8px 14px !important; font-size: 0.88rem !important; }
}

.add-to-cart-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.cart-options {
    display: inline-block;
    margin-top: 4px;
}
.unit-input {
    width: 90px;
    padding: 5px 8px;
    margin-right: 8px;
    border-radius: 4px;
    border: 1px solid #bdbdbd;
    font-size: 13px;
}
.confirm-add-btn {
    background: #4a7c59;
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}
.confirm-add-btn:hover {
    background: #3a5c47;
}

footer {
    background: #184f20;
    color: #fff;
    padding: 32px 0 0 0;
    margin-top: 60px;
    box-sizing: border-box;
    flex-shrink: 0;
}
.footer-social {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    margin-left: 16px;
    margin-bottom: 12px;
}
.footer-columns {
    display: flex;
    justify-content: center;
    gap: 80px;
    padding: 0 0 32px 0;
    font-size: 13px;
    flex-wrap: wrap; /* allow wrapping on smaller screens */
    align-items: flex-start;
    box-sizing: border-box;
}
.footer-columns h4 { margin-bottom: 10px; font-size: 15px; font-weight: 600; letter-spacing: 1px; }
.footer-columns ul { list-style: none; }
.footer-columns li { margin-bottom: 6px; color: #e0e0e0; }

/* ===== Responsive tweaks for footer ===== */
@media (max-width: 900px) {
  footer {
    padding: 28px 16px 20px;
  }
  .footer-social {
    margin-left: 0;
    justify-content: center;
  }
  .footer-columns {
    gap: 40px;
    padding-bottom: 24px;
  }
}
@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,
  .footer-columns ul {
    width: 100%;
    max-width: 360px;
    box-sizing: border-box;
    text-align: center;
  }
  .footer-columns ul {
    display: block;
  }
  .footer-columns ul li {
    display: block;
    margin: 6px 0;
  }
}
@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; }
}

/* Fix for zoom levels - ensure category nav is always visible */
@media (min-width: 601px) and (max-width: 1920px) {
  .category-nav {
    display: flex !important;
    justify-content: center;
    overflow-x: auto;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
  }
  .category-btn {
    display: inline-block !important;
    flex-shrink: 0;
    white-space: nowrap;
    visibility: visible !important;
  }
}

/* Responsive product layout without changing design */
@media (max-width: 1280px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
  /* Ensure category navigation stays visible at zoom levels */
  .category-nav {
    display: flex !important;
    justify-content: center;
    overflow-x: auto;
  }
  .category-btn {
    flex-shrink: 0;
    white-space: nowrap;
  }
}
@media (max-width: 1024px) {
  header { padding: 0 20px; }
  .category-btn { padding: 12px 28px; }
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
  .product-image { height: 120px; }
  .product-image img { max-width: 100px; max-height: 100px; }
}
@media (max-width: 820px) {
  nav { gap: 12px; }
  .brand-name { font-size: 14px; }
  .logo { height: 44px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); width: 95%; }
  .product-card { padding: 12px; }
  .product-name { font-size: 0.96rem; }
}
@media (max-width: 600px) {
  header { padding: 6px 12px; height: auto; }
  .logo { height: 40px; }
  .brand-name { font-size: 13px; letter-spacing: .5px; }
  nav { gap: 8px; flex-wrap: wrap; }
  main { padding: 16px 0 0 0; }
  .product-grid { width: 96%; gap: 14px; }
  /* ensure tabs bar shows on phones and is non-slidable */
  .category-nav {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    min-height: 44px;
    align-items: stretch;
    margin-top: 6px;
    overflow-x: visible !important;
    padding: 0 !important;
  }
  .category-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 44px;
    padding: 0 6px;
    font-size: 12.5px;
    text-align: center;
    border-radius: 0;
    background: transparent;
  }
  .category-btn + .category-btn { border-left: 1px solid rgba(255,255,255,0.08); }
  .category-btn.active { background: #3a5c47 !important; box-shadow: inset 0 -3px rgba(255,255,255,0.25); }
  /* footer fixes: single column, center aligned */
  .footer-columns {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    align-items: start !important;
    justify-items: stretch !important;
    padding-bottom: 18px !important;
  }
  .footer-columns > div { width: 100%; max-width: 100%; text-align: center !important; padding: 0 12px; }
  .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 {
    list-style: none;
    padding: 0; margin: 0;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    column-count: initial !important;
  }
  
  /* Fix Returns & Refunds text wrapping */
  .footer-columns ul li {
    white-space: nowrap !important;
    text-align: center !important;
  }
}
@media (max-width: 480px) {
  header { height: auto; padding: 8px 14px; flex-wrap: wrap; gap: 8px; }
  nav { flex-wrap: wrap; justify-content: center; }
  /* phones: dropdown nav same as home.php */
  nav.site-nav { display: none !important; }
  nav.site-nav.open {
    display: flex !important;
    position: absolute;
    left: 12px; right: 12px;
    top: calc(56px + 6px);
    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;
  }
  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;
    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; pointer-events: auto;
    margin-left: auto;
  }
  .header-actions { display: inline-flex; align-items: center; gap: 8px; margin-left: 8px; }
  .category-nav { justify-content: initial; gap: 0; display: grid !important; grid-template-columns: repeat(4, 1fr); min-height: 44px; overflow-x: visible !important; padding: 0 !important; }
  .category-btn { height: 44px; padding: 0 4px; font-size: 12px; white-space: normal; }
  .product-grid { width: 96%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0.75rem 0 1rem; }
  .product-card { padding: 10px; min-height: 190px; border-radius: 14px; }
  .product-image { height: 110px; }
  .product-image img { max-width: 90px; max-height: 90px; }
  .product-name { font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; }
  .product-card .modern-add-btn { min-width: unset; width: 100%; padding: 7px 10px !important; font-size: 0.85rem !important; }
  /* ensure footer sticks visually consistent on tiny phones */
  .footer-columns { gap: 14px !important; }
}
@media (max-width: 360px) {
  .category-btn { padding: 8px 12px; font-size: 12px; }
  .product-grid { gap: 10px; width: 98%; }
  .product-card { border-radius: 12px; min-height: 180px; }
  .product-image { height: 100px; }
  .product-image img { max-width: 84px; max-height: 84px; }
}