/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', sans-serif; background: #f5f7f2; color: #222; }
a { text-decoration: none; color: inherit; }
img { width: 100%; display: block; }

/* ===== VARIABLES ===== */
:root {
  --green: #2e7d32;
  --green-light: #4caf50;
  --green-bg: #e8f5e9;
  --orange: #f57c00;
  --orange-light: #ff9800;
  --white: #fff;
  --gray: #757575;
  --border: #e0e0e0;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* ===== NAVBAR ===== */
.navbar {
  background: var(--green);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.nav-brand { color: #fff; font-size: 1.2rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.nav-brand span { font-size: 1.4rem; }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  color: rgba(255,255,255,0.85);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.2s;
}
.nav-links a:hover, .nav-links a.active { background: rgba(255,255,255,0.2); color: #fff; }
.cart-btn {
  position: relative;
  background: var(--orange);
  color: #fff !important;
  border-radius: 8px !important;
  padding: 6px 12px !important;
}
#cart-badge {
  position: absolute;
  top: -6px; right: -6px;
  background: #fff;
  color: var(--green);
  font-size: 0.7rem;
  font-weight: 700;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
}

/* ===== HERO BANNER ===== */
.hero {
  background: linear-gradient(135deg, var(--green) 0%, #1b5e20 100%);
  color: #fff;
  padding: 40px 16px 32px;
  text-align: center;
}
.hero h1 { font-size: 1.7rem; font-weight: 800; line-height: 1.3; margin-bottom: 8px; }
.hero p { font-size: 0.95rem; opacity: 0.9; margin-bottom: 20px; }
.hero-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  background: var(--orange);
  color: #fff;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
.btn-outline {
  background: transparent;
  color: #fff;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid rgba(255,255,255,0.6);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}
.btn-outline:hover { background: rgba(255,255,255,0.15); }

/* ===== DELIVERY BADGE ===== */
.delivery-strip {
  background: var(--orange-light);
  color: #fff;
  text-align: center;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ===== SECTION ===== */
.section { padding: 20px 16px; }
.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===== CATEGORY SHORTCUTS ===== */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.cat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px 8px;
  text-align: center;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.15s;
  border: 2px solid transparent;
}
.cat-card:hover { transform: translateY(-2px); border-color: var(--green-light); }
.cat-card .icon { font-size: 2rem; margin-bottom: 6px; display: flex; align-items: center; justify-content: center; }
.cat-card .icon img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.cat-card span { font-size: 0.8rem; font-weight: 600; color: #333; }

/* ===== PRODUCT GRID ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.product-card .p-img {
  height: 130px;
  background: var(--green-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
}
.product-card .p-img img { height: 100%; width: 100%; object-fit: cover; }
.out-of-stock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}
.product-card .p-body { padding: 10px; flex: 1; display: flex; flex-direction: column; }
.product-card .p-name { font-weight: 700; font-size: 0.95rem; margin-bottom: 2px; }
.product-card .p-unit { font-size: 0.75rem; color: var(--gray); margin-bottom: 8px; }
.product-card .p-price { font-size: 1.1rem; font-weight: 800; color: var(--green); margin-bottom: 10px; }
.btn-add {
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s;
  margin-top: auto;
}
.btn-add:hover { background: var(--green-light); }
.btn-add:disabled { background: #bdbdbd; cursor: not-allowed; }

/* ===== SEARCH & FILTER ===== */
.search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.search-bar input {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: 50px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}
.search-bar input:focus { border-color: var(--green-light); }
.filter-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 16px;
  scrollbar-width: none;
}
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tab {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 50px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.filter-tab.active { background: var(--green); color: #fff; border-color: var(--green); }

/* ===== CART PAGE ===== */
.cart-list { display: flex; flex-direction: column; gap: 10px; }
.cart-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
}
.cart-item .ci-img {
  width: 60px; height: 60px;
  border-radius: 8px;
  background: var(--green-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
  overflow: hidden;
}
.cart-item .ci-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item .ci-info { flex: 1; }
.cart-item .ci-name { font-weight: 700; font-size: 0.9rem; }
.cart-item .ci-price { font-size: 0.8rem; color: var(--gray); }
.cart-item .ci-subtotal { font-weight: 700; color: var(--green); font-size: 0.95rem; }
.qty-ctrl { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.qty-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--green);
  background: #fff;
  color: var(--green);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.qty-btn:hover { background: var(--green); color: #fff; }
.qty-num { font-weight: 700; min-width: 20px; text-align: center; }
.btn-remove { background: none; border: none; color: #e53935; font-size: 1.2rem; cursor: pointer; padding: 4px; }

.cart-summary {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 16px;
  box-shadow: var(--shadow);
}
.summary-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 0.9rem; }
.summary-row.total { font-weight: 800; font-size: 1.1rem; color: var(--green); border-top: 2px solid var(--border); margin-top: 6px; padding-top: 10px; }
.btn-checkout {
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 14px;
  font-size: 1rem;
  font-weight: 700;
  width: 100%;
  cursor: pointer;
  margin-top: 14px;
  transition: background 0.2s;
}
.btn-checkout:hover { background: var(--green-light); }

.empty-cart {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray);
}
.empty-cart .icon { font-size: 4rem; margin-bottom: 12px; }
.empty-cart p { margin-bottom: 16px; }

/* ===== CHECKOUT PAGE ===== */
.checkout-form { display: flex; flex-direction: column; gap: 14px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: #444; margin-bottom: 5px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--green-light); }
.form-group textarea { resize: vertical; min-height: 70px; }
.payment-box {
  background: var(--green-bg);
  border: 2px solid var(--green-light);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.payment-box .icon { font-size: 1.5rem; }
.payment-box strong { display: block; font-size: 0.9rem; }
.payment-box span { font-size: 0.8rem; color: var(--gray); }

/* Dummy Online Payment */
.payment-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.pay-tab {
  flex: 1;
  padding: 10px;
  border: 2px solid var(--border);
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s;
  background: #fff;
}
.pay-tab.active { border-color: var(--green); background: var(--green-bg); color: var(--green); }
.pay-panel { display: none; }
.pay-panel.active { display: block; }
.dummy-card-form { display: flex; flex-direction: column; gap: 10px; }
.dummy-card-form input {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  outline: none;
}
.dummy-card-form input:focus { border-color: var(--green-light); }
.card-row { display: flex; gap: 10px; }
.card-row input { flex: 1; }
.upi-box { text-align: center; padding: 20px; background: var(--green-bg); border-radius: 10px; }
.upi-box .upi-id { font-size: 1.1rem; font-weight: 700; color: var(--green); margin: 8px 0; }
.upi-box p { font-size: 0.8rem; color: var(--gray); }

.order-summary-mini {
  background: var(--green-bg);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 14px;
}
.order-summary-mini h3 { font-size: 0.9rem; color: var(--green); margin-bottom: 8px; }
.order-summary-mini .osi { display: flex; justify-content: space-between; font-size: 0.82rem; padding: 3px 0; }
.order-summary-mini .osi-total { font-weight: 800; border-top: 1px solid #c8e6c9; margin-top: 6px; padding-top: 6px; color: var(--green); }

.btn-whatsapp {
  background: #25d366;
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 15px;
  font-size: 1rem;
  font-weight: 700;
  width: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  transition: background 0.2s;
}
.btn-whatsapp:hover { background: #1ebe5d; }

/* ===== CONTACT PAGE ===== */
.info-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.info-card .ic-icon { font-size: 1.8rem; flex-shrink: 0; }
.info-card .ic-label { font-size: 0.75rem; color: var(--gray); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.info-card .ic-value { font-size: 0.95rem; font-weight: 700; margin-top: 2px; }
.info-card .ic-sub { font-size: 0.82rem; color: var(--gray); margin-top: 2px; }
.btn-wa-contact {
  background: #25d366;
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 13px 24px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  transition: background 0.2s;
}
.btn-wa-contact:hover { background: #1ebe5d; }

/* ===== DRAWER ===== */
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
}
.drawer-overlay.open { display: block; }
.drawer {
  position: fixed;
  top: 0; left: 0;
  width: 280px;
  height: 100%;
  background: #fff;
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}
.drawer.open { transform: translateX(0); }
.drawer-header {
  background: var(--green);
  padding: 20px 16px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-header .dh-brand { color: #fff; }
.drawer-header .dh-brand strong { display: block; font-size: 1.1rem; }
.drawer-header .dh-brand span { font-size: 0.75rem; opacity: 0.85; }
.drawer-close {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  font-size: 1.3rem;
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.drawer-nav { flex: 1; padding: 12px 0; }
.drawer-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
  border-left: 3px solid transparent;
  transition: all 0.2s;
}
.drawer-nav a:hover, .drawer-nav a.active {
  background: var(--green-bg);
  color: var(--green);
  border-left-color: var(--green);
}
.drawer-nav a .dn-icon { font-size: 1.2rem; width: 24px; text-align: center; }
.drawer-divider { height: 1px; background: var(--border); margin: 8px 16px; }
.drawer-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--gray);
  line-height: 1.6;
}
.drawer-footer strong { color: #333; font-size: 0.78rem; }

/* Hamburger button */
.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

/* ===== BANNER SLIDER ===== */
.banner-slider {
  position: relative;
  overflow: hidden;
  background: #1b5e20;
}
.banner-track {
  display: flex;
  transition: transform 0.5s ease;
}
.banner-slide {
  min-width: 100%;
  position: relative;
}
.banner-slide img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}
.banner-slide .slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.1) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px 24px;
  color: #fff;
}
.banner-slide .slide-overlay h2 { font-size: 1.3rem; font-weight: 800; line-height: 1.3; margin-bottom: 6px; text-shadow: 0 1px 4px rgba(0,0,0,0.4); }
.banner-slide .slide-overlay p { font-size: 0.85rem; opacity: 0.9; margin-bottom: 14px; }
.banner-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}
.banner-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 0.2s;
}
.banner-dot.active { background: #fff; }

/* ===== FOOTER ===== */
footer {
  background: #1b5e20;
  color: rgba(255,255,255,0.8);
  text-align: center;
  padding: 24px 16px 16px;
  font-size: 0.82rem;
  margin-top: 30px;
  line-height: 1.8;
}
footer .footer-app { font-size: 1.1rem; font-weight: 800; color: #fff; margin-bottom: 4px; }
footer .footer-links { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin: 10px 0; }
footer .footer-links a { color: rgba(255,255,255,0.75); font-size: 0.8rem; transition: color 0.2s; }
footer .footer-links a:hover { color: #fff; }
footer .footer-divider { border: none; border-top: 1px solid rgba(255,255,255,0.15); margin: 10px 0; }
footer .footer-company { font-size: 0.72rem; color: rgba(255,255,255,0.55); }
footer .footer-company strong { color: rgba(255,255,255,0.75); }

/* ===== PRODUCT SLIDER WIDGET ===== */
.product-slider-wrap {
  position: relative;
  overflow: hidden;
}
.product-slider {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.product-slider::-webkit-scrollbar { display: none; }
.product-slider .product-card {
  min-width: 160px;
  max-width: 160px;
  scroll-snap-align: start;
  flex-shrink: 0;
}

/* ===== TOAST ===== */
#toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #333;
  color: #fff;
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  transition: all 0.3s;
  z-index: 999;
  white-space: nowrap;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== BOTTOM NAV (mobile) ===== */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  z-index: 100;
  padding: 6px 0;
}
.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--gray);
  padding: 4px 0;
  gap: 2px;
}
.bottom-nav a .bn-icon { font-size: 1.3rem; }
.bottom-nav a.active { color: var(--green); }
.bottom-nav .cart-btn-bn { position: relative; }

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .bottom-nav { display: flex; }
  body { padding-bottom: 60px; }
  .nav-links { display: none; }
  .hero h1 { font-size: 1.4rem; }
}
@media (min-width: 600px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .cat-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (min-width: 900px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
  .section { max-width: 960px; margin: 0 auto; }
  .hero h1 { font-size: 2.2rem; }
  .banner-slide img { height: 380px; }
  .banner-slide .slide-overlay h2 { font-size: 2rem; }
  .drawer { width: 320px; }
}
