/* ================================================================
   Sharma Kirana Store — Main CSS
   Mobile-first · Green theme (#16a34a) · Clean & Modern
   ================================================================ */

/* ── RESET & ROOT ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:        #16a34a;
  --green-dark:   #15803d;
  --green-light:  #dcfce7;
  --green-pale:   #f0fdf4;
  --orange:       #ea580c;
  --orange-light: #fff7ed;
  --red:          #dc2626;
  --red-light:    #fef2f2;
  --yellow:       #ca8a04;
  --yellow-light: #fefce8;
  --blue:         #2563eb;
  --blue-light:   #eff6ff;
  --gray-50:      #f9fafb;
  --gray-100:     #f3f4f6;
  --gray-200:     #e5e7eb;
  --gray-300:     #d1d5db;
  --gray-400:     #9ca3af;
  --gray-500:     #6b7280;
  --gray-600:     #4b5563;
  --gray-700:     #374151;
  --gray-800:     #1f2937;
  --gray-900:     #111827;
  --white:        #ffffff;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow:       0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-md:    0 10px 15px rgba(0,0,0,.08), 0 4px 6px rgba(0,0,0,.05);
  --shadow-lg:    0 20px 25px rgba(0,0,0,.1), 0 10px 10px rgba(0,0,0,.04);
  --radius-sm:    6px;
  --radius:       10px;
  --radius-lg:    16px;
  --radius-xl:    20px;
  --radius-full:  9999px;
  --font:         'Nunito', system-ui, -apple-system, sans-serif;
  --header-h:     64px;
  --mobile-search-h: 52px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--gray-50);
  min-height: 100vh;
  padding-top: calc(var(--header-h) + var(--mobile-search-h));
}

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); }

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

.hidden { display: none !important; }

/* ── HEADER ──────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--green);
  color: var(--white);
  box-shadow: 0 2px 12px rgba(22,163,74,.3);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  height: var(--header-h);
}

/* Logo */
.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 38px; height: 38px;
  background: rgba(255,255,255,.2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-main {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .3px;
}

.logo-sub {
  font-size: 10px;
  opacity: .85;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* Desktop search (hidden on mobile) */
.header-search {
  display: none;
  flex: 1;
  max-width: 480px;
}

/* Cart button */
.cart-btn {
  position: relative;
  color: var(--white);
  font-size: 22px;
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.15);
  transition: background .2s;
  flex-shrink: 0;
  margin-left: auto;
}
.cart-btn:hover { background: rgba(255,255,255,.25); color: var(--white); }

.cart-badge {
  position: absolute;
  top: 4px; right: 4px;
  min-width: 18px; height: 18px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  border: 2px solid var(--green);
  transition: transform .3s cubic-bezier(.175,.885,.32,1.275);
}
.cart-badge.bounce { animation: cartBounce .4s ease; }

@keyframes cartBounce {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.5); }
  100% { transform: scale(1); }
}

/* Mobile search row */
.mobile-search-row {
  padding: 6px 12px 8px;
  background: var(--green);
}

/* Search wrap (shared) */
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--white);
  border-radius: var(--radius-full);
  overflow: visible;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--gray-400);
  font-size: 14px;
  pointer-events: none;
  z-index: 1;
}

.search-wrap input {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 12px 10px 38px;
  font-family: var(--font);
  font-size: 14px;
  background: transparent;
  border-radius: var(--radius-full) 0 0 var(--radius-full);
  color: var(--gray-800);
}

