:root {
  --primary: #16a34a;
  --primary-dark: #15803d;
  --bg: #f3f4f6;
  --surface: #ffffff;
  --text: #1f2937;
  --text-light: #6b7280;
  --border: #e5e7eb;
  --danger: #ef4444;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --radius: 16px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

input, textarea, [contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  padding-bottom: calc(70px + env(safe-area-inset-bottom));
  overflow: hidden;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

/* --- Views --- */
.view {
  display: none;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.view.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Login View --- */
.login-container {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: white;
  text-align: center;
  padding: 40px;
}

.logo {
  font-size: 3rem;
  margin-bottom: 20px;
}

.app-logo-img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 20px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.hero-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.hero-sub {
  color: var(--text-light);
  margin-bottom: 40px;
}

.auth-input {
  width: 100%;
  padding: 16px;
  font-size: 1.1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  outline: none;
  transition: border-color 0.2s;
  text-align: center;
  letter-spacing: 1px;
}

.auth-input:focus {
  border-color: var(--primary);
}

select.auth-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 1.2rem;
  padding-right: 40px;
  cursor: pointer;
}

/* --- Premium Inputs --- */
.input-group-premium {
    position: relative;
    width: 100%;
}

.input-icon-premium {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    z-index: 2;
    pointer-events: none;
    opacity: 0.8;
}

.auth-input-premium {
    width: 100%;
    padding: 16px 16px 16px 48px;
    font-size: 16px; /* Minimum 16px to prevent iOS auto-zoom */
    font-weight: 700;
    color: #1e293b;
    background: #fdfdfd;
    border: 2px solid #f1f5f9;
    border-radius: 16px;
    outline: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.auth-input-premium:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.1), 0 4px 12px rgba(0,0,0,0.05);
}

select.auth-input-premium {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 1rem;
    padding-right: 40px;
}


.btn-main {
  width: 100%;
  padding: 16px;
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(22, 163, 74, 0.2);
  transition: transform 0.1s;
}

.btn-main:active {
  transform: scale(0.98);
}

/* --- Shop View --- */
.shop-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 16px 20px;
  height: 60px;
  /* Explicit height for calculation */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  z-index: 100;
}

/* --- Category Navigation (Shop View) --- */
.top-cat-item {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    z-index: 10;
}

/* Premium Pill Styles */
.pill-premium {
    padding: 5px 12px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.8rem;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1.5px solid #f1f5f9;
    background: #f8fafc;
    color: #64748b;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.pill-premium.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
    color: white !important;
    border-color: transparent !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.pill-premium:active {
    transform: scale(0.95);
}

/* Special Styling for 'All' button */
.pill-all {
    background: #fcfdfe !important;
    border: 1.5px solid #e2e8f0;
    color: #475569;
}

.pill-all.active {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    color: white !important;
    border-color: transparent !important;
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.25);
}

/* --- BACK BUTTON PREMIUM --- */
.back-btn-premium {
  width: 32px;
  height: 32px;
  background: #f8fafc;
  border: 1.5px solid #f1f5f9;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.back-btn-premium:active {
  transform: scale(0.9);
  background: #f1f5f9;
}

/* --- TOAST NOTIFICATIONS --- */
#toast-container {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.premium-toast {
  background: #0f172a; /* Solid, high-contrast background */
  backdrop-filter: blur(10px);
  color: white;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 800;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  transform: translateY(0);
  animation: toastIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  white-space: nowrap;
  text-align: center;
}

.premium-toast.fade-out {
  animation: toastOut 0.5s ease forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-20px); }
}

.category-select-item:active {
    transform: scale(0.95);
    background: #f8fafc !important;
}

/* --- Zepto-style Categories --- */
.category-card-zepto {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-card-zepto:active {
    transform: scale(0.92);
}

.zepto-icon-box {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.02);
}

.zepto-icon-img {
    width: 75%;
    height: 75%;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.08));
}

