/* Authentic Blinkit Quick Commerce Stylesheet — Multi-Page & Multi-Section Layout */
:root {
  --blinkit-yellow: #f8cb46;
  --blinkit-yellow-bg: #fff9e6;
  --blinkit-green: #0c831f;
  --blinkit-green-hover: #086618;
  --blinkit-green-soft: #e8f5e9;
  --blinkit-dark: #1c1c1c;
  --blinkit-gray-bg: #f4f6fb;
  --blinkit-card-bg: #ffffff;
  --blinkit-border: #e2e8f0;
  --blinkit-text-muted: #64748b;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.14);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--blinkit-gray-bg);
  color: var(--blinkit-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 90px;
}

/* Page Views Management */
.app-page-view {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 16px 24px;
}

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

/* 1. Header Bar */
.blinkit-header {
  background: linear-gradient(180deg, #fef3c7 0%, #fef9c3 100%);
  padding: 14px 24px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid #fde047;
}

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

.header-sub-tag {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 11px;
  color: var(--blinkit-dark);
  letter-spacing: -0.2px;
}

.delivery-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 26px;
  color: var(--blinkit-dark);
  letter-spacing: -1px;
  line-height: 1;
}

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

.wallet-badge {
  background: var(--blinkit-green);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 18px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.user-avatar-btn {
  width: 34px;
  height: 34px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.address-dropdown-bar {
  font-size: 11px;
  color: #334155;
  margin-top: 4px;
  font-weight: 500;
}

.down-arrow { font-size: 8px; margin-left: 3px; }

/* Global Search Input Bar */
.header-search-bar {
  width: 100%;
  position: relative;
  margin-top: 10px;
}

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

.header-search-bar input {
  width: 100%;
  height: 44px;
  background: #ffffff;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 0 40px 0 40px;
  font-size: 13px;
  outline: none;
  box-shadow: var(--shadow-sm);
}

.mic-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  cursor: pointer;
}

.clear-search-btn {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--blinkit-text-muted);
  cursor: pointer;
  font-weight: 700;
}

.clear-search-btn.hidden { display: none; }

/* 2. Top Navigation Pills */
.quick-pill-strip {
  background: #ffffff;
  padding: 10px 24px;
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--blinkit-border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.pill-item {
  background: var(--blinkit-gray-bg);
  border: 1px solid var(--blinkit-border);
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: var(--blinkit-dark);
  cursor: pointer;
  white-space: nowrap;
}

.pill-item.active, .pill-item:hover {
  background: var(--blinkit-dark);
  color: #ffffff;
  border-color: var(--blinkit-dark);
}

/* Hero Promotional Banner */
.hero-promo-banner {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.banner-tag {
  background: #fde047;
  color: #854d0e;
  font-size: 10px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.hero-promo-banner h2 {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 24px;
  margin-top: 6px;
}

.hero-promo-banner p {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 2px;
}

/* Category Sections Wrapper */
.category-sections-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cat-group-box {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 16px;
  border: 1px solid var(--blinkit-border);
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cat-group-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 16px;
  color: var(--blinkit-dark);
}

.see-all-link {
  background: none;
  border: none;
  color: var(--blinkit-green);
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}

/* 4-Column Category Tile Grid */
.cat-grid-4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.cat-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.tile-icon-bg {
  width: 100%;
  height: 64px;
  background: #eefbf3;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  transition: var(--transition);
}

.cat-tile:hover .tile-icon-bg {
  transform: translateY(-2px);
  background: var(--blinkit-yellow-bg);
}

.cat-tile span {
  font-size: 10px;
  font-weight: 700;
  color: var(--blinkit-dark);
  text-align: center;
  line-height: 1.2;
}

/* Dedicated Category Page View Styling */
.category-header-banner {
  background: #ffffff;
  border: 1px solid var(--blinkit-border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.back-to-home-btn {
  background: var(--blinkit-gray-bg);
  border: 1px solid var(--blinkit-border);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  width: fit-content;
}

.cat-banner-title-group h2 {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 22px;
}

.cat-count-sub {
  font-size: 11px;
  color: var(--blinkit-text-muted);
}

.category-toolbar {
  background: #ffffff;
  border: 1px solid var(--blinkit-border);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  display: flex;
  justify-content: flex-end;
}

.sort-select-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
}

.sort-select-box select {
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid var(--blinkit-border);
  font-size: 12px;
  outline: none;
}

/* Products Section & Grid */
.feed-products-section {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 18px;
  border: 1px solid var(--blinkit-border);
}

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

.feed-section-header h2 {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 17px;
}

.total-count-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--blinkit-text-muted);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.blinkit-card {
  background: #ffffff;
  border: 1px solid var(--blinkit-border);
  border-radius: var(--radius-lg);
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: var(--transition);
}

.blinkit-card:hover {
  box-shadow: var(--shadow-md);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.time-badge {
  background: var(--blinkit-green-soft);
  color: var(--blinkit-green);
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.card-img {
  height: 90px;
  background: #f8fafc;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  margin-bottom: 8px;
}

.card-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--blinkit-dark);
  line-height: 1.3;
  height: 32px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-pack {
  font-size: 10px;
  color: var(--blinkit-text-muted);
  margin-bottom: 8px;
}

.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.price-box { display: flex; flex-direction: column; }
.price-main { font-weight: 800; font-size: 13px; color: var(--blinkit-dark); }
.price-mrp { font-size: 9px; text-decoration: line-through; color: var(--blinkit-text-muted); }

.add-btn-blinkit {
  background: #ffffff;
  color: var(--blinkit-green);
  border: 1px solid var(--blinkit-green);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-weight: 800;
  font-size: 11px;
  cursor: pointer;
}

.add-btn-blinkit:hover {
  background: var(--blinkit-green);
  color: #ffffff;
}

.stepper {
  display: flex;
  align-items: center;
  background: var(--blinkit-green);
  color: #ffffff;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.stepper button {
  background: none;
  border: none;
  color: #ffffff;
  padding: 4px 8px;
  font-weight: 800;
  cursor: pointer;
}

.stepper span { font-size: 12px; font-weight: 700; padding: 0 4px; }

/* Footer Branding */
.blinkit-footer-branding {
  text-align: center;
  padding: 40px 20px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--blinkit-border);
}

.blinkit-footer-branding h2 {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 24px;
  color: #94a3b8;
}

.footer-logo {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 32px;
  color: #cbd5e1;
  margin-top: 4px;
}

/* 5. Cart Sidebar Drawer */
.cart-sidebar {
  background: #ffffff;
  border-left: 1px solid var(--blinkit-border);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-lg);
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 380px;
  max-width: 90vw;
  z-index: 500;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-sidebar.open, .cart-sidebar.mobile-open {
  transform: translateX(0);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--blinkit-border);
  padding-bottom: 8px;
}

.sidebar-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-title-group h3 {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 15px;
}

.cart-item-count {
  background: var(--blinkit-gray-bg);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

.close-drawer-x {
  display: block;
  background: var(--blinkit-gray-bg);
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 800;
  cursor: pointer;
}

.delivery-progress-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress-info-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--blinkit-green);
}

.progress-bar-track {
  height: 4px;
  background: #dcfce7;
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--blinkit-green);
  transition: width 0.3s ease;
}

.cart-items-scroll-list {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.empty-cart-state {
  text-align: center;
  padding: 20px 10px;
  color: var(--blinkit-text-muted);
}

.empty-icon { font-size: 32px; margin-bottom: 4px; }
.empty-cart-state h4 { font-size: 13px; font-weight: 700; color: var(--blinkit-dark); }
.empty-cart-state p { font-size: 10px; margin-top: 2px; }

.cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed var(--blinkit-border);
}

.bill-summary-card {
  background: var(--blinkit-gray-bg);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
}

.bill-summary-card h4 { font-size: 11px; font-weight: 700; }

.bill-line {
  display: flex;
  justify-content: space-between;
  color: #475569;
}

.green-text { color: var(--blinkit-green); font-weight: 700; }

.total-line {
  border-top: 1px solid var(--blinkit-border);
  padding-top: 4px;
  font-weight: 800;
  color: var(--blinkit-dark);
}

.blinkit-proceed-btn {
  width: 100%;
  background: var(--blinkit-green);
  color: #ffffff;
  border: none;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  height: 48px;
}

.blinkit-proceed-btn:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
}

