/* ==========================================================================
   Samrat Spices - Mobile-First Online Store & CRM Web App Styles
   Optimized for Smartphone Screens, Tablets & Desktop PWA
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Sans+Devanagari:wght@400;500;600;700;800&display=swap');

:root {
  --primary-gold: #F59E0B;
  --primary-amber: #D97706;
  --primary-dark: #B45309;
  --accent-green: #10B981;
  --accent-purple: #8B5CF6;
  --accent-blue: #0EA5E9;
  --accent-red: #EF4444;
  
  --bg-app: #0B1120;
  --bg-card: #131E32;
  --bg-elevated: #1E293B;
  --bg-surface: #0F172A;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-gold: rgba(245, 158, 11, 0.35);
  --border-green: rgba(16, 185, 129, 0.35);
  
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-gold: #FCD34D;
  --text-dim: #64748B;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-gold: 0 4px 20px rgba(245, 158, 11, 0.25);
  --bottom-nav-height: 64px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', 'Noto Sans Devanagari', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  padding-bottom: calc(var(--bottom-nav-height) + 24px);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Container */
.app-container {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 14px;
}

/* ==========================================================================
   Header & App Shell Bar
   ========================================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 17, 32, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 14px;
}

.header-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
  background: #FFF;
  padding: 2px;
}

.brand-meta {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #FFF;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 700;
  background: linear-gradient(135deg, #D97706, #B45309);
  color: #FFF;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.brand-tagline {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-header-icon {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-header-icon:hover, .btn-header-icon:active {
  background: #334155;
  border-color: var(--primary-gold);
}

.badge-cart-count {
  position: absolute;
  top: -3px;
  right: -3px;
  background: #EF4444;
  color: #FFF;
  font-size: 0.7rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--bg-app);
}

/* ==========================================================================
   Persona Switcher (Household vs Kirana B2B)
   ========================================================================== */
.persona-switcher-box {
  margin-top: 10px;
  background: #0F172A;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  padding: 4px;
  display: flex;
  position: relative;
  gap: 4px;
}

.persona-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.persona-tab.active {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #0F172A;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.persona-tab.b2b-active {
  background: linear-gradient(135deg, #8B5CF6, #6D28D9);
  color: #FFF;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.35);
}

.persona-badge-sub {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.25);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 400px) {
  .persona-tab {
    font-size: 0.76rem;
    padding: 6px 6px;
    gap: 4px;
  }
  .persona-badge-sub {
    font-size: 0.62rem;
    padding: 1px 4px;
  }
}

/* ==========================================================================
   Search & Quick Filters
   ========================================================================== */
.store-search-row {
  margin: 12px 0 10px 0;
  position: relative;
}

.store-search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px 10px 38px;
  color: var(--text-main);
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.store-search-input:focus {
  border-color: var(--primary-gold);
  background: #1A263D;
}

.search-icon-pos {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
}

/* Category Chips Carousel */
.category-chips-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 10px 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.category-chips-scroll::-webkit-scrollbar {
  display: none;
}

.chip-btn {
  white-space: nowrap;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.chip-btn.active {
  background: rgba(245, 158, 11, 0.18);
  border-color: var(--primary-gold);
  color: var(--text-gold);
  font-weight: 700;
}

/* ==========================================================================
   Hero Offer Announcement Banner
   ========================================================================== */
.offer-banner-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(217, 119, 6, 0.04));
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.offer-banner-card.b2b-mode {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(109, 40, 217, 0.05));
  border-color: rgba(139, 92, 246, 0.4);
}

.offer-text-block h4 {
  font-size: 0.9rem;
  color: #FFF;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.offer-text-block p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.btn-offer-action {
  background: var(--primary-gold);
  color: #0F172A;
  border: none;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

/* ==========================================================================
   Product Grid & Product Cards
   ========================================================================== */
.products-feed-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 540px) {
  .products-feed-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.product-app-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.product-app-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-2px);
}

.card-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #0B1120;
  overflow: hidden;
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-app-card:hover .card-image-wrap img {
  transform: scale(1.04);
}

