/* =========================================
   KHOJO APP - PREMIUM MOBILE UI STYLESHEET
   ========================================= */

:root {
  --primary: #6d28d9;
  --primary-light: #a78bfa;
  --primary-dark: #5b21b6;
  --secondary: #f5c518;
  --secondary-light: #fde047;
  --accent: #f5c518;
  --bg: #F8F7FC;
  --bg2: #EFEAFB;
  --card: #FFFFFF;
  --card-shadow: 0 4px 20px rgba(109,40,217,0.08);
  --text: #1e1b29;
  --text2: #6b6478;
  --text3: #a39fb0;
  --border: #e7e4f0;
  --radius: 18px;
  --radius-sm: 12px;
  --header-h: 110px;
  --nav-h: 68px;
  --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  --glass: rgba(255,255,255,0.85);
  --glass-border: rgba(255,255,255,0.5);
  --success: #16a34a;
  --success-bg: #dcfce7;
  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --warning: #d97706;
  --warning-bg: #fef3c7;
  --info: #2563eb;
  --info-bg: #dbeafe;
}

[data-theme="dark"] {
  --bg: #161025;
  --bg2: #221a38;
  --card: #1f1733;
  --card-shadow: 0 4px 20px rgba(0,0,0,0.3);
  --text: #F8F7FC;
  --text2: #a39fb0;
  --text3: #6b6478;
  --border: #332a4d;
  --glass: rgba(31,23,51,0.92);
  --glass-border: rgba(255,255,255,0.08);
  --success-bg: rgba(22,163,74,0.15);
  --danger-bg: rgba(220,38,38,0.15);
  --warning-bg: rgba(217,119,6,0.15);
  --info-bg: rgba(37,99,235,0.15);
}

* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
a { text-decoration: none; color: inherit; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  transition: background 0.3s, color 0.3s;
}

/* =========================================
   SPLASH SCREEN
   ========================================= */
.splash-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: linear-gradient(160deg, #1c1233 0%, #4c1d95 50%, #6d28d9 100%);
  display: flex; align-items: center; justify-content: center;
}
.splash-content { text-align: center; }
.splash-logo-wrap { position: relative; display: inline-block; margin-bottom: 24px; }
.splash-logo { width: 260px; height: auto; filter: drop-shadow(0 8px 32px rgba(0,0,0,0.3)); animation: splashBounce 0.8s ease; }
.splash-pulse {
  position: absolute; inset: -20px; border-radius: 50%;
  background: rgba(255,255,255,0.1);
  animation: splashPulse 2s ease-in-out infinite;
}
.splash-tagline { color: rgba(255,255,255,0.9); font-size: 1.1rem; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 40px; }
.splash-loader { width: 200px; margin: 0 auto; }
.loader-bar { height: 4px; background: rgba(255,255,255,0.2); border-radius: 2px; overflow: hidden; }
.loader-fill { height: 100%; background: white; border-radius: 2px; width: 0; animation: loaderFill 2.5s ease forwards; }

@keyframes splashBounce { 0%{transform:scale(0.5);opacity:0} 70%{transform:scale(1.05)} 100%{transform:scale(1);opacity:1} }
@keyframes splashPulse { 0%,100%{transform:scale(1);opacity:0.5} 50%{transform:scale(1.2);opacity:0} }
@keyframes loaderFill { 0%{width:0} 100%{width:100%} }

/* =========================================
   LOGIN PAGE
   ========================================= */
.page { min-height: 100vh; position: relative; overflow: hidden; }
.login-bg { position: absolute; inset: 0; background: var(--bg); }
.login-blob {
  position: absolute; border-radius: 50%;
  filter: blur(60px); opacity: 0.15;
}
.blob1 { width: 350px; height: 350px; background: var(--primary); top: -100px; right: -80px; }
.blob2 { width: 300px; height: 300px; background: var(--secondary); bottom: -60px; left: -80px; }
.login-container {
  position: relative; z-index: 1; padding: 60px 28px 40px;
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
}
.theme-toggle-btn {
  position: absolute; top: 24px; right: 24px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1.1rem; box-shadow: var(--card-shadow);
  transition: var(--transition);
}
.login-logo-wrap { text-align: center; margin-bottom: 32px; }
.login-logo { width: 200px; height: auto; }
.login-title { font-size: 1.8rem; font-weight: 900; color: var(--text); margin-bottom: 6px; }
.login-subtitle { color: var(--text2); font-size: 0.95rem; margin-bottom: 32px; }

.input-group-modern {
  display: flex; align-items: center;
  background: var(--card); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
  transition: border-color 0.2s;
}
.input-group-modern:focus-within { border-color: var(--primary); }
.input-prefix {
  padding: 14px 12px; font-size: 0.9rem; font-weight: 700;
  color: var(--text2); border-right: 1px solid var(--border);
  white-space: nowrap; background: var(--bg2);
}
.modern-input {
  flex: 1; border: none; outline: none; padding: 14px 16px;
  font-family: 'Nunito', sans-serif; font-size: 1rem;
  background: transparent; color: var(--text);
}
.modern-input::placeholder { color: var(--text3); }

.btn-primary-modern {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white; border: none; border-radius: var(--radius-sm);
  padding: 15px 24px; font-family: 'Nunito', sans-serif;
  font-size: 1rem; font-weight: 800; cursor: pointer;
  transition: var(--transition); box-shadow: 0 4px 15px rgba(37,99,235,0.3);
}
.btn-primary-modern:active { transform: scale(0.97); }

.divider-text {
  text-align: center; margin: 20px 0; position: relative;
}
.divider-text::before {
  content: ''; position: absolute; top: 50%; left: 0; right: 0;
  height: 1px; background: var(--border);
}
.divider-text span {
  position: relative; background: var(--bg); padding: 0 12px;
  color: var(--text3); font-size: 0.85rem;
}
.btn-google {
  background: var(--card); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 24px;
  font-family: 'Nunito', sans-serif; font-size: 0.95rem; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  gap: 8px; color: var(--text); transition: var(--transition);
}
.btn-google:active { background: var(--bg2); }

.otp-info { text-align: center; margin-bottom: 20px; color: var(--text2); }
.otp-boxes { display: flex; gap: 10px; justify-content: center; margin-bottom: 4px; }
.otp-box {
  width: 46px; height: 54px; text-align: center;
  border: 2px solid var(--border); border-radius: 12px;
  font-size: 1.4rem; font-weight: 800; font-family: 'Nunito', sans-serif;
  background: var(--card); color: var(--text); outline: none;
  transition: border-color 0.2s;
}
.otp-box:focus { border-color: var(--primary); }
.resend-text { text-align: center; margin-top: 16px; color: var(--text2); font-size: 0.9rem; }

/* =========================================
   MAIN APP LAYOUT
   ========================================= */
#mainApp { min-height: 100vh; background: var(--bg); }