.btn-price-col { display: flex; flex-direction: column; text-align: left; }
.grand-price { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 14px; }
.price-sub { font-size: 9px; opacity: 0.8; }
.btn-text-col { display: flex; align-items: center; gap: 4px; font-weight: 700; font-size: 12px; }

/* Floating Bottom Cart Bar */
.mobile-floating-cart-bar {
  position: fixed;
  bottom: 14px;
  left: 14px;
  right: 14px;
  background: var(--blinkit-green);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 300;
  box-shadow: 0 8px 24px rgba(12, 131, 31, 0.4);
}

.mobile-floating-cart-bar.hidden { display: none !important; }

.float-left { display: flex; align-items: center; gap: 10px; }
.float-thumb-previews { font-size: 20px; }
.float-text-col { display: flex; flex-direction: column; }

/* Empty cart: no ₹0 / 0 items readout — just the cart icon and "View cart". */
.mobile-floating-cart-bar.cart-empty-mode .float-text-col { display: none; }
.mobile-floating-cart-bar.cart-empty-mode { background: #3f8f4d; }

/* Product detail page: ADD control on the left, "View cart" on the right. */
.float-pdp-slot { display: none; }

.mobile-floating-cart-bar.pdp-mode .float-pdp-slot { display: flex; align-items: center; }
.mobile-floating-cart-bar.pdp-mode .float-left { display: none; }
.mobile-floating-cart-bar.pdp-mode { gap: 10px; }

.float-add-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  background: #ffffff;
  color: var(--blinkit-green);
  border: none;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-weight: 900;
  cursor: pointer;
  transition: var(--transition);
}