.search-btn {
  background: var(--green-dark);
  color: var(--white);
  border: none;
  padding: 0 18px;
  height: 100%;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
  transition: background .2s;
  min-height: 40px;
  white-space: nowrap;
}
.search-btn:hover { background: #14532d; }

/* Search dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
  border: 1px solid var(--gray-200);
}

.search-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  cursor: pointer;
  transition: background .15s;
  font-size: 14px;
  color: var(--gray-800);
  border-bottom: 1px solid var(--gray-100);
}
.search-dropdown-item:last-child { border-bottom: none; }
.search-dropdown-item:hover { background: var(--green-pale); }

.sdi-price { color: var(--green); font-weight: 700; font-size: 13px; }

/* Desktop layout */
@media (min-width: 640px) {
  body { padding-top: var(--header-h); }
  .mobile-search-row { display: none; }
  .header-search { display: block; }
  .header-inner { gap: 16px; }
}

/* ── FLASH MESSAGES ───────────────────────────────────────────── */
.flash-container {
  position: fixed;
  top: calc(var(--header-h) + var(--mobile-search-h) + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(420px, calc(100vw - 32px));
}

@media (min-width: 640px) {
  .flash-container { top: calc(var(--header-h) + 8px); }
}

.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  font-size: 14px;
  font-weight: 600;
  animation: slideDown .3s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.flash-success { background: var(--green-light); color: var(--green-dark); border-left: 4px solid var(--green); }
.flash-error   { background: var(--red-light);   color: var(--red);        border-left: 4px solid var(--red); }
.flash-warning { background: var(--yellow-light); color: var(--yellow);    border-left: 4px solid var(--yellow); }
.flash-info    { background: var(--blue-light);   color: var(--blue);      border-left: 4px solid var(--blue); }

.flash span { flex: 1; }

.flash-close {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  opacity: .6;
  padding: 2px 4px;
  border-radius: var(--radius-sm);
  transition: opacity .2s;
}
.flash-close:hover { opacity: 1; }

/* ── MAIN CONTENT ─────────────────────────────────────────────── */
.main-content {
  min-height: calc(100vh - var(--header-h) - var(--mobile-search-h) - 200px);
  padding-bottom: 80px;
}

@media (min-width: 640px) {
  .main-content { min-height: calc(100vh - var(--header-h) - 200px); }
}

/* ── HERO BANNER ──────────────────────────────────────────────── */
.hero-banner {
  background: linear-gradient(135deg, var(--green) 0%, #059669 60%, #10b981 100%);
  color: var(--white);
  margin: 0;
  overflow: hidden;
}

.hero-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hero-text h1 {
  font-size: clamp(22px, 5vw, 34px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 8px;
}

.hero-text p {
  font-size: 15px;
  opacity: .9;
  margin-bottom: 14px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-badges span {
  background: rgba(255,255,255,.2);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,.3);
}

.hero-emoji {
  font-size: clamp(52px, 12vw, 88px);
  flex-shrink: 0;
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.2));
}

/* ── CATEGORY CHIPS ───────────────────────────────────────────── */
.category-section {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: calc(var(--header-h) + var(--mobile-search-h));
  z-index: 50;
}

@media (min-width: 640px) {
  .category-section { top: var(--header-h); }
}

.category-scroll {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.category-scroll::-webkit-scrollbar { display: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  background: var(--gray-100);
  color: var(--gray-700);
  border: 2px solid transparent;
  transition: all .2s;
  cursor: pointer;
}

.chip:hover {
  background: var(--green-light);
  color: var(--green-dark);
  border-color: var(--green);
}

.chip-active {
  background: var(--green);
  color: var(--white);
  border-color: var(--green-dark);
}
.chip-active:hover { color: var(--white); }

/* ── RESULTS HEADER ───────────────────────────────────────────── */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  font-size: 14px;
}

.results-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gray-700);
  flex-wrap: wrap;
}

.results-count {
  background: var(--gray-100);
  color: var(--gray-600);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
}

.clear-filter {
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--red-light);
  white-space: nowrap;
}

/* ── PRODUCTS SECTION ─────────────────────────────────────────── */
.products-section {
  padding: 16px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ── PRODUCT GRID ─────────────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 500px)  { .products-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
@media (min-width: 700px)  { .products-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 900px)  { .products-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; } }
@media (min-width: 1100px) { .products-grid { grid-template-columns: repeat(5, 1fr); } }

/* ── PRODUCT CARD ─────────────────────────────────────────────── */
.product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  transition: transform .25s ease, box-shadow .25s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.product-card.out-of-stock {
  opacity: .7;
  filter: grayscale(.25);
}

/* Savings badge */
.savings-badge {
  position: absolute;
  top: 8px; left: 8px;
  background: var(--orange);
  color: var(--white);
  font-size: 10px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: var(--radius-full);
  z-index: 2;
  letter-spacing: .3px;
}

/* OOS overlay */
.oos-overlay {
  position: absolute;
  top: 8px; right: 8px;
  background: rgba(0,0,0,.6);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: var(--radius-full);
  z-index: 2;
}

/* Card image */
.card-img-link { display: block; }

.card-img {
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 110px;
  border-bottom: 1px solid var(--gray-100);
  transition: background .2s;
}

.product-card:hover .card-img { background: var(--green-pale); }

