/* ============================================================
   EarnKart.shop — JustDial-Style Mobile-First Stylesheet
   ============================================================ */
:root {
  /* JustDial-inspired palette */
  --primary: #FF6B00;          /* JD orange */
  --primary-dark: #E55A00;
  --primary-light: #FFF3EC;
  --accent: #FFA500;
  --secondary: #1A1A2E;
  --success: #00A651;
  --danger: #E53E3E;
  --warning: #F6AD55;

  --bg: #F5F5F5;
  --card-bg: #FFFFFF;
  --text: #1A1A1A;
  --text-muted: #888888;
  --text-tiny: #AAAAAA;
  --border: #E8E8E8;
  --border-light: #F0F0F0;

  --radius: 10px;
  --radius-sm: 6px;
  --radius-pill: 20px;
  --shadow: 0 1px 4px rgba(0,0,0,0.08);
  --shadow-card: 0 1px 4px rgba(0,0,0,0.08);
  --shadow-modal: 0 8px 32px rgba(0,0,0,0.18);
  --bottom-nav-height: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  background: var(--bg); color: var(--text);
  font-size: 14px; line-height: 1.45;
  padding-bottom: var(--bottom-nav-height);
  max-width: 480px; margin: 0 auto;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

/* ===== SEARCH BAR ===== */
.search-bar {
  position: sticky; top: 0; z-index: 100;
  background: var(--primary); padding: 12px 14px 14px;
  display: flex; align-items: center; gap: 8px;
}
.search-input-wrap {
  flex: 1; background: white; border-radius: var(--radius-sm);
  padding: 8px 12px; display: flex; align-items: center; gap: 8px;
}
.search-input-wrap input {
  flex: 1; border: 0; outline: none; font-size: 13px;
  background: transparent;
}
.search-icon { color: var(--text-muted); font-size: 16px; }
.search-bar .nav-link {
  color: white; font-size: 12px; display: flex; flex-direction: column;
  align-items: center; gap: 2px;
}

/* ===== STORE BANNER (referral branding) ===== */
.store-banner {
  background: var(--primary-light); color: var(--primary-dark);
  padding: 10px 14px; display: flex; justify-content: space-between;
  align-items: center; font-size: 12px;
  border-bottom: 1px solid var(--primary-light);
}
.store-banner b { font-weight: 700; font-size: 13px; }
.store-banner .powered { font-size: 11px; opacity: 0.7; }

/* ===== CATEGORY PILLS ===== */
.category-pills {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 12px 14px; background: white;
  border-bottom: 1px solid var(--border);
  scrollbar-width: none; -ms-overflow-style: none;
}
.category-pills::-webkit-scrollbar { display: none; }
.category-pill {
  white-space: nowrap; padding: 6px 14px;
  border-radius: 20px; font-size: 12px; font-weight: 500;
  border: 1.5px solid var(--border); background: white;
  cursor: pointer; transition: all 0.15s;
  display: inline-flex; align-items: center; gap: 4px;
}
.category-pill.active {
  background: var(--primary); color: white; border-color: var(--primary);
}

/* ===== SECTION ===== */
.section { background: white; margin-bottom: 8px; padding: 8px 0 14px; }
.section-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 14px 8px;
}
.section-title { font-size: 16px; font-weight: 700; }
.see-all { color: var(--primary); font-size: 12px; font-weight: 600; }

/* ===== PRODUCT HORIZONTAL SCROLL ===== */
.product-scroll {
  display: flex; gap: 10px; overflow-x: auto;
  padding: 4px 14px 8px; scrollbar-width: none;
}
.product-scroll::-webkit-scrollbar { display: none; }

/* ===== PRODUCT CARD ===== */
.product-card {
  min-width: 140px; max-width: 140px;
  background: white; border-radius: var(--radius);
  overflow: hidden; flex-shrink: 0;
  border: 1px solid var(--border);
}
.product-card.flex {
  min-width: auto; max-width: none; width: 100%;
}
.product-img-wrap {
  position: relative; height: 120px;
  background: #F9FAFB;
  display: flex; align-items: center; justify-content: center;
}
.pimg { width: 100%; height: 100%; object-fit: cover; }
.pimg-emoji { font-size: 56px; }
.pimg-lg { font-size: 96px; }
.badge-bestseller {
  position: absolute; top: 6px; left: 6px;
  background: #1A1A1A; color: white;
  font-size: 9px; font-weight: 700;
  padding: 3px 7px; border-radius: 4px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-discount {
  position: absolute; top: 6px; right: 6px;
  background: var(--primary); color: white;
  font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 4px;
}
.add-btn {
  position: absolute; bottom: 8px; right: 8px;
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  background: white; color: var(--primary);
  border: 1.5px solid var(--primary); font-size: 22px;
  font-weight: 700; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  text-decoration: none; line-height: 1;
}
.add-btn:hover { background: var(--primary); color: white; }
.add-btn.added { background: var(--primary); color: white; }
.product-info { padding: 8px 10px 12px; }
.product-weight {
  font-size: 11px; color: var(--text-muted); margin-bottom: 3px;
  background: white; border: 1px solid var(--border); border-radius: 4px;
  padding: 1px 5px; display: inline-block;
}
.product-name {
  font-size: 12px; font-weight: 500; line-height: 1.3;
  margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  min-height: 30px;
}
.product-pricing { display: flex; align-items: center; gap: 6px; }
.product-pricing .price { font-size: 14px; font-weight: 700; }
.product-pricing .mrp {
  font-size: 11px; color: var(--text-muted);
  text-decoration: line-through;
}
.earn-tag {
  font-size: 9px; background: var(--primary-light);
  color: var(--primary-dark); padding: 2px 6px;
  border-radius: 4px; margin-top: 4px; display: inline-block;
  font-weight: 600;
}

/* ===== CATEGORY GRID ===== */
.cat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 6px; padding: 10px 14px;
}
.cat-tile {
  background: #EAF4FE; border-radius: var(--radius);
  padding: 12px 6px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.cat-tile .cat-emoji { font-size: 36px; }
.cat-tile .cat-name {
  font-size: 11px; font-weight: 500; color: var(--text);
  line-height: 1.2;
}

/* ===== HERO BANNER ===== */
.hero-banner {
  background: linear-gradient(135deg, #CEE7FA 0%, #DDEDF9 100%);
  margin: 8px 14px; padding: 14px;
  border-radius: var(--radius);
  display: flex; justify-content: space-between; align-items: center;
}
.hero-banner h2 {
  font-size: 18px; font-weight: 800;
  color: #0F4F7A; margin-bottom: 4px;
}
.hero-banner p { font-size: 12px; color: #3A6F94; }
.hero-banner .hero-img { font-size: 64px; }

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  height: var(--bottom-nav-height);
  background: white; border-top: 1px solid var(--border);
  display: flex; z-index: 1000;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
}
.nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-size: 10px; color: var(--text-muted); gap: 2px;
  position: relative;
}
.nav-item.active { color: var(--primary); font-weight: 600; }
.nav-icon { font-size: 22px; line-height: 1; }
.cart-count {
  position: absolute; top: 6px; right: calc(50% - 22px);
  background: var(--primary); color: white;
  font-size: 10px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 9px;
  padding: 0 5px;
  display: flex; align-items: center; justify-content: center;
}

/* ===== FORMS / LOGIN ===== */
.auth-page {
  padding: 30px 20px; min-height: calc(100vh - var(--bottom-nav-height));
}
.auth-card {
  background: white; padding: 24px 20px;
  border-radius: var(--radius); box-shadow: var(--shadow);
  max-width: 400px; margin: 0 auto;
}
.auth-card h1 {
  font-size: 22px; font-weight: 700; margin-bottom: 6px;
  color: var(--primary);
}
.auth-card .sub { color: var(--text-muted); margin-bottom: 18px; font-size: 13px; }
.auth-card label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text); margin-top: 14px; margin-bottom: 6px;
}
.auth-card input, .auth-card select, .auth-card textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px;
}
.auth-card input:focus, .auth-card select:focus, .auth-card textarea:focus {
  outline: none; border-color: var(--primary);
}
.btn {
  display: inline-block; padding: 12px 18px;
  border-radius: var(--radius-sm); border: 0;
  font-size: 14px; font-weight: 600; cursor: pointer;
  text-align: center; text-decoration: none;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: white; color: var(--text); border: 1.5px solid var(--border); }
.btn-danger { background: white; color: #B91C1C; border: 1.5px solid #FCA5A5; }
.btn-block { width: 100%; }

.flash {
  padding: 10px 14px; border-radius: var(--radius-sm);
  margin: 14px; font-size: 13px;
}
.flash.ok { background: #DCFCE7; color: #166534; border-left: 4px solid #16A34A; }
.flash.error { background: #FEE2E2; color: #991B1B; border-left: 4px solid #DC2626; }

.tip-box {
  background: #FEF3C7; color: #92400E; font-size: 11px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  margin-top: 14px; line-height: 1.6;
}

/* ===== CART ===== */
.cart-page { padding: 14px; }
.cart-page h1 { font-size: 20px; margin-bottom: 12px; padding: 0 4px; }
.cart-line {
  display: flex; gap: 12px; padding: 12px;
  background: white; border-radius: var(--radius);
  margin-bottom: 8px; align-items: center;
}
.cart-line .pimg-emoji { font-size: 36px; width: 50px; text-align: center; }
.cart-line .pimg { width: 50px; height: 50px; object-fit: cover; border-radius: 6px; }
.cart-line .info { flex: 1; }
.cart-line .info h4 { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.cart-line .info .meta { font-size: 11px; color: var(--text-muted); }
.cart-line .price { font-weight: 700; color: var(--primary); }
.qty-ctrl {
  display: flex; align-items: center; gap: 4px;
  background: var(--primary); border-radius: 6px;
  padding: 2px;
}
.qty-ctrl button {
  width: 26px; height: 26px; border: 0; background: transparent;
  color: white; font-size: 16px; font-weight: 700;
}
.qty-ctrl .qty-num { color: white; min-width: 18px; text-align: center; font-weight: 600; font-size: 13px; }

.cart-total-box {
  background: white; border-radius: var(--radius);
  padding: 14px; margin-top: 10px;
}
.total-line {
  display: flex; justify-content: space-between;
  padding: 6px 0; font-size: 13px;
}
.total-line.grand {
  font-size: 16px; font-weight: 700;
  border-top: 1px solid var(--border); padding-top: 10px; margin-top: 4px;
}
.total-line.grand b { color: var(--primary); font-size: 18px; }

.wallet-apply-box {
  background: var(--primary-light); border-radius: var(--radius);
  padding: 12px 14px; margin-top: 10px;
  border: 1px solid var(--primary);
}
.wallet-apply-box .wallet-balance {
  font-size: 13px; color: var(--primary-dark); margin-bottom: 6px;
}
.wallet-apply-box label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.wallet-apply-box input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); }

/* ===== DASHBOARD ===== */
.dash {
  padding: 14px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary) 110px, var(--bg) 110px);
  min-height: calc(100vh - var(--bottom-nav-height));
}
.dash-header { color: white; margin-bottom: 14px; }
.dash-header h2 { font-size: 18px; font-weight: 700; }
.dash-header .sub { font-size: 13px; opacity: 0.9; }

.wallet-card {
  background: white; border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow); margin-bottom: 10px;
}
.wallet-card .label { font-size: 12px; color: var(--text-muted); }
.wallet-card .amt {
  font-size: 28px; font-weight: 800; color: var(--primary);
  margin: 4px 0 10px;
}
.wallet-card .actions { display: flex; gap: 6px; }
.wallet-card .actions .btn { flex: 1; padding: 9px; font-size: 12px; }

.tab-bar {
  display: flex; background: white; border-radius: var(--radius);
  padding: 4px; margin-bottom: 12px;
}
.tab-bar a {
  flex: 1; padding: 9px 4px; text-align: center;
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  border-radius: 8px;
}
.tab-bar a.active { background: var(--primary); color: white; }