.zepto-label {
    font-size: 0.72rem;
    font-weight: 800;
    color: #334155;
    text-align: center;
    line-height: 1.1;
    letter-spacing: -0.2px;
    padding: 0 2px;
    height: 1.1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

/* --- Premium Category Tiles (Home) --- */
.premium-cat-tile {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid #f1f5f9;
    border-radius: 20px;
    padding: 12px 14px 8px; /* Slightly reduced bottom padding */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Push label up and icon down */
    align-items: flex-start;
    text-align: left;
    height: 120px; /* Increased height for space */
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    cursor: pointer;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

.premium-cat-tile:active {
    transform: scale(0.94) translateY(2px);
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.1);
}

.premium-cat-icon-wrapper {
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative; /* No longer absolute to avoid overlap */
    align-self: flex-end; /* Push to the right */
    margin-right: -10px; /* Slight offset for premium feel */
    margin-bottom: -4px;
    background: transparent !important;
    transition: transform 0.3s;
    overflow: visible;
}

.premium-cat-tile:active .premium-cat-icon-wrapper {
    transform: scale(1.15);
}

.premium-cat-img {
    width: 95%;
    height: 95%;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.1));
}

.premium-cat-label {
    font-size: 0.85rem;
    font-weight: 850;
    color: #1e293b;
    line-height: 1.25;
    letter-spacing: -0.3px;
    width: 100%;
    z-index: 5;
    position: relative;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Allow 2 lines of text */
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Floating Sidebar Indicator (Shop) --- */
.zepto-sidebar {
    position: relative;
}

.sidebar-indicator {
    position: absolute;
    left: 0;
    width: 4px;
    height: 36px;
    background: var(--primary);
    border-radius: 0 4px 4px 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 20;
    pointer-events: none;
    box-shadow: 2px 0 10px rgba(22, 163, 74, 0.3);
}

/* --- Tinted Backgrounds (Full Tile) --- */
.cat-bg-green { background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%) !important; border-color: #dcfce7 !important; }
.cat-bg-amber { background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%) !important; border-color: #fef3c7 !important; }
.cat-bg-red { background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%) !important; border-color: #fee2e2 !important; }
.cat-bg-blue { background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important; border-color: #dbeafe !important; }
.cat-bg-pink { background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%) !important; border-color: #fce7f3 !important; }
.cat-bg-violet { background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%) !important; border-color: #ede9fe !important; }
.cat-bg-emerald { background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%) !important; border-color: #d1fae5 !important; }
.cat-bg-sky { background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%) !important; border-color: #e0f2fe !important; }

/* Premium Gradient Connection Glow */
.category-glow {
    position: absolute;
    top: 60px; /* Below header */
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, rgba(22, 163, 74, 0.15), transparent);
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.category-glow.active {
    opacity: 1;
}

/* The Improved "A-shape" Pointer with Glow (REMOVED by User Request to create seamless connection) */
/* .top-cat-item.active::after { ... } */

@keyframes pointerPop {
    from { transform: translateX(-50%) translateY(-8px) scale(0); opacity: 0; }
    to { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
}

/* Dynamic Content Tints */
.shop-content-area {
    transition: background-color 0.6s ease;
}

.bg-tint-green { background-color: rgba(22, 163, 74, 0.03) !important; }
.bg-tint-amber { background-color: rgba(245, 158, 11, 0.03) !important; }
.bg-tint-red { background-color: rgba(239, 68, 68, 0.03) !important; }
.bg-tint-blue { background-color: rgba(59, 130, 246, 0.03) !important; }

/* Staggered Product Entrance */
@keyframes cardEntrance {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.product-card-animated {
    animation: cardEntrance 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.user-welcome {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary-dark);
}

.logout-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-light);
}

/* Top Category Bar */
.top-cat-bar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 12px 16px;
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 90;
}

.top-cat-bar::-webkit-scrollbar {
  display: none;
}

.top-cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  min-width: 64px;
  transition: transform 0.15s;
}

.top-cat-item:active {
  transform: scale(0.95);
}