.card-emoji {
  font-size: 52px;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.1));
}

/* Card body */
.card-body {
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-800);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-name:hover { color: var(--green); }

.card-unit {
  font-size: 11px;
  color: var(--gray-500);
  font-weight: 600;
}

.card-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.card-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--green);
}

.card-mrp {
  font-size: 12px;
  color: var(--gray-400);
  text-decoration: line-through;
  font-weight: 600;
}

.card-savings {
  font-size: 11px;
  color: var(--orange);
  font-weight: 700;
}

/* Add to cart button */
.btn-add-cart {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px;
  margin-top: auto;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .15s;
}

.btn-add-cart:hover:not(:disabled) {
  background: var(--green-dark);
  transform: scale(1.02);
}

.btn-add-cart:active:not(:disabled) { transform: scale(.97); }

.btn-add-cart.btn-oos {
  background: var(--gray-200);
  color: var(--gray-500);
  cursor: not-allowed;
}

.btn-add-cart.btn-added {
  background: #059669;
}

/* ── EMPTY STATE ──────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
}

.empty-icon {
  font-size: 72px;
  margin-bottom: 16px;
  filter: grayscale(.2);
}

.empty-state h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--gray-700);
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--gray-500);
  margin-bottom: 24px;
}

/* ── FLOATING CART BAR ────────────────────────────────────────── */
.floating-cart {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  width: min(420px, calc(100vw - 32px));
  animation: slideUp .3s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.floating-cart-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--green);
  color: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 30px rgba(22,163,74,.45);
  font-weight: 700;
  font-size: 15px;
}

.fc-left { display: flex; align-items: center; gap: 8px; }
.fc-right { display: flex; align-items: center; gap: 6px; opacity: .9; font-size: 14px; }

/* ── BUTTONS ──────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .2s;
  text-decoration: none;
}

.btn-primary:hover:not(:disabled) {
  background: var(--green-dark);
  box-shadow: 0 4px 15px rgba(22,163,74,.35);
  color: var(--white);
}

.btn-primary:active:not(:disabled) { transform: scale(.97); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  background: transparent;
  color: var(--green);
  border: 2px solid var(--green);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
}

.btn-secondary:hover {
  background: var(--green);
  color: var(--white);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
}

.btn-ghost:hover {
  background: var(--gray-200);
  color: var(--gray-800);
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gray-600);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 0;
}
.btn-back:hover { color: var(--green); }

/* ── PAGE HEADER ──────────────────────────────────────────────── */
.page-header {
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--gray-200);
  background: var(--white);
}

.page-header h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-header h2 i { color: var(--green); }

.page-header-sub {
  color: var(--gray-500);
  font-size: 13px;
  margin-top: 4px;
}

/* ── PRODUCT DETAIL ───────────────────────────────────────────── */
.product-detail-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 0 40px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--gray-500);
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  overflow-x: auto;
  white-space: nowrap;
}

.breadcrumb a { color: var(--gray-500); font-weight: 600; }
.breadcrumb a:hover { color: var(--green); }
.bc-sep { color: var(--gray-300); font-size: 11px; }
.bc-current { color: var(--gray-800); font-weight: 700; }

.product-detail-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  background: var(--white);
}

@media (min-width: 640px) {
  .product-detail-card { grid-template-columns: 300px 1fr; }
}

.pd-image-area {
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  position: relative;
  border-bottom: 1px solid var(--gray-100);
}

@media (min-width: 640px) {
  .pd-image-area { border-bottom: none; border-right: 1px solid var(--gray-100); min-height: 320px; }
}

.pd-image-box {
  width: 160px; height: 160px;
  background: var(--white);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  border: 2px solid var(--gray-100);
}

.pd-emoji { font-size: 80px; filter: drop-shadow(0 4px 12px rgba(0,0,0,.1)); }

.pd-savings-badge {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--orange);
  color: var(--white);
  font-size: 14px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: var(--radius-full);
}

.pd-info {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pd-name {
  font-size: clamp(20px, 4vw, 26px);
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.25;
}

.pd-category-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--green-light);
  color: var(--green-dark);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  width: fit-content;
}

.pd-price-block {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.pd-price {
  font-size: 30px;
  font-weight: 900;
  color: var(--green);
}

.pd-mrp {
  font-size: 16px;
  color: var(--gray-400);
  text-decoration: line-through;
  font-weight: 600;
}

.pd-save-pill {
  background: var(--orange-light);
  color: var(--orange);
  font-size: 12px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid #fed7aa;
}

.pd-unit {
  font-size: 14px;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: 6px;
}

.pd-stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  width: fit-content;
}