.stat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 6px; margin-bottom: 10px;
}
.stat-card {
  background: white; border-radius: var(--radius);
  padding: 10px 8px; text-align: center;
  border: 1px solid var(--border);
}
.stat-card .stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.stat-card .stat-value { font-size: 18px; font-weight: 700; margin-top: 4px; }
.stat-card .stat-sub { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.stat-card.l1 .stat-value { color: var(--primary); }
.stat-card.l2 .stat-value { color: #1D4ED8; }
.stat-card.l3 .stat-value { color: #D97706; }

.panel {
  background: white; border-radius: var(--radius);
  padding: 14px; margin-bottom: 10px;
}
.panel h3 {
  font-size: 14px; font-weight: 700; margin-bottom: 10px;
  display: flex; justify-content: space-between; align-items: center;
}

.referral-box {
  background: linear-gradient(135deg, var(--primary), #15A832);
  color: white; border-radius: var(--radius);
  padding: 16px; margin-bottom: 10px;
}
.referral-box h3 { font-size: 14px; margin-bottom: 4px; opacity: 0.9; }
.referral-box .code {
  font-size: 24px; font-weight: 800; letter-spacing: 2px;
  background: rgba(255,255,255,0.2); border-radius: var(--radius-sm);
  padding: 10px; text-align: center; margin: 10px 0;
  font-family: 'SF Mono', 'Menlo', monospace;
}
.referral-box .share-row { display: flex; gap: 6px; }
.referral-box .share-row button {
  flex: 1; padding: 9px; border-radius: 8px;
  background: white; color: var(--primary); border: 0;
  font-size: 12px; font-weight: 700;
}
.referral-box .store-info {
  font-size: 11px; opacity: 0.85; margin-top: 10px;
  background: rgba(0,0,0,0.15); padding: 6px 10px; border-radius: 6px;
}

.tree-level {
  background: #F9FAFB; border-radius: var(--radius-sm);
  padding: 10px; margin-bottom: 8px;
}
.tree-level h4 { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.tree-member {
  display: inline-block; background: white; padding: 5px 10px;
  border-radius: 14px; border: 1px solid var(--border);
  margin: 3px 3px 0 0; font-size: 11px; font-weight: 500;
}
.tree-member small { color: var(--text-muted); }

.txn-row {
  display: flex; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.txn-row:last-child { border: 0; }
.txn-row .desc { flex: 1; }
.txn-row .desc small { color: var(--text-muted); display: block; margin-top: 2px; }
.txn-row .amt { font-weight: 700; color: var(--primary); }

/* ===== ORDER TRACKING ===== */
.track-page { padding: 14px; }
.track-page h1 { font-size: 18px; margin-bottom: 4px; }
.track-page .est-time {
  color: var(--primary); font-weight: 600; font-size: 13px; margin-bottom: 14px;
}
.tracking-steps { padding: 0 14px; }
.step {
  display: flex; gap: 14px; padding: 10px 0;
  position: relative;
}
.step::before {
  content: ''; position: absolute; left: 19px; top: 36px;
  bottom: -10px; width: 2px; background: var(--border);
}
.step:last-child::before { display: none; }
.step.completed::before { background: var(--primary); }
.step-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; z-index: 1; flex-shrink: 0;
}
.step.completed .step-icon { background: var(--primary); }
.step.active .step-icon {
  background: var(--primary); animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(12,131,31,0.2); }
}
.step-info { padding-top: 6px; }
.step-info .step-label { font-size: 13px; font-weight: 600; }
.step-info .step-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ===== PRODUCT DETAIL ===== */
.pdp-page { padding: 14px; }
.pdp-img-wrap {
  background: white; border-radius: var(--radius);
  padding: 30px; text-align: center; margin-bottom: 14px;
  position: relative;
}
.pdp-img-wrap .pimg-lg { width: 200px; height: 200px; object-fit: contain; margin: 0 auto; }
.pdp-info { background: white; border-radius: var(--radius); padding: 16px; }
.pdp-info h1 { font-size: 18px; margin-bottom: 6px; }
.pdp-info .pdp-weight {
  display: inline-block; background: #F3F4F6;
  padding: 3px 8px; border-radius: 4px; font-size: 11px;
  color: var(--text-muted); margin-bottom: 10px;
}
.pdp-pricing { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.pdp-pricing .price { font-size: 24px; font-weight: 800; color: var(--primary); }
.pdp-pricing .mrp { color: var(--text-muted); text-decoration: line-through; }
.pdp-pricing .disc { background: var(--primary); color: white; padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.pdp-earn {
  background: var(--primary-light); color: var(--primary-dark);
  padding: 10px; border-radius: var(--radius-sm); margin: 10px 0;
  font-size: 12px;
}
.pdp-actions { display: flex; gap: 8px; margin-top: 14px; }

/* ===== TABLES ===== */
table.t {
  width: 100%; background: white; border-collapse: collapse;
  border-radius: var(--radius); overflow: hidden; font-size: 12px;
}
table.t th, table.t td {
  padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border);
}
table.t th { background: #F9FAFB; font-weight: 600; color: var(--text-muted); font-size: 10px; text-transform: uppercase; }
table.t tr:last-child td { border: 0; }

.badge {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 10px; font-weight: 600;
}
.badge-pending { background: #FEF3C7; color: #92400E; }
.badge-paid, .badge-approved { background: var(--primary-light); color: var(--primary-dark); }
.badge-delivered { background: var(--primary-light); color: var(--primary-dark); }
.badge-cancelled, .badge-rejected { background: #FEE2E2; color: #991B1B; }
.badge-active { background: var(--primary-light); color: var(--primary-dark); }
.badge-blocked { background: #FEE2E2; color: #991B1B; }

/* ===== ADMIN STYLES ===== */
.admin-body {
  background: #F3F4F6; max-width: 100%; padding-bottom: 0;
}
.admin-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px; background: #1F2937; color: white;
  padding: 18px 0; flex-shrink: 0;
}
.sidebar .brand {
  padding: 4px 18px 14px; border-bottom: 1px solid #374151;
  margin-bottom: 10px; font-size: 16px; font-weight: 700;
}
.sidebar a {
  display: block; color: #D1D5DB; padding: 10px 18px;
  font-size: 13px; transition: 0.15s;
}
.sidebar a:hover { background: #374151; color: white; }
.sidebar a.active { background: var(--primary); color: white; }
.admin-main { flex: 1; padding: 20px; overflow: auto; }
.admin-main h1 { font-size: 22px; margin-bottom: 16px; }
.admin-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px; margin-bottom: 20px;
}
.adm-stat {
  background: white; border-radius: var(--radius); padding: 14px;
  border-left: 4px solid var(--primary);
}
.adm-stat .l { font-size: 11px; color: var(--text-muted); text-transform: uppercase; }
.adm-stat .v { font-size: 22px; font-weight: 700; margin-top: 4px; }
.adm-stat.warn { border-left-color: #F59E0B; }
.adm-stat.danger { border-left-color: #EF4444; }
.adm-stat.info { border-left-color: #3B82F6; }

.export-btns { display: flex; gap: 6px; margin-bottom: 12px; }
.export-btns .btn { padding: 6px 12px; font-size: 12px; }

@media (max-width: 700px) {
  .sidebar {
    width: 100%; padding: 8px;
    display: flex; flex-wrap: wrap; overflow-x: auto;
  }
  .sidebar .brand { width: 100%; border: 0; padding: 8px; margin: 0; }
  .sidebar a { padding: 6px 12px; font-size: 11px; }
  .admin-shell { flex-direction: column; }
  .admin-main { padding: 12px; }
  body.admin-body { padding-bottom: 0; }
}

/* MLM TREE viz */
.tree-viz {
  background: white; border-radius: var(--radius); padding: 20px;
  overflow-x: auto;
}
.tree-node {
  display: inline-block; background: #F9FAFB;
  border: 2px solid var(--border); padding: 8px 12px;
  border-radius: var(--radius-sm); font-size: 12px;
  margin: 4px; min-width: 120px; cursor: pointer;
  transition: 0.2s;
}
.tree-node:hover { border-color: var(--primary); transform: translateY(-2px); }
.tree-node.lvl-0 { border-color: #1F2937; background: #1F2937; color: white; }
.tree-node.lvl-1 { border-color: var(--primary); background: var(--primary-light); }
.tree-node.lvl-2 { border-color: #3B82F6; background: #DBEAFE; }
.tree-node.lvl-3 { border-color: #F59E0B; background: #FEF3C7; }
.tree-node.lvl-4 { border-color: #7C3AED; background: #EDE9FE; }
.tree-node.lvl-5 { border-color: #DB2777; background: #FCE7F3; }
.tree-node .nm { font-weight: 700; font-size: 13px; }
.tree-node .cd { font-family: monospace; font-size: 10px; opacity: 0.8; }
.tree-node .met { font-size: 10px; margin-top: 4px; }

.tree-row { display: flex; flex-wrap: wrap; gap: 8px; margin-left: 30px; margin-top: 8px; padding-left: 16px; border-left: 2px dashed var(--border); }

@media print {
  .sidebar, .bottom-nav, .search-bar, .store-banner,
  .btn, .export-btns, .add-btn, .qty-ctrl { display: none !important; }
  body { background: white; padding: 0; max-width: 100%; }
  .admin-main { padding: 0; }
  table.t { font-size: 10px; }
}

/* ============================================================
   JustDial-style additions
   ============================================================ */

/* Table polish */
table.t th {
  background: #F9FAFB;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #E8E8E8;
}
table.t tr:hover td { background: #FFFAF5; }

/* Sidebar hover/active in orange */
.sidebar a:hover { background: rgba(255,107,0,0.15); color: white; }
.sidebar a.active { background: var(--primary); color: white; }

/* Role badge buttons */
button.role-badge {
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border-width: 1.5px;
  border-style: solid;
}

/* Bottom nav active color matches orange */
.nav-item.active { color: var(--primary); }

/* Stat card values */
.adm-stat .v { color: var(--text); }

/* Tab bar inside admin */
.tab-bar a.active { background: var(--primary); color: white; }

/* Compact admin nav (.admin-nav) — not currently used but available */
.admin-nav a { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 13px; border-radius: 8px; color: #374151; text-decoration: none; }
.admin-nav a:hover, .admin-nav a.active { background: var(--primary-light); color: var(--primary); }

/* Load bar component for staff load panel */
.load-bar { background: #F3F4F6; height: 6px; border-radius: 3px; overflow: hidden; }
.load-bar > div { height: 100%; transition: width 0.3s; }

/* ============================================================
   ADMIN UI POLISH (v7)
   ============================================================ */
.admin-body {
  background: #F7F8FA;
  font-feature-settings: "tnum";
}
.admin-main h1 {
  font-size: 24px; font-weight: 700; color: #111827;
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 14px; border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.sidebar {
  background: linear-gradient(180deg, #1F2937 0%, #111827 100%);
  border-right: 1px solid #0F172A;
  width: 230px;
}
.sidebar .brand {
  background: rgba(255,255,255,0.04);
  font-size: 18px; letter-spacing: 0.3px;
  padding: 16px 18px;
}
.sidebar a {
  margin: 2px 8px; padding: 9px 12px;
  border-radius: 8px; font-size: 13px;
  display: flex; align-items: center;
  transition: all 0.15s;
}
.sidebar a:hover { background: rgba(255,255,255,0.08); color: white; transform: translateX(2px); }
.sidebar a.active {
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  color: white; box-shadow: 0 4px 12px rgba(255,107,0,0.3);
}

.admin-grid {
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.adm-stat {
  padding: 18px 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  border-left-width: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: transform 0.15s, box-shadow 0.15s;
}
.adm-stat:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.adm-stat .l { font-size: 10px; color: #6B7280; }
.adm-stat .v { font-size: 24px; font-weight: 800; color: #111827; }

.panel {
  background: white; border-radius: 12px; padding: 18px;
  border: 1px solid var(--border); margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.panel h3 {
  font-size: 15px; color: #111827; font-weight: 700;
  padding-bottom: 12px; margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}

table.t { font-size: 13px; }
table.t th {
  padding: 10px 12px; background: #F9FAFB;
  color: #6B7280; font-size: 10px; font-weight: 700;
}
table.t td {
  padding: 12px; border-bottom: 1px solid #F3F4F6;
}
table.t tr:hover td { background: #FFFAF5; }

.btn { transition: all 0.15s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.btn-primary:hover { box-shadow: 0 4px 12px rgba(255,107,0,0.4); }
.btn-danger:hover { box-shadow: 0 4px 12px rgba(229,62,62,0.3); }

.tab-bar {
  background: white; border-radius: 12px; padding: 6px;
  border: 1px solid var(--border); margin-bottom: 14px;
  display: flex; gap: 4px;
}
.tab-bar a {
  padding: 10px 16px; border-radius: 8px;
  font-weight: 600; font-size: 13px;
  color: var(--text-muted); transition: 0.15s;
  flex: 0 0 auto;
}
.tab-bar a.active {
  background: var(--primary); color: white;
  box-shadow: 0 2px 6px rgba(255,107,0,0.3);
}

.export-btns { gap: 8px; margin-bottom: 16px; align-items: center; }
.export-btns .btn { padding: 7px 14px; font-size: 12px; font-weight: 600; }

.flash {
  border-radius: 10px; padding: 12px 16px;
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 500; margin: 14px 0;
}
.flash.ok { background: linear-gradient(90deg, #DCFCE7, #BBF7D0); color: #14532D; border-left: 4px solid var(--success); }
.flash.error { background: linear-gradient(90deg, #FEE2E2, #FECACA); color: #7F1D1D; border-left: 4px solid var(--danger); }

.badge {
  padding: 3px 10px; border-radius: 12px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.3px;
}

@media (min-width: 768px) {
  body.admin-body { max-width: 100%; padding-bottom: 0; }
  .admin-main { padding: 24px; }
}

/* User-facing polish */
.cart-line { transition: 0.15s; }
.cart-line:active { transform: scale(0.99); }

.order-status-ribbon {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 12px;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px;
}
.order-status-ribbon.cancelled { background: #FEE2E2; color: #991B1B; }
.order-status-ribbon.returned { background: #DBEAFE; color: #1E40AF; }
.order-status-ribbon.delivered { background: #DCFCE7; color: #166534; }
.order-status-ribbon.pending, .order-status-ribbon.packing, .order-status-ribbon.packed { background: #FEF3C7; color: #92400E; }
.order-status-ribbon.dispatched, .order-status-ribbon.out_for_delivery { background: #FFF3EC; color: var(--primary-dark); }

/* Cancel/return buttons on user orders page */
.order-actions {
  display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap;
}
.order-actions .btn-mini {
  padding: 5px 10px; font-size: 11px; border-radius: 6px;
  border: 1px solid var(--border); background: white;
  font-weight: 600; cursor: pointer;
}
.order-actions .btn-mini.danger { color: var(--danger); border-color: #FCA5A5; }
.order-actions .btn-mini:hover { background: var(--primary-light); }

/* Modal generic */
.modal-bg {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  z-index: 9999; display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal-box {
  background: white; border-radius: 16px; padding: 24px;
  width: 380px; max-width: 100%;
  box-shadow: 0 24px 60px rgba(0,0,0,0.25);
}

/* ============================================================
   PREMIUM POLISH v8 (real images, soft gradients)
   ============================================================ */

/* Smooth image loading */
.pimg, img[loading="lazy"] {
  animation: fadeIn 0.3s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Product cards — premium feel */
.product-card {
  border: 1px solid var(--border-light);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: transform 0.18s, box-shadow 0.18s;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.product-img-wrap {
  background: linear-gradient(135deg, #FAFAFA 0%, #F3F4F6 100%);
  overflow: hidden;
}

/* Search bar — premium gradient */
.search-bar {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  box-shadow: 0 2px 8px rgba(255,107,0,0.2);
}

/* Bottom nav — subtle glow */
.bottom-nav {
  box-shadow: 0 -4px 16px rgba(0,0,0,0.06);
}

/* Store banner gradient */
.store-banner {
  background: linear-gradient(135deg, var(--primary-light) 0%, #FFF8F0 100%);
}

/* Hero banner — premium glass effect */
.hero-banner {
  background: linear-gradient(135deg, #FFE5D0 0%, #FFD0A8 100%);
  box-shadow: 0 4px 12px rgba(255,107,0,0.12);
  border: 1px solid rgba(255,107,0,0.1);
}
.hero-banner h2 { color: #B45309; }
.hero-banner p { color: #92400E; }

/* Wallet card — premium gradient */
.wallet-card {
  background: linear-gradient(135deg, var(--primary) 0%, #FFA500 100%);
  color: white;
  box-shadow: 0 8px 24px rgba(255,107,0,0.25);
}
.wallet-card .label { opacity: 0.9; color: white; }
.wallet-card .amt { color: white; }

/* Referral box — premium */
.referral-box {
  background: linear-gradient(135deg, var(--primary), #FFA500);
  box-shadow: 0 8px 24px rgba(255,107,0,0.25);
}

/* Category pill — premium */
.category-pill {
  background: white;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  font-weight: 600;
}
.category-pill.active {
  box-shadow: 0 4px 10px rgba(255,107,0,0.3);
}

/* Category tiles in grid */
.cat-tile {
  background: linear-gradient(135deg, #EAF4FE 0%, #DDEDF9 100%);
  transition: transform 0.15s;
}
.cat-tile:active { transform: scale(0.96); }

/* Big touch-friendly buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  box-shadow: 0 4px 12px rgba(255,107,0,0.25);
  font-weight: 700;
  letter-spacing: 0.3px;
}
.btn-primary:hover { box-shadow: 0 6px 16px rgba(255,107,0,0.4); }

/* Panel — premium */
.panel {
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  border: 1px solid var(--border-light);
}

/* Cart line item — premium */
.cart-line {
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  border: 1px solid var(--border-light);
}

/* Form inputs — premium */
input[type="text"], input[type="number"], input[type="tel"], input[type="email"], input[type="password"], input[type="url"], textarea, select {
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(255,107,0,0.1);
}

/* Address card radio glow */
.addr-radio { transition: all 0.15s; }
.addr-radio:hover { transform: translateY(-1px); }

/* ============================================================
   v9: PREMIUM EMOJI CARDS (Instamart-look even without real photos)
   ============================================================ */

/* Emoji-as-image — premium gradient backgrounds per category feel */
.pimg-emoji {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #FFFFFF 0%, #F8F4EE 60%, #FFF1E0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  border-radius: 12px;
  box-shadow: inset 0 -8px 16px rgba(255,107,0,0.05);
  position: relative;
  overflow: hidden;
}
.pimg-emoji::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.6) 0%, transparent 50%);
  pointer-events: none;
}
.pimg-emoji.pimg-lg { font-size: 96px; }

/* Real image: clean white background, subtle shadow */
img.pimg, img.pimg-lg {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  background: white;
  display: block;
}

/* Product cards — bigger, more premium */
.product-card {
  background: white;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #F0F0F0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: transform 0.18s, box-shadow 0.18s;
}
.product-card:active { transform: scale(0.98); }
.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

/* Product image wrapper */
.product-img-wrap {
  position: relative;
  padding: 8px;
  background: linear-gradient(180deg, #FAFBFC 0%, #F5F5F5 100%);
}

/* Add button — Instamart pill */
.add-btn {
  position: absolute;
  bottom: 8px; right: 8px;
  background: white;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: 8px;
  padding: 6px 16px;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: 0.15s;
}
.add-btn:hover { background: var(--primary); color: white; }

/* Bestseller / discount badges (top-left/right) */
.badge-bestseller,
.badge-discount {
  position: absolute;
  top: 8px;
  font-size: 9px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.badge-bestseller {
  left: 8px;
  background: linear-gradient(135deg, #1E40AF, #2563EB);
  color: white;
}
.badge-discount {
  right: 8px;
  background: linear-gradient(135deg, #DC2626, #EF4444);
  color: white;
}

/* Product info */
.product-info { padding: 8px 12px 12px; }
.product-weight {
  display: inline-block;
  font-size: 9px;
  background: #F3F4F6;
  color: #6B7280;
  padding: 2px 6px;
  border-radius: 3px;
  margin-bottom: 4px;
  font-weight: 600;
}
.product-name {
  font-size: 12px;
  font-weight: 600;
  color: #1F2937;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
  min-height: 31px;
}
.product-pricing { display: flex; align-items: baseline; gap: 6px; }
.product-pricing .price {
  font-size: 14px;
  font-weight: 800;
  color: #111827;
}
.product-pricing .mrp {
  font-size: 11px;
  color: #9CA3AF;
  text-decoration: line-through;
}

/* Earn pill — green, prominent */
.earn-pill {
  display: inline-block;
  background: linear-gradient(135deg, #DCFCE7, #BBF7D0);
  color: #14532D;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 4px;
}

/* ============================================================
   v10 — BANNERS + PREMIUM UI
   ============================================================ */

/* Carousel */
/* ===== BANNER CAROUSEL (mobile-fixed) ===== */
.banner-carousel {
  margin: 12px 0 16px;
  position: relative;
  padding: 0 14px;
}
.banner-track {
  display: flex;
  flex-wrap: nowrap;          /* prevent vertical stacking */
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  border-radius: 14px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 0;
}
.banner-track::-webkit-scrollbar { display: none; }
.banner-slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;            /* iOS Safari fix */
  scroll-snap-align: center;
  display: block;             /* image fills */
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 1;        /* 1200×400 ratio */
  background: #F3F4F6;
}
.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;          /* fill banner, no distortion */
  display: block;
}
.banner-slide .banner-text {
  position: absolute;
  left: 16px;
  bottom: 16px;
  right: 16px;
  z-index: 2;
  color: white;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
  pointer-events: none;
}
.banner-slide h3 {
  font-size: 18px; font-weight: 800;
  line-height: 1.15;
  margin-bottom: 2px;
  color: white;
}
.banner-slide p {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.95);
}
.banner-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
}
.banner-dots {
  display: flex; justify-content: center;
  gap: 5px; margin-top: 10px;
}
.banner-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #D1D5DB;
  transition: all 0.3s;
  cursor: pointer;
}
.banner-dot.active {
  background: var(--primary);
  width: 18px;
  border-radius: 3px;
}

/* Banner slot (between sections) — 2:1 wide rectangle */
.banner-slot {
  display: block;
  position: relative;
  margin: 14px;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  aspect-ratio: 2 / 1;        /* 600×300 ratio */
  background: #F3F4F6;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: transform 0.18s, box-shadow 0.18s;
}
.banner-slot:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}
.banner-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.banner-slot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 55%);
  pointer-events: none;
}
.banner-slot .banner-slot-text {
  position: absolute;
  left: 14px;
  bottom: 12px;
  right: 14px;
  color: white;
  text-shadow: 0 2px 6px rgba(0,0,0,0.5);
  z-index: 2;
}
.banner-slot h4 {
  font-size: 15px; font-weight: 800;
  line-height: 1.2;
  margin-bottom: 2px;
  color: white;
}
.banner-slot p {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.95);
}

/* Premium category tile redesign */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 0 14px;
}
.cat-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 6px;
  background: linear-gradient(135deg, #FFFFFF 0%, #F9FAFB 100%);
  border-radius: 14px;
  text-decoration: none;
  color: #1F2937;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  border: 1px solid #F3F4F6;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.cat-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.06);
  border-color: var(--primary);
}
.cat-tile .cat-emoji {
  font-size: 32px;
  margin-bottom: 6px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.08));
}
.cat-tile .cat-name {
  font-size: 11px;
  line-height: 1.2;
}

/* Cart total box — premium */
.cart-total-box {
  background: white;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  margin: 8px 0;
}
.cart-total-box .total-line {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  color: #4B5563;
}
.cart-total-box .total-line.grand {
  border-top: 1px dashed #E5E7EB;
  margin-top: 4px;
  padding-top: 10px;
  font-size: 15px;
  color: #111827;
  font-weight: 700;
}
.cart-total-box .total-line.grand b {
  font-size: 18px;
  color: var(--primary);
  font-weight: 800;
}

/* Section header — premium */
.section { margin: 18px 0; }
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 14px;
  margin-bottom: 10px;
}
.section-title {
  font-size: 16px;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.3px;
}
.see-all {
  font-size: 11px;
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

@media (min-width: 768px) {
  .cat-grid { grid-template-columns: repeat(7, 1fr); }
  .banner-slide h3 { font-size: 28px; }
  .banner-slide p { font-size: 14px; }
  .banner-slot h4 { font-size: 20px; }
}

/* ===== v11 — Flash strip + category images ===== */
.flash-strip-wrap {
  margin: 0 0 14px;
  padding: 0 14px;
  overflow: hidden;
}
.flash-strip-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.flash-strip-track::-webkit-scrollbar { display: none; }
.flash-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 220px;
  scroll-snap-align: start;
  border-radius: 10px;
  padding: 8px 12px;
  text-decoration: none;
  color: #111827;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: transform 0.15s;
}
.flash-strip:active { transform: scale(0.97); }
.flash-strip img {
  width: 36px; height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}
.flash-strip strong {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  display: block;
}
.flash-strip span {
  font-size: 10px;
  color: #4B5563;
  line-height: 1.3;
}

/* Category image (replaces emoji when set) */
.cat-tile .cat-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* ============================================================
   v12 — PREMIUM POLISH (Amazon/Instamart-style refinement)
   ============================================================ */

/* Smaller, premium fonts everywhere */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.1px;
  background: #FAFAFA;
}

/* Image fallback - if Unsplash fails, show subtle gradient */
img.pimg, img.pimg-lg, .cat-img, .banner-slide img, .banner-slot img, .flash-strip img {
  background: linear-gradient(135deg, #F5F5F5 0%, #E5E7EB 100%);
}

/* Product card - tighter, more premium */
.product-card {
  border-radius: 12px;
  border: 1px solid #F3F4F6;
  background: white;
}
.product-img-wrap { padding: 6px; }
.product-info { padding: 6px 10px 10px; }
.product-weight { font-size: 9px; padding: 1px 5px; }
.product-name {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: -0.1px;
  min-height: 28px;
  margin-bottom: 4px;
}
.product-pricing .price { font-size: 13px; font-weight: 700; }
.product-pricing .mrp { font-size: 10px; }

/* Earn pill - smaller, premium */
.earn-pill {
  font-size: 9px;
  padding: 1px 6px;
  letter-spacing: 0.2px;
}

/* Category tile - smaller image, tighter */
.cat-tile { padding: 10px 4px; }
.cat-tile .cat-img {
  width: 42px;
  height: 42px;
  margin-bottom: 4px;
}
.cat-tile .cat-emoji { font-size: 26px; margin-bottom: 4px; }
.cat-tile .cat-name {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: -0.1px;
  line-height: 1.2;
}

/* Section title — smaller, less shouty */
.section-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.2px;
}
.see-all { font-size: 10px; font-weight: 600; }

/* Search bar - sleeker */
.search-bar { padding: 10px 14px; }
.search-bar input {
  font-size: 12px;
  padding: 9px 12px 9px 36px;
  letter-spacing: -0.1px;
}

/* Bottom nav — tighter */
.bottom-nav {
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
}
.bottom-nav a { font-size: 9px; padding: 4px 0; }
.bottom-nav a .ico { font-size: 18px; margin-bottom: 1px; }

/* Cart price box - smaller, premium */
.cart-total-box .total-line { font-size: 12px; padding: 5px 0; }
.cart-total-box .total-line.grand { font-size: 13px; padding-top: 8px; }
.cart-total-box .total-line.grand b { font-size: 16px; }

/* Buttons - smaller, more refined */
.btn { font-size: 12px; font-weight: 600; padding: 8px 14px; letter-spacing: -0.1px; }
.btn-primary { letter-spacing: 0.1px; }

/* Wallet card */
.wallet-card { padding: 14px; }
.wallet-card .amt { font-size: 22px; }
.wallet-card .label { font-size: 10px; }

/* Banner text - readable but smaller */
.banner-slide h3 { font-size: 16px; }
.banner-slide p { font-size: 11px; }
.banner-slot h4 { font-size: 13px; }
.banner-slot p { font-size: 10px; }

/* Flash strip - more pill-like */
.flash-strip {
  min-width: 200px;
  border-radius: 999px;
  padding: 6px 12px 6px 6px;
}
.flash-strip img { width: 30px; height: 30px; border-radius: 50%; }
.flash-strip strong { font-size: 11px; }
.flash-strip span { font-size: 9px; }

/* Table - smaller, tighter */
table.t { font-size: 11px; }
table.t th { font-size: 9px; padding: 8px 10px; letter-spacing: 0.3px; }
table.t td { padding: 8px 10px; }

/* Admin sidebar - smaller links */
.sidebar a { font-size: 12px; padding: 8px 10px; }
.sidebar .brand { font-size: 16px; padding: 14px 16px; }

/* Premium polish for h1/h2/h3 */
h1 { letter-spacing: -0.4px; }
h2 { letter-spacing: -0.3px; }
h3 { letter-spacing: -0.2px; }

/* Order status ribbons */
.order-status-ribbon { font-size: 9px; padding: 2px 8px; letter-spacing: 0.4px; }

/* Tab bar - sleeker */
.tab-bar a { font-size: 12px; padding: 8px 12px; }

/* ============================================================
   v13 — Amazon-style 3-row sticky header
   ============================================================ */
.amz-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  padding: 0;
}
.amz-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 14px 4px;
  color: white;
}
.amz-store {
  font-size: 12px;
  letter-spacing: -0.1px;
}
.amz-store strong {
  font-weight: 700;
  margin-left: 2px;
}
.amz-store small {
  font-size: 11px;
  opacity: 0.85;
  font-weight: 500;
}
.amz-signin {
  color: white;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  background: rgba(255,255,255,0.12);
  padding: 4px 10px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}
.amz-signin:active { background: rgba(255,255,255,0.2); }

.amz-search {
  display: flex;
  margin: 4px 14px 8px;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.amz-search-icon {
  padding: 9px 4px 9px 12px;
  font-size: 14px;
  opacity: 0.55;
  align-self: center;
}
.amz-search input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 13px;
  padding: 10px 8px;
  background: transparent;
  letter-spacing: -0.1px;
}
.amz-search input::placeholder {
  color: #9CA3AF;
  font-weight: 400;
}
.amz-search-btn {
  background: #FFD814;
  border: none;
  padding: 0 18px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 700;
}
.amz-search-btn:active { background: #F7CA00; }

.amz-location {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.18);
  color: white;
  padding: 7px 14px;
  text-decoration: none;
  font-size: 12px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.amz-location:active { background: rgba(0,0,0,0.28); }
.amz-loc-icon { font-size: 14px; flex-shrink: 0; }
.amz-loc-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  line-height: 1.2;
  overflow: hidden;
}
.amz-loc-text small {
  font-size: 10px;
  opacity: 0.8;
  font-weight: 500;
  letter-spacing: 0.1px;
}
.amz-loc-text strong {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.amz-chev {
  font-size: 18px;
  font-weight: 300;
  opacity: 0.7;
  flex-shrink: 0;
}

/* Hide old search-bar / store-banner if any other page still renders them */
.amz-header + .search-bar,
.amz-header + .store-banner { display: none; }

/* Bigger top spacing in pages with amz-header */
.amz-header + * { padding-top: 8px; }

/* Smaller category pills under header */
.category-pills {
  margin: 8px 14px 4px;
  gap: 6px;
}
.category-pill {
  font-size: 11px;
  padding: 6px 12px;
  font-weight: 600;
  border-radius: 999px;
  letter-spacing: -0.1px;
}

/* Premium polish — refined icons */
.cat-emoji, .ico, .product-card .add-btn,
.bottom-nav a .ico {
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.06));
}

/* Even smaller, premium font weights for premium feel */
body { font-weight: 400; }
strong, b { font-weight: 600; }
h3 { font-weight: 700; }
.section-title { font-weight: 700; }

/* ============================================================
   v14 — Compact header + sleeker amazon colors + map pin
   ============================================================ */

/* Refined gradient — deeper, more premium */
.amz-header {
  background: linear-gradient(180deg, #E85100 0%, #C44500 100%);
}

/* Row 1 — store title takes center stage (no Hi-Ravi) */
.amz-top {
  padding: 8px 14px 3px;
}
.amz-store {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.2px;
}
.amz-store strong { font-weight: 700; }

/* Compact location row */
.amz-location {
  padding: 5px 12px;
  background: rgba(0,0,0,0.22);
  gap: 6px;
}
.amz-loc-icon { font-size: 12px; }
.amz-loc-text small { font-size: 9px; opacity: 0.75; }
.amz-loc-text strong { font-size: 11px; font-weight: 600; }

/* Map pin button — top right of location strip */
.amz-map-pin {
  background: rgba(255,255,255,0.18);
  color: white;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.25);
  transition: transform 0.15s;
  text-decoration: none;
}
.amz-map-pin:active {
  transform: scale(0.92);
  background: rgba(255,255,255,0.3);
}

/* Tighter search */
.amz-search { margin: 3px 14px 6px; }
.amz-search input { padding: 8px 6px; font-size: 12px; }
.amz-search-icon { padding: 8px 4px 8px 10px; font-size: 13px; }
.amz-search-btn { padding: 0 14px; font-size: 13px; }

/* ============================================================
   v15 — Dark blue Amazon header + centered title + autosuggest
   ============================================================ */

/* DARK BLUE header (Amazon-style) */
.amz-header {
  background: linear-gradient(180deg, #131921 0%, #232F3E 100%) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Row 1 — centered title with address pill on right */
.amz-top {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 10px 14px 6px;
  min-height: 38px;
}
.amz-store-title {
  color: white;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.3px;
  text-align: center;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 80px; /* keep clear of address pill */
}

/* Address pill — top right corner */
.amz-addr-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  text-decoration: none;
  letter-spacing: -0.1px;
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.amz-addr-btn:active { background: rgba(255,255,255,0.22); }
.amz-addr-btn span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Search bar - amazon yellow button */
.amz-search {
  position: relative;
  margin: 4px 12px 8px;
}
.amz-search input { padding: 9px 8px; font-size: 13px; }
.amz-search-btn {
  background: #FEBD69;
  color: #131921;
}
.amz-search-btn:active { background: #F0A954; }

/* Autosuggest dropdown */
.search-suggest {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: white;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  z-index: 1000;
  max-height: 60vh;
  overflow-y: auto;
}
.suggest-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid #F3F4F6;
  text-decoration: none;
  color: #1F2937;
}
.suggest-row:active, .suggest-row:hover {
  background: #FAFAFA;
}
.suggest-row img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
  background: #F3F4F6;
  flex-shrink: 0;
}
.suggest-info { flex: 1; min-width: 0; }
.suggest-name {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.1px;
}
.suggest-meta {
  font-size: 10px;
  color: #6B7280;
  margin-top: 1px;
}
.suggest-more {
  display: block;
  padding: 9px 12px;
  font-size: 11px;
  color: #131921;
  font-weight: 700;
  text-decoration: none;
  background: #F9FAFB;
  text-align: center;
  border-top: 1px solid #E5E7EB;
}
.suggest-empty {
  padding: 14px;
  text-align: center;
  font-size: 12px;
  color: #6B7280;
}

/* Hide old location row entirely */
.amz-location { display: none !important; }

/* ============================================================
   v16 — Mobile fixes: sticky header + bottom nav always
   ============================================================ */

/* Search bar slight overlap fix — proper iOS safe-area + sticky */
.amz-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  padding-top: env(safe-area-inset-top);
}

/* Always-visible search row (compact mobile-friendly) */
.amz-search {
  margin: 2px 10px 6px !important;
  padding: 0;
}
.amz-search input {
  font-size: 12.5px !important;
  padding: 8px 6px !important;
  min-height: 36px;
}
.amz-search-btn {
  padding: 0 14px !important;
  min-width: 40px;
}
.amz-search-icon { padding: 7px 4px 7px 10px !important; }

/* Bottom nav - lock to bottom, safe-area aware */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: white;
  border-top: 1px solid #F3F4F6;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
  padding-bottom: calc(6px + env(safe-area-inset-bottom));
}
/* Push page content above bottom nav */
body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }

/* Refined icons & text — even smaller, sharper */
.bottom-nav a {
  font-size: 8.5px;
  padding: 4px 0;
  letter-spacing: 0.1px;
}
.bottom-nav a .ico {
  font-size: 16px;
  margin-bottom: 1px;
}

/* Product card — tighter, sharper */
.product-card { border-radius: 10px; }
.product-name {
  font-size: 10.5px;
  font-weight: 500;
  min-height: 26px;
  margin-bottom: 3px;
  line-height: 1.25;
}
.product-pricing .price { font-size: 12.5px; }
.product-pricing .mrp { font-size: 9.5px; }
.product-weight { font-size: 8.5px; padding: 1px 5px; }
.earn-pill { font-size: 8.5px; padding: 1px 5px; }

/* Category tiles — tighter */
.cat-tile { padding: 8px 4px; }
.cat-tile .cat-img {
  width: 40px;
  height: 40px;
  margin-bottom: 4px;
  object-fit: cover;
}
.cat-tile .cat-emoji { font-size: 24px; margin-bottom: 4px; }
.cat-tile .cat-name {
  font-size: 9.5px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.1px;
}

/* Section title — sharper */
.section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.2px;
}
.see-all { font-size: 9.5px; font-weight: 600; }

/* Address pill — slightly smaller for tight phones */
.amz-addr-btn {
  font-size: 10.5px !important;
  padding: 4px 9px !important;
  max-width: 100px !important;
}
.amz-store-title {
  font-size: 14px !important;
  padding: 0 75px !important;
}

/* Buttons everywhere — tighter, premium */
.btn { font-size: 11.5px; font-weight: 600; padding: 7px 12px; }
.btn-primary { padding: 9px 14px; }

/* Search suggest — fine-tuned */
.suggest-row { padding: 7px 10px; }
.suggest-row img { width: 32px; height: 32px; }
.suggest-name { font-size: 11.5px; }
.suggest-meta { font-size: 9.5px; }
.suggest-more { font-size: 10.5px; padding: 8px 12px; }

/* Flash strip — sharper */
.flash-strip strong { font-size: 10.5px; }
.flash-strip span { font-size: 9px; }
.flash-strip img { width: 26px; height: 26px; }

/* Bottom nav — active state cleaner */
.bottom-nav a.active {
  color: var(--primary);
  font-weight: 700;
}

/* ============================================================
   v17 — Aggressive sticky-header fix (kills mobile overlap)
   ============================================================ */

/* Lock header behaviour — fixed beats sticky on iOS Safari notch */
.amz-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding-top: env(safe-area-inset-top, 0);
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
  background: linear-gradient(180deg, #131921 0%, #232F3E 100%) !important;
}

/* Body always reserves space at top so content cannot slide under header */
body {
  padding-top: 0;
  padding-bottom: calc(70px + env(safe-area-inset-bottom, 0));
}

/* Search bar — explicit height, no surprises */
.amz-search {
  margin: 4px 10px 8px !important;
  background: white;
  border-radius: 8px;
  display: flex;
  align-items: stretch;
  min-height: 40px;
  overflow: hidden;
}
.amz-search input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 13px !important;
  padding: 0 8px !important;
  background: transparent;
  letter-spacing: -0.1px;
  min-width: 0;
}
.amz-search-icon {
  display: flex;
  align-items: center;
  padding: 0 6px 0 12px !important;
  font-size: 13px;
  opacity: 0.55;
}
.amz-search-btn {
  background: #FEBD69;
  border: none;
  padding: 0 16px !important;
  font-size: 14px;
  color: #131921;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Bottom nav — fixed bottom with safe-area */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: white;
  border-top: 1px solid #F0F0F0;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.04);
  padding: 4px 0 calc(4px + env(safe-area-inset-bottom, 0));
}

/* ============================================================
   v18 — Final UI polish: orange header back + search position + branches tab
   ============================================================ */

/* Restore orange-themed header with yellow accent on title */
.amz-header {
  background: linear-gradient(180deg, #E85100 0%, #C44500 100%) !important;
  padding-top: env(safe-area-inset-top, 0);
}

/* Title — gold/yellow Amazon-style gradient text */
.amz-store-title {
  background: linear-gradient(180deg, #FFFFFF 0%, #FFE4B5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 1px 2px rgba(0,0,0,0.18);
  font-weight: 800 !important;
  font-size: 15px !important;
  letter-spacing: -0.2px !important;
}

/* Tighter address pill */
.amz-addr-btn {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.28);
}

/* Search bar — move slightly up, eliminate the gap */
.amz-top {
  padding: 6px 14px 2px !important;
  min-height: 32px;
}
.amz-search {
  margin: 0 10px 6px !important;
  min-height: 40px;
}

/* Bottom nav active state */
.bottom-nav a.active { color: var(--primary); font-weight: 700; }

/* Branches tab content tight on mobile */
.tab-bar a {
  font-size: 11px;
  padding: 6px 10px;
  flex-shrink: 0;
}
.tab-bar {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tab-bar::-webkit-scrollbar { display: none; }

/* Address required asterisk */
.addr-req {
  color: var(--danger);
  font-weight: 700;
  font-size: 13px;
}

/* ============================================================
   v19 — TRUE APP-LIKE MOBILE UI (Flutter/React Native feel)
   No zoom, fixed max-width, app chrome, safe-area aware
   ============================================================ */

/* ── GLOBAL APP SHELL ── */
html {
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
body {
  max-width: 480px;
  margin: 0 auto;
  background: #F5F5F5;
  overscroll-behavior-y: contain;
  padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important;
  padding-top: 0 !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  -webkit-user-select: none;
}

/* ── ORANGE HEADER — full redesign ── */
.amz-header {
  background: #E8601C !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 500 !important;
  box-shadow: 0 2px 12px rgba(0,0,0,.2) !important;
  padding: 0 !important;
  padding-top: env(safe-area-inset-top, 0px) !important;
}
.amz-top {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 10px 12px 6px !important;
  min-height: unset !important;
  position: relative !important;
}
.amz-store-title {
  color: #fff !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  letter-spacing: -0.3px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: calc(100% - 120px) !important;
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: #fff !important;
  text-shadow: none !important;
}
.amz-addr-btn {
  position: relative !important;
  top: unset !important; right: unset !important;
  transform: none !important;
  background: rgba(255,255,255,.18) !important;
  border: 1.5px solid rgba(255,255,255,.4) !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  padding: 5px 12px !important;
  border-radius: 20px !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  max-width: 110px !important;
}

/* ── SEARCH BAR ── */
.amz-search {
  display: flex !important;
  align-items: stretch !important;
  margin: 0 10px 8px !important;
  background: #fff !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  min-height: 42px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.12) !important;
  position: relative !important;
}
.amz-search-icon {
  display: flex !important;
  align-items: center !important;
  padding: 0 6px 0 12px !important;
  font-size: 14px !important;
  opacity: .5 !important;
  flex-shrink: 0 !important;
}
.amz-search input,
.amz-search input[type="text"],
.amz-search input[type="search"] {
  flex: 1 !important;
  border: none !important;
  outline: none !important;
  font-size: 13px !important;
  padding: 0 6px !important;
  background: transparent !important;
  color: #111 !important;
  min-width: 0 !important;
  box-shadow: none !important;
}
.amz-search input::placeholder { color: #9ca3af !important; font-weight: 400 !important; }
.amz-search-btn {
  background: #FEBD69 !important;
  border: none !important;
  padding: 0 16px !important;
  font-size: 15px !important;
  color: #1a1a1a !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
}
.amz-search-btn:active { background: #f0a93d !important; }

/* ── AUTOSUGGEST DROPDOWN ── */
.search-suggest {
  display: none;
  position: absolute !important;
  top: calc(100% + 5px) !important;
  left: 0 !important; right: 0 !important;
  background: #fff !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 32px rgba(0,0,0,.18) !important;
  border: 1px solid #e5e7eb !important;
  overflow: hidden !important;
  z-index: 9999 !important;
  max-height: 65vh !important;
  overflow-y: auto !important;
}
.suggest-row {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 10px 13px !important;
  text-decoration: none !important;
  color: #1a1a1a !important;
  border-bottom: 1px solid #f3f4f6 !important;
  transition: background .15s !important;
}
.suggest-row:active { background: #fff7f3 !important; }
.suggest-row img { width: 38px; height: 38px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.suggest-info { flex: 1; min-width: 0; }
.suggest-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest-meta { font-size: 11px; color: #6b7280; margin-top: 2px; }
.suggest-more { display: block; padding: 10px 14px; font-size: 13px; color: #E8601C; font-weight: 700; text-align: center; background: #fff7f3; border-top: 1px solid #e5e7eb; text-decoration: none; }
.suggest-empty { padding: 16px; font-size: 13px; color: #6b7280; text-align: center; }

/* ── CATEGORY PILLS ── */
.category-pills {
  display: flex !important;
  gap: 8px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: none !important;
  padding: 10px 12px !important;
  background: #fff !important;
  border-bottom: 1px solid #e5e7eb !important;
  -webkit-overflow-scrolling: touch !important;
  margin: 0 !important;
}
.category-pills::-webkit-scrollbar { display: none; }
.category-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 7px 14px !important;
  border-radius: 20px !important;
  border: 1.5px solid #e5e7eb !important;
  background: #fff !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  text-decoration: none !important;
  color: #1a1a1a !important;
  transition: all .15s !important;
  -webkit-tap-highlight-color: transparent !important;
}
.category-pill:active { transform: scale(.96) !important; }
.category-pill.active {
  background: #E8601C !important;
  color: #fff !important;
  border-color: #E8601C !important;
  box-shadow: 0 3px 10px rgba(232,96,28,.3) !important;
}

/* ── BOTTOM NAV — app-style ── */
.bottom-nav {
  position: fixed !important;
  bottom: 0 !important; left: 0 !important; right: 0 !important;
  margin: 0 auto !important;
  max-width: 480px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  height: calc(58px + env(safe-area-inset-bottom, 0px)) !important;
  padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  background: #fff !important;
  border-top: 1px solid #f0f0f0 !important;
  display: flex !important;
  align-items: stretch !important;
  z-index: 400 !important;
  box-shadow: 0 -3px 16px rgba(0,0,0,.08) !important;
}
.bottom-nav .nav-item,
.bottom-nav a {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  color: #9ca3af !important;
  text-decoration: none !important;
  padding: 6px 4px 4px !important;
  border-top: 2px solid transparent !important;
  transition: color .15s !important;
  min-height: 44px !important;
  -webkit-tap-highlight-color: transparent !important;
}
.bottom-nav .nav-item.active,
.bottom-nav a.active {
  color: #E8601C !important;
  border-top-color: #E8601C !important;
  font-weight: 700 !important;
}
.bottom-nav .nav-item:active,
.bottom-nav a:active { opacity: .7 !important; }
.nav-icon { font-size: 20px !important; line-height: 1 !important; }
.nav-label { font-size: 10px !important; letter-spacing: .1px !important; }
.cart-count {
  position: absolute !important;
  top: 3px !important; right: calc(50% - 22px) !important;
  background: #E8601C !important; color: #fff !important;
  font-size: 9px !important; font-weight: 700 !important;
  min-width: 16px !important; height: 16px !important;
  border-radius: 8px !important; padding: 0 4px !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
}

/* ── PRODUCT CARDS — consistent image ── */
.product-card {
  min-width: 148px !important; max-width: 148px !important;
  border-radius: 12px !important;
  border: 1px solid #f0f0f0 !important;
  background: #fff !important;
  box-shadow: 0 1px 4px rgba(0,0,0,.05) !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  transition: transform .15s !important;
}
.product-card:active { transform: scale(.97) !important; }
.product-img-wrap {
  position: relative !important;
  width: 100% !important;
  padding-top: 75% !important;
  background: #f9fafb !important;
  overflow: hidden !important;
  padding: 0 !important;
  height: 110px !important;
}
.product-img-wrap .pimg,
.product-img-wrap img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important; height: 100% !important;
  object-fit: cover !important;
}
.product-img-wrap .pimg-emoji {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important; height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 44px !important;
  background: linear-gradient(135deg, #fff 0%, #f9fafb 100%) !important;
  border-radius: 0 !important;
  aspect-ratio: unset !important;
}
.add-btn {
  position: absolute !important;
  bottom: 6px !important; right: 6px !important;
  background: #fff !important;
  border: 1.5px solid #E8601C !important;
  color: #E8601C !important;
  width: 28px !important; height: 28px !important;
  border-radius: 7px !important;
  font-size: 20px !important;
  font-weight: 300 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
  line-height: 1 !important;
  box-shadow: 0 2px 6px rgba(0,0,0,.1) !important;
  transition: all .15s !important;
}
.add-btn:active { background: #E8601C !important; color: #fff !important; transform: scale(.92) !important; }

/* ── CATEGORY GRID TILES ── */
.cat-grid { gap: 8px !important; padding: 0 12px 12px !important; }
.cat-tile {
  background: linear-gradient(135deg, #fff 0%, #f9fafb 100%) !important;
  border-radius: 12px !important;
  border: 1px solid #f0f0f0 !important;
  padding: 10px 4px !important;
  transition: transform .15s !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.04) !important;
}
.cat-tile:active { transform: scale(.94) !important; }
.cat-tile .cat-img { width: 48px !important; height: 48px !important; border-radius: 50% !important; object-fit: cover !important; margin-bottom: 5px !important; }
.cat-tile .cat-emoji { font-size: 30px !important; margin-bottom: 5px !important; }
.cat-tile .cat-name { font-size: 10px !important; font-weight: 600 !important; }

/* ── SECTIONS ── */
.section { background: #fff !important; margin-bottom: 10px !important; padding: 12px 0 14px !important; }
.section-header { padding: 0 12px 8px !important; }
.section-title { font-size: 15px !important; font-weight: 800 !important; color: #111 !important; }
.see-all { font-size: 11px !important; color: #E8601C !important; font-weight: 700 !important; }
.product-scroll { padding: 2px 12px 8px !important; gap: 10px !important; }

/* ── BANNER CAROUSEL ── */
.banner-carousel { margin: 10px 0 12px !important; padding: 0 12px !important; }
.banner-dot.active { background: #E8601C !important; }

/* ── SUPPRESS ZOOM GESTURE ── */
input, select, textarea { font-size: 16px; }
/* override back for small inputs inside cards */
.product-info input { font-size: 13px; }

/* ── FLASH STRIP ── */
.flash-strip-wrap { margin: 0 0 10px !important; padding: 0 12px !important; }

/* ── BANNER SLOTS ── */
.banner-slot { margin: 10px 12px !important; border-radius: 12px !important; }

/* ── FOOTER ── */
body > div:last-of-type { font-size: 10px !important; padding: 14px !important; }


/* ============================================================
   v20 — FINAL FIXES
   ============================================================ */

/* ── BOTTOM NAV: desktop center fix ──
   Multiple conflicting rules above. This final block wins.
   left:50% + transform centers it on desktop.
   On mobile it fills full width naturally since max-width=480px > screen.
*/
.bottom-nav {
  position: fixed !important;
  bottom: 0 !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  width: 100% !important;
  max-width: 480px !important;
  height: calc(58px + env(safe-area-inset-bottom, 0px)) !important;
  padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  background: #fff !important;
  border-top: 1px solid #f0f0f0 !important;
  display: flex !important;
  align-items: stretch !important;
  z-index: 9999 !important;
  box-shadow: 0 -3px 16px rgba(0,0,0,.08) !important;
  margin: 0 !important;
}

/* ── SEARCH SUGGEST: always above everything ── */
#searchSuggest {
  position: absolute !important;
  top: calc(100% + 4px) !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 99999 !important;
  background: #fff !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 40px rgba(0,0,0,.18) !important;
  border: 1px solid #e5e7eb !important;
  overflow: hidden !important;
  max-height: 60vh !important;
  overflow-y: auto !important;
  display: none;
}

/* ── amz-search: no overflow:hidden (was cutting suggest box) ── */
.amz-search {
  overflow: visible !important;
  border-radius: 10px !important;
  margin: 0 !important;
}
/* Re-clip only the input row itself */
.amz-search > span,
.amz-search > input,
.amz-search > button {
  /* nothing — let parent clip visually via box */
}

/* Desktop: show nav centered in middle of screen */
@media (min-width: 480px) {
  .bottom-nav {
    left: 50% !important;
    transform: translateX(-50%) !important;
    border-left: 1px solid #f0f0f0 !important;
    border-right: 1px solid #f0f0f0 !important;
  }
  body:not(.admin-body) {
    background: #e8e8e8 !important; /* grey outside the app shell */
  }
  /* Only clip customer-facing pages, NOT admin */
  body:not(.admin-body) > *:not(.bottom-nav) {
    max-width: 480px;
    margin: 0 auto;
  }
  /* Admin gets full desktop width — no clipping */
  body.admin-body { background: #F3F4F6 !important; }
  body.admin-body > * { max-width: none !important; margin: 0 !important; }
}

/* ═══════════════════════════════════════════════════════════
   v19 — HD IMAGES + MOBILE-NO-ZOOM + GOLD CARD POLISH
   ═══════════════════════════════════════════════════════════ */

/* ── HD/Sharp image rendering for all product images ── */
img.pimg, img.pimg-lg, img.hd-img,
.product-img-wrap img, .pdp-img-wrap img,
.cart-line img, .cat-img, .banner-slide img, .banner-slot img,
.flash-strip img, .product-thumb {
  image-rendering: -webkit-optimize-contrast !important;
  image-rendering: crisp-edges;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  filter: contrast(1.06) saturate(1.08);
}

/* Product cards: tight container with high-quality crop */
.product-img-wrap {
  background: #fff !important;
  border-radius: 12px 12px 0 0 !important;
  overflow: hidden !important;
}
.product-img-wrap img, .product-img-wrap .pimg {
  object-fit: cover !important;
  object-position: center !important;
  width: 100% !important;
  height: 100% !important;
  transition: transform .3s ease;
}
.product-img-wrap:hover img {
  transform: scale(1.04);
}

/* PDP large image — contain to show full product without cropping */
.pdp-img-wrap {
  background: #fff !important;
  border-radius: 16px;
  overflow: hidden;
  padding: 12px;
}
.pdp-img-wrap img.pimg-lg, .pdp-img-wrap .pimg-lg {
  width: 100% !important;
  max-width: 280px !important;
  height: auto !important;
  aspect-ratio: 1 / 1;
  object-fit: contain !important;
  margin: 0 auto !important;
  display: block;
}

/* Emoji fallback: bigger, premium gradient */
.product-img-wrap .pimg-emoji {
  font-size: 52px !important;
  background: linear-gradient(135deg, #fff8f0 0%, #fff 50%, #ffe8d6 100%) !important;
  filter: none !important;
}

/* Bottom toast */
#cartToast {
  font-family: inherit;
}

/* Mobile: prevent zoom on input focus (iOS) — set min font-size 16px */
@media (max-width: 640px) {
  input[type="text"], input[type="number"], input[type="tel"],
  input[type="password"], input[type="email"], textarea, select {
    font-size: 16px !important;
  }
}

/* ── No zoom, no rubber-band, no horizontal scroll on mobile ── */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  touch-action: manipulation;
  overscroll-behavior-x: none;
}
body {
  overscroll-behavior-x: none;
  -webkit-user-select: none;
  user-select: text; /* still allow text select where needed */
  overflow-x: hidden !important;
}
* {
  -webkit-tap-highlight-color: transparent;
}
/* Allow user select in inputs, descriptions */
input, textarea, p, h1, h2, h3, h4, h5, h6, .pdp-info, .desc, [contenteditable] {
  -webkit-user-select: text;
  user-select: text;
}
/* Prevent double-tap zoom on buttons/links */
button, a, .btn, .nav-item, .category-pill, .add-btn, .product-card {
  touch-action: manipulation;
}

/* Gold card hover */
.gold-card { transition: transform .2s ease, box-shadow .2s ease; }
.gold-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(146,64,14,.35); }

/* ═══════════════════════════════════════════════════════════════════════════
   v20 — SWIGGY INSTAMART SKIN OVERRIDE (final, !important all the way down)
   This block intentionally appears LAST so it wins the cascade.
   ─────────────────────────────────────────────────────────────────────────── */

:root {
  --im-bg:      #F1F5F9;
  --im-card:    #ffffff;
  --im-border:  #E5E7EB;
  --im-text:    #1f2937;
  --im-muted:   #6b7280;
  --im-blue:    #2563eb;
  --im-blue-d:  #1d4ed8;
  --im-green:   #16a34a;
  --im-red:     #dc2626;
  --im-orange:  #ea580c;
  --im-purple:  #9333ea;
  --im-pink:    #ec4899;
  --im-yellow:  #FCD34D;
  --ek-nav-h:   72px;
}

/* ── Hide v18 amazon header + old category pills so v20 is the only header ── */
.amz-header { display: none !important; }
.category-pills { display: none !important; }

/* ── Body / page background ── */
body {
  background: #ffffff !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'SF Pro Display', 'Segoe UI', Roboto, sans-serif !important;
  color: var(--im-text) !important;
  padding-bottom: calc(var(--ek-nav-h) + 56px) !important; /* room for nav + delivery strip */
}

/* ═══════ INSTAMART HEADER ═══════ */
.im-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
  padding: 14px 14px 0 !important;
  box-shadow: 0 2px 12px rgba(0,0,0,.04) !important;
  transition: background .25s ease, color .25s ease !important;
}

.im-top-row {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin-bottom: 12px !important;
}

.im-delivery { flex: 1 !important; min-width: 0 !important; text-decoration: none !important; color: inherit !important; }
.im-delivery-time {
  font-size: 22px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}
.im-delivery-time::after {
  content: '↗';
  font-size: 14px !important;
  opacity: .7;
}
.im-delivery-addr {
  font-size: 12.5px !important;
  font-weight: 600 !important;
  opacity: .92 !important;
  margin-top: 2px !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 260px !important;
}
.im-chev { font-size: 10px !important; opacity: .8; }

.im-top-right { display: flex !important; align-items: center !important; gap: 10px !important; }
.im-promo-pill {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: rgba(255,255,255,.92) !important;
  color: #1f2937 !important;
  border-radius: 24px !important;
  padding: 5px 12px 5px 6px !important;
  font-size: 10px !important;
  line-height: 1.1 !important;
  box-shadow: 0 2px 6px rgba(0,0,0,.08) !important;
  font-weight: 700 !important;
}
.im-promo-icon {
  width: 22px !important; height: 22px !important;
  background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
  border-radius: 50% !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  font-size: 12px !important;
}
.im-promo-pill strong { font-size: 11px !important; }

.im-profile-btn {
  width: 36px !important; height: 36px !important;
  background: rgba(0,0,0,.65) !important;
  color: #fff !important;
  border-radius: 50% !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  text-decoration: none !important;
  font-weight: 800 !important;
  font-size: 14px !important;
  box-shadow: 0 2px 6px rgba(0,0,0,.15) !important;
  flex-shrink: 0 !important;
}

/* ═══════ SEARCH BAR (Instamart style) ═══════ */
.im-search-wrap {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-bottom: 14px !important;
  position: relative !important;
}
.im-search {
  flex: 1 !important;
  display: flex !important;
  align-items: center !important;
  background: #fff !important;
  border-radius: 14px !important;
  padding: 0 12px !important;
  height: 44px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.05) !important;
  border: 1px solid #f3f4f6 !important;
}
.im-search-icon { color: #1f2937 !important; display: inline-flex !important; margin-right: 8px !important; }
.im-search input {
  flex: 1 !important;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  font-size: 14px !important;
  color: #1f2937 !important;
  font-weight: 500 !important;
}
.im-search input::placeholder { color: #9ca3af !important; font-weight: 500 !important; }
.im-search-prescription {
  background: transparent !important;
  border: none !important;
  color: #4b5563 !important;
  padding: 4px 0 4px 8px !important;
  border-left: 1px solid #e5e7eb !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
}
.im-bookmark {
  width: 44px !important; height: 44px !important;
  background: #fff !important;
  border-radius: 12px !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  color: #1f2937 !important;
  text-decoration: none !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.05) !important;
  border: 1px solid #f3f4f6 !important;
  flex-shrink: 0 !important;
}

/* ═══════ CATEGORY STRIP (Swiggy notch tabs) ═══════ */
.im-cat-strip {
  display: flex !important;
  align-items: flex-end !important;
  gap: 8px !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  padding: 0 0 0 !important;
  margin: 0 -14px !important;
  scrollbar-width: none !important;
  scroll-behavior: smooth !important;
  -webkit-overflow-scrolling: touch !important;
}
.im-cat-strip::-webkit-scrollbar { display: none !important; }

.im-cat-tab {
  flex-shrink: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 8px 10px 12px !important;
  text-decoration: none !important;
  color: inherit !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  opacity: .82 !important;
  position: relative !important;
  min-width: 64px !important;
  transition: opacity .15s !important;
}
.im-cat-tab:first-child { margin-left: 14px !important; }
.im-cat-tab:last-child  { margin-right: 14px !important; }
.im-cat-icon {
  width: 28px !important; height: 28px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.im-cat-icon svg { width: 100% !important; height: 100% !important; }
.im-cat-label { white-space: nowrap !important; font-size: 12.5px !important; }

/* Active tab — the signature Swiggy "notched envelope" */
.im-cat-tab.is-active { opacity: 1 !important; }
.im-cat-tab.is-active::before {
  content: '';
  position: absolute !important;
  left: 0 !important; right: 0 !important; bottom: 0 !important;
  height: 26px !important;
  background: #ffffff !important;
  border-radius: 14px 14px 0 0 !important;
  z-index: -1 !important;
  box-shadow: 0 -2px 6px rgba(0,0,0,.04) !important;
}
.im-cat-tab.is-active .im-cat-label,
.im-cat-tab.is-active .im-cat-icon {
  color: #1f2937 !important;
  position: relative !important;
  z-index: 1 !important;
}

/* ═══════ HERO CATEGORY BANNER ═══════ */
.im-cat-hero {
  padding: 18px 16px 22px !important;
  text-align: center !important;
  position: relative !important;
  overflow: hidden !important;
  margin-bottom: 12px !important;
}
.im-hero-title { display: flex !important; flex-direction: column !important; align-items: center !important; gap: 4px !important; }
.im-hero-eyebrow {
  font-size: 11px !important;
  letter-spacing: 4px !important;
  font-weight: 600 !important;
  opacity: .9 !important;
  text-transform: uppercase !important;
}
.im-hero-headline {
  font-family: 'Georgia', 'Playfair Display', serif !important;
  font-size: 28px !important;
  font-weight: 700 !important;
  letter-spacing: .5px !important;
  font-style: italic !important;
}
.im-hero-decor {
  position: absolute !important;
  font-size: 48px !important;
  opacity: .35 !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
}
.im-hero-left { left: 18px !important; }
.im-hero-right { right: 18px !important; }

.im-hero-electronics, .im-hero-fresh {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  text-align: left !important;
  padding: 0 6px !important;
}

/* ═══════ LOWEST PRICES card (Swiggy blue card) ═══════ */
.im-lowest-card {
  margin: 14px 12px !important;
  background: linear-gradient(180deg, #DBEAFE 0%, #EFF6FF 100%) !important;
  border-radius: 18px !important;
  padding: 14px 4px 14px 14px !important;
  position: relative !important;
}
.im-lowest-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding-right: 14px !important;
  margin-bottom: 10px !important;
}
.im-lowest-eyebrow {
  font-weight: 800 !important;
  color: #1E3A8A !important;
  font-size: 14px !important;
  letter-spacing: .3px !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}
.im-lowest-eyebrow::before {
  content: '';
  width: 14px; height: 14px;
  background: #1E40AF;
  border-radius: 4px;
  display: inline-block;
}
.im-lowest-arrow {
  width: 28px !important; height: 28px !important;
  border-radius: 50% !important;
  background: #fff !important;
  color: #1E40AF !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  box-shadow: 0 1px 4px rgba(0,0,0,.08) !important;
}
.im-lowest-scroll { padding-right: 8px !important; }

/* ═══════ OFFERS CURATED FOR YOU ═══════ */
.im-curated { margin: 18px 0 14px !important; padding: 0 14px !important; }
.im-curated-title {
  font-size: 18px !important;
  font-weight: 800 !important;
  color: #1f2937 !important;
  margin: 0 0 12px !important;
  letter-spacing: -.3px !important;
}
.im-curated-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 10px !important;
}
.im-curated-tile {
  border-radius: 14px !important;
  padding: 12px !important;
  text-decoration: none !important;
  min-height: 140px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  position: relative !important;
  overflow: hidden !important;
}
.im-curated-text { font-weight: 700 !important; }
.im-curated-eyebrow { font-size: 11px !important; font-weight: 600 !important; opacity: .85 !important; margin-bottom: 4px !important; }
.im-curated-headline { font-size: 13px !important; font-weight: 800 !important; line-height: 1.15 !important; }
.im-curated-img {
  font-size: 46px !important;
  align-self: flex-end !important;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.1));
  margin-top: auto !important;
}

/* ═══════ STEAL DEALS purple banner ═══════ */
.im-steal {
  margin: 18px 12px !important;
  background: linear-gradient(180deg, #F3E8FF 0%, #FAF5FF 100%) !important;
  border-radius: 18px !important;
  padding: 14px 4px 14px 14px !important;
  position: relative !important;
}
.im-steal-banner {
  text-align: center !important;
  font-size: 22px !important;
  font-weight: 900 !important;
  color: #6B21A8 !important;
  letter-spacing: 1px !important;
  font-style: italic !important;
  margin-bottom: 12px !important;
  padding: 6px 0 !important;
  position: relative !important;
}
.im-steal-spark { font-size: 16px !important; margin: 0 8px !important; vertical-align: top !important; }

/* ═══════ PRODUCT CARDS (Swiggy style) ═══════ */
.product-scroll {
  display: flex !important;
  gap: 10px !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  padding: 4px 14px 6px !important;
  scrollbar-width: none !important;
  scroll-snap-type: x proximity !important;
  -webkit-overflow-scrolling: touch !important;
}
.product-scroll::-webkit-scrollbar { display: none !important; }
.product-scroll > .product-card {
  flex: 0 0 158px !important;
  width: 158px !important;
  scroll-snap-align: start !important;
}

.product-card {
  background: #ffffff !important;
  border-radius: 14px !important;
  border: 1px solid #f3f4f6 !important;
  overflow: hidden !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.04) !important;
  transition: transform .15s ease !important;
}
.product-card:active { transform: scale(.97) !important; }

.product-img-wrap {
  position: relative !important;
  width: 100% !important;
  height: 140px !important;
  background: #ffffff !important;
  border-radius: 12px 12px 0 0 !important;
  overflow: hidden !important;
  padding: 8px !important;
}
.product-img-wrap img,
.product-img-wrap .pimg {
  width: 100% !important; height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
  position: relative !important; inset: auto !important;
  border-radius: 8px !important;
}
.product-img-wrap .pimg-emoji {
  width: 100% !important; height: 100% !important;
  display: flex !important;
  align-items: center !important; justify-content: center !important;
  font-size: 52px !important;
  background: linear-gradient(135deg,#fff8f0,#fff,#ffe8d6) !important;
  border-radius: 8px !important;
}

/* + add button — Instamart-style blue outline rounded square top-right */
.add-btn {
  position: absolute !important;
  top: 6px !important; right: 6px !important;
  bottom: auto !important;
  background: #ffffff !important;
  color: #2563eb !important;
  border: 1.5px solid #93C5FD !important;
  width: 30px !important; height: 30px !important;
  border-radius: 8px !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-shadow: 0 2px 4px rgba(0,0,0,.06) !important;
  z-index: 2 !important;
  transition: all .15s ease !important;
  padding: 0 !important;
}
.add-btn:active { transform: scale(.92) !important; }
.add-btn.added { background: #16a34a !important; color: #fff !important; border-color: #16a34a !important; }

/* Bookmark icon top-left (visual only) */
.product-img-wrap::before {
  content: '';
  position: absolute !important;
  top: 6px !important;
  left: 6px !important;
  width: 18px !important;
  height: 22px !important;
  background: rgba(255,255,255,.85) !important;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%) !important;
  z-index: 1 !important;
  border-radius: 2px !important;
  pointer-events: none !important;
}

/* Bestseller pill at bottom of image (Swiggy blue) */
.badge-bestseller {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  top: auto !important;
  background: linear-gradient(180deg, #3B82F6, #2563eb) !important;
  color: #fff !important;
  text-align: center !important;
  padding: 3px 0 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  border-radius: 0 0 8px 8px !important;
  margin: 0 8px !important;
  width: auto !important;
  letter-spacing: .3px !important;
}

/* Discount pill (small green badge on image) */
.badge-discount {
  position: absolute !important;
  top: 8px !important;
  left: 30px !important;
  background: #16a34a !important;
  color: #fff !important;
  font-size: 9px !important;
  font-weight: 800 !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  z-index: 1 !important;
}

/* Card text below image */
.product-info { padding: 8px 10px 10px !important; }

.pc-weight-pill {
  display: inline-block !important;
  background: #fff !important;
  border: 1px solid #d1d5db !important;
  border-radius: 12px !important;
  padding: 1px 8px !important;
  font-size: 10px !important;
  color: #1f2937 !important;
  font-weight: 600 !important;
  margin-bottom: 6px !important;
}

.pc-rating-row {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  margin-bottom: 4px !important;
  flex-wrap: nowrap !important;
}
.pc-time { color: #6b7280 !important; letter-spacing: .3px !important; }
.pc-star { color: #16a34a !important; display: inline-flex !important; align-items: center !important; gap: 2px !important; }
.pc-count { color: #6b7280 !important; font-weight: 500 !important; }

.product-weight {
  display: none !important; /* hidden — we show size pill on the image instead */
}

.product-name {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #1f2937 !important;
  line-height: 1.25 !important;
  min-height: 32px !important;
  margin-bottom: 6px !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

.product-pricing {
  display: flex !important;
  align-items: baseline !important;
  gap: 6px !important;
  margin-bottom: 2px !important;
}
.product-pricing .price {
  font-size: 14px !important;
  font-weight: 800 !important;
  color: #1f2937 !important;
}
.product-pricing .mrp {
  font-size: 11px !important;
  color: #9ca3af !important;
  text-decoration: line-through !important;
}

/* Discount % line (we add this dynamically via ::after on .product-pricing) */
.product-info .discount-line {
  font-size: 11px !important;
  color: #16a34a !important;
  font-weight: 700 !important;
  margin-bottom: 4px !important;
}

.earn-tag {
  display: inline-block !important;
  font-size: 9px !important;
  color: #ea580c !important;
  background: #fff7ed !important;
  border-radius: 4px !important;
  padding: 1px 5px !important;
  font-weight: 700 !important;
  margin-top: 4px !important;
}

/* ═══════ CATEGORY GRID — Swiggy style colored tiles ═══════ */
.cat-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 10px !important;
  padding: 0 14px !important;
}
.cat-tile {
  background: #F1F5F9 !important;
  border-radius: 14px !important;
  padding: 12px 8px 6px !important;
  text-align: center !important;
  text-decoration: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 6px !important;
  min-height: 110px !important;
  position: relative !important;
  overflow: hidden !important;
  border: 1px solid #f3f4f6 !important;
}
.cat-tile img.cat-img {
  width: 60px !important;
  height: 60px !important;
  object-fit: contain !important;
  margin-top: auto !important;
}
.cat-tile .cat-emoji {
  font-size: 38px !important;
  margin-top: auto !important;
  margin-bottom: 4px !important;
}
.cat-tile .cat-name {
  font-size: 11.5px !important;
  font-weight: 600 !important;
  color: #1f2937 !important;
  text-align: center !important;
  line-height: 1.2 !important;
  order: -1 !important; /* name on top, image below — like Swiggy */
}

/* ═══════ SECTION HEADERS ═══════ */
.section { padding: 16px 0 8px !important; }
.section-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 14px !important;
  margin-bottom: 10px !important;
}
.section-title {
  font-size: 17px !important;
  font-weight: 800 !important;
  color: #1f2937 !important;
  letter-spacing: -.3px !important;
}
.see-all {
  font-size: 12px !important;
  color: #2563eb !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

/* ═══════ FREE DELIVERY strip ═══════ */
.im-free-delivery-strip {
  position: fixed !important;
  left: 0 !important; right: 0 !important;
  bottom: var(--ek-nav-h) !important;
  background: linear-gradient(180deg, #ECFEFF 0%, #CFFAFE 100%) !important;
  color: #134e4a !important;
  text-align: center !important;
  padding: 9px 12px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  border-top: 1px solid #A5F3FC !important;
  z-index: 90 !important;
  box-shadow: 0 -2px 6px rgba(0,0,0,.03) !important;
}
.im-free-delivery-strip strong { color: #0F766E !important; font-weight: 800 !important; }

/* ═══════ BOTTOM NAV — Swiggy 4 tab style ═══════ */
.bottom-nav {
  position: fixed !important;
  left: 0 !important; right: 0 !important;
  bottom: 0 !important;
  height: var(--ek-nav-h) !important;
  background: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-around !important;
  border-top: 1px solid #e5e7eb !important;
  padding: 0 4px !important;
  z-index: 100 !important;
  box-shadow: 0 -2px 12px rgba(0,0,0,.04) !important;
}
.bottom-nav .nav-item, .bottom-nav a {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  flex: 1 !important;
  color: #6b7280 !important;
  text-decoration: none !important;
  font-size: 10.5px !important;
  font-weight: 600 !important;
  padding: 6px 0 !important;
  position: relative !important;
}
.bottom-nav .nav-item.active, .bottom-nav a.active {
  color: #1f2937 !important;
  font-weight: 800 !important;
}
.bottom-nav .nav-icon {
  font-size: 22px !important;
  line-height: 1 !important;
  margin: 0 !important;
}
.bottom-nav .cart-count {
  position: absolute !important;
  top: 4px !important;
  right: calc(50% - 22px) !important;
  background: #dc2626 !important;
  color: #fff !important;
  font-size: 9px !important;
  font-weight: 800 !important;
  min-width: 16px !important;
  height: 16px !important;
  border-radius: 8px !important;
  padding: 0 5px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
/* Active tab indicator — small line above */
.bottom-nav .nav-item.active::before, .bottom-nav a.active::before {
  content: '';
  position: absolute !important;
  top: 0 !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 24px !important;
  height: 3px !important;
  background: #1f2937 !important;
  border-radius: 0 0 4px 4px !important;
}

/* ═══════ PDP (product detail) PAGE ═══════ */
.pdp-page { padding: 14px !important; max-width: 480px; margin: 0 auto; }
.pdp-img-wrap {
  background: #fff !important;
  border-radius: 18px !important;
  padding: 16px !important;
  margin-bottom: 14px !important;
  border: 1px solid #f3f4f6 !important;
  position: relative !important;
}
.pdp-img-wrap img.pimg-lg {
  width: 100% !important; max-width: 300px !important;
  height: 280px !important;
  object-fit: contain !important;
  margin: 0 auto !important;
  display: block !important;
}
.pdp-info h1 {
  font-size: 20px !important;
  font-weight: 800 !important;
  color: #1f2937 !important;
  letter-spacing: -.4px !important;
  margin: 6px 0 8px !important;
}
.pdp-pricing { display: flex !important; align-items: baseline !important; gap: 10px !important; margin: 6px 0 !important; }
.pdp-pricing .price { font-size: 24px !important; font-weight: 800 !important; color: #1f2937 !important; }
.pdp-pricing .mrp { font-size: 14px !important; color: #9ca3af !important; text-decoration: line-through !important; }
.pdp-pricing .disc { color: #16a34a !important; font-weight: 800 !important; font-size: 13px !important; }
.pdp-actions { margin-top: 16px !important; }
.pdp-actions .btn-primary {
  background: #16a34a !important;
  color: #fff !important;
  font-weight: 800 !important;
  font-size: 15px !important;
  padding: 14px !important;
  border-radius: 12px !important;
  border: none !important;
  width: 100% !important;
  box-shadow: 0 4px 12px rgba(22,163,74,.25) !important;
}

/* ═══════ CART PAGE — Swiggy style ═══════ */
.cart-page { padding: 12px !important; max-width: 480px; margin: 0 auto; }
.cart-line {
  background: #fff !important;
  border-radius: 14px !important;
  padding: 12px !important;
  margin-bottom: 10px !important;
  display: flex !important;
  gap: 12px !important;
  align-items: center !important;
  border: 1px solid #f3f4f6 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.04) !important;
}
.cart-line img { width: 60px !important; height: 60px !important; border-radius: 10px !important; object-fit: cover !important; }

/* ═══════ TOAST ═══════ */
#cartToast {
  font-family: inherit !important;
  bottom: calc(var(--ek-nav-h) + 56px + 14px) !important;
}

/* ═══════ MOBILE TIGHTENING ═══════ */
@media (max-width: 380px) {
  .im-delivery-time { font-size: 19px !important; }
  .im-delivery-addr { max-width: 200px !important; }
  .im-promo-pill { padding: 4px 10px 4px 4px !important; }
  .product-scroll > .product-card { flex: 0 0 142px !important; width: 142px !important; }
  .im-curated-grid { gap: 8px !important; }
  .im-curated-tile { min-height: 130px !important; }
  .im-curated-img { font-size: 36px !important; }
  .cat-grid { grid-template-columns: repeat(3, 1fr) !important; }
}

/* Auto-zoom prevention — already in v19 — make sure still active */
input, textarea, select { font-size: 16px !important; }
input.im-search-input, .im-search input { font-size: 14px !important; }
html { -webkit-text-size-adjust: 100% !important; touch-action: manipulation !important; }
body { overflow-x: hidden !important; overscroll-behavior-x: none !important; }
button, a, .btn { touch-action: manipulation !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   BRAND STORE BANNER (Dashboard) — premium branded "Reseller Store" card
   ─────────────────────────────────────────────────────────────────────────── */
.brand-store-banner {
  position: relative !important;
  background: linear-gradient(135deg, #1E40AF 0%, #6366F1 50%, #8B5CF6 100%) !important;
  border-radius: 20px !important;
  padding: 18px !important;
  margin: 14px 0 !important;
  color: #fff !important;
  overflow: hidden !important;
  box-shadow: 0 10px 30px rgba(30,64,175,.25) !important;
}
.brand-store-glow {
  position: absolute !important;
  top: -40px !important;
  right: -40px !important;
  width: 160px !important;
  height: 160px !important;
  background: radial-gradient(circle, rgba(252,211,77,.4), transparent 70%) !important;
  border-radius: 50% !important;
  pointer-events: none !important;
}
.brand-store-content {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  position: relative !important;
  z-index: 1 !important;
}
.brand-store-logo {
  width: 58px !important;
  height: 58px !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg, #FCD34D, #F59E0B) !important;
  color: #7C2D12 !important;
  font-size: 28px !important;
  font-weight: 900 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 6px 16px rgba(0,0,0,.2), inset 0 -3px 6px rgba(0,0,0,.15) !important;
  flex-shrink: 0 !important;
  border: 3px solid rgba(255,255,255,.3) !important;
}
.brand-store-text { flex: 1 !important; min-width: 0 !important; }
.brand-store-eyebrow {
  font-size: 9.5px !important;
  font-weight: 700 !important;
  letter-spacing: 2.5px !important;
  color: rgba(255,255,255,.75) !important;
  text-transform: uppercase !important;
  margin-bottom: 2px !important;
}
.brand-store-name {
  font-size: 20px !important;
  font-weight: 800 !important;
  letter-spacing: -.3px !important;
  line-height: 1.15 !important;
  text-shadow: 0 1px 3px rgba(0,0,0,.15) !important;
  margin-bottom: 4px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.brand-store-tag {
  font-size: 11px !important;
  color: rgba(255,255,255,.85) !important;
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  flex-wrap: wrap !important;
}
.brand-store-verified {
  background: rgba(255,255,255,.2) !important;
  border: 1px solid rgba(255,255,255,.4) !important;
  color: #FCD34D !important;
  border-radius: 12px !important;
  padding: 1px 8px !important;
  font-size: 10px !important;
  font-weight: 700 !important;
}

.brand-store-stats {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 6px !important;
  margin-top: 14px !important;
  padding-top: 14px !important;
  border-top: 1px solid rgba(255,255,255,.18) !important;
  position: relative !important;
  z-index: 1 !important;
}
.brand-stat { text-align: center !important; }
.brand-stat-val {
  font-size: 16px !important;
  font-weight: 800 !important;
  color: #fff !important;
  line-height: 1.1 !important;
}
.brand-stat-lbl {
  font-size: 10px !important;
  color: rgba(255,255,255,.75) !important;
  font-weight: 600 !important;
  letter-spacing: .3px !important;
  margin-top: 2px !important;
}

@media (max-width: 380px) {
  .brand-store-name { font-size: 18px !important; }
  .brand-store-logo { width: 50px !important; height: 50px !important; font-size: 24px !important; }
}

/* PDP / inner-page top bar */
.im-pdp-topbar {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 10px 12px !important;
  background: #fff !important;
  border-bottom: 1px solid #f3f4f6 !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 90 !important;
  box-shadow: 0 1px 4px rgba(0,0,0,.04) !important;
}
.im-pdp-back {
  width: 40px !important; height: 40px !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  border-radius: 12px !important;
  background: #f3f4f6 !important;
  color: #1f2937 !important;
  text-decoration: none !important;
  flex-shrink: 0 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   v21 — PREMIUM BLACK + ORANGE THEME OVERLAY (final cascade winner)
   ─────────────────────────────────────────────────────────────────────────── */

:root {
  --v21-black:    #0F172A;       /* primary deep black */
  --v21-charcoal: #1F2937;       /* secondary dark */
  --v21-orange:   #F97316;       /* signature orange */
  --v21-orange-d: #EA580C;       /* darker orange (hover) */
  --v21-orange-l: #FB923C;       /* lighter orange */
  --v21-gold:     #FCD34D;       /* accent gold */
  --v21-cream:    #FFFBF5;       /* card cream bg */
  --v21-line:     #1E293B;       /* divider on dark */
  --v21-text-on-dark: #FAFAFA;
  --v21-text-on-light: #0F172A;
  --ek-nav-h: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ── Body — light cream warmth (only on customer pages) ── */
body:not(.admin-body) {
  background: linear-gradient(180deg, #FFFBF5 0%, #ffffff 100%) !important;
}
body {
  color: var(--v21-text-on-light) !important;
  padding-bottom: calc(var(--ek-nav-h) + 44px + var(--safe-bottom) + 8px) !important;
  opacity: 1;
}
body.admin-body { padding-bottom: 0 !important; }
body.page-fading { opacity: 0; transition: opacity .25s ease; }
body.page-loaded  { opacity: 1; transition: opacity .25s ease; }

/* ── v21 Header: themed bg from data + premium gradient overlay ── */
.im-header.v21 {
  background: linear-gradient(180deg, var(--theme-bg, #0F172A) 0%, color-mix(in srgb, var(--theme-bg, #0F172A) 92%, #000) 100%) !important;
  color: var(--theme-fg, #fff) !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
  padding: 14px 14px 0 !important;
  box-shadow: 0 4px 16px rgba(0,0,0,.12) !important;
}

/* Default theme (All tab) — premium black */
.im-header.v21[data-cat="all"] {
  --theme-bg: #0F172A;
  --theme-fg: #FAFAFA;
  background: linear-gradient(180deg, #0F172A 0%, #1E293B 100%) !important;
}

/* Promo pill — orange-glow over dark backgrounds */
.im-header.v21 .im-promo-pill {
  background: linear-gradient(135deg, rgba(252,211,77,.95), rgba(252,211,77,.85)) !important;
  color: #7C2D12 !important;
  box-shadow: 0 2px 12px rgba(252,211,77,.45) !important;
  border: 1px solid rgba(255,255,255,.3) !important;
}
.im-header.v21 .im-promo-icon {
  background: linear-gradient(135deg, #F97316, #EA580C) !important;
  color: #fff !important;
}

/* Profile button — orange ring on dark */
.im-header.v21 .im-profile-btn {
  background: linear-gradient(135deg, var(--v21-orange), var(--v21-orange-d)) !important;
  color: #fff !important;
  box-shadow: 0 3px 10px rgba(249,115,22,.45), 0 0 0 2px rgba(255,255,255,.15) !important;
  font-weight: 800 !important;
}

/* Delivery / store name — bolder */
.im-header.v21 .im-delivery-time {
  font-size: 22px !important;
  font-weight: 800 !important;
  letter-spacing: -.4px !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.15);
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.im-header.v21 .im-delivery-addr {
  font-size: 12px !important;
  opacity: .85 !important;
  max-width: 260px;
}

/* Search bar — keeps white, gets orange focus glow */
.im-header.v21 .im-search { border: 1.5px solid transparent !important; }
.im-header.v21 .im-search:focus-within {
  border-color: var(--v21-orange) !important;
  box-shadow: 0 0 0 3px rgba(249,115,22,.18) !important;
}

/* Bookmark btn — clean white on dark */
.im-header.v21 .im-bookmark { background: #fff !important; color: var(--v21-charcoal) !important; }

/* Category tabs — active gets cream rounded notch with orange underline */
.im-cat-tab { opacity: .75 !important; }
.im-cat-tab.is-active { opacity: 1 !important; }
.im-cat-tab.is-active::before {
  content: '' !important;
  position: absolute !important;
  left: 0 !important; right: 0 !important; bottom: 0 !important;
  height: 30px !important;
  background: #ffffff !important;
  border-radius: 16px 16px 0 0 !important;
  z-index: -1 !important;
  box-shadow: 0 -2px 10px rgba(0,0,0,.08) !important;
}
.im-cat-tab.is-active .im-cat-label,
.im-cat-tab.is-active .im-cat-icon {
  color: var(--v21-charcoal) !important;
  position: relative !important;
  z-index: 1 !important;
}
.im-cat-tab.is-active::after {
  content: '' !important;
  position: absolute !important;
  bottom: 6px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 22px !important;
  height: 3px !important;
  background: linear-gradient(90deg, var(--v21-orange), var(--v21-orange-l)) !important;
  border-radius: 2px !important;
  z-index: 2 !important;
}

/* ── PRODUCT CARDS — link wrap is the clickable surface ── */
.product-card { position: relative !important; }
.product-card-link {
  display: block !important;
  text-decoration: none !important;
  color: inherit !important;
  -webkit-tap-highlight-color: rgba(249,115,22,.1) !important;
}
.product-card:active { transform: scale(.98) !important; transition: transform .1s !important; }

/* + button — orange premium with isolation from card-link */
.add-btn {
  background: #ffffff !important;
  color: var(--v21-orange) !important;
  border: 1.5px solid var(--v21-orange) !important;
  box-shadow: 0 2px 6px rgba(249,115,22,.18) !important;
  z-index: 5 !important;
}
.add-btn:active {
  background: var(--v21-orange) !important;
  color: #fff !important;
  transform: scale(.92) !important;
}
.add-btn.added {
  background: #16a34a !important;
  color: #fff !important;
  border-color: #16a34a !important;
}

/* ── PRODUCT PREVIEW MODAL (Point 5+6) ── */
.prod-preview {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
  display: none !important;
  align-items: flex-end !important;
  justify-content: center !important;
}
.prod-preview.open { display: flex !important; }
.prod-preview-backdrop {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(0,0,0,.55) !important;
  backdrop-filter: blur(2px) !important;
  animation: ppFade .25s ease;
}
.prod-preview-card {
  position: relative !important;
  background: #fff !important;
  width: 100% !important;
  max-width: 480px !important;
  border-radius: 24px 24px 0 0 !important;
  padding: 16px 18px calc(20px + var(--safe-bottom)) !important;
  box-shadow: 0 -10px 40px rgba(0,0,0,.25) !important;
  animation: ppSlide .35s cubic-bezier(.34,1.56,.64,1) !important;
  max-height: 85vh !important;
  overflow-y: auto !important;
  z-index: 2 !important;
}
.prod-preview-close {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  background: #f3f4f6 !important;
  border: none !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #6b7280 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 3 !important;
}
.prod-preview-body { text-align: center !important; padding-top: 8px !important; }
.pp-img {
  width: 180px !important;
  height: 180px !important;
  margin: 0 auto 14px !important;
  background: #fff !important;
  border-radius: 16px !important;
  border: 1px solid #f3f4f6 !important;
  padding: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
}
.pp-img img, .pp-img .pimg, .pp-img .pimg-emoji {
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}
.pp-img .pimg-emoji {
  font-size: 80px !important;
  background: transparent !important;
}
.pp-name {
  font-size: 17px !important;
  font-weight: 800 !important;
  color: var(--v21-text-on-light) !important;
  margin-bottom: 4px !important;
  letter-spacing: -.3px !important;
}
.pp-price {
  font-size: 22px !important;
  font-weight: 900 !important;
  color: var(--v21-orange) !important;
  margin-bottom: 12px !important;
}
.pp-loading-line {
  width: 60px !important;
  height: 3px !important;
  background: linear-gradient(90deg, transparent, var(--v21-orange), transparent) !important;
  margin: 8px auto 16px !important;
  border-radius: 2px !important;
  animation: ppShimmer 1s ease-in-out infinite !important;
}
.pp-cta {
  display: block !important;
  width: 100% !important;
  padding: 14px !important;
  border-radius: 12px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  text-align: center !important;
  margin-top: 8px !important;
  cursor: pointer !important;
  border: none !important;
  transition: transform .12s ease !important;
}
.pp-cta-primary {
  background: linear-gradient(135deg, var(--v21-orange), var(--v21-orange-d)) !important;
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(249,115,22,.35) !important;
}
.pp-cta-primary:active { transform: scale(.97) !important; }
.pp-cta-secondary {
  background: #f3f4f6 !important;
  color: var(--v21-charcoal) !important;
}
.prod-preview-loading {
  padding: 40px 20px !important;
  text-align: center !important;
  color: #6b7280 !important;
}
.prod-preview-spinner {
  width: 28px !important;
  height: 28px !important;
  border: 3px solid #f3f4f6 !important;
  border-top-color: var(--v21-orange) !important;
  border-radius: 50% !important;
  margin: 0 auto 10px !important;
  animation: ppSpin .8s linear infinite !important;
}

@keyframes ppFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ppSlide { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes ppSpin { to { transform: rotate(360deg); } }
@keyframes ppShimmer {
  0%,100% { transform: scaleX(.4); opacity: .5; }
  50%     { transform: scaleX(1.2); opacity: 1; }
}

/* ── BOTTOM NAV FIX (Point 1) — premium black with orange accent ── */
.bottom-nav {
  position: fixed !important;
  left: 0 !important; right: 0 !important;
  bottom: 0 !important;
  height: calc(var(--ek-nav-h) + var(--safe-bottom)) !important;
  padding-bottom: var(--safe-bottom) !important;
  background: #ffffff !important;
  display: flex !important;
  align-items: stretch !important;
  justify-content: space-around !important;
  border-top: 1px solid #e5e7eb !important;
  z-index: 100 !important;
  box-shadow: 0 -4px 16px rgba(0,0,0,.06) !important;
}
.bottom-nav .nav-item, .bottom-nav a {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  flex: 1 1 0 !important;
  min-width: 0 !important;
  color: #6b7280 !important;
  text-decoration: none !important;
  font-size: 10.5px !important;
  font-weight: 600 !important;
  padding: 6px 2px !important;
  position: relative !important;
  height: var(--ek-nav-h) !important;
  -webkit-tap-highlight-color: transparent !important;
}
.bottom-nav .nav-icon {
  font-size: 22px !important;
  line-height: 1 !important;
  margin: 0 !important;
  transition: transform .15s ease !important;
}
.bottom-nav .nav-item.active, .bottom-nav a.active {
  color: var(--v21-orange) !important;
  font-weight: 800 !important;
}
.bottom-nav .nav-item.active .nav-icon, .bottom-nav a.active .nav-icon {
  transform: scale(1.15) translateY(-2px) !important;
}
.bottom-nav .nav-item.active::before, .bottom-nav a.active::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 28px !important;
  height: 3px !important;
  background: linear-gradient(90deg, var(--v21-orange), var(--v21-orange-l)) !important;
  border-radius: 0 0 4px 4px !important;
}

/* Cart badge — fixed position relative to the icon, not the whole nav-item */
.bottom-nav .cart-nav { position: relative !important; }
.bottom-nav .cart-count {
  position: absolute !important;
  top: 4px !important;
  right: calc(50% - 22px) !important;
  background: #dc2626 !important;
  color: #fff !important;
  font-size: 9.5px !important;
  font-weight: 800 !important;
  min-width: 17px !important;
  height: 17px !important;
  border-radius: 9px !important;
  padding: 0 5px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  border: 2px solid #fff !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.2) !important;
  z-index: 3 !important;
}

/* FREE DELIVERY strip — sits above bottom nav, accounts for safe area */
.im-free-delivery-strip {
  position: fixed !important;
  left: 0 !important; right: 0 !important;
  bottom: calc(var(--ek-nav-h) + var(--safe-bottom)) !important;
  background: linear-gradient(180deg, #FFFBEB 0%, #FEF3C7 100%) !important;
  color: #7C2D12 !important;
  text-align: center !important;
  padding: 8px 12px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  border-top: 1px solid #FCD34D !important;
  z-index: 90 !important;
  box-shadow: 0 -1px 4px rgba(0,0,0,.04) !important;
  letter-spacing: .2px !important;
}
.im-free-delivery-strip strong { color: #B45309 !important; font-weight: 800 !important; }

/* ── Existing curated tiles + steal banner — tweak for orange theme ── */
.im-curated-title { color: var(--v21-text-on-light) !important; }

.im-steal-banner {
  color: var(--v21-orange-d) !important;
  background: linear-gradient(90deg, transparent, rgba(249,115,22,.05), transparent) !important;
}

.im-lowest-card {
  background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 100%) !important;
  border: 1px solid #FED7AA !important;
}
.im-lowest-eyebrow { color: var(--v21-orange-d) !important; }
.im-lowest-eyebrow::before { background: var(--v21-orange) !important; }
.im-lowest-arrow { color: var(--v21-orange-d) !important; }

/* PDP "Add to Cart" sticky button — orange */
.pdp-actions .btn-primary {
  background: linear-gradient(135deg, var(--v21-orange), var(--v21-orange-d)) !important;
  box-shadow: 0 6px 18px rgba(249,115,22,.35) !important;
}

/* Toast color — orange to match theme */
#cartToast {
  background: linear-gradient(135deg, #16a34a, #15803d) !important;
  bottom: calc(var(--ek-nav-h) + 44px + var(--safe-bottom) + 14px) !important;
}

/* ── Lazy-loaded image fade-in (Point 6) ── */
img[loading="lazy"] {
  transition: opacity .3s ease !important;
}
img[loading="lazy"]:not([src]),
img[loading="lazy"][src=""] {
  opacity: 0 !important;
}

/* ── Page transitions ── */
.product-card, .cat-tile, .im-curated-tile {
  transition: transform .15s ease, box-shadow .15s ease !important;
}

/* ── Mobile-specific tightening ── */
@media (max-width: 380px) {
  .im-header.v21 .im-delivery-time { font-size: 18px !important; max-width: 180px !important; }
  .im-header.v21 .im-delivery-addr { max-width: 200px !important; }
  .im-header.v21 .im-promo-pill { padding: 4px 8px 4px 4px !important; }
  .bottom-nav .nav-item, .bottom-nav a { font-size: 9.5px !important; }
  .bottom-nav .nav-icon { font-size: 20px !important; }
}

/* ── iPhone notch + safe area handling ── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .bottom-nav { padding-bottom: env(safe-area-inset-bottom) !important; }
  .im-free-delivery-strip { bottom: calc(var(--ek-nav-h) + env(safe-area-inset-bottom)) !important; }
}

/* v21.1 — micro-fix: non-clickable store name area for guests */
.im-delivery.no-click {
  cursor: default !important;
  pointer-events: none !important;
}
.im-delivery.no-click .im-chev { display: none !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   v21.2 — UNIVERSAL BOTTOM NAV FIX (works on ALL pages, all devices)
   Targets: cart.php, dashboard.php, orders.php, product.php, track.php, all others
   ─────────────────────────────────────────────────────────────────────────── */

/* Bottom nav: full-bleed, fixed, with proper iOS safe-area + Safari toolbar handling */
.bottom-nav {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  /* Use CSS env for iOS notch + dynamic Safari toolbar */
  padding-bottom: max(env(safe-area-inset-bottom, 0px), 8px) !important;
  padding-left: max(env(safe-area-inset-left, 0px), 0px) !important;
  padding-right: max(env(safe-area-inset-right, 0px), 0px) !important;
  height: auto !important;
  min-height: var(--ek-nav-h, 64px) !important;
  background: #ffffff !important;
  display: flex !important;
  align-items: stretch !important;
  justify-content: space-around !important;
  border-top: 1px solid #e5e7eb !important;
  z-index: 9999 !important;
  box-shadow: 0 -4px 16px rgba(0,0,0,.08) !important;
  /* Force GPU layer so iOS doesn't clip behind Safari bar */
  transform: translateZ(0) !important;
  -webkit-transform: translateZ(0) !important;
  will-change: transform !important;
}

/* Each nav item — equal flex, no clipping */
.bottom-nav > a,
.bottom-nav > .nav-item {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  flex: 1 1 0 !important;
  min-width: 0 !important;
  max-width: none !important;
  color: #6b7280 !important;
  text-decoration: none !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  padding: 8px 2px !important;
  position: relative !important;
  height: 56px !important;
  overflow: visible !important;
  -webkit-tap-highlight-color: transparent !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

/* Icon */
.bottom-nav .nav-icon {
  font-size: 22px !important;
  line-height: 1 !important;
  margin: 0 !important;
  display: block !important;
}

/* Label */
.bottom-nav .nav-label {
  font-size: 10.5px !important;
  line-height: 1.2 !important;
  display: block !important;
  font-weight: 600 !important;
  letter-spacing: .1px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
}

/* Active state */
.bottom-nav > a.active,
.bottom-nav > .nav-item.active {
  color: #F97316 !important;
  font-weight: 800 !important;
}
.bottom-nav > a.active .nav-icon,
.bottom-nav > .nav-item.active .nav-icon {
  transform: scale(1.1) translateY(-1px) !important;
  transition: transform .15s ease !important;
}
.bottom-nav > a.active::before,
.bottom-nav > .nav-item.active::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 28px !important;
  height: 3px !important;
  background: linear-gradient(90deg, #F97316, #FB923C) !important;
  border-radius: 0 0 4px 4px !important;
}

/* Cart badge — proper position centered above the 🛒 icon */
.bottom-nav .cart-nav { position: relative !important; }
.bottom-nav .cart-count {
  position: absolute !important;
  top: 4px !important;
  left: 50% !important;
  margin-left: 4px !important;  /* offset to right of icon center */
  background: #dc2626 !important;
  color: #fff !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  min-width: 18px !important;
  height: 18px !important;
  border-radius: 9px !important;
  padding: 0 5px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  border: 2px solid #fff !important;
  box-shadow: 0 2px 4px rgba(220,38,38,.4) !important;
  z-index: 3 !important;
}

/* ── BODY PADDING for ALL pages (so content doesn't hide behind nav) ── */
body {
  padding-bottom: calc(var(--ek-nav-h, 64px) + env(safe-area-inset-bottom, 0px) + 12px) !important;
}

/* Pages that ALSO have FREE DELIVERY strip (index.php only) need MORE padding */
body:has(.im-free-delivery-strip) {
  padding-bottom: calc(var(--ek-nav-h, 64px) + 44px + env(safe-area-inset-bottom, 0px) + 12px) !important;
}

/* Admin pages don't have bottom nav — no padding */
body.admin-body { padding-bottom: 0 !important; }

/* ── PAGE-SPECIFIC FIXES ── */

/* Cart.php: Place Order sticky button must sit ABOVE bottom nav */
.cart-page-sticky-cta,
.cart-checkout-bar,
.checkout-sticky {
  bottom: calc(var(--ek-nav-h, 64px) + env(safe-area-inset-bottom, 0px) + 8px) !important;
}

/* Dashboard.php: ensure last refer-card visible above nav */
.dash-content,
.dashboard-container {
  padding-bottom: 20px !important;
}

/* Product.php sticky add-to-cart bar */
.pdp-sticky-cta {
  bottom: calc(var(--ek-nav-h, 64px) + env(safe-area-inset-bottom, 0px) + 8px) !important;
}

/* ── Small phone (iPhone SE / 380px) ── */
@media (max-width: 380px) {
  .bottom-nav > a,
  .bottom-nav > .nav-item {
    font-size: 9.5px !important;
    padding: 6px 1px !important;
  }
  .bottom-nav .nav-label { font-size: 9.5px !important; }
  .bottom-nav .nav-icon { font-size: 20px !important; }
}

/* Very narrow (under 340px) */
@media (max-width: 340px) {
  .bottom-nav .nav-label { font-size: 9px !important; }
}

/* v21.2 — kill old desktop-only nav transform that was breaking layout */
@media (min-width: 480px) {
  .bottom-nav {
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    /* On desktop, center the nav inside a max-width container */
    max-width: 100% !important;
  }
  /* Center nav content visually using padding instead of width-clip */
  .bottom-nav::before, .bottom-nav::after { content: none !important; }
}
/* On very large screens, only center the inner nav items, not the bar itself */
@media (min-width: 720px) {
  .bottom-nav > a,
  .bottom-nav > .nav-item {
    max-width: 120px !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   v22.1 — ADMIN PANEL DESKTOP-FIRST (full width, premium UX)
   ─────────────────────────────────────────────────────────────────────────── */

body.admin-body {
  background: #F3F4F6 !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  padding-bottom: 0 !important;
  font-size: 14px !important;
  opacity: 1 !important;
}

/* Force admin shell full width */
.admin-shell {
  display: flex !important;
  min-height: 100vh !important;
  width: 100% !important;
  max-width: none !important;
}

/* Sidebar premium dark */
.admin-shell .sidebar {
  width: 240px !important;
  min-width: 240px !important;
  background: linear-gradient(180deg, #111827 0%, #1F2937 100%) !important;
  color: #fff !important;
  flex-shrink: 0 !important;
  position: sticky !important;
  top: 0 !important;
  height: 100vh !important;
  overflow-y: auto !important;
  box-shadow: 2px 0 12px rgba(0,0,0,.08) !important;
  padding: 16px 0 !important;
}

.admin-shell .sidebar .brand {
  font-size: 17px !important;
  font-weight: 800 !important;
  padding: 8px 20px 16px !important;
  border-bottom: 1px solid #374151 !important;
  margin-bottom: 12px !important;
  color: #fff !important;
}

.admin-shell .sidebar a {
  display: block !important;
  color: #D1D5DB !important;
  padding: 11px 20px !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  transition: background .15s, color .15s !important;
  border-left: 3px solid transparent !important;
}
.admin-shell .sidebar a:hover {
  background: #374151 !important;
  color: #fff !important;
}
.admin-shell .sidebar a.active {
  background: linear-gradient(90deg, rgba(249,115,22,.15), transparent) !important;
  color: #F97316 !important;
  border-left-color: #F97316 !important;
  font-weight: 700 !important;
}

/* Main content full available width */
.admin-shell .admin-main {
  flex: 1 1 0 !important;
  width: 100% !important;
  max-width: none !important;
  padding: 24px 28px !important;
  overflow-x: auto !important;
  background: #F3F4F6 !important;
}

.admin-shell .admin-main h1 {
  font-size: 24px !important;
  font-weight: 800 !important;
  margin: 0 0 20px !important;
  color: #111827 !important;
  letter-spacing: -.3px !important;
}

/* Panels full width */
.admin-body .panel {
  background: #fff !important;
  border-radius: 10px !important;
  padding: 18px 22px !important;
  margin-bottom: 16px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.04), 0 1px 2px rgba(0,0,0,.06) !important;
  max-width: none !important;
  width: 100% !important;
}
.admin-body .panel h3 {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #1F2937 !important;
  margin: 0 0 14px !important;
}

/* Stats grid — multiple columns on desktop */
.admin-body .admin-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
  gap: 14px !important;
  margin-bottom: 22px !important;
}

.admin-body .adm-stat {
  background: #fff !important;
  border-radius: 10px !important;
  padding: 16px 18px !important;
  border-left: 4px solid #F97316 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.04) !important;
}
.admin-body .adm-stat .l {
  font-size: 11px !important;
  color: #6B7280 !important;
  text-transform: uppercase !important;
  font-weight: 600 !important;
  letter-spacing: .4px !important;
}
.admin-body .adm-stat .v {
  font-size: 26px !important;
  font-weight: 800 !important;
  color: #111827 !important;
  margin-top: 6px !important;
  line-height: 1.1 !important;
}

/* Tables — wider, proper spacing for desktop */
.admin-body table.t,
.admin-body .panel table {
  width: 100% !important;
  border-collapse: collapse !important;
  font-size: 13px !important;
  background: #fff !important;
}
.admin-body table.t th,
.admin-body .panel table th {
  background: #F9FAFB !important;
  text-align: left !important;
  padding: 10px 12px !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  text-transform: uppercase !important;
  letter-spacing: .3px !important;
  color: #4B5563 !important;
  border-bottom: 2px solid #E5E7EB !important;
}
.admin-body table.t td,
.admin-body .panel table td {
  padding: 10px 12px !important;
  border-bottom: 1px solid #F3F4F6 !important;
  vertical-align: middle !important;
}
.admin-body table.t tbody tr:hover,
.admin-body .panel table tbody tr:hover {
  background: #F9FAFB !important;
}

/* Buttons cleaner on desktop */
.admin-body .btn {
  padding: 8px 16px !important;
  font-size: 13px !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  border: none !important;
  transition: opacity .15s, transform .1s !important;
}
.admin-body .btn:active { transform: scale(.97) !important; }
.admin-body .btn-primary {
  background: #F97316 !important;
  color: #fff !important;
}
.admin-body .btn-primary:hover { background: #EA580C !important; }
.admin-body .btn-secondary {
  background: #fff !important;
  color: #374151 !important;
  border: 1px solid #D1D5DB !important;
}
.admin-body .btn-secondary:hover { background: #F9FAFB !important; }
.admin-body .btn-danger {
  background: #DC2626 !important;
  color: #fff !important;
}

/* Forms */
.admin-body input[type="text"],
.admin-body input[type="number"],
.admin-body input[type="email"],
.admin-body input[type="tel"],
.admin-body input[type="password"],
.admin-body select,
.admin-body textarea {
  padding: 8px 12px !important;
  border: 1px solid #D1D5DB !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  background: #fff !important;
}
.admin-body input:focus,
.admin-body select:focus,
.admin-body textarea:focus {
  outline: none !important;
  border-color: #F97316 !important;
  box-shadow: 0 0 0 3px rgba(249,115,22,.12) !important;
}

/* No bottom nav on admin pages */
.admin-body .bottom-nav { display: none !important; }
.admin-body .im-free-delivery-strip { display: none !important; }

/* ── Mobile/Tablet admin (< 900px) — collapsible sidebar at top ── */
@media (max-width: 900px) {
  .admin-shell { flex-direction: column !important; }
  .admin-shell .sidebar {
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    max-height: none !important;
    position: relative !important;
    padding: 10px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
  }
  .admin-shell .sidebar .brand {
    width: 100% !important;
    padding: 8px 12px !important;
    border-bottom: 1px solid #374151 !important;
    margin-bottom: 8px !important;
    font-size: 14px !important;
  }
  .admin-shell .sidebar a {
    padding: 6px 12px !important;
    font-size: 12px !important;
    border-left: none !important;
    border-radius: 6px !important;
    flex: 0 0 auto !important;
  }
  .admin-shell .sidebar a.active {
    background: #F97316 !important;
    color: #fff !important;
  }
  .admin-shell .admin-main { padding: 14px !important; }
  .admin-shell .admin-main h1 { font-size: 18px !important; }
}

/* Tables horizontal-scroll on small screens */
@media (max-width: 700px) {
  .admin-body .panel { padding: 12px !important; }
  .admin-body table.t,
  .admin-body .panel table {
    font-size: 11px !important;
  }
  .admin-body table.t th,
  .admin-body .panel table th,
  .admin-body table.t td,
  .admin-body .panel table td {
    padding: 6px 8px !important;
  }
}