.top-cat-img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  background: #f1f5f9;
  border: 2.5px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.top-cat-item.active .top-cat-img {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.top-cat-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-light);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 64px;
}

/* Global Search Bar (Home) */
.home-search-container {
  padding: 0 20px 20px 20px;
  background: #111827;
  border-radius: 0 0 24px 24px;
  margin-bottom: 20px;
  position: relative;
}

.home-search-input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  background: white url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%239ca3af" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>') no-repeat 16px center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  color: var(--text);
}

/* Shop Search Bar */
.shop-search-container {
  background: var(--bg);
  padding: 10px 16px;
  height: 60px;
  /* Explicit height */
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 95;
}

.shop-search-input {
  width: 100%;
  padding: 12px 16px 12px 40px;
  border: 1px solid #d1d5db;
  border-radius: 20px;
  font-size: 0.95rem;
  font-family: inherit;
  background: white url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%236b7280" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>') no-repeat 14px center;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.2s;
}

.shop-search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15), inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.top-cat-item.active .top-cat-name {
  color: var(--primary-dark);
  font-weight: 700;
}

#viewShop.active {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  padding: 0;
}

/* Shop Body: Sidebar + Grid */
.shop-body {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: stretch;
  overflow: hidden;
}

/* Left Sub-Category Sidebar */
.sub-sidebar {
  width: 105px;
  min-width: 105px;
  flex-shrink: 0;
  background: #f8fafc;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 8px 0 160px 0;
  height: 100%;
  overflow-y: auto;
  scrollbar-width: none;
}

@media (max-width: 380px) {
  .sub-sidebar {
    width: 85px;
    min-width: 85px;
  }
}

.sub-sidebar::-webkit-scrollbar {
  display: none;
}

.sub-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.15s;
  text-align: center;
}

.sub-item:active {
  background: #e2e8f0;
}

.sub-item.active {
  background: white;
  border-left-color: var(--primary);
}

.sub-item-img {
  width: 55px;
  height: 55px;
  border-radius: 12px;
  object-fit: cover;
  background: #e2e8f0;
}

.sub-item-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-light);
  line-height: 1.2;
  word-break: break-word;
}

.sub-item.active .sub-item-name {
  color: var(--primary-dark);
  font-weight: 800;
}

.zepto-sidebar-item {
    padding: 12px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 10;
}

.zepto-sidebar-item.active {
    background: white;
}

.zepto-sidebar-item-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1.5px solid transparent;
}

.zepto-sidebar-item.active .zepto-sidebar-item-icon {
    background: #f0fdf4;
    border-color: rgba(22, 163, 74, 0.2);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.1);
}

.zepto-sidebar-item-img {
    width: 70%;
    height: 70%;
    object-fit: contain;
    filter: grayscale(0.2) opacity(0.8);
    transition: all 0.3s ease;
}

.zepto-sidebar-item.active .zepto-sidebar-item-img {
    filter: grayscale(0) opacity(1);
    transform: scale(1.1);
}

.zepto-sidebar-item-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #64748b;
    text-align: center;
    line-height: 1.2;
    transition: all 0.2s ease;
}

.zepto-sidebar-item.active .zepto-sidebar-item-label {
    color: #0f172a;
    font-weight: 900;
}

/* Product Grid — Zepto/BB Standard */
.grid {
  flex: 1;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 10px;
  align-content: start;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 160px;
}

@media (max-width: 380px) {
  .grid {
    gap: 8px;
    padding: 8px;
  }
}

@media (min-width: 481px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 12px;
  }
}

.product-card-premium {
  background: white;
  border-radius: 16px;
  padding: 10px;
  border: 1px solid #f1f5f9;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  scroll-snap-align: start;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.2s;
  box-sizing: border-box;
}

.product-card-premium:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

@media (max-width: 380px) {
  .product-card-premium {
    padding: 8px;
    gap: 4px;
    border-radius: 14px;
  }
}

.item-card:active, .product-card-premium:active {
  transform: scale(0.98);
}