.pd-stock.in-stock  { background: var(--green-light); color: var(--green-dark); }
.pd-stock.no-stock  { background: var(--red-light); color: var(--red); }

.pd-add-section {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Qty selector */
.qty-selector {
  display: flex;
  align-items: center;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
}

.qty-btn {
  width: 40px; height: 40px;
  background: var(--gray-100);
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--gray-700);
  transition: background .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:hover { background: var(--green-light); color: var(--green); }

.qty-selector input {
  width: 48px;
  text-align: center;
  border: none;
  outline: none;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-800);
  background: var(--white);
}

.btn-add-to-cart-detail {
  flex: 1;
  min-width: 150px;
  padding: 12px 20px;
  font-size: 15px;
}

.btn-added { background: #059669 !important; }

.btn-go-cart { margin-top: 0; }

.pd-features {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.pd-feature {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--gray-600);
  font-weight: 600;
  padding: 5px 10px;
  background: var(--gray-100);
  border-radius: var(--radius-full);
}

.pd-feature i { color: var(--green); }

.pd-back { padding: 20px 16px 0; }

/* ── CART PAGE ────────────────────────────────────────────────── */
.cart-page {
  max-width: 1000px;
  margin: 0 auto;
  padding-bottom: 32px;
}

.cart-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 16px;
}

@media (min-width: 768px) {
  .cart-layout { grid-template-columns: 1fr 320px; align-items: start; }
}

/* Cart item */
.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 10px;
  transition: opacity .3s, transform .3s;
}

.ci-emoji {
  font-size: 40px;
  flex-shrink: 0;
  width: 52px; height: 52px;
  background: var(--gray-50);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ci-info { flex: 1; min-width: 0; }

.ci-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ci-unit {
  font-size: 11px;
  color: var(--gray-500);
  font-weight: 600;
}

.ci-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 4px;
}

.ci-price { font-size: 15px; font-weight: 800; color: var(--green); }
.ci-mrp   { font-size: 12px; color: var(--gray-400); text-decoration: line-through; }
.ci-save-tag {
  background: var(--orange-light);
  color: var(--orange);
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.ci-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.ci-qty-row {
  display: flex;
  align-items: center;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
}

.ci-qty-row .qty-btn { width: 32px; height: 32px; font-size: 12px; }

.ci-qty {
  width: 36px;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  color: var(--gray-800);
  background: var(--white);
  border: none;
  padding: 0;
}

.ci-line-total {
  font-size: 15px;
  font-weight: 800;
  color: var(--gray-800);
}

.ci-remove {
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  font-size: 15px;
  padding: 4px;
  transition: color .2s;
  border-radius: var(--radius-sm);
}
.ci-remove:hover { color: var(--red); background: var(--red-light); }

.cart-actions {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  justify-content: flex-end;
}

.btn-clear-cart {
  background: var(--red-light) !important;
  color: var(--red) !important;
  border-color: #fca5a5 !important;
}

/* Summary card */
.cart-summary { display: flex; flex-direction: column; gap: 12px; }

.summary-card, .checkout-summary-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.summary-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--gray-800);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-100);
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  color: var(--gray-700);
}

.summary-row i { color: var(--green); margin-right: 4px; }

.free-tag {
  background: var(--green-light);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.summary-divider {
  height: 1px;
  background: var(--gray-100);
  margin: 8px 0;
}

.summary-total {
  font-size: 17px;
  font-weight: 800;
  color: var(--gray-900);
}

.btn-checkout {
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  font-size: 16px;
  border-radius: var(--radius-lg);
  background: var(--green);
  box-shadow: 0 4px 15px rgba(22,163,74,.35);
}

.btn-continue-shop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--gray-500);
  font-size: 13px;
  font-weight: 600;
  margin-top: 12px;
  text-align: center;
}

.trust-badges {
  display: flex;
  justify-content: space-around;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 14px;
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--gray-600);
  font-weight: 700;
  text-align: center;
}
.trust-item i { font-size: 18px; color: var(--green); }

/* ── CHECKOUT PAGE ────────────────────────────────────────────── */
.checkout-page {
  max-width: 960px;
  margin: 0 auto;
  padding-bottom: 40px;
}

/* Steps */
.checkout-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 14px 16px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
}