.app-header {
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(135deg, var(--primary-dark, #5b21b6), var(--primary, #6d28d9));
  padding: 12px 16px 14px;
  box-shadow: 0 2px 12px rgba(37,99,235,0.08);
  transition: background 0.3s;
}
.header-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.header-location { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.location-icon { color: #fde68a; font-size: 1.2rem; }
.loc-label { display: block; font-size: 0.7rem; color: rgba(255,255,255,0.75); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.loc-name { font-size: 0.9rem; font-weight: 800; color: #fff; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.16); cursor: pointer; display: flex;
  align-items: center; justify-content: center; font-size: 1rem;
  color: #fff; position: relative; transition: var(--transition);
}
.icon-btn:active { transform: scale(0.9); }
.badge-dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px; background: #ef4444;
  border-radius: 50%; border: 2px solid var(--card);
}
.avatar-btn { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; cursor: pointer; border: 2px solid #fff; }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }

.search-bar-wrap { cursor: pointer; }
.search-bar {
  background: #fff; border-radius: 12px; padding: 10px 14px;
  display: flex; align-items: center; gap: 10px; color: var(--text3);
  border: none; box-shadow: 0 2px 8px rgba(0,0,0,0.12); transition: var(--transition);
}
.search-bar i.bi-search { color: var(--primary); }
.search-bar:active { transform: scale(0.99); }
.search-placeholder { font-size: 0.9rem; flex: 1; }
.search-cam-btn { color: var(--text3); font-size: 1rem; padding-left: 8px; border-left: 1px solid var(--border); }

.page-container { padding-top: 0; }
.app-page { display: none; padding: 0; }
.app-page.active { display: block; }

/* =========================================
   BANNER SLIDER (native scroll-snap — swipes natively on touch,
   JS in app.js just drives the dots + optional auto-advance)
   ========================================= */
.banner-slider {
  position: relative; border-radius: 0 0 20px 20px; margin-bottom: 4px;
}
.banner-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.banner-track::-webkit-scrollbar { display: none; }
.banner-slide {
  min-width: 100%; scroll-snap-align: start; flex-shrink: 0;
  padding: 20px 20px 30px; text-decoration: none;
  display: flex; align-items: center; justify-content: space-between;
  min-height: 160px; position: relative; overflow: hidden;
}
.banner-content { flex: 1; }
.banner-badge {
  display: inline-block; background: rgba(255,255,255,0.2);
  color: white; border-radius: 20px; padding: 3px 10px;
  font-size: 0.75rem; font-weight: 700; margin-bottom: 8px;
  border: 1px solid rgba(255,255,255,0.3);
}
.banner-content h3 { color: white; font-size: 1.3rem; font-weight: 900; margin-bottom: 4px; }
.banner-content p { color: rgba(255,255,255,0.85); font-size: 0.82rem; margin-bottom: 12px; }
.banner-btn {
  display: inline-block; background: white; border: none; border-radius: 20px;
  padding: 7px 18px; font-size: 0.8rem; font-weight: 800; color: var(--primary);
  cursor: pointer; transition: var(--transition); text-decoration: none;
}
.banner-btn:active { transform: scale(0.95); }
.banner-icon { font-size: 4.5rem; opacity: 0.9; }
.banner-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; z-index: 2; }
.dot { width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.4); transition: all 0.3s; cursor: pointer; }
.dot.active { width: 20px; background: white; }

/* Numeric notification/support badge (header icon buttons) */
.badge-dot-count {
  position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px;
  padding: 0 3px; border-radius: 10px; background: #ef4444; color: #fff;
  font-size: 0.6rem; font-weight: 800; display: flex; align-items: center; justify-content: center;
  line-height: 1; border: 1.5px solid var(--card);
}

/* =========================================
   SECTIONS
   ========================================= */
.section-wrap { padding: 16px 16px 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-header h6 { font-size: 1rem; font-weight: 800; color: var(--text); margin: 0; }
.section-header a { font-size: 0.82rem; color: var(--primary); font-weight: 700; text-decoration: none; }

/* Quick Services */
.quick-services { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.qs-item { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.qs-icon {
  width: 56px; height: 56px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  transition: var(--transition);
}
.qs-item:active .qs-icon { transform: scale(0.9); }
.qs-item span { font-size: 0.72rem; font-weight: 700; color: var(--text2); text-align: center; }

/* Categories */
.categories-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.cat-card {
  background: var(--card); border-radius: var(--radius-sm);
  padding: 12px 6px; display: flex; flex-direction: column;
  align-items: center; gap: 6px; cursor: pointer;
  box-shadow: var(--card-shadow); transition: var(--transition);
  border: 1px solid var(--border);
}
.cat-card:active { transform: scale(0.95); }
.cat-emoji { font-size: 1.8rem; }
.cat-card span { font-size: 0.7rem; font-weight: 700; color: var(--text2); text-align: center; }

/* Stores */
.stores-list { display: flex; flex-direction: column; gap: 12px; }
.store-card {
  background: var(--card); border-radius: var(--radius);
  overflow: hidden; display: flex; cursor: pointer;
  box-shadow: var(--card-shadow); border: 1px solid var(--border);
  transition: var(--transition);
}
.store-card:active { transform: scale(0.98); }
.store-img-wrap { position: relative; flex-shrink: 0; }
.store-img {
  width: 90px; height: 90px;
  display: flex; align-items: center; justify-content: center;
}
.store-badge {
  position: absolute; bottom: 6px; left: 6px;
  font-size: 0.65rem; font-weight: 800; padding: 2px 7px;
  border-radius: 10px; text-transform: uppercase; letter-spacing: 0.5px;
}
.store-badge.open { background: #dcfce7; color: #16a34a; }
.store-badge.closed { background: #fee2e2; color: #dc2626; }
.store-info { padding: 12px; flex: 1; }
.store-info h6 { font-size: 0.92rem; font-weight: 800; margin-bottom: 4px; color: var(--text); }
.store-meta { display: flex; gap: 5px; align-items: center; font-size: 0.72rem; color: var(--text2); margin-bottom: 6px; flex-wrap: wrap; }
.rating { color: var(--accent); font-weight: 700; }
.store-tag { font-size: 0.7rem; color: var(--text3); }

/* Offers */
.offers-scroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.offers-scroll::-webkit-scrollbar { display: none; }
.offer-chip {
  white-space: nowrap; background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: var(--primary); border: 1px solid #bfdbfe;
  border-radius: 20px; padding: 7px 16px; font-size: 0.8rem; font-weight: 800;
  cursor: pointer; transition: var(--transition); flex-shrink: 0;
}
[data-theme="dark"] .offer-chip { background: linear-gradient(135deg, #1e3a8a33, #1e3a8a66); border-color: #1e40af; }
.offer-chip:active { transform: scale(0.95); }

/* Glass Card */
.glass-card {
  background: var(--glass); backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border); border-radius: var(--radius);
  padding: 16px; margin: 16px; box-shadow: var(--card-shadow);
}

/* =========================================
   ACCOUNT OVERVIEW STAT CARDS
   ========================================= */
.overview-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.overview-stat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px; display: flex; flex-direction: column; gap: 8px;
  box-shadow: var(--card-shadow); transition: var(--transition);
}
.overview-stat-card:active { transform: scale(0.97); }
.overview-stat-icon {
  width: 38px; height: 38px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
}
.overview-stat-value { font-size: 1.05rem; font-weight: 900; color: var(--text); line-height: 1.2; word-break: break-word; }
.overview-stat-label { font-size: 0.72rem; font-weight: 700; color: var(--text2); }

/* =========================================
   SUB HEADER
   ========================================= */
.sub-header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: var(--card);
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--border);
}
.sub-header.transparent { background: transparent; border-bottom: none; }
.back-btn {
  width: 38px; height: 38px; border-radius: 50%; border: none;
  background: var(--bg2); display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text); font-size: 1.1rem; flex-shrink: 0;
  transition: var(--transition);
}
.back-btn:active { transform: scale(0.9); }
.sub-title { font-size: 1rem; font-weight: 800; color: var(--text); margin: 0; flex: 1; }

/* Search page */
.search-input-wrap {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: var(--bg2); border-radius: 10px; padding: 8px 12px;
  border: 1.5px solid var(--border);
}
.search-input-wrap i { color: var(--text3); }
.search-input-wrap input {
  flex: 1; border: none; outline: none; background: transparent;
  font-family: 'Nunito',sans-serif; font-size: 0.95rem; color: var(--text);
}
.search-content { padding: 16px; }
.suggestions-title { font-size: 0.85rem; font-weight: 700; color: var(--text2); margin-bottom: 12px; }
.suggestion-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.stag {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; padding: 6px 14px; font-size: 0.82rem;
  font-weight: 700; cursor: pointer; color: var(--text2);
  transition: var(--transition);
}
.stag:active { background: var(--primary); color: white; border-color: var(--primary); }

/* =========================================
   PRODUCTS GRID
   ========================================= */
.products-grid-wrap { padding: 12px; }
.products-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.product-card {
  background: var(--card); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; box-shadow: var(--card-shadow);
  border: 1px solid var(--border); transition: var(--transition);
  position: relative; display: flex; flex-direction: column; height: 100%;
}
.product-card:active { transform: scale(0.97); }
.product-img {
  width: 100%; height: 160px;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; position: relative; overflow: hidden; flex-shrink: 0;
}
.product-discount {
  position: absolute; top: 8px; left: 8px;
  background: #ef4444; color: white; font-size: 0.65rem;
  font-weight: 800; padding: 2px 7px; border-radius: 6px;
}
.wishlist-btn {
  position: absolute; top: 8px; right: 8px;
  width: 28px; height: 28px; border-radius: 50%;
  background: white; border: none; display: flex;
  align-items: center; justify-content: center; cursor: pointer;
  font-size: 0.9rem; color: #ef4444; box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.product-info { padding: 10px; display: flex; flex-direction: column; flex: 1; }
.product-name {
  font-size: 0.85rem; font-weight: 700; color: var(--text); margin-bottom: 4px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; text-overflow: ellipsis; height: 2.6em;
}
.product-price { font-size: 1rem; font-weight: 900; color: var(--primary); }
.product-mrp { font-size: 0.75rem; color: var(--text3); text-decoration: line-through; margin-left: 4px; }
.product-off { display: block; font-size: 0.72rem; font-weight: 800; color: #16a34a; margin-top: 2px; }
.product-rating-badge {
  display: inline-flex; align-items: center; gap: 3px; background: #16a34a; color: #fff;
  font-size: 0.68rem; font-weight: 800; padding: 1px 6px; border-radius: 4px; margin-bottom: 4px;
}
.product-rating-badge i { font-size: 0.6rem; }
.add-cart-btn {
  width: 100%; background: linear-gradient(135deg,var(--primary),var(--primary-light));
  color: white; border: none; border-radius: 8px;
  padding: 8px; font-size: 0.8rem; font-weight: 800;
  cursor: pointer; margin-top: 8px; transition: var(--transition);
  font-family: 'Nunito', sans-serif;
}
.add-cart-btn:active { transform: scale(0.95); }
.qty-control {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg2); border-radius: 8px; overflow: hidden;
  margin-top: 8px;
}
.qty-btn {
  width: 32px; height: 32px; border: none; background: var(--primary);
  color: white; font-size: 1.1rem; font-weight: 800; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Nunito', sans-serif;
}
.qty-num { font-size: 0.9rem; font-weight: 800; color: var(--text); }

/* =========================================
   RECHARGE PAGE
   ========================================= */
.recharge-wrap { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.rc-title { font-size: 1rem; font-weight: 800; margin-bottom: 14px; color: var(--text); }
.operator-detect { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.op-badge, .op-circle {
  background: var(--bg2); border-radius: 20px; padding: 4px 12px;
  font-size: 0.8rem; font-weight: 700; color: var(--text2);
}
.operator-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-top: 14px; }
.op-item {
  background: var(--bg2); border-radius: 12px; padding: 10px 6px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  cursor: pointer; border: 2px solid transparent; transition: var(--transition);
}
.op-item.active { border-color: var(--primary); background: #eff6ff; }
[data-theme="dark"] .op-item.active { background: #1e3a8a33; }
.op-item img { width: 32px; height: 32px; object-fit: contain; }
.op-item span:last-child { font-size: 0.72rem; font-weight: 700; color: var(--text2); }

.plans-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.plan-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg2); border-radius: 12px; padding: 12px;
  cursor: pointer; border: 2px solid transparent; transition: var(--transition);
}
.plan-item.selected { border-color: var(--primary); background: #eff6ff; }
[data-theme="dark"] .plan-item.selected { background: #1e3a8a22; }
.plan-price { font-size: 1.2rem; font-weight: 900; color: var(--primary); min-width: 50px; }
.plan-info { flex: 1; }
.plan-info strong { display: block; font-size: 0.88rem; color: var(--text); }
.plan-info span { font-size: 0.72rem; color: var(--text2); }
.plan-tag { font-size: 0.65rem; font-weight: 800; background: var(--secondary); color: white; padding: 2px 8px; border-radius: 10px; }

.rh-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.rh-item:last-child { border-bottom: none; }
.rh-op { font-size: 0.82rem; font-weight: 700; color: var(--text); flex-shrink: 0; }
.rh-mid { flex: 1; font-size: 0.82rem; color: var(--text2); }
.rh-amt { font-size: 0.85rem; font-weight: 800; color: var(--text); display: flex; align-items: center; gap: 6px; }
.badge-status {
  font-size: 0.65rem; font-weight: 800; padding: 2px 8px; border-radius: 10px;
}
.badge-status.success { background: #dcfce7; color: #16a34a; }
.badge-status.failed { background: #fee2e2; color: #dc2626; }
.badge-status.pending { background: #fef3c7; color: #d97706; }
.recharge-history h6 { font-size: 0.9rem; font-weight: 800; margin-bottom: 12px; color: var(--text); }

/* =========================================
   CART PAGE
   ========================================= */
.cart-content-wrap { padding: 16px; }
.cart-item {
  background: var(--card); border-radius: var(--radius-sm);
  padding: 14px; margin-bottom: 10px; display: flex;
  gap: 12px; border: 1px solid var(--border); align-items: center;
  box-shadow: var(--card-shadow);
}
.cart-item-img { font-size: 2.2rem; width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; background: var(--bg2); border-radius: 10px; flex-shrink: 0; }
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 0.9rem; font-weight: 800; color: var(--text); margin-bottom: 2px; }
.cart-item-price { font-size: 0.95rem; font-weight: 900; color: var(--primary); }
.cart-remove { background: none; border: none; color: #ef4444; cursor: pointer; padding: 4px; }

.coupon-apply {
  background: var(--card); border-radius: var(--radius-sm);
  padding: 14px; margin-bottom: 10px; display: flex; gap: 10px;
  border: 1.5px dashed var(--primary); align-items: center;
}
.coupon-apply input {
  flex: 1; border: none; outline: none; background: transparent;
  font-family: 'Nunito',sans-serif; font-size: 0.9rem; color: var(--text);
}
.coupon-apply button {
  background: var(--primary); color: white; border: none;
  border-radius: 8px; padding: 8px 16px; font-size: 0.82rem;
  font-weight: 800; cursor: pointer; font-family: 'Nunito',sans-serif;
}

.cart-summary {
  background: var(--card); border-radius: var(--radius);
  padding: 16px; margin-bottom: 10px;
  border: 1px solid var(--border);
}
.sum-row { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 0.88rem; color: var(--text2); }
.sum-row.total { font-weight: 900; font-size: 1rem; color: var(--text); border-top: 1px solid var(--border); padding-top: 10px; margin-top: 6px; }
.sum-row.discount { color: var(--secondary); }

.cart-count-label { font-size: 0.8rem; color: var(--text3); font-weight: 600; }

/* =========================================
   ORDER TRACKING
   ========================================= */
.tracking-wrap { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.order-info-card { padding: 16px; }
.order-id { font-size: 1rem; font-weight: 900; color: var(--text); margin-bottom: 6px; }
.order-eta, .order-addr { font-size: 0.85rem; color: var(--text2); margin-bottom: 4px; }
.tracking-map { height: 150px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg,#dbeafe,#d1fae5); position: relative; overflow: hidden; }
.map-placeholder { text-align: center; }
.map-animation { position: relative; margin-bottom: 10px; }
.map-dot { width: 20px; height: 20px; background: var(--primary); border-radius: 50%; margin: 0 auto; }
.pulse-map { animation: pulseMap 1.5s ease-in-out infinite; }
@keyframes pulseMap { 0%,100%{box-shadow:0 0 0 0 rgba(37,99,235,0.4)} 50%{box-shadow:0 0 0 15px rgba(37,99,235,0)} }
.map-placeholder p { font-size: 0.85rem; font-weight: 700; color: var(--text2); }

.timeline-card { padding: 16px; }
.timeline-item {
  display: flex; gap: 14px; align-items: flex-start;
  position: relative; padding-bottom: 20px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ''; position: absolute; left: 15px; top: 32px;
  width: 2px; height: 100%; background: var(--border);
}
.timeline-item:last-child::before { display: none; }
.timeline-item.completed::before { background: var(--secondary); }
.timeline-item.active::before { background: linear-gradient(var(--secondary),var(--border)); }
.tl-icon {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg2); color: var(--text3); font-size: 0.9rem;
  position: relative; z-index: 1;
}
.timeline-item.completed .tl-icon { background: var(--secondary); color: white; }
.timeline-item.active .tl-icon { background: var(--primary); color: white; }
.pulse-icon { animation: pulseIcon 1s ease-in-out infinite; }
@keyframes pulseIcon { 0%,100%{box-shadow:0 0 0 0 rgba(37,99,235,0.4)} 50%{box-shadow:0 0 0 8px rgba(37,99,235,0)} }
.tl-content strong { display: block; font-size: 0.88rem; font-weight: 800; color: var(--text); }
.tl-content span { font-size: 0.75rem; color: var(--text3); }
.timeline-item:not(.completed):not(.active) .tl-content strong { color: var(--text3); }

.driver-card { display: flex; align-items: center; gap: 12px; }
.driver-avatar { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--secondary); }
.driver-info { flex: 1; }
.driver-info strong { display: block; font-size: 0.9rem; font-weight: 800; color: var(--text); }
.driver-info span { font-size: 0.75rem; color: var(--text2); }
.driver-actions { display: flex; gap: 8px; }
.call-btn { background: #dcfce7; color: #16a34a; }
.msg-btn { background: #dbeafe; color: var(--primary); }

/* =========================================
   WALLET PAGE
   ========================================= */
.wallet-wrap { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.wallet-card {
  border-radius: 20px; overflow: hidden; position: relative;
  background: linear-gradient(135deg, #1d4ed8, #2563EB, #10B981);
  padding: 24px; min-height: 180px;
}
.wallet-card-inner { position: relative; z-index: 1; }
.wallet-label { font-size: 0.8rem; color: rgba(255,255,255,0.7); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.wallet-balance { font-size: 2.5rem; font-weight: 900; color: white; margin-bottom: 4px; }
.wallet-sub { font-size: 0.82rem; color: rgba(255,255,255,0.8); margin-bottom: 20px; }
.wallet-btns { display: flex; gap: 12px; }
.wallet-action-btn {
  background: rgba(255,255,255,0.2); color: white; border: 1px solid rgba(255,255,255,0.3);
  border-radius: 10px; padding: 8px 16px; font-size: 0.82rem;
  font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 6px;
  font-family: 'Nunito', sans-serif; transition: var(--transition);
}
.wallet-action-btn:active { background: rgba(255,255,255,0.3); }
.wallet-pattern {
  position: absolute; top: -40px; right: -40px;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(255,255,255,0.07);
}
.wallet-pattern::after {
  content: ''; position: absolute; inset: 20px; border-radius: 50%;
  background: rgba(255,255,255,0.07);
}

.wallet-stats {
  display: flex; align-items: center; justify-content: space-around;
  margin: 0;
}
.wstat { display: flex; align-items: center; gap: 10px; }
.wstat-icon { font-size: 1.5rem; }
.wstat strong { display: block; font-size: 0.95rem; font-weight: 900; color: var(--text); }
.wstat span { font-size: 0.72rem; color: var(--text2); }
.wstat-div { width: 1px; height: 40px; background: var(--border); }

.txn-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.txn-item:last-child { border-bottom: none; }
.txn-icon {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; font-weight: 900;
}
.txn-icon.credit { background: #dcfce7; color: #16a34a; }
.txn-icon.debit { background: #fee2e2; color: #dc2626; }
.txn-info { flex: 1; }
.txn-info strong { display: block; font-size: 0.85rem; font-weight: 800; color: var(--text); }
.txn-info span { font-size: 0.72rem; color: var(--text3); }
.txn-amt { font-size: 0.92rem; font-weight: 900; }
.txn-amt.credit { color: #16a34a; }
.txn-amt.debit { color: #dc2626; }

/* =========================================
   ORDERS PAGE
   ========================================= */
.orders-wrap { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.order-card { padding: 14px; cursor: pointer; }
.order-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.order-num { font-size: 0.8rem; font-weight: 700; color: var(--text2); }
.order-status { font-size: 0.7rem; font-weight: 800; padding: 3px 10px; border-radius: 10px; }
.order-status.active { background: #dbeafe; color: #1d4ed8; }
.order-status.delivered { background: #dcfce7; color: #15803d; }
.order-status.cancelled { background: #fee2e2; color: #dc2626; }
.order-items-preview { font-size: 0.82rem; color: var(--text2); margin-bottom: 8px; }
.order-card-bot { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--text3); margin-bottom: 10px; }
.track-btn, .reorder-btn {
  background: linear-gradient(135deg,var(--primary),var(--primary-light)); color: white;
  border: none; border-radius: 8px; padding: 7px 16px;
  font-size: 0.8rem; font-weight: 800; cursor: pointer;
  font-family: 'Nunito', sans-serif; transition: var(--transition);
}
.reorder-btn { background: linear-gradient(135deg,var(--secondary),var(--secondary-light)); }
.track-btn:active, .reorder-btn:active { transform: scale(0.95); }

/* =========================================
   COUPONS PAGE
   ========================================= */
.coupons-wrap { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.coupon-card {
  background: var(--card); border-radius: var(--radius);
  display: flex; align-items: stretch; overflow: hidden;
  box-shadow: var(--card-shadow); border: 1px solid var(--border);
  position: relative;
}
.coupon-left {
  width: 80px; flex-shrink: 0; display: flex;
  flex-direction: column; align-items: center; justify-content: center;
  padding: 12px 0;
}
.coupon-value { font-size: 1.3rem; font-weight: 900; color: white; }
.coupon-off { font-size: 0.7rem; font-weight: 800; color: rgba(255,255,255,0.85); text-transform: uppercase; }
.coupon-right { flex: 1; padding: 12px; }
.coupon-right strong { display: block; font-size: 1rem; font-weight: 900; color: var(--text); margin-bottom: 4px; font-family: monospace; letter-spacing: 1px; }
.coupon-right p { font-size: 0.78rem; color: var(--text2); margin: 0 0 6px; }
.coupon-expiry { font-size: 0.7rem; color: var(--text3); }
.copy-coupon {
  position: absolute; bottom: 12px; right: 12px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 6px; padding: 4px 10px; font-size: 0.72rem;
  font-weight: 800; cursor: pointer; color: var(--primary);
  font-family: 'Nunito', sans-serif; transition: var(--transition);
}
.copy-coupon:active { background: var(--primary); color: white; }

/* =========================================
   NOTIFICATIONS
   ========================================= */
.notifs-wrap { margin: 16px; padding: 0; }
.notif-item {
  display: flex; gap: 12px; padding: 14px;
  border-bottom: 1px solid var(--border); align-items: flex-start;
  transition: background 0.2s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: linear-gradient(135deg,rgba(37,99,235,0.04),transparent); }
.notif-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.notif-content { flex: 1; }
.notif-content strong { display: block; font-size: 0.88rem; font-weight: 800; color: var(--text); margin-bottom: 3px; }
.notif-content p { font-size: 0.78rem; color: var(--text2); margin: 0 0 4px; line-height: 1.4; }
.notif-time { font-size: 0.7rem; color: var(--text3); }

/* =========================================
   PROFILE PAGE
   ========================================= */
.profile-header { text-align: center; padding-bottom: 20px; position: relative; }
.profile-cover {
  height: 120px; background: linear-gradient(135deg,#1e3a8a,#2563EB,#10B981);
  border-radius: 0 0 30px 30px;
}
.profile-avatar-wrap { margin-top: -45px; position: relative; display: inline-block; }
.profile-avatar { width: 90px; height: 90px; border-radius: 50%; border: 4px solid var(--bg); box-shadow: 0 4px 16px rgba(0,0,0,0.15); }
.avatar-edit {
  position: absolute; bottom: 2px; right: 2px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--primary); color: white; border: 2px solid white;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; cursor: pointer;
}
.profile-name { font-size: 1.2rem; font-weight: 900; color: var(--text); margin: 10px 0 4px; }
.profile-phone { font-size: 0.85rem; color: var(--text2); }

.profile-menu { margin: 0 16px 16px; padding: 0; }
.pmenu-item {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border-bottom: 1px solid var(--border); cursor: pointer;
  transition: background 0.15s; color: var(--text);
}
.pmenu-item:last-child { border-bottom: none; }
.pmenu-item:active { background: var(--bg2); }
.pmenu-item > i:first-child { font-size: 1.1rem; color: var(--primary); width: 20px; text-align: center; }
.pmenu-item span { flex: 1; font-size: 0.92rem; font-weight: 700; }
.pmenu-item > i:last-child { color: var(--text3); font-size: 0.75rem; }
.pmenu-item.danger > i:first-child { color: #ef4444; }
.pmenu-item.danger span { color: #ef4444; }

.toggle-switch {
  width: 44px; height: 24px; background: var(--border);
  border-radius: 12px; position: relative; transition: background 0.3s; cursor: pointer;
}
.toggle-switch.on { background: var(--primary); }
.toggle-thumb {
  position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: white; transition: transform 0.3s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.toggle-switch.on .toggle-thumb { transform: translateX(20px); }

/* =========================================
   BOTTOM NAVIGATION
   ========================================= */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; height: var(--nav-h);
  background: var(--card); border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-around;
  z-index: 200; padding: 0 8px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer; padding: 8px 12px; border-radius: 12px;
  transition: var(--transition); flex: 1; position: relative;
  text-decoration: none; color: var(--text3);
}
.nav-item span { font-size: 0.65rem; font-weight: 700; color: var(--text3); transition: color 0.2s; }
.nav-item i, .nav-item .nav-icon { font-size: 1.3rem; color: var(--text3); transition: color 0.2s; position: relative; }
.nav-item.active span,
.nav-item.active i,
.nav-item.active .nav-icon { color: var(--primary); }
.nav-item.active { background: rgba(109,40,217,0.08); }
.cart-nav-icon { position: relative; }
.cart-badge {
  position: absolute; top: -8px; right: -10px;
  background: #ef4444; color: white; border-radius: 10px;
  font-size: 0.6rem; font-weight: 900; padding: 1px 5px;
  min-width: 16px; text-align: center; border: 2px solid var(--card);
}

/* Floating Cart */
.floating-cart {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg,var(--primary),var(--secondary));
  color: white; border-radius: 30px; padding: 12px 20px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 8px 24px rgba(37,99,235,0.4);
  cursor: pointer; z-index: 150; max-width: calc(100% - 40px);
  animation: floatUp 0.4s ease;
}
.floating-cart i { font-size: 1.1rem; }
.floating-cart span { font-size: 0.85rem; font-weight: 800; }
.floating-cart span:last-child { background: rgba(255,255,255,0.2); border-radius: 20px; padding: 2px 10px; }
@keyframes floatUp { from{transform:translateX(-50%) translateY(20px);opacity:0} to{transform:translateX(-50%) translateY(0);opacity:1} }

/* =========================================
   TOAST NOTIFICATIONS
   ========================================= */
.toast-container {
  position: fixed; top: 70px; left: 50%; transform: translateX(-50%);
  z-index: 9998; display: flex; flex-direction: column; gap: 8px;
  width: calc(100% - 32px); max-width: 420px; pointer-events: none;
}
.toast-msg {
  background: var(--card); border-radius: 12px; padding: 12px 16px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15); border-left: 4px solid var(--primary);
  animation: toastIn 0.4s ease; pointer-events: all;
  font-size: 0.88rem; font-weight: 700; color: var(--text);
}
.toast-msg.success { border-color: var(--secondary); }
.toast-msg.error { border-color: #ef4444; }
.toast-msg.info { border-color: var(--accent); }
.toast-msg.out { animation: toastOut 0.4s ease forwards; }
@keyframes toastIn { from{transform:translateY(-20px);opacity:0} to{transform:translateY(0);opacity:1} }
@keyframes toastOut { from{transform:translateY(0);opacity:1} to{transform:translateY(-20px);opacity:0} }

/* =========================================
   MODAL
   ========================================= */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 1000; display: flex; align-items: flex-end; justify-content: center;
  backdrop-filter: blur(4px);
}
.bottom-modal {
  background: var(--card); border-radius: 24px 24px 0 0;
  padding: 20px 24px 36px; width: 100%; max-width: 480px;
  animation: slideUp 0.3s ease;
}
.modal-handle { width: 40px; height: 4px; background: var(--border); border-radius: 2px; margin: 0 auto 20px; }
.bottom-modal h6 { font-size: 1.1rem; font-weight: 800; color: var(--text); margin-bottom: 16px; }
.quick-amounts { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.quick-amounts button {
  background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: 10px; padding: 10px; font-size: 0.9rem;
  font-weight: 800; cursor: pointer; color: var(--text);
  font-family: 'Nunito',sans-serif; transition: var(--transition);
}
.quick-amounts button:active { background: var(--primary); color: white; border-color: var(--primary); }
.btn-cancel {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 13px; font-size: 0.95rem;
  font-weight: 800; cursor: pointer; color: var(--text2);
  font-family: 'Nunito',sans-serif;
}
@keyframes slideUp { from{transform:translateY(100%)} to{transform:translateY(0)} }

/* =========================================
   SHIMMER / SKELETON
   ========================================= */
.shimmer {
  background: linear-gradient(90deg, var(--bg2) 25%, var(--border) 50%, var(--bg2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* =========================================
   PRODUCT DETAIL
   ========================================= */
.product-detail-wrap { }
.product-detail-gallery { position: relative; }
.product-detail-gallery-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.product-detail-gallery-track::-webkit-scrollbar { display: none; }
.product-detail-img {
  width: 100%; min-width: 100%; height: 340px; display: flex; flex-shrink: 0;
  scroll-snap-align: start;
  align-items: center; justify-content: center; font-size: 6rem;
  background: linear-gradient(135deg, var(--bg2), var(--bg)); overflow: hidden;
}
.product-detail-gallery-dots { display: flex; gap: 5px; justify-content: center; padding: 8px 0; }
.product-detail-gallery-dot { width: 5px; height: 5px; border-radius: 3px; background: var(--border); transition: all 0.3s; }
.product-detail-gallery-dot.active { width: 16px; background: var(--primary); }
.product-detail-content { padding: 20px; }
.product-detail-name {
  font-size: 1.15rem; font-weight: 800; color: var(--text); margin-bottom: 10px;
  background: var(--bg2); border-left: 4px solid var(--primary);
  border-radius: 0 10px 10px 0; padding: 8px 12px; line-height: 1.35;
}
.product-detail-price { font-size: 1.6rem; font-weight: 900; color: var(--primary); margin-bottom: 4px; }
.product-detail-mrp { font-size: 0.9rem; color: var(--text3); text-decoration: line-through; }
.product-detail-desc { font-size: 0.88rem; color: var(--text2); line-height: 1.6; margin: 14px 0; }
.desc-collapse { max-height: 4.6em; overflow: hidden; position: relative; transition: max-height 0.25s ease; }
.desc-collapse.expanded { max-height: 1000px; }
.desc-collapse:not(.expanded)::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1.6em;
  background: linear-gradient(to bottom, transparent, var(--bg));
}
.read-more-btn {
  background: none; border: none; color: var(--primary); font-weight: 700;
  font-size: 0.82rem; padding: 2px 0 10px; cursor: pointer; display: block;
}

/* =========================================
   ALERTS & BADGES — used throughout the member panel for flash
   messages and inline status/discount tags. Was previously only
   defined in dashboard.css (admin/seller), leaving every member-facing
   alert/badge unstyled.
   ========================================= */
.alert {
  padding: 13px 16px; border-radius: var(--radius-sm); font-size: 0.86rem;
  font-weight: 600; margin-bottom: 16px; display: flex; align-items: center; gap: 10px;
}
.alert-success { background: var(--success-bg); color: var(--success); }
.alert-danger  { background: var(--danger-bg);  color: var(--danger); }
.alert-warning { background: var(--warning-bg); color: var(--warning); }
.alert-info    { background: var(--info-bg);    color: var(--info); }

.badge {
  display: inline-block; padding: 3px 9px; border-radius: 20px;
  font-size: 0.72rem; font-weight: 700; line-height: 1.4;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-info    { background: var(--info-bg);    color: var(--info); }
.badge-neutral { background: var(--bg2); color: var(--text2); }

.variant-pill {
  padding: 8px 16px; border-radius: 20px; border: 1.5px solid var(--border);
  background: var(--card); color: var(--text); font-weight: 700; font-size: 0.85rem;
  cursor: pointer; transition: var(--transition);
}
.variant-pill.active { border-color: var(--primary); background: var(--primary); color: #fff; }
.qty-selector { display: flex; align-items: center; gap: 16px; margin: 16px 0; }
.qty-selector label { font-size: 0.9rem; font-weight: 700; color: var(--text2); }
.qty-selector-btns { display: flex; align-items: center; gap: 12px; background: var(--bg2); border-radius: 10px; padding: 4px; }
.qty-selector-btn {
  width: 34px; height: 34px; border-radius: 8px; border: none;
  background: var(--primary); color: white; font-size: 1.2rem;
  font-weight: 900; cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-family: 'Nunito', sans-serif;
}
.qty-selector-num { font-size: 1.1rem; font-weight: 900; color: var(--text); min-width: 24px; text-align: center; }
.product-actions { display: flex; gap: 12px; }
.btn-add-cart {
  flex: 1; background: var(--bg2); border: 2px solid var(--primary);
  color: var(--primary); border-radius: var(--radius-sm); padding: 14px;
  font-size: 0.95rem; font-weight: 800; cursor: pointer;
  font-family: 'Nunito', sans-serif; transition: var(--transition);
}
.btn-buy-now {
  flex: 1; background: linear-gradient(135deg,var(--primary),var(--primary-light));
  color: white; border: none; border-radius: var(--radius-sm); padding: 14px;
  font-size: 0.95rem; font-weight: 800; cursor: pointer;
  font-family: 'Nunito', sans-serif; transition: var(--transition);
}
.btn-add-cart:active, .btn-buy-now:active { transform: scale(0.97); }

/* Search Results */
.search-results-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.no-results { text-align: center; padding: 40px 20px; color: var(--text3); }
.no-results i { font-size: 3rem; margin-bottom: 12px; display: block; }

/* Recharge success animation */
@keyframes successPop { 0%{transform:scale(0)} 70%{transform:scale(1.1)} 100%{transform:scale(1)} }
.success-pop { animation: successPop 0.5s ease; }

/* Responsive fine-tuning */
@media (max-width: 360px) {
  .categories-grid { grid-template-columns: repeat(4,1fr); gap: 6px; }
  .cat-emoji { font-size: 1.5rem; }
  .otp-boxes { gap: 6px; }
  .otp-box { width: 40px; height: 48px; }
}

/* =========================================================
   PHP CONVERSION PATCH
   Added when converting the SPA to multi-page PHP includes.
   Many elements that were <div onclick> in the JS version are now
   real <a href> / <button type="submit"> elements for no-JS-required
   navigation; this resets their default browser styling so the
   visual design is unaffected.
   ========================================================= */
a.cat-card, a.store-card, a.qs-item, a.offer-chip, a.banner-btn,
a.icon-btn, a.avatar-btn, a.search-bar-wrap, a.nav-item,
a.floating-cart, a.back-btn, a.pmenu-item, a.track-btn, a.reorder-btn {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
}
a.cat-card, a.store-card { display: flex; }
a.qs-item { flex-direction: column; }
a.nav-item { flex-direction: column; }
a.search-bar-wrap { display: block; }
button.btn-primary-modern, button.btn-google, button.btn-cancel {
  font-family: 'Nunito', sans-serif;
}

/* =========================================================
   PREMART ADDITIONS — multi-vendor marketplace components
   ========================================================= */

/* Bottom nav bar (5 tabs) — base .bottom-nav/.nav-item rules live earlier
   in this file; just the cart-count badge variant is added here since the
   base file's .cart-badge targets a different markup shape. */
.nav-item .nav-cart-count {
  position: absolute; top: 2px; right: 14px;
  background: var(--secondary); color: #2b2206; font-size: 0.6rem; font-weight: 800;
  width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--card);
}

/* Vendor store badge on product card */
.vendor-tag {
  font-size: 0.65rem; color: var(--text3); font-weight: 700;
  display: flex; align-items: center; gap: 3px; margin-top: 2px;
}
.vendor-tag i { font-size: 0.6rem; }

/* Vendor storefront header */
.vendor-hero {
  padding: 18px 16px; background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; border-radius: 0 0 20px 20px;
}
.vendor-hero-top { display: flex; align-items: center; gap: 12px; }
.vendor-hero-logo { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; background: #fff; flex-shrink: 0; }
.vendor-hero h2 { font-size: 1.1rem; font-weight: 800; }
.vendor-hero-meta { display: flex; gap: 10px; font-size: 0.75rem; opacity: 0.9; margin-top: 4px; flex-wrap: wrap; }

/* Star rating */
.star-rating { color: var(--secondary); font-size: 0.8rem; letter-spacing: 1px; }
.star-rating .empty { color: var(--border); }

/* Multi-vendor cart grouping */
.cart-vendor-group { margin-bottom: 18px; }
.cart-vendor-label {
  display: flex; align-items: center; gap: 6px; font-size: 0.8rem;
  font-weight: 800; color: var(--text2); margin-bottom: 8px; padding: 0 4px;
}
.cart-vendor-label i { color: var(--primary); }

/* Pending-approval banner (seller awaiting admin) */
.status-banner {
  margin: 14px 16px; padding: 14px 16px; border-radius: var(--radius-sm);
  display: flex; gap: 10px; align-items: flex-start; font-size: 0.85rem;
}
.status-banner.warning { background: #fef9c3; color: #78350f; border: 1px solid #fde68a; }
.status-banner.success { background: #dcfce7; color: #14532d; border: 1px solid #bbf7d0; }
.status-banner.danger { background: #fee2e2; color: #7f1d1d; border: 1px solid #fecaca; }
.status-banner i { font-size: 1.1rem; margin-top: 1px; }

/* Wallet/referral cards reused from KHOJO base, just relabelled via PHP content */

/* Auth pages (customer) reuse .auth-* classes from dashboard.css when shared,
   but storefront auth keeps its own mobile-first look defined above (.login-container etc). */

/* Order tracking timeline */
.track-timeline { padding: 16px; }
.track-step { display: flex; gap: 14px; position: relative; padding-bottom: 28px; }
.track-step:last-child { padding-bottom: 0; }
.track-step::before {
  content: ''; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--border);
}
.track-step:last-child::before { display: none; }
.track-dot {
  width: 28px; height: 28px; border-radius: 50%; background: var(--bg2);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  color: var(--text3); font-size: 0.8rem; z-index: 1;
}
.track-step.done .track-dot { background: var(--primary); color: #fff; }
.track-step.current .track-dot { background: var(--secondary); color: #2b2206; }
.track-content strong { display: block; font-size: 0.88rem; color: var(--text); }
.track-content span { font-size: 0.75rem; color: var(--text3); }

/* Barcode display on product detail (seller/admin reuse via dashboard.css; this is the
   lightweight customer-facing variant shown on order confirmation, etc.) */
.barcode-strip { font-family: 'Libre Barcode 128', monospace; font-size: 2.4rem; letter-spacing: 2px; text-align: center; line-height: 1; }

/* PP (point value) badge shown alongside prices, per admin-set product PP */
.pp-badge {
  display: inline-block; background: var(--secondary, #f5c518); color: #2b2206;
  font-size: 0.68rem; font-weight: 800; padding: 1px 6px; border-radius: 4px;
  margin-left: 4px; vertical-align: middle;
}

/* Category icon images (uploaded via Admin -> Categories) — sized to
   match the emoji they replace in each context. */
.category-icon-img {
  width: 1.8em; height: 1.8em; object-fit: cover; border-radius: 50%;
  vertical-align: middle; display: inline-block;
}
.category-icon-inline {
  width: 1.1em; height: 1.1em; object-fit: cover; border-radius: 50%;
  vertical-align: middle; display: inline-block; margin-right: 2px;
}

/* =========================================================
   ALL CATEGORIES — two-pane Flipkart-style layout: a persistent
   left rail of top-level categories, right pane showing that
   category's subcategories/highlights.
   ========================================================= */
.catpage-shell { display: flex; min-height: calc(100vh - var(--header-h, 56px) - var(--nav-h, 60px)); }
.catpage-rail {
  width: 84px; flex-shrink: 0; background: var(--bg2); overflow-y: auto;
  border-right: 1px solid var(--border);
}
.catpage-rail-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 14px 4px; text-align: center; cursor: pointer; position: relative;
  color: var(--text2); text-decoration: none;
}
.catpage-rail-item .rail-icon { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.catpage-rail-item span { font-size: 0.66rem; font-weight: 700; line-height: 1.15; }
.catpage-rail-item.active { background: var(--card); color: var(--primary); }
.catpage-rail-item.active::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--primary);
}
.catpage-content { flex: 1; padding: 14px; overflow-y: auto; }
.catpage-content h3 { font-size: 1rem; font-weight: 800; margin-bottom: 12px; }
.catpage-sub-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px; }
.catpage-sub-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 6px; text-decoration: none; color: var(--text); transition: var(--transition);
}
.catpage-sub-tile:active { transform: scale(0.95); }
.catpage-sub-tile img, .catpage-sub-tile .rail-icon-lg { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.catpage-sub-tile span { font-size: 0.7rem; font-weight: 700; text-align: center; }
.catpage-shop-btn {
  display: block; text-align: center; background: var(--primary); color: #fff;
  font-weight: 800; font-size: 0.85rem; padding: 12px; border-radius: 12px; text-decoration: none; margin-top: 4px;
}

/* =========================================================
   HORIZONTAL PRODUCT CAROUSEL (Flipkart "Big Saving" style) —
   same .product-card visual language as the grid, just laid out as a
   horizontally-scrolling strip for denser, more browsable sections.
   ========================================================= */
.products-carousel {
  display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 10px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
}
.products-carousel::-webkit-scrollbar { display: none; }
.products-carousel .product-card { min-width: 132px; max-width: 132px; flex-shrink: 0; scroll-snap-align: start; }
.products-carousel .product-img { height: 100px; }

/* Flipkart-style quick tab pills (replaces the plain icon-grid look for
   the top-of-home quick-access row when a denser strip is wanted). */
.pill-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; }
.pill-tabs::-webkit-scrollbar { display: none; }
.pill-tab {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
  background: var(--card); border: 1px solid var(--border); border-radius: 20px;
  padding: 8px 14px; font-size: 0.78rem; font-weight: 700; color: var(--text);
  text-decoration: none; white-space: nowrap;
}
.pill-tab i, .pill-tab span.emoji { font-size: 0.95rem; }

/* Quick-add "+" button overlaid on the product image, matching the
   reference's compact "tap to add" affordance without leaving the grid. */
.product-quick-add {
  position: absolute; bottom: 8px; right: 8px; width: 28px; height: 28px;
  border-radius: 8px; background: var(--card); border: 1.5px solid var(--primary);
  color: var(--primary); display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 800; cursor: pointer; z-index: 2; transition: var(--transition);
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.product-quick-add:active { transform: scale(0.9); background: var(--primary); color: #fff; }

/* Live ID validation (Referral ID / Sponsor ID / Business Guru ID on
   the registration form) — checkmark/cross icon inside the input,
   plus a small helper line underneath showing who it matched. */
.id-check-icon { padding: 0 14px; font-size: 1.1rem; display: none; flex-shrink: 0; }
.id-check-icon.checking { display: block; color: var(--text3); }
.id-check-icon.valid { display: block; color: #16a34a; }
.id-check-icon.invalid { display: block; color: #ef4444; }
.input-group-modern.id-valid { border-color: #16a34a; }
.input-group-modern.id-invalid { border-color: #ef4444; }
.id-check-msg { font-size: 0.72rem; margin-top: 4px; padding-left: 2px; min-height: 1em; }
.id-check-msg.valid { color: #16a34a; font-weight: 700; }
.id-check-msg.invalid { color: #ef4444; font-weight: 700; }

/* Simple data table used by Level View / My Referrals — consistent with
   the app's card-based design language. */
.tbl { width: 100%; border-collapse: collapse; }
.tbl thead th { background: var(--bg2); font-size: 0.72rem; font-weight: 800; color: var(--text3); text-transform: uppercase; letter-spacing: 0.03em; }
.tbl tbody tr:hover { background: var(--bg2); }
.status-dot { display: inline-flex; align-items: center; gap: 5px; font-size: 0.78rem; font-weight: 700; }
.status-dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; }
.status-dot.active { color: #16a34a; }
.status-dot.active::before { background: #16a34a; }
.status-dot.inactive { color: var(--text3); }
.status-dot.inactive::before { background: var(--text3); }
.member-cell { display: flex; align-items: center; gap: 10px; }
.member-cell img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.member-cell span { display: block; font-weight: 700; font-size: 0.85rem; color: var(--text); }
.member-cell small { display: block; font-size: 0.72rem; color: var(--text3); }

/* "3 bar style" network navigation buttons (Refer & Earn hub -> Tree
   View / Level View / My Referrals) — equal-width bars with a big icon
   and label, easy to tap on mobile. */
.network-nav-bar { display: flex; flex-direction: column; gap: 10px; }
.network-nav-btn {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1.5px solid var(--border); border-radius: 14px;
  padding: 16px 18px; text-decoration: none; color: var(--text);
  font-weight: 800; font-size: 0.92rem; transition: var(--transition);
}
.network-nav-btn:active { transform: scale(0.98); background: var(--bg2); }
.network-nav-btn i.bi-diagram-3, .network-nav-btn i.bi-bar-chart-steps, .network-nav-btn i.bi-people {
  font-size: 1.3rem; color: var(--primary); width: 40px; height: 40px;
  border-radius: 10px; background: rgba(109,40,217,0.12);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.network-nav-btn .chev { margin-left: auto; color: var(--text3); font-size: 1rem; }

/* Level View — collapsible per-level sections (native <details>, no
   JS needed) with the same member-row look as My Referrals. */
.level-accordion {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  margin-bottom: 10px; overflow: hidden;
}
.level-accordion-head {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  cursor: pointer; list-style: none; user-select: none;
}
.level-accordion-head::-webkit-details-marker { display: none; }
.level-accordion-title { font-weight: 800; font-size: 0.9rem; color: var(--text); }
.level-accordion-counts { margin-left: auto; display: flex; gap: 10px; font-size: 0.76rem; }
.level-count-total { color: var(--text3); font-weight: 700; }
.level-count-active { color: var(--success); font-weight: 700; }
.level-accordion-chev { color: var(--text3); font-size: 0.9rem; transition: transform 0.2s; }
.level-accordion[open] .level-accordion-chev { transform: rotate(180deg); }
.level-accordion-body { border-top: 1px solid var(--border); }
.level-member-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 16px; border-top: 1px solid var(--border);
}
.level-member-row:first-child { border-top: none; }

/* Shared pagination control (member panel) */
.pagination { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 14px 16px; justify-content: center; }
.page-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 32px; padding: 0 8px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--card); color: var(--text2);
  font-size: 0.8rem; font-weight: 700; text-decoration: none; transition: var(--transition);
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn.disabled { opacity: 0.4; pointer-events: none; }
.page-ellipsis { padding: 0 4px; color: var(--text3); }
.pagination-summary { font-size: 0.75rem; color: var(--text3); text-align: center; padding: 0 16px 10px; }