.img-box {
  width: 100%;
  height: 130px;
  background: #f8f9fa;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.item-img-qty-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  z-index: 5;
}

.item-add-container {
  position: absolute;
  bottom: 8px;
  right: 8px;
  z-index: 10;
  width: 80px;
}

.item-tag-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--primary);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  z-index: 5;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.item-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.item-body {
  padding: 8px 10px 10px;
}

.item-title {
  font-weight: 600;
  font-size: 0.82rem;
  line-height: 1.3;
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-price {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-bottom: 6px;
}

.price-bold {
  color: var(--text);
  font-weight: 700;
  font-size: 0.82rem;
}

.qty-controls-initial {
  display: block;
  width: 100%;
  text-align: center;
  background: white;
  border: 1.5px solid var(--primary);
  border-radius: 8px;
  padding: 7px 0;
  color: var(--primary);
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.12);
}

.qty-controls-initial:active {
  background: #f0fdf4;
  transform: scale(0.95);
}

.qty-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.qty-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: white;
  border-radius: 6px;
  border: none;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}

.qty-val {
  font-weight: 700;
  font-size: 0.85rem;
  min-width: 18px;
  text-align: center;
}

/* Floating Cart */
.cart-float {
  position: fixed;
  bottom: 85px;
  /* Stay above bottom nav */
  left: 20px;
  right: 20px;
  background: #111827;
  color: white;
  padding: 16px 24px;
  border-radius: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  cursor: pointer;
  transform: translateY(150%);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cart-float.visible {
  transform: translateY(0);
}

.cart-info {
  display: flex;
  flex-direction: column;
}

.cart-count {
  font-size: 0.8rem;
  opacity: 0.8;
}

.cart-total {
  font-weight: 700;
  font-size: 1.1rem;
}

.cart-action {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Cart View */
.cart-list {
  margin-top: 20px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.cart-item img,
.cart-item > div:nth-child(2) {
  cursor: pointer;
}

.product-card-zepto {
  cursor: pointer;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 20000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.25s ease;
}

.bill-summary {
  background: white;
  padding: 20px;
  margin-top: 20px;
  border-radius: var(--radius);
}

.bill-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.bill-row.total {
  font-weight: 700;
  font-size: 1.2rem;
  border-top: 1px dashed var(--border);
  padding-top: 10px;
  margin-top: 10px;
}

/* Success View */
.success-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  animation: bounce 0.5s;
}

@keyframes bounce {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }
}

/* --- Homepage --- */
.home-container {
  padding-bottom: 40px;
}

.home-header {
  padding: 20px 20px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.home-greeting {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}

.home-sub {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 2px;
}

/* Banner Carousel */
.banner-section {
  padding: 0 16px;
  margin-bottom: 24px;
}

.banner-carousel {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #e2e8f0;
  aspect-ratio: 16 / 7;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.banner-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  height: 100%;
}

.banner-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
}

.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.banner-title-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
  color: white;
  font-weight: 700;
  font-size: 0.95rem;
}

.banner-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  transition: all 0.3s;
}

.banner-dot.active {
  background: var(--primary);
  width: 20px;
  border-radius: 4px;
}

.no-banner-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #dcfce7, #d1fae5);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 1.2rem;
}

/* Home Category Grid */
.home-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  padding: 0 20px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.see-all-btn {
  font-size: 0.82rem;
  color: var(--primary);
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
}

.category-select-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 14px;
    background: #f8fafc;
    border-radius: 20px;
    border: 1px solid #f1f5f9;
    margin: 0 14px 80px;
}

@media (min-width: 481px) {
  .category-select-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    padding: 16px;
  }
}

.home-cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px 8px;
  padding: 14px 12px;
  margin: 0 14px 20px;
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.home-cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.15s;
  padding: 6px 2px;
}

.home-cat-card:active {
  transform: scale(0.93);
}

.home-cat-img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: #f1f5f9;
  border: 2px solid #e2e8f0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.home-cat-card:active .home-cat-img {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.home-cat-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  line-height: 1.15;
  max-width: 72px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.shop-all-btn {
  display: block;
  width: calc(100% - 32px);
  margin: 0 16px 20px;
  padding: 14px;
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.2);
  transition: transform 0.1s;
}