.step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-400);
  padding: 6px 10px;
  border-radius: var(--radius-full);
}

.step-active { color: var(--green); background: var(--green-light); }
.step-done   { color: var(--gray-500); }

.step-line {
  flex: 1;
  max-width: 40px;
  height: 2px;
  background: var(--gray-200);
}
.step-line.done { background: var(--green); }

/* Checkout layout */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 16px;
}

@media (min-width: 768px) {
  .checkout-layout { grid-template-columns: 1fr 360px; align-items: start; }
}

.checkout-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
}

.checkout-section-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-100);
}
.checkout-section-title i { color: var(--green); }

/* Forms */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-group label i { color: var(--green); }

.req { color: var(--red); }
.optional { color: var(--gray-400); font-weight: 500; font-size: 11px; }

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 15px;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22,163,74,.12);
}

.form-group textarea { resize: vertical; min-height: 88px; }

.phone-input-wrap {
  display: flex;
  align-items: stretch;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}

.phone-input-wrap:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22,163,74,.12);
}

.phone-prefix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: var(--gray-100);
  color: var(--gray-600);
  font-size: 14px;
  font-weight: 700;
  border-right: 2px solid var(--gray-200);
  white-space: nowrap;
}

.phone-input-wrap input {
  border: none;
  box-shadow: none;
  border-radius: 0;
  flex: 1;
}
.phone-input-wrap input:focus { box-shadow: none; }

.form-hint { font-size: 11px; color: var(--gray-400); margin-top: 4px; display: block; }

.btn-place-order {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  margin-top: 4px;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 15px rgba(22,163,74,.35);
}

/* Order items in checkout summary */
.order-items-list { margin-bottom: 8px; }

.order-item-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
  gap: 8px;
}
.order-item-row:last-child { border-bottom: none; }

.oi-name-qty { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.oi-name { font-size: 13px; font-weight: 700; color: var(--gray-800); }
.oi-qty  { font-size: 11px; color: var(--gray-500); font-weight: 600; }
.oi-total { font-size: 13px; font-weight: 800; color: var(--gray-800); white-space: nowrap; }

.payment-note {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--yellow-light);
  color: var(--yellow);
  border: 1px solid #fef08a;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  margin-top: 14px;
}

/* ── ORDER CONFIRMATION ───────────────────────────────────────── */
.order-confirm-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 0 48px;
}

.confirm-banner {
  text-align: center;
  background: linear-gradient(135deg, var(--green) 0%, #059669 100%);
  color: var(--white);
  padding: 36px 24px 32px;
}

.confirm-check {
  font-size: 56px;
  margin-bottom: 10px;
  animation: popIn .5s cubic-bezier(.175,.885,.32,1.275);
}

@keyframes popIn {
  from { transform: scale(0) rotate(-10deg); opacity: 0; }
  to   { transform: scale(1) rotate(0);   opacity: 1; }
}

.confirm-banner h1 {
  font-size: clamp(24px, 5vw, 34px);
  font-weight: 800;
  margin-bottom: 8px;
}

.confirm-banner p {
  font-size: 15px;
  opacity: .9;
  margin-bottom: 16px;
}

.order-number-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.2);
  border: 2px solid rgba(255,255,255,.5);
  border-radius: var(--radius-full);
  padding: 8px 20px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .5px;
}

.confirm-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 20px 16px 8px;
}

@media (min-width: 640px) {
  .confirm-layout { grid-template-columns: 1fr 1fr; }
}

.confirm-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.confirm-section-title {
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-800);
}
.confirm-section-title i { color: var(--green); }

.confirm-items { margin-bottom: 8px; }

.confirm-item-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
  gap: 8px;
}
.confirm-item-row:last-child { border-bottom: none; }

.cir-left { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cir-name { font-size: 13px; font-weight: 700; color: var(--gray-800); }
.cir-unit { font-size: 11px; color: var(--gray-500); font-weight: 600; }
.cir-qty  { font-size: 12px; color: var(--gray-600); font-weight: 600; }

.cir-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; }
.cir-price { font-size: 14px; font-weight: 800; color: var(--gray-800); }
.cir-mrp   { font-size: 12px; color: var(--gray-400); text-decoration: line-through; }

/* Delivery info */
.delivery-info-grid { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }

.di-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.di-row > i {
  color: var(--green);
  font-size: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  width: 20px;
}