.float-add-btn:hover { background: #f0fdf4; }
.float-add-label { font-size: 11px; letter-spacing: 0.3px; }
.float-add-price { font-family: 'Outfit', sans-serif; font-size: 13px; font-weight: 900; }

.float-add-stepper {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #ffffff;
  border-radius: var(--radius-sm);
  padding: 4px 6px;
  color: var(--blinkit-green);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.float-add-stepper button {
  background: var(--blinkit-green-soft);
  border: none;
  color: var(--blinkit-green);
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  line-height: 1;
}

.float-add-stepper button:hover { background: #d5ecd8; }
.float-price { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 15px; }
.float-qty { font-size: 10px; opacity: 0.9; }

.float-view-btn {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* AI Recommendation Bottom Sheet */
.blinkit-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 1000;
  opacity: 1;
  visibility: visible;
  overflow-y: auto;
  padding: 0;
  transition: opacity 0.2s ease, visibility 0s linear 0s;
}

/* Fade out, then actually leave the layout and the a11y tree — opacity alone
   left the overlay on top of the page and readable by screen readers. */
.blinkit-modal-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}

.blinkit-bottom-sheet {
  width: 100%;
  max-width: 680px;
  background: #ffffff;
  border-radius: 24px 24px 0 0;
  padding: 20px 20px 28px 20px;
  box-shadow: var(--shadow-lg);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.sheet-drag-handle {
  width: 40px;
  height: 4px;
  background: #cbd5e1;
  border-radius: 2px;
  margin: 0 auto 4px auto;
}

.sheet-close-x {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--blinkit-gray-bg);
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 800;
  cursor: pointer;
}

.sheet-header {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fef9c3;
  border: 1px solid #fef08a;
  padding: 10px 14px;
  border-radius: var(--radius-md);
}

.sheet-header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sheet-main-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 13px;
  color: #854d0e;
}

.sheet-context-tag {
  font-size: 10px;
  font-weight: 700;
  color: #a16207;
}

.multi-recs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.rec-card-item {
  background: var(--blinkit-gray-bg);
  border: 1px solid var(--blinkit-border);
  border-radius: var(--radius-lg);
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}

.rec-cat-badge {
  font-size: 8px;
  font-weight: 800;
  color: var(--blinkit-green);
  text-transform: uppercase;
}

.rec-img-box {
  height: 55px;
  background: #ffffff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
}

/* Product name is shortened server-side; this is the single-line guarantee. */
.rec-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 11.5px;
  color: var(--blinkit-dark);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rec-reason {
  font-size: 10px;
  color: #854d0e;
  background: #fef9c3;
  border: 1px dashed #facc15;
  padding: 4px 6px;
  border-radius: 6px;
  font-weight: 700;
  margin-top: 4px;
  line-height: 1.3;
  display: block;
}

.rec-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
}

.rec-btn-add {
  background: var(--blinkit-green);
  color: #ffffff;
  border: none;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 10px;
  cursor: pointer;
}

.sheet-footer {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--blinkit-border);
  padding-top: 10px;
}

.btn-skip-checkout {
  background: var(--blinkit-gray-bg);
  border: none;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 12px;
  color: #475569;
  cursor: pointer;
  width: 100%;
}

@media (max-width: 768px) {
  .cat-grid-4col {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

  .tile-icon-bg {
    height: 52px;
    font-size: 22px;
  }

  .cart-sidebar {
    width: 100%;
    max-width: 100vw;
  }

  .multi-recs-grid {
    grid-template-columns: repeat(1, 1fr);
  }

  .rec-card-item {
    flex-direction: row;
    align-items: center;
  }

  .rec-img-box {
    width: 44px;
    height: 44px;
  }
}

/* ==========================================
   PRODUCT DETAIL PAGE (PDP) STYLES
   ========================================== */
.pdp-header {
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  padding: 10px 16px;
  border-bottom: 1px solid var(--blinkit-border);
  gap: 12px;
}

.pdp-back-btn {
  background: var(--blinkit-gray-bg);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 800;
  color: var(--blinkit-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdp-header-title-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pdp-header-brand {
  font-size: 10px;
  font-weight: 800;
  color: var(--blinkit-green);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pdp-header-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--blinkit-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.pdp-icon-btn {
  background: var(--blinkit-gray-bg);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdp-container {
  padding: 12px 16px 120px 16px;
  width: 100%;
  max-width: 768px;
  /* Flex items default to min-width:auto, so the carousels below were forcing
     this to its full 768px on narrow phones and scrolling the whole page. */
  min-width: 0;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pdp-hero-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 16px;
  border: 1px solid var(--blinkit-border);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.pdp-hero-img-box {
  height: 180px;
  background: linear-gradient(135deg, #f8fafc 0%, #fffbe6 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  margin-bottom: 16px;
  position: relative;
}

.pdp-time-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #000000;
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  padding: 4px 8px;
  border-radius: 6px;
}

.pdp-discount-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #2563eb;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
}

.pdp-brand-name {
  font-size: 12px;
  font-weight: 800;
  color: var(--blinkit-green);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.pdp-product-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--blinkit-dark);
  line-height: 1.3;
  margin-bottom: 12px;
}

.pdp-pack-selector-title {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 8px;
}

.pdp-pack-options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.pdp-pack-option-btn {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pdp-pack-option-btn.active {
  background: #f0fdf4;
  border-color: var(--blinkit-green);
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.15);
}

.pdp-pack-weight {
  font-size: 13px;
  font-weight: 800;
  color: var(--blinkit-dark);
}

.pdp-pack-price {
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  margin-top: 2px;
}

.pdp-pack-save {
  font-size: 9px;
  font-weight: 700;
  color: #2563eb;
  margin-top: 2px;
}

.pdp-trust-banner {
  background: #f8fafc;
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid #e2e8f0;
}

.pdp-trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #334155;
  font-weight: 600;
}

.pdp-section-box {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 16px;
  border: 1px solid var(--blinkit-border);
  box-shadow: var(--shadow-sm);
}

.pdp-section-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--blinkit-dark);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pdp-horizontal-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  /* Scroll the carousel rather than widening its parent. */
  min-width: 0;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.pdp-horizontal-scroll::-webkit-scrollbar {
  height: 4px;
}

.pdp-horizontal-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 2px;
}

.pdp-mini-card {
  flex: 0 0 130px;
  background: #ffffff;
  border: 1px solid var(--blinkit-border);
  border-radius: var(--radius-md);
  padding: 8px;
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
  cursor: pointer;
}

.pdp-mini-img {
  height: 60px;
  background: var(--blinkit-gray-bg);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 6px;
}

.pdp-mini-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--blinkit-dark);
  height: 28px;
  overflow: hidden;
  line-height: 1.25;
}