.card-badge-top {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #FFF;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.card-badge-margin {
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(135deg, #10B981, #059669);
  color: #FFF;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.card-content {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title-en {
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFF;
  margin-bottom: 2px;
  line-height: 1.3;
}

.card-title-hi {
  font-size: 0.78rem;
  color: var(--primary-gold);
  margin-bottom: 8px;
}

.card-hsn-tag {
  font-size: 0.68rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.card-variant-picker {
  margin-bottom: 10px;
}

.card-variant-select {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #FFF;
  font-size: 0.82rem;
  padding: 7px 10px;
  outline: none;
  cursor: pointer;
}

.card-variant-select:focus {
  border-color: var(--primary-gold);
}

.card-pricing-block {
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 10px;
}

.price-main-wrap {
  display: flex;
  flex-direction: column;
}

.price-live-num {
  font-size: 1.25rem;
  font-weight: 800;
  color: #FFF;
}

.price-mrp-strike {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-decoration: line-through;
}

.price-unit-rate {
  font-size: 0.72rem;
  color: var(--accent-green);
  font-weight: 600;
}

/* ==========================================================================
   Horizontal Weight Variant Chips & Touch-Friendly Steppers
   ========================================================================== */
.variant-chips-container {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0 10px 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.variant-chips-container::-webkit-scrollbar {
  display: none;
}

.variant-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 64px;
  padding: 5px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.variant-chip .chip-weight {
  font-size: 0.82rem;
  font-weight: 700;
  color: #FFF;
  line-height: 1.2;
}

.variant-chip .chip-price {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.variant-chip.active {
  border-color: #F59E0B;
  background: rgba(245, 158, 11, 0.15);
  box-shadow: 0 0 0 1px #F59E0B;
}

.variant-chip.active .chip-weight {
  color: #FCD34D;
}

.variant-chip.active .chip-price {
  color: #FFF;
  font-weight: 700;
}

.variant-chip.b2b-active {
  border-color: #8B5CF6;
  background: rgba(139, 92, 246, 0.18);
  box-shadow: 0 0 0 1px #8B5CF6;
}

.variant-chip.b2b-active .chip-weight {
  color: #DDD6FE;
}

/* Card Quantity Stepper (min 48px touch height) */
.card-stepper-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  border-radius: 12px;
  background: #1E293B;
  border: 1.5px solid var(--border-gold);
  padding: 2px 4px;
  width: 100%;
}

.card-stepper-wrap.b2b-stepper {
  border-color: rgba(139, 92, 246, 0.6);
}

.btn-stepper-step {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #0F172A;
  border: none;
  border-radius: 8px;
  font-size: 1.35rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.card-stepper-wrap.b2b-stepper .btn-stepper-step {
  background: linear-gradient(135deg, #8B5CF6, #7C3AED);
  color: #FFF;
}

.btn-stepper-step:active {
  transform: scale(0.92);
}

.stepper-count {
  font-size: 1.15rem;
  font-weight: 800;
  color: #FFF;
  font-variant-numeric: tabular-nums;
  padding: 0 10px;
}

.card-savings-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34D399;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.price-wholesale-strike {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Sticky Bottom Cart Bar (App Shell Extension, z-index: 40)
   ========================================================================== */
.sticky-bottom-cart-bar {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + 8px);
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  justify-content: center;
  padding: 0 14px;
  pointer-events: none;
}

.sticky-bottom-cart-bar .cart-bar-inner {
  width: 100%;
  max-width: 430px;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid #10B981;
  border-radius: 16px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), 0 0 18px rgba(16, 185, 129, 0.3);
  pointer-events: auto;
  animation: slideUpCartBar 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpCartBar {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.cart-bar-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cart-bar-meta-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cart-bar-badge {
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12);
  color: #E2E8F0;
  padding: 1px 6px;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
}

.cart-bar-savings {
  font-size: 0.72rem;
  font-weight: 800;
  color: #34D399;
  font-variant-numeric: tabular-nums;
}

.cart-bar-total {
  font-size: 1.15rem;
  font-weight: 800;
  color: #FCD34D;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.btn-cart-bar-cta {
  min-height: 48px;
  background: linear-gradient(135deg, #10B981, #059669);
  color: #FFF;
  border: none;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 800;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-cart-bar-cta:hover, .btn-cart-bar-cta:active {
  background: linear-gradient(135deg, #34D399, #10B981);
  transform: translateY(-1px);
}

.btn-card-add-primary {
  width: 100%;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #0F172A;
  border: none;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-card-add-primary:hover, .btn-card-add-primary:active {
  background: linear-gradient(135deg, #FBBF24, #F59E0B);
  transform: translateY(-1px);
}

.btn-card-add-primary.b2b-btn {
  background: linear-gradient(135deg, #8B5CF6, #7C3AED);
  color: #FFF;
}

/* ==========================================================================
   Bottom Navigation Bar (App Experience on Mobile)
   ========================================================================== */
.bottom-nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: rgba(11, 17, 32, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 900;
  max-width: 720px;
  margin: 0 auto;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 6px 0;
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
}

.nav-item .nav-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.nav-item.active {
  color: var(--primary-gold);
}

.nav-item.active .nav-icon {
  transform: translateY(-2px);
}

.nav-cart-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 18px);
  background: #EF4444;
  color: #FFF;
  font-size: 0.65rem;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

/* ==========================================================================
   Slide-Up Cart Drawer & Modals
   ========================================================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-card {
  width: 100%;
  max-width: 720px;
  max-height: 88vh;
  background: #0F172A;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  border: 1px solid var(--border-subtle);
  border-bottom: none;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.drawer-backdrop.open .drawer-card {
  transform: translateY(0);
}

.drawer-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #131E32;
}

.drawer-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #FFF;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-drawer-close {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
}

.drawer-body-scroll {
  padding: 14px 18px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Cart Item Row */
.cart-item-row {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-item-img {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  background: #0B1120;
}

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

.cart-item-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #FFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-variant {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.cart-item-price {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-gold);
}

.cart-item-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  padding: 2px 6px;
}

.stepper-btn {
  background: transparent;
  border: none;
  color: #FFF;
  font-size: 0.95rem;
  font-weight: 800;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.stepper-qty {
  font-size: 0.82rem;
  font-weight: 700;
  min-width: 18px;
  text-align: center;
}

/* Delivery & Coupon Box in Cart */
.cart-aux-box {
  background: #131E32;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.pincode-inline-wrap {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.pincode-input {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #FFF;
  font-size: 0.82rem;
  padding: 6px 10px;
  outline: none;
}

.btn-inline-apply {
  background: var(--bg-elevated);
  border: 1px solid var(--border-gold);
  color: var(--text-gold);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
}

/* Cart Bill Breakdown */
.cart-bill-summary {
  background: #131E32;
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bill-line {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
}

.bill-line.highlight {
  color: var(--accent-green);
  font-weight: 600;
}

.bill-line.total {
  font-size: 1rem;
  font-weight: 800;
  color: #FFF;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 4px;
}

.drawer-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border-subtle);
  background: #131E32;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-checkout-cta {
  width: 100%;
  background: linear-gradient(135deg, #10B981, #059669);
  color: #FFF;
  border: none;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 13px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

/* ==========================================================================
   Checkout Modal & Form Fields
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-sheet-card {
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  background: #0F172A;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.form-group-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.form-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #FFF;
  font-size: 0.85rem;
  padding: 8px 12px;
  outline: none;
}

.form-input:focus {
  border-color: var(--primary-gold);
}

/* ==========================================================================
   Header Buttons (Bilingual & WhatsApp Auth)
   ========================================================================== */
.btn-lang-toggle {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-gold);
  padding: 6px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 38px;
  white-space: nowrap;
}

.btn-lang-toggle:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--primary-gold);
}

.btn-auth-user {
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.35);
  color: #25D366;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 38px;
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-auth-user:hover {
  background: rgba(37, 211, 102, 0.22);
  border-color: #25D366;
}

.btn-auth-user.logged-in {
  background: var(--bg-elevated);
  border-color: var(--border-gold);
  color: var(--text-gold);
}

.auth-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   Mobile-First WhatsApp OTP Bottom Sheet Modal
   Responsive: 360px-430px viewports, 48px tap targets, 16px input font
   ========================================================================== */
.auth-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  opacity: 0;
  transition: opacity 0.25s ease-out;
}

.auth-sheet-backdrop.active {
  display: flex;
  opacity: 1;
}

.auth-sheet-container {
  width: 100%;
  max-width: 430px;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: none;
  border-radius: 24px 24px 0 0;
  padding: 20px 20px calc(24px + env(safe-area-inset-bottom, 12px));
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  color: #F9FAFB;
}

.auth-sheet-backdrop.active .auth-sheet-container {
  transform: translateY(0);
}

.auth-sheet-drag-handle {
  width: 44px;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  margin: 0 auto 16px;
}

.auth-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.auth-sheet-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-sheet-whatsapp-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #25D366;
  color: #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.auth-sheet-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #FFF;
  line-height: 1.3;
}

.auth-sheet-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.auth-sheet-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #9CA3AF;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.auth-sheet-close-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #FFF;
}

.auth-phone-input-wrap {
  display: flex;
  align-items: center;
  background: #1F2937;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  height: 52px;
  padding: 0 14px;
  margin: 16px 0 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-phone-input-wrap:focus-within {
  border-color: #25D366;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.2);
}

.auth-country-prefix {
  font-size: 1rem;
  font-weight: 700;
  color: #E5E7EB;
  padding-right: 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  gap: 4px;
  user-select: none;
}

.auth-phone-field {
  flex: 1;
  background: transparent;
  border: none;
  color: #FFF;
  font-size: 1.05rem;
  font-weight: 600;
  padding-left: 12px;
  outline: none;
  letter-spacing: 0.04em;
}

.auth-otp-field {
  width: 100%;
  height: 54px;
  background: #1F2937;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  color: #25D366;
  font-size: 1.6rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.35em;
  outline: none;
  margin: 16px 0 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-otp-field:focus {
  border-color: #25D366;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.2);
}

.auth-action-btn {
  width: 100%;
  min-height: 48px;
  background: #25D366;
  color: #064E3B;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  margin-top: 6px;
}

.auth-action-btn:hover {
  background: #20bd5a;
}

.auth-action-btn:active {
  transform: scale(0.98);
}

.auth-action-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.auth-alert-box {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  margin-bottom: 12px;
  display: none;
  line-height: 1.4;
}

.auth-alert-box.error {
  display: block;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #FCA5A5;
}

.auth-alert-box.success {
  display: block;
  background: rgba(37, 211, 102, 0.15);
  border: 1px solid rgba(37, 211, 102, 0.35);
  color: #6EE7B7;
}

.auth-resend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.auth-resend-btn {
  background: none;
  border: none;
  color: #25D366;
  font-weight: 700;
  cursor: pointer;
  padding: 4px;
  text-decoration: underline;
}

.auth-resend-btn:disabled {
  color: var(--text-dim);
  text-decoration: none;
  cursor: not-allowed;
}

.auth-session-popover {
  position: absolute;
  top: 56px;
  right: 14px;
  background: #1F2937;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 14px;
  width: 240px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 105;
  display: none;
  flex-direction: column;
  gap: 10px;
}

.auth-session-popover.active {
  display: flex;
}

.auth-session-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.auth-session-phone {
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFF;
}

.auth-session-role {
  font-size: 0.72rem;
  color: var(--text-gold);
  text-transform: uppercase;
  font-weight: 700;
}

.btn-auth-logout {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #F87171;
  padding: 8px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.btn-auth-logout:hover {
  background: rgba(239, 68, 68, 0.25);
}

/* ==========================================================================
   Print Tax Invoice Media Rules
   ========================================================================== */
@media print {
  body {
    background: #FFF !important;
    color: #000 !important;
    padding: 0 !important;
  }
  .app-header, .bottom-nav-bar, .drawer-backdrop, .no-print {
    display: none !important;
  }
  .invoice-printable-container {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
  }
}

/* ==========================================================================
   Step 4: Mobile UPI Intent Grid & Checkout Drawer Styles
   ========================================================================== */
.checkout-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkout-view.hidden {
  display: none !important;
}

.checkout-bill-preview {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
}

.checkout-bill-preview .bill-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-variant-numeric: tabular-nums;
}

.checkout-bill-preview .bill-row.total-row {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 8px;
  margin-top: 4px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-gold);
}

.upi-intent-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0 8px 0;
}

.btn-upi-intent {
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-upi-intent:active {
  transform: scale(0.98);
}

.btn-upi-gpay {
  background: #1F2937;
  color: #FFF;
  border-color: #4285F4;
}

.btn-upi-phonepe {
  background: #2E1065;
  color: #DDD6FE;
  border-color: #8B5CF6;
}

.btn-upi-paytm {
  background: #082F49;
  color: #BAE6FD;
  border-color: #0EA5E9;
}

.btn-upi-generic {
  background: #1E293B;
  color: #FCD34D;
  border-color: #F59E0B;
}

.qr-scan-card {
  background: #111827;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.qr-scan-card img {
  border-radius: 8px;
  background: #FFF;
  padding: 6px;
  max-width: 170px;
  width: 100%;
}

.pulse-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #FCD34D;
  font-size: 0.78rem;
  font-weight: 600;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #F59E0B;
  animation: pulseDot 1.4s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.order-success-card {
  text-align: center;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.success-icon-wrap {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  border: 2px solid #10B981;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  animation: bounceIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bounceIn {
  0% { transform: scale(0.4); opacity: 0; }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

.btn-invoice-download {
  background: linear-gradient(135deg, #10B981, #059669);
  color: #FFF;
  border: none;
  border-radius: 10px;
  min-height: 48px;
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}