.di-row > div { display: flex; flex-direction: column; gap: 2px; }
.di-label { font-size: 11px; color: var(--gray-500); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.di-value { font-size: 14px; color: var(--gray-800); font-weight: 600; }

/* Status tracker */
.status-tracker {
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding-top: 12px;
}

.status-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  text-align: center;
}

.ss-dot {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}

.ss-dot.pending {
  background: var(--gray-200);
  color: var(--gray-400);
}

.ss-info strong { font-size: 11px; display: block; color: var(--gray-700); font-weight: 700; }
.ss-info small  { font-size: 10px; color: var(--gray-400); }

.status-line {
  flex: 1;
  height: 2px;
  background: var(--gray-200);
  margin-top: 17px;
  flex-shrink: 0;
  max-width: 40px;
}

/* WhatsApp message */
.whatsapp-msg {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--green-pale);
  border: 1px solid var(--green-light);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin: 16px 16px 0;
}

.wa-icon {
  width: 44px; height: 44px;
  background: var(--green);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.wa-text { font-size: 14px; color: var(--gray-700); line-height: 1.6; }
.wa-text p:first-child { color: var(--green-dark); font-size: 15px; margin-bottom: 4px; }

.confirm-actions {
  display: flex;
  gap: 12px;
  padding: 20px 16px 0;
  flex-wrap: wrap;
  justify-content: center;
}

.confirm-actions .btn-primary,
.confirm-actions .btn-secondary { flex: 1; min-width: 180px; justify-content: center; }

/* Status badges */
.toc-status {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 800;
}

.status-pending         { background: var(--yellow-light); color: var(--yellow); }
.status-confirmed       { background: var(--blue-light);   color: var(--blue); }
.status-preparing       { background: var(--orange-light); color: var(--orange); }
.status-out_for_delivery { background: var(--green-light); color: var(--green-dark); }
.status-delivered       { background: var(--green-light);  color: var(--green-dark); }
.status-cancelled       { background: var(--red-light);    color: var(--red); }

/* ── TRACK PAGE ───────────────────────────────────────────────── */
.track-page {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 40px;
}

.track-search-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  margin: 16px;
}

.track-form { display: flex; flex-direction: column; gap: 16px; }

.track-results { padding: 0 16px; }

.track-results h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-600);
  margin-bottom: 12px;
}

.track-order-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
}

.toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.toc-number {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 800;
  color: var(--gray-800);
}
.toc-number i { color: var(--green); }

.toc-meta {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 600;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.toc-meta i { color: var(--green); margin-right: 3px; }

.toc-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.toc-item-pill {
  background: var(--gray-100);
  color: var(--gray-700);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-full);
}

.toc-more {
  background: var(--green-light);
  color: var(--green-dark);
}

.toc-view-btn { font-size: 13px; }

/* ── AUTH PAGE ────────────────────────────────────────────────── */
.auth-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: 36px 28px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  font-size: 44px;
  color: var(--green);
  margin-bottom: 12px;
}

.auth-card h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 6px;
}

.auth-sub {
  color: var(--gray-500);
  margin-bottom: 24px;
}

.auth-card form { text-align: left; }

.auth-card .btn-primary { width: 100%; margin-top: 4px; }

.auth-footer {
  margin-top: 20px;
  font-size: 14px;
  color: var(--gray-600);
}

/* ── CART TOAST ───────────────────────────────────────────────── */
.cart-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gray-900);
  color: var(--white);
  padding: 12px 22px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
  animation: toastIn .3s ease;
  white-space: nowrap;
}

.cart-toast i { color: #4ade80; }
.cart-toast.toast-error i { color: #f87171; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── FOOTER ───────────────────────────────────────────────────── */
.site-footer {
  background: var(--gray-900);
  color: var(--gray-300);
  margin-top: 40px;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 20px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 800;
  color: var(--white);
}
.footer-brand i { color: var(--green); }

.footer-tagline { font-size: 13px; color: var(--gray-500); font-style: italic; }

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 6px 0;
}

.footer-links a {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--gray-400);
  font-size: 13px;
  font-weight: 600;
  transition: color .2s;
}
.footer-links a:hover { color: var(--green); }

.footer-copy { font-size: 12px; color: var(--gray-600); }

/* ── UTILITY ──────────────────────────────────────────────────── */
.text-green { color: var(--green); }
.text-red   { color: var(--red); }
.fw-bold     { font-weight: 700; }