.pdp-mini-pack {
  font-size: 10px;
  color: #64748b;
  margin: 2px 0 6px 0;
}

.pdp-mini-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.pdp-mini-price {
  font-size: 12px;
  font-weight: 800;
  color: var(--blinkit-dark);
}

.pdp-brand-pills-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.pdp-brand-pill {
  flex: 0 0 auto;
  background: var(--blinkit-gray-bg);
  border: 1px solid var(--blinkit-border);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: var(--blinkit-dark);
  cursor: pointer;
}

.pdp-sticky-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 95;
  background: #ffffff;
  border-top: 1px solid var(--blinkit-border);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* The bar is PDP-only; showView() toggles .hidden on every other page. */
.pdp-sticky-bottom-bar.hidden { display: none !important; }

.pdp-bottom-price-col {
  display: flex;
  flex-direction: column;
}

.pdp-bottom-pack {
  font-size: 10px;
  color: #64748b;
  font-weight: 600;
}

.pdp-bottom-price-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pdp-bottom-price-row strong {
  font-size: 18px;
  font-weight: 900;
  color: var(--blinkit-dark);
}

.pdp-bottom-mrp {
  font-size: 12px;
  color: #94a3b8;
  text-decoration: line-through;
}

.pdp-tax-note {
  font-size: 9px;
  color: #94a3b8;
}

.pdp-add-btn {
  background: var(--blinkit-green);
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

@media (max-width: 480px) {
  .pdp-pack-options-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
}

/* ==========================================
   RESPONSIVE DESIGN OVERHAUL (MOBILE & DESKTOP)
   ========================================== */

/* Mobile Phones (screen width <= 480px) */
@media (max-width: 480px) {
  body {
    padding-bottom: 70px;
  }

  .blinkit-header {
    padding: 8px 12px;
  }

  .header-sub-tag {
    font-size: 9px;
  }

  .delivery-title {
    font-size: 16px;
  }

  .address-dropdown-bar {
    font-size: 11px;
  }

  .header-search-bar {
    margin-top: 6px;
  }

  .header-search-bar input {
    font-size: 13px;
    height: 38px;
    padding: 0 32px 0 34px;
  }

  /* Product Grid: 2 Equal Columns on Phone */
  .products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    padding: 0 4px;
  }

  .blinkit-card {
    padding: 8px;
    border-radius: 12px;
  }

  .card-img {
    height: 90px;
    font-size: 42px;
  }

  .card-title {
    font-size: 11px;
    height: 28px;
    line-height: 1.25;
  }

  .card-pack {
    font-size: 10px;
    margin: 2px 0 6px 0;
  }

  .price-main {
    font-size: 13px;
  }

  .price-mrp {
    font-size: 10px;
  }

  .add-btn-blinkit {
    padding: 6px 14px;
    font-size: 11px;
    height: 32px;
  }

  .stepper {
    height: 32px;
  }

  .stepper button {
    width: 28px;
    font-size: 14px;
  }

  /* Category Grid: 4 Equal Columns */
  .cat-grid-4col {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
  }

  .cat-tile span {
    font-size: 10px;
    line-height: 1.2;
  }

  .tile-icon-bg {
    height: 48px;
    font-size: 20px;
    border-radius: 10px;
  }

  /* Product Detail Page (PDP) Mobile Optimization */
  .pdp-header {
    padding: 8px 12px;
  }

  .pdp-container {
    padding: 10px 12px 100px 12px;
    gap: 12px;
  }

  .pdp-hero-card {
    padding: 12px;
    border-radius: 14px;
  }

  .pdp-hero-img-box {
    height: 150px;
    font-size: 64px;
    margin-bottom: 12px;
  }

  .pdp-product-title {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .pdp-pack-options-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
  }

  .pdp-pack-option-btn {
    padding: 8px 4px;
  }

  .pdp-pack-weight {
    font-size: 11px;
  }

  .pdp-pack-price {
    font-size: 11px;
  }

  .pdp-pack-save {
    font-size: 8px;
  }

  .pdp-section-box {
    padding: 12px;
    border-radius: 14px;
  }

  .pdp-section-title {
    font-size: 14px;
    margin-bottom: 10px;
  }

  .pdp-mini-card {
    flex: 0 0 120px !important;
    padding: 6px;
  }

  .pdp-mini-img {
    height: 52px;
    font-size: 24px;
  }

  .pdp-mini-title {
    font-size: 10px;
    height: 26px;
  }

  .pdp-sticky-bottom-bar {
    padding: 8px 12px max(8px, env(safe-area-inset-bottom)) 12px;
  }

  .pdp-bottom-price-row strong {
    font-size: 16px;
  }

  .pdp-add-btn {
    padding: 10px 18px;
    font-size: 12px;
  }

  /* Cart Sidebar Drawer Full Width */
  .cart-sidebar {
    width: 100% !important;
    max-width: 100vw !important;
  }

  /* AI Recommendation Sheet Mobile */
  .blinkit-bottom-sheet {
    width: 100% !important;
    max-width: 100vw !important;
    border-radius: 20px 20px 0 0 !important;
    padding: 16px 14px 20px 14px !important;
  }

  .rec-card-item {
    padding: 10px;
    gap: 8px;
  }

  .rec-title {
    font-size: 12px;
  }

  .rec-reason {
    font-size: 10px;
    padding: 3px 6px;
  }
}