.shop-all-btn:active {
  transform: scale(0.98);
}

/* --- Bottom Nav --- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  display: none;
  justify-content: space-around;
  align-items: center;
  padding: 6px 0 env(safe-area-inset-bottom, 8px);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
  z-index: 2000;
  border-top: 1px solid var(--border);
}

.bottom-nav.visible {
  display: flex;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  padding: 4px 12px;
  border-radius: 10px;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.nav-item:active {
  transform: scale(0.9);
}

.nav-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.nav-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-light);
}

.nav-item.active .nav-label {
  color: var(--primary-dark);
}

.nav-item.active .nav-icon {
  transform: scale(1.1);
}

/* --- Orders View --- */
.orders-container {
  padding: 0 16px 20px;
  overflow-y: auto;
  height: calc(100vh - 130px);
}

.order-card {
  background: white;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border);
}

.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.order-date {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
}

.order-status {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.order-status.pending {
  background: #fef9c3;
  color: #a16207;
}

.order-status.accepted {
  background: #dcfce7;
  color: #166534;
}

.order-status.delivered {
  background: #e0f2fe;
  color: #0369a1;
}

.order-status.cancelled {
  background: #fee2e2;
  color: #991b1b;
}

.order-items-list {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.6;
}

.order-total {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.95rem;
}

/* --- Profile View --- */
.profile-container {
  padding: 30px 20px;
  text-align: center;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 16px;
  box-shadow: 0 4px 15px rgba(22, 163, 74, 0.15);
}

.profile-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.profile-phone {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 24px;
}

.profile-info-card {
  background: white;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border);
  text-align: left;
}

.profile-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
}

.profile-row:last-child {
  border-bottom: none;
}

.profile-key {
  color: var(--text-light);
}

.profile-val {
  font-weight: 600;
  color: var(--text);
}

.logout-btn-big {
  width: 100%;
  padding: 14px;
  background: #fee2e2;
  color: #ef4444;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  margin-top: 20px;
}

/* ===== BOTTOM NAVIGATION ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  display: none;
  justify-content: space-around;
  align-items: center;
  padding: 8px 0 12px;
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
  z-index: 9999 !important;
}

.bottom-nav.visible {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  padding: 4px 12px;
  border-radius: 12px;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.nav-item.active {
  background: #f0fdf4;
}

.nav-item.active .nav-icon {
  transform: scale(1.15);
}

.nav-item.active .nav-label {
  color: var(--primary);
  font-weight: 700;
}

.nav-icon {
  font-size: 1.3rem;
  transition: transform 0.2s;
}

.nav-label {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-light);
  transition: color 0.2s;
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: 18px;
  background: var(--danger);
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 12px;
  border: 2px solid white;
  box-shadow: 0 2px 5px rgba(239, 68, 68, 0.4);
  display: none;
  /* Hidden by default when 0 items */
  z-index: 10;
}

.cart-badge.visible {
  display: block;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  0% {
    transform: scale(0);
  }

  100% {
    transform: scale(1);
  }
}

/* ===== ORDERS VIEW ===== */
.orders-container {
  padding: 80px 16px 80px;
  overflow-y: auto;
  height: 100vh;
}

.order-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.order-date {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.order-status {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.order-status.delivered {
  background: #dcfce7;
  color: #16a34a;
}

.order-status.pending {
  background: #fef3c7;
  color: #d97706;
}

.order-items-list {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 8px;
}

.order-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.95rem;
  border-top: 1px dashed var(--border);
  padding-top: 8px;
  margin-top: 8px;
}

/* ===== PROFILE VIEW ===== */
.profile-container {
  padding: 80px 20px 80px;
  text-align: center;
}

.profile-avatar {
  font-size: 4rem;
  margin-bottom: 10px;
}

.profile-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

.profile-phone {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 24px;
}

.profile-info-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px 20px;
  text-align: left;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  margin-bottom: 24px;
}

