:root {
  --navy: #131921;
  --navy-light: #232f3e;
  --orange: #f0900a;
  --orange-dark: #e07b00;
  --link-blue: #2874f0;
  --ink: #0f172a;
  --muted: #565959;
  --bg: #f0f2f5;
  --card: #ffffff;
  --border: #e0e0e0;
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", "Noto Sans Devanagari", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
img { max-width: 100%; display: block; }

/* ---- Header (Amazon-style dark bar + Flipkart-style search) ---- */
.site-header { background: var(--navy); color: #fff; }
.header-top { display: flex; align-items: center; gap: 16px; padding: 12px 0; }
.header-top .container { display: flex; align-items: center; gap: 18px; width: 100%; }
.logo { font-size: 22px; font-weight: 800; color: #fff; letter-spacing: -0.5px; white-space: nowrap; }
.logo span { color: var(--orange); }

.search-bar { flex: 1; display: flex; max-width: 640px; }
.search-bar input { flex: 1; border: none; padding: 10px 12px; font-size: 14px; border-radius: 4px 0 0 4px; outline: none; }
.search-bar button { background: var(--orange); border: none; padding: 0 16px; border-radius: 0 4px 4px 0; cursor: pointer; font-size: 16px; }

.header-actions { display: flex; align-items: center; gap: 20px; margin-left: auto; white-space: nowrap; }
.header-actions a { color: #fff; font-size: 13.5px; }
.header-actions a small { display: block; color: #ccc; font-size: 11px; }
.cart-link { position: relative; display: flex; align-items: center; gap: 4px; }
.cart-badge {
  position: absolute; top: -8px; right: -12px; background: var(--orange); color: #fff;
  font-size: 10.5px; font-weight: 800; border-radius: 50%; width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
}

.header-cats { background: var(--navy-light); overflow-x: auto; }
.header-cats .container { display: flex; gap: 4px; padding: 0; }
.header-cats a { padding: 10px 14px; font-size: 13px; color: #e2e2e2; white-space: nowrap; }
.header-cats a:hover, .header-cats a.active { background: rgba(255,255,255,0.1); }

.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 22px; cursor: pointer; }
@media (max-width: 760px) {
  .search-bar { order: 3; flex-basis: 100%; max-width: none; margin-top: 10px; }
  .header-top .container { flex-wrap: wrap; }
}

.btn { display: inline-block; padding: 11px 26px; border-radius: 4px; font-weight: 700; font-size: 14px; background: var(--orange); color: #fff; }
.btn:hover { background: var(--orange-dark); }
.link { background: none; border: none; cursor: pointer; font-size: 13px; color: var(--link-blue); }

/* ---- Hero / banner ---- */
.hero-banner { background: linear-gradient(120deg, var(--navy), var(--navy-light)); color: #fff; padding: 34px 0; text-align: center; }
.hero-banner h1 { font-size: 26px; margin: 0 0 8px; }
.hero-banner p { margin: 0; opacity: .85; font-size: 14px; }

/* ---- Sections ---- */
section { padding: 30px 0; }
.section-title { font-size: 20px; font-weight: 700; margin: 0 0 18px; color: var(--ink); }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .4s ease, transform .4s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---- Product grid / cards (Flipkart-style plain cards) ---- */
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-4, .grid-3 { grid-template-columns: 1fr 1fr; } }

.product-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; display: flex; flex-direction: column; transition: box-shadow .15s ease;
}
.product-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.product-card img.product-thumb { width: 100%; height: 150px; object-fit: contain; margin-bottom: 10px; background: #fafafa; }
.product-card h3 { font-size: 13.5px; font-weight: 500; margin: 0 0 6px; color: var(--ink); min-height: 34px; overflow: hidden; }
.price-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.product-price { font-size: 17px; font-weight: 700; color: var(--ink); }
.product-mrp { font-size: 13px; color: var(--muted); text-decoration: line-through; }
.discount-badge { font-size: 12px; color: #388e3c; font-weight: 700; }
.stock-badge { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 10px; margin-bottom: 6px; width: fit-content; }
.stock-badge.in { background: #e8f5e9; color: #2e7d32; }
.stock-badge.out { background: #fdecea; color: #c62828; }
.link-view { font-size: 12.5px; color: var(--link-blue); font-weight: 600; margin: 6px 0; }
.btn-cart {
  background: var(--orange); color: #fff; border: none; border-radius: 4px; padding: 9px 10px;
  font-size: 13px; font-weight: 700; cursor: pointer; width: 100%; margin-top: auto;
}
.btn-cart:hover { background: var(--orange-dark); }
.btn-cart:disabled { background: #d5d5d5; color: #888; cursor: not-allowed; }

.category-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.category-bar a { padding: 7px 16px; border-radius: 20px; border: 1px solid var(--border); background: #fff; font-size: 13px; font-weight: 600; color: var(--muted); }
.category-bar a.active, .category-bar a:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---- Cart / checkout ---- */
.cart-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; }
.cart-table th, .cart-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
.cart-table input[type=number] { width: 60px; padding: 5px; border-radius: 4px; border: 1px solid var(--border); }
.cart-total-row td { font-weight: 800; font-size: 16px; }

.checkout-form { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; max-width: 640px; margin: 0 auto; }
.checkout-form label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; margin-top: 14px; }
.checkout-form input, .checkout-form textarea, .checkout-form select { width: 100%; padding: 10px; border-radius: 4px; border: 1px solid var(--border); font-size: 14px; box-sizing: border-box; }
.pay-option { border: 1px solid var(--border); border-radius: 6px; padding: 12px; margin-top: 8px; cursor: pointer; }
.pay-option.selected { border-color: var(--orange); background: #fff8ee; }
.pay-option img.qr { width: 130px; margin-top: 10px; }

.auth-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; max-width: 400px; margin: 30px auto; }
.auth-box h1 { font-size: 20px; margin-top: 0; }
.auth-box label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 5px; }
.auth-box input { width: 100%; padding: 10px; border-radius: 4px; border: 1px solid var(--border); box-sizing: border-box; }
.auth-box button { width: 100%; margin-top: 18px; background: var(--orange); color: #fff; border: none; padding: 11px; border-radius: 4px; font-weight: 700; cursor: pointer; }
.auth-box .switch-link { text-align: center; margin-top: 14px; font-size: 13px; color: var(--muted); }
.auth-box .switch-link a { color: var(--link-blue); font-weight: 600; }
.form-err { background: #fdecea; color: #c62828; padding: 8px 12px; border-radius: 4px; margin-bottom: 12px; font-size: 13px; }
.form-ok { background: #e8f5e9; color: #2e7d32; padding: 8px 12px; border-radius: 4px; margin-bottom: 12px; font-size: 13px; }

.contact-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 36px; text-align: center; max-width: 560px; margin: 0 auto; }
.whatsapp-btn { display: inline-flex; align-items: center; gap: 10px; background: #25D366; color: #fff; padding: 13px 26px; border-radius: 4px; font-weight: 700; font-size: 15px; margin-top: 16px; }

/* ---- Order history ---- */
.order-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.order-card .badge { font-size: 11px; padding: 3px 10px; border-radius: 12px; font-weight: 700; }
.badge.new, .badge.processing { background: #fff3e0; color: #e65100; }
.badge.shipped { background: #e3f2fd; color: #1565c0; }
.badge.delivered { background: #e8f5e9; color: #2e7d32; }
.badge.cancelled { background: #fdecea; color: #c62828; }

/* ---- Footer ---- */
.site-footer { background: var(--navy); color: #cfd3d8; padding: 34px 0 20px; margin-top: 30px; }
.site-footer .container { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.site-footer a.whatsapp-footer { font-weight: 700; color: #fff; }
.site-footer .copyright { font-size: 12px; color: #8a9099; }