/* Tablets (481px to 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;
  }

  .cat-grid-4col {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 10px !important;
  }

  .pdp-hero-img-box {
    height: 180px;
    font-size: 72px;
  }

  .cart-sidebar {
    width: 380px;
  }
}

/* Desktop Screens (769px and above) */
@media (min-width: 769px) {
  .blinkit-header {
    /* margin:0 auto on a column flex item collapses it to content width,
       so it was rendering ~415px above a 1200px nav strip. */
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 0 0 16px 16px;
  }

  .quick-pill-strip {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
  }

  #homeView, #categoryView, #searchView, #authView, #accountView, #trackingView {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
  }

  .hero-promo-banner {
    border-radius: 16px;
    margin-top: 12px;
  }

  .cat-grid-4col {
    grid-template-columns: repeat(8, 1fr) !important;
    gap: 12px !important;
  }

  .products-grid {
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 16px !important;
  }

  .blinkit-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .blinkit-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  }

  /* Desktop PDP Layout */
  .pdp-container {
    max-width: 768px;
    margin: 20px auto;
  }

  .pdp-hero-img-box {
    height: 220px;
    font-size: 84px;
  }

  .pdp-product-title {
    font-size: 22px;
  }

  .pdp-mini-card {
    flex: 0 0 150px !important;
  }

  .pdp-mini-card:hover {
    border-color: var(--blinkit-green);
  }

  .pdp-sticky-bottom-bar {
    max-width: 768px;
    margin: 0 auto;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
  }

  /* Desktop AI Modal Dialog */
  .blinkit-bottom-sheet {
    max-width: 480px !important;
    margin: auto !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2) !important;
  }
}

/* ==========================================
   LOCATION MODAL POPUP STYLES
   ========================================== */
.location-modal-card {
  background: #ffffff;
  border-radius: 16px;
  width: 92%;
  max-width: 520px;
  padding: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  position: relative;
  margin: auto;
  animation: modalPopIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.location-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 10px;
}

.location-modal-header h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--blinkit-dark);
}

.modal-close-btn {
  background: #f1f5f9;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 800;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.location-action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.btn-detect-gps {
  background: var(--blinkit-green);
  color: #ffffff;
  border: none;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
  transition: transform 0.15s ease, background-color 0.15s ease;
  white-space: nowrap;
}

.btn-detect-gps:hover {
  background: #15803d;
  transform: translateY(-1px);
}

.location-or-divider {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #64748b;
  flex-shrink: 0;
}

.location-search-box {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 0 10px;
  height: 42px;
  transition: border-color 0.2s ease;
}

.location-search-box:focus-within {
  border-color: var(--blinkit-green);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.location-search-box input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 12px;
  font-weight: 600;
  color: var(--blinkit-dark);
}

.quick-locations-section {
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px;
  border: 1px solid #e2e8f0;
}

.quick-loc-title {
  font-size: 10px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.quick-loc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.loc-chip-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s ease;
}

.loc-chip-btn:hover, .loc-chip-btn.active {
  background: #f0fdf4;
  border-color: var(--blinkit-green);
  color: #15803d;
}