.profile-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.profile-row:last-child {
  border-bottom: none;
}

.profile-key {
  font-weight: 600;
  color: var(--text-light);
  font-size: 0.9rem;
}

.profile-val {
  font-weight: 500;
  color: var(--text);
  font-size: 0.9rem;
}

.logout-btn-big {
  width: 100%;
  padding: 14px;
  background: #fee2e2;
  color: #ef4444;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}

/* ===== LOGIN MODAL OVERLAY ===== */
.login-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 20000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.login-modal {
  background: var(--surface);
  border-radius: 20px;
  padding: 28px 24px 24px;
  width: 100%;
  max-width: 380px;
  max-height: none;
  overflow-y: visible;
  margin: auto 0;
  position: relative;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}

@keyframes slideUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.login-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--text-light);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.15s;
}

.login-modal-close:active {
  background: #f1f5f9;
}

.login-modal .auth-input {
  margin-bottom: 10px;
}

.login-modal .btn-main {
  margin-top: 6px;
}

/* Skeleton Loaders */
.skeleton-box {
  background-color: #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.skeleton-box::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transform: translateX(-100%);
  background-image: linear-gradient(90deg,
      rgba(255, 255, 255, 0) 0,
      rgba(255, 255, 255, 0.4) 20%,
      rgba(255, 255, 255, 0.6) 60%,
      rgba(255, 255, 255, 0));
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

/* Specific shapes */
.skeleton-image {
  height: 120px;
  width: 100%;
}

.skeleton-text {
  height: 16px;
  width: 80%;
  margin-top: 8px;
}

.skeleton-price {
  height: 16px;
  width: 40%;
  margin-top: 8px;
}

/* Delivery Banner */
.delivery-banner {
  background-color: #e8f5e9;
  /* Soft fresh green */
  color: #2e7d32;
  /* Deep readable green */
  text-align: center;
  padding: 10px 15px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
}

/* Consolidate delivery styles */
#homeDeliverySlotBanner {
  background: white;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

/* ========== ZEPTO DUAL-PANE LAYOUT ========== */
:root {
  --z-bg: #f4f6f8;
  --z-surface: #ffffff;
  --z-text: #0f172a;
  --z-text-muted: #64748b;
  --z-border: #f1f5f9;
  --z-primary: #16a34a;
  --z-primary-light: #f0fdf4;
  --z-primary-dark: #15803d;
  --primary: #16a34a;
  --primary-dark: #15803d;
  --border: #f1f5f9;
  --text: #0f172a;
}

.dual-pane-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  background: var(--z-bg);
  overflow: hidden;
}

.zepto-sidebar {
  width: 82px;
  min-width: 82px;
  background: var(--z-surface);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border-right: 1px solid var(--z-border);
  padding-bottom: 100px;
  scrollbar-width: none;
}

.zepto-sidebar::-webkit-scrollbar {
  display: none;
}

.zepto-main-content {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  padding-bottom: 120px;
  background: #fff;
  scrollbar-width: none;
}

.zepto-main-content::-webkit-scrollbar {
  display: none;
}

/* Left Sidebar Items */
.z-sidebar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 4px;
  cursor: pointer;
  border-left: 4px solid transparent;
  transition: all 0.2s;
  border-bottom: none !important;
}

.z-sidebar-item.active {
  background: white !important;
  border-left: 4px solid var(--primary) !important;
  position: relative;
}

.z-sidebar-img-box {
  width: 56px;
  height: 56px;
  background: #f8fafc;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  overflow: hidden;
  border: 1px solid #f1f5f9;
  transition: all 0.2s ease;
}

.z-sidebar-item.active .z-sidebar-img-box {
  background: #fff;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.15);
}

.z-sidebar-name {
  font-size: 0.72rem;
  font-weight: 800;
  color: #64748b;
  text-align: center;
  line-height: 1.2;
  word-break: break-word;
  padding: 0 4px;
}