/* ==================== LOGIN / SIGN UP PAGE VIEW ==================== */
.auth-page-header,
.account-page-header {
  background: #ffffff;
  border: 1px solid var(--blinkit-border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-page-header h2,
.account-page-header h2 {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 22px;
}

.auth-card {
  background: #ffffff;
  border: 1px solid var(--blinkit-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
}

.auth-brand-mark {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 26px;
  color: var(--blinkit-green);
  text-align: center;
  letter-spacing: -0.5px;
}

.auth-context-note {
  font-size: 12px;
  color: var(--blinkit-text-muted);
  text-align: center;
  line-height: 1.5;
}

.auth-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--blinkit-gray-bg);
  border: 1px solid var(--blinkit-border);
  border-radius: 30px;
  padding: 4px;
}

.auth-tab-btn {
  background: transparent;
  border: none;
  border-radius: 30px;
  padding: 9px 10px;
  font-size: 12px;
  font-weight: 800;
  color: #475569;
  cursor: pointer;
  transition: var(--transition);
}

.auth-tab-btn.active {
  background: var(--blinkit-green);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field-label {
  font-size: 11px;
  font-weight: 800;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 8px;
}

.auth-input {
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  transition: var(--transition);
}

.auth-input:focus {
  border-color: var(--blinkit-green);
  box-shadow: 0 0 0 3px rgba(12, 131, 31, 0.12);
}

.auth-error-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 11.5px;
  font-weight: 700;
  margin-top: 10px;
}

.auth-error-box.hidden { display: none !important; }

.auth-submit-btn {
  margin-top: 16px;
  background: var(--blinkit-green);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: var(--transition);
}

.auth-submit-btn:hover:not(:disabled) { background: var(--blinkit-green-hover); }
.auth-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.auth-switch-row {
  text-align: center;
  font-size: 12px;
  color: var(--blinkit-text-muted);
  font-weight: 600;
}

.auth-switch-link {
  background: none;
  border: none;
  color: var(--blinkit-green);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  text-decoration: underline;
  padding: 0 2px;
}

/* ==================== MY ACCOUNT PAGE VIEW ==================== */
.account-identity-card {
  background: #ffffff;
  border: 1px solid var(--blinkit-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.account-avatar-circle {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--blinkit-green);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 900;
  text-transform: uppercase;
}

.account-identity-text { flex: 1; min-width: 0; }

.account-name-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--blinkit-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.account-name-value {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.account-meta-line {
  font-size: 11px;
  color: var(--blinkit-text-muted);
  font-weight: 600;
}

.account-logout-btn {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 20px;
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
}

.account-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.account-stat-tile {
  background: #ffffff;
  border: 1px solid var(--blinkit-border);
  border-radius: var(--radius-md);
  padding: 14px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.account-stat-tile strong {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 900;
  color: var(--blinkit-green);
}

.account-stat-tile span {
  font-size: 10px;
  font-weight: 700;
  color: var(--blinkit-text-muted);
}

.account-section-box {
  background: #ffffff;
  border: 1px solid var(--blinkit-border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.account-section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 900;
}

.account-order-card {
  border: 1px solid var(--blinkit-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.account-order-card:last-child { margin-bottom: 0; }

.account-order-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.account-order-id {
  font-size: 12px;
  font-weight: 900;
}

.account-order-date {
  font-size: 10.5px;
  color: var(--blinkit-text-muted);
  font-weight: 600;
}

.account-order-total {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 900;
  color: var(--blinkit-green);
  white-space: nowrap;
}

.account-order-loc {
  font-size: 10.5px;
  color: var(--blinkit-text-muted);
  font-weight: 600;
}

.account-order-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px dashed var(--blinkit-border);
  padding-top: 8px;
}

.account-order-item-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: #334155;
}

.account-order-item-row .qty-tag {
  color: var(--blinkit-text-muted);
  font-weight: 700;
  white-space: nowrap;
}

.account-loc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: #334155;
  padding: 8px 0;
  border-bottom: 1px dashed var(--blinkit-border);
}

.account-loc-row:last-child { border-bottom: none; }

.account-loc-row .loc-time {
  font-size: 10px;
  color: var(--blinkit-text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.account-empty-state {
  text-align: center;
  padding: 24px 10px;
  color: var(--blinkit-text-muted);
}

.account-empty-state .empty-icon { font-size: 30px; margin-bottom: 6px; }
.account-empty-state h4 { font-size: 13px; color: var(--blinkit-dark); }
.account-empty-state p { font-size: 11px; margin-top: 4px; }

/* ==========================================
   RESPONSIVE PASS — screens the earlier rules
   did not cover (account/auth views, the
   floating bar, and very small phones)
   ========================================== */

/* Nothing may push the page sideways. */
.app-page-view,
.account-section-box,
.account-identity-card,
.auth-card {
  min-width: 0;
  max-width: 100%;
}

.account-order-card,
.account-order-item-row,
.account-loc-row {
  min-width: 0;
}

/* Long product names in order history wrap instead of stretching the row. */
.account-order-item-row > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.account-loc-row > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Desktop: keep the floating bar aligned with the content column instead of
   stretching across a wide screen. */
@media (min-width: 769px) {
  .mobile-floating-cart-bar {
    max-width: 1200px;
    margin: 0 auto;
  }

  /* On a product page the content column is 768px — match it. */
  .mobile-floating-cart-bar.pdp-mode {
    max-width: 768px;
  }

  .auth-card {
    padding: 28px 28px;
  }

  .account-stats-row {
    gap: 14px;
  }

  .account-stat-tile {
    padding: 18px 10px;
  }
}

/* Tablets: the account stats row has room to breathe. */
@media (min-width: 481px) and (max-width: 768px) {
  .account-identity-card {
    gap: 16px;
  }
}

/* Phones */
@media (max-width: 480px) {
  .auth-page-header,
  .account-page-header {
    padding: 12px 14px;
  }

  .auth-page-header h2,
  .account-page-header h2 {
    font-size: 19px;
  }

  .auth-card {
    padding: 18px 16px;
    gap: 12px;
  }

  .auth-input {
    padding: 11px 12px;
    /* 16px keeps iOS Safari from zooming in on focus. */
    font-size: 16px;
  }

  .auth-submit-btn {
    padding: 13px;
    font-size: 13px;
  }

  .account-identity-card {
    padding: 14px;
    gap: 12px;
  }

  .account-avatar-circle {
    width: 46px;
    height: 46px;
    font-size: 21px;
  }

  .account-name-value {
    font-size: 17px;
  }

  .account-section-box {
    padding: 14px;
  }

  .account-section-title {
    font-size: 15px;
  }

  .account-stat-tile strong {
    font-size: 18px;
  }

  .account-order-item-row {
    font-size: 11px;
  }

  /* Clear the home indicator on notched phones. */
  .mobile-floating-cart-bar {
    bottom: max(14px, env(safe-area-inset-bottom));
    padding: 9px 12px;
  }

  .float-add-btn {
    padding: 6px 12px;
  }
}

/* Small phones (iPhone SE and narrower) */
@media (max-width: 360px) {
  .app-page-view {
    padding: 12px 14px;
  }

  /* Three stat tiles no longer fit side by side legibly. */
  .account-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .account-stat-tile:last-child {
    grid-column: 1 / -1;
  }

  .account-identity-card {
    flex-wrap: wrap;
  }

  .account-logout-btn {
    margin-left: auto;
  }

  .auth-mode-tabs {
    gap: 4px;
  }

  .auth-tab-btn {
    font-size: 11px;
    padding: 8px 6px;
  }

  /* Keep the PDP add control and "View cart" on one line. */
  .mobile-floating-cart-bar {
    left: 8px;
    right: 8px;
    padding: 8px 10px;
  }

  .float-add-label {
    font-size: 10px;
  }

  .float-view-btn {
    padding: 7px 10px;
    font-size: 11px;
  }

  .float-add-stepper {
    font-size: 10px;
  }

  .float-add-stepper button {
    width: 22px;
    height: 22px;
  }
}

/* ==========================================
   LIVE ORDER TRACKING PAGE
   ========================================== */
.track-box {
  background: linear-gradient(160deg, #0c831f 0%, #0a6b19 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: 0 10px 26px rgba(12, 131, 31, 0.28);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.track-box-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.track-eta-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.track-eta-label {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.track-eta-clock {
  font-family: 'Outfit', sans-serif;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.track-rider-badge {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  animation: trackPulse 1.8s ease-in-out infinite;
}

@keyframes trackPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.35); }
  50%      { transform: scale(1.06); box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
}

.track-progress-track {
  height: 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.25);
  overflow: hidden;
}

.track-progress-fill {
  height: 100%;
  border-radius: 4px;
  background: #ffffff;
  transition: width 0.9s linear;
}

.track-stage-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.track-stage-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.18);
}

.track-stage-row:last-child { border-bottom: none; }
.track-stage-row.pending { opacity: 0.5; }

.track-stage-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.track-stage-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.track-stage-label {
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.track-stage-row.current .track-stage-label { font-size: 12.5px; }

.track-stage-sub {
  font-size: 10px;
  opacity: 0.85;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.track-stage-tick {
  font-size: 12px;
  font-weight: 900;
  flex-shrink: 0;
}

.track-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 10.5px;
  font-weight: 700;
  opacity: 0.9;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 10px;
  flex-wrap: wrap;
}

.track-meta-addr { overflow-wrap: anywhere; }

/* Ordered items summary */
.track-items-box,
.track-recs-box {
  background: #ffffff;
  border: 1px solid var(--blinkit-border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.track-recs-box.hidden { display: none !important; }

.track-items-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.track-section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 900;
}

.track-items-total {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 900;
  color: var(--blinkit-green);
}

.track-item-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: #334155;
  padding: 5px 0;
  border-bottom: 1px dashed var(--blinkit-border);
  min-width: 0;
}

.track-item-row:last-of-type { border-bottom: none; }
.track-item-name { min-width: 0; overflow-wrap: anywhere; }
.track-item-qty { white-space: nowrap; font-weight: 800; color: var(--blinkit-text-muted); }

.track-continue-btn {
  margin-top: 4px;
  background: var(--blinkit-gray-bg);
  border: 1px solid var(--blinkit-border);
  border-radius: var(--radius-md);
  padding: 11px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
}

.track-continue-btn:hover {
  background: var(--blinkit-green-soft);
  border-color: var(--blinkit-green);
  color: #15803d;
}

/* Recommendations shown while the order is live */
.track-recs-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.track-recs-head > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.track-recs-title {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.track-recs-sub {
  font-size: 10.5px;
  color: var(--blinkit-text-muted);
  font-weight: 700;
}

#trackRecsGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 769px) {
  .track-box { padding: 22px 24px; }
  .track-eta-clock { font-size: 40px; }
  #trackRecsGrid { grid-template-columns: repeat(3, 1fr); }
  .track-recs-box .rec-card-item { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .track-box { padding: 15px 16px; }
  .track-eta-clock { font-size: 30px; }
  .track-rider-badge { width: 42px; height: 42px; font-size: 21px; }
  .track-items-box, .track-recs-box { padding: 14px; }
  .track-section-title, .track-recs-title { font-size: 15px; }
}

@media (max-width: 360px) {
  .track-eta-clock { font-size: 26px; }
  .track-meta-row { font-size: 10px; }
  .track-stage-label { font-size: 11.5px; }
}

/* ==========================================
   PRICING — a struck-through price only when
   there is a real discount, plus the % saved
   ========================================== */
.price-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 0;
}

.price-sub-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}

.price-box .price-main {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 14px;
  color: var(--blinkit-dark);
  line-height: 1.2;
}

.price-box .price-mrp {
  font-size: 10px;
  text-decoration: line-through;
  color: var(--blinkit-text-muted);
  font-weight: 600;
}

.price-off {
  font-size: 9.5px;
  font-weight: 900;
  color: #15803d;
  background: var(--blinkit-green-soft);
  border-radius: 4px;
  padding: 1px 4px;
  white-space: nowrap;
  line-height: 1.4;
}

.price-box.compact { gap: 3px; }
.price-box.compact .price-main { font-size: 13px; }
.price-box.compact .price-mrp { font-size: 9px; }
.price-box.compact .price-off { font-size: 8.5px; padding: 1px 3px; }

/* Corner ribbon on product cards */
.discount-badge {
  background: #1d4ed8;
  color: #ffffff;
  font-size: 9px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.pdp-mini-img { position: relative; }

.pdp-mini-img .discount-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 8px;
  padding: 1px 4px;
}

/* Rec cards show the percentage in the price row instead of a corner badge —
   the thumbnail is only 44px on mobile and the ribbon overflowed it. */
.rec-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
  margin-top: 2px;
}

.rec-price-row .price-box { min-width: 0; }
.rec-price-row .rec-btn-add { flex-shrink: 0; }

/* Price block on the left, ADD on the right — never wrapping, so every card
   in the grid is the same height whether or not the item is discounted. */
.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
  margin-top: auto;
}

.card-bottom .price-box { flex: 1; min-width: 0; }
.card-bottom .add-btn-blinkit,
.card-bottom .stepper { flex-shrink: 0; }

/* Equal-height cards regardless of title length */
.blinkit-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.products-grid { align-items: stretch; }

.rec-body { flex: 1; min-width: 0; }

/* ==========================================
   AI SUGGESTION LOADING ANIMATION
   ========================================== */
.rec-loading-head {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 2px 2px 6px 2px;
}

.rec-scanner {
  height: 4px;
  border-radius: 3px;
  background: var(--blinkit-green-soft);
  overflow: hidden;
  position: relative;
}

.rec-scanner span {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 38%;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--blinkit-green), transparent);
  animation: recScan 1.15s ease-in-out infinite;
}

@keyframes recScan {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(365%); }
}

.rec-loading-step {
  font-size: 11.5px;
  font-weight: 800;
  color: #15803d;
  text-align: center;
  min-height: 15px;
  opacity: 1;
}


/* Skeleton placeholders */
.rec-card-item.rec-skeleton { pointer-events: none; }

.skel {
  background: linear-gradient(90deg, #e9edf3 25%, #f6f8fb 50%, #e9edf3 75%);
  background-size: 200% 100%;
  animation: skelShimmer 1.3s linear infinite;
  border-radius: 6px;
}

@keyframes skelShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skel-box { height: 55px; border-radius: var(--radius-md); }
.skel-line { height: 10px; margin-bottom: 6px; }
.skel-title { width: 70%; height: 12px; }
.skel-joke { width: 100%; }
.skel-joke.short { width: 60%; }
.skel-price { width: 46px; height: 14px; margin: 0; }
.skel-pill { width: 58px; height: 26px; border-radius: var(--radius-sm); }

@media (prefers-reduced-motion: reduce) {
  .skel, .rec-scanner span, .track-rider-badge { animation: none; }
}

.rec-empty-note {
  grid-column: 1 / -1;
  text-align: center;
  padding: 18px;
  color: var(--blinkit-text-muted);
}

.rec-empty-note h4 { font-size: 13px; color: var(--blinkit-dark); }

/* ==========================================
   GRID SIZING FIX
   `1fr` is minmax(auto, 1fr), so a long product
   title inflated one column and pushed the next
   past the viewport (164px vs 187px at 375w).
   ========================================== */
.products-grid > *,
.cat-grid-4col > *,
.multi-recs-grid > *,
#trackRecsGrid > * {
  min-width: 0;
}