.z-sidebar-item.active .z-sidebar-name {
  color: var(--z-text);
  font-weight: 800;
}

/* TRUE ZEPTO DUAL-PANE ARCHITECTURE */
body,
html {
  overflow: hidden;
  height: 100%;
  position: fixed;
  width: 100%;
  background: #f4f6f8;
}

.view {
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.dual-pane-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  background: #f8fafc;
  height: calc(100vh - 135px);
}

.zepto-sidebar {
  width: 82px;
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-right: 1px solid #f1f5f9;
  padding-bottom: calc(150px + env(safe-area-inset-bottom));
  z-index: 10;
}

.zepto-sidebar::-webkit-scrollbar {
  display: none;
}

.zepto-main-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* Momentum scrolling */
  background: #f8fafc;
  padding-bottom: calc(180px + env(safe-area-inset-bottom));
}

.zepto-main-content::-webkit-scrollbar {
  display: none;
}

/* Zepto Sticky Cart */
.zepto-bottom-cart {
  position: fixed;
  bottom: 72px;
  left: 14px;
  right: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-radius: 14px;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.35);
  border: 1px solid #22c55e;
  z-index: 999;
  cursor: pointer;
  transform: translateY(150%);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.zepto-bottom-cart.visible {
  transform: translateY(0);
}

/* === FULL-WIDTH MODE (no sidebar when no sub-categories exist) === */
.dual-pane-layout.no-sidebar .zepto-sidebar {
  display: none !important;
}

.dual-pane-layout.no-sidebar .zepto-main-content {
  flex: 1;
  width: 100%;
}

#deliveryProgressContainer {
  background: white;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

#deliveryProgressText {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 8px;
}

#progressTrack {
  background: #f1f5f9;
  height: 8px;
  border-radius: 9999px;
  overflow: hidden;
}

#progressBarFill {
  background: #16a34a;
  height: 100%;
  border-radius: 9999px;
  width: 0%;
  transition: width 0.4s ease;
}

#homeDeliverySlotBanner {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 12px;
  margin: 0 16px 16px 16px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.85rem;
  color: #16a34a;
  text-align: center;
}

/* --- Testimonials --- */
.testimonial-card {
  flex: 0 0 280px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
  transition: transform 0.2s;
}

.testimonial-card:active {
  transform: scale(0.98);
}

.testimonial-quote {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 3rem;
  color: #e2e8f0;
  font-family: serif;
  line-height: 1;
  pointer-events: none;
}

.testimonial-stars {
  font-size: 0.85rem;
  letter-spacing: 2px;
}

.testimonial-text {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.5;
  font-style: italic;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 4.5em;
}

.testimonial-footer {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.testimonial-name {
  font-weight: 800;
  font-size: 0.9rem;
  color: #1e293b;
}

.testimonial-tower {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
  margin-top: 2px;
}

/* --- Order Tracking Timeline --- */
.tracking-container {
    margin: 16px 0 8px;
    padding: 0 10px;
}

.timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 5px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e2e8f0;
    z-index: 1;
}