.blinkit-card,
.cat-tile,
.rec-card-item {
  min-width: 0;
  overflow-wrap: anywhere;
}

.card-title,
.card-pack,
.cat-tile span {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* ==========================================
   CART DRAWER ROWS
   .item-info had no styling at all, so as a flex
   item its min-width:auto refused to shrink and
   pushed the stepper past the drawer's edge.
   ========================================== */
.cart-item-row {
  gap: 10px;
}

.item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.item-info .title {
  font-size: 12px;
  font-weight: 700;
  color: var(--blinkit-dark);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.item-info .price {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 11px;
}

.cart-price-now {
  font-weight: 900;
  color: var(--blinkit-dark);
}

.cart-price-mrp {
  text-decoration: line-through;
  color: var(--blinkit-text-muted);
  font-weight: 600;
  font-size: 10px;
}

.cart-qty-x {
  color: var(--blinkit-text-muted);
  font-weight: 700;
}

/* The stepper keeps its width no matter how long the product name is. */
.cart-item-row .stepper {
  flex-shrink: 0;
}

@media (max-width: 360px) {
  .item-info .title { font-size: 11.5px; }
  .item-info .price { font-size: 10.5px; gap: 4px; }
  .cart-item-row .stepper button { padding: 4px 6px; }
}

/* ==========================================
   PRICE TOKENS MUST NEVER BREAK MID-NUMBER
   .blinkit-card carries overflow-wrap:anywhere so
   long product titles wrap; that was inherited by
   the price spans and split "₹55" across lines.
   ========================================== */
.price-main,
.price-mrp,
.price-off,
.cart-price-now,
.cart-price-mrp,
.cart-qty-x,
.pdp-mini-price,
.track-items-total,
.account-order-total {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}

/* If the card is genuinely too narrow, break between the mrp and the
   badge — never inside either of them. */
.price-sub-row {
  flex-wrap: wrap;
  row-gap: 2px;
}

/* Reclaim room on narrow cards so the two-line price still fits beside ADD */
@media (max-width: 420px) {
  .card-bottom { gap: 6px; }

  .card-bottom .add-btn-blinkit {
    padding: 6px 10px;
    font-size: 10.5px;
  }

  .price-box .price-main { font-size: 13px; }
  .price-box .price-mrp { font-size: 9px; }
  .price-off { font-size: 8.5px; padding: 1px 3px; }
  .price-sub-row { gap: 3px; }

  /* Grid cards already carry the percentage as a corner ribbon, so the inline
     copy is redundant here — dropping it keeps the price to two tidy lines
     instead of wrapping to three. The ribbon still states the discount. */
  .blinkit-card .card-bottom .price-off { display: none; }
}

@media (max-width: 360px) {
  .card-bottom .add-btn-blinkit { padding: 6px 8px; font-size: 10px; }
}

/* Per-joke lead emoji — kept whole and never squeezed by the text beside it. */
.rec-reason-emoji {
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}