.timeline-step {
    position: relative;
    z-index: 2;
    background: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-step.active {
    border-color: var(--primary);
    background: var(--primary);
}

.timeline-step.completed {
    border-color: var(--primary);
    background: var(--primary);
}

.timeline-step.completed::after {
    content: '✓';
    color: white;
    font-size: 0.6rem;
    font-weight: 900;
}

.timeline-step.active::after {
    content: '';
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

.timeline-labels {
    display: flex;
    justify-content: space-between;
    padding: 0;
}

.timeline-label {
    font-size: 0.62rem;
    font-weight: 700;
    color: #94a3b8;
    text-align: center;
    width: 80px; /* Max width to prevent too much spread */
    flex: 1;
}

.timeline-label.active {
    color: var(--primary);
}

/* --- Modals & Overlays --- */
.login-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: env(safe-area-inset-top, 12px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 20000;
  animation: modalFadeIn 0.3s ease;
}

.login-modal {
  width: 90%;
  max-width: 400px;
  max-height: none;
  background: white;
  border-radius: 24px;
  padding: 30px 24px;
  margin: auto 0;
  position: relative;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: modalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  flex-shrink: 0;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalPop {
  0% { transform: scale(0.9) translateY(20px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.login-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: #64748b;
  cursor: pointer;
}

/* Spinner for Loading States */
.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}



@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- MASTER FOLDER TAB UI EFFECT --- */
#viewShop {
    background-color: #f1f5f9 !important; /* The dim "outside" color for the master background */
}

.folder-tab-header {
    padding: 12px 12px 0 0;
    background: transparent;
    z-index: 100;
    flex-shrink: 0;
    position: relative;
}

.folder-back-btn {
    width: 38px; 
    height: 38px; 
    background: #e2e8f0; 
    border-radius: 12px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 1rem; 
    cursor: pointer; 
    flex-shrink: 0; 
    color: #475569;
    font-weight: 900;
}

.folder-tab-bar {
    display: flex; 
    gap: 6px; 
    overflow-x: auto; 
    scrollbar-width: none; 
    -webkit-overflow-scrolling: touch; 
    flex: 1;
}

/* Modifying pill-premium for the Tab effect */
.folder-tab-bar .pill-premium {
    padding: 10px 18px;
    border-radius: 16px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    background: #e2e8f0 !important;
    color: #64748b !important;
    font-weight: 800;
    font-size: 0.95rem;
    box-shadow: none !important;
    border: none !important;
    opacity: 0.6;
    transition: all 0.3s;
}

.folder-tab-bar .pill-premium.active {
    background: #ffffff !important;
    color: #16a34a !important;
    border-top: 3px solid #16a34a !important;
    border-left: 3px solid #16a34a !important;
    border-right: 3px solid #16a34a !important;
    border-bottom: 5px solid #ffffff !important; /* Extra thick masking border */
    border-radius: 20px 20px 0 0 !important;
    opacity: 1;
    position: relative;
    top: 3px; /* Pull it down to sit ON TOP of the dual-pane-layout's green border */
    z-index: 110 !important;
    padding-bottom: 12px !important;
}

/* Modifying the master body structural layout */
.dual-pane-layout {
    background: #ffffff !important;
    border-top: 3px solid #16a34a;
    border-radius: 0 20px 0 0; /* Smooth folder corner */
    margin: 0;
    position: relative;
    z-index: 100;
    box-shadow: 0 -10px 15px rgba(0,0,0,0.02);
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* Inside the room, we clean up standard headers to look nice */
.category-header-title {
    font-size: 1.1rem;
    font-weight: 900;
    color: #0f172a;
}

/* Bouncy touch active effect for all primary buttons and nav items */
.btn-main:active, 
.nav-item:active, 
.premium-cat-tile:active, 
.zepto-bottom-cart:active, 
.z-sidebar-item:active, 
.folder-back-btn:active, 
.folder-tab-bar .pill-premium:active {
    transform: scale(0.96) !important;
}

.bottom-nav {
    padding-bottom: env(safe-area-inset-bottom);
    height: calc(62px + env(safe-area-inset-bottom)) !important;
}

/* === Zepto/BB Premium Micro-Animations === */
@keyframes shimmerCard {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.product-card-premium .img-box {
  transition: transform 0.2s ease;
}

.product-card-premium:active .img-box {
  transform: scale(0.96);
}

/* MRP Strikethrough Style */
.price-mrp-strike {
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: line-through;
  margin-left: 4px;
}

/* Zepto-style green border ADD button */
.add-btn-zepto {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 7px 0;
  background: #f0fdf4;
  border: 1.5px solid var(--primary);
  border-radius: 8px;
  color: var(--primary);
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.1);
}

.add-btn-zepto:active {
  background: var(--primary);
  color: white;
  transform: scale(0.95);
}

/* Category item count badge */
.cat-item-count {
  font-size: 0.6rem;
  font-weight: 700;
  color: #94a3b8;
  margin-top: 2px;
}


