/* ============================================================
   styles.css — Grozo Web App
   Layout: Grocery-style
   Theme: Salonap Red #A5050D + White + Light Grey
   Fonts: Outfit (UI text)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --red:          #A5050D;
  --primary:      #A5050D;
  --red-light:    #C40202;
  --red-dark:     #8B0000;
  --red-bg:       #FFF0F0;
  --red-border:   #FFCDD2;
  --green:        #2E7D32;
  --green-light:  #E8F5E9;
  --white:        #FFFFFF;
  --bg:           #F8F9FA;
  --surface:      #F5F5F5;
  --card:         #FFFFFF;
  --border:       #E0E0E0;
  --border-light: #EEEEEE;
  --text:         #212121;
  --text-mid:     #424242;
  --text-muted:   #757575;
  --text-light:   #9E9E9E;
  --shadow-sm:    0 1px 4px rgba(0,0,0,.08);
  --shadow:       0 2px 12px rgba(0,0,0,.1);
  --shadow-md:    0 4px 20px rgba(0,0,0,.12);
  --radius-sm:    6px;
  --radius:       10px;
  --radius-lg:    16px;
  --radius-xl:    24px;
  --transition:   all .2s ease;
  --nav-h:        104px;
  --subnav-h:     48px;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; overflow-x: hidden; width: 100%; }

body {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
}

img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

/* ─── TOP NAVBAR ─── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: background-color 0.4s ease, border-bottom-color 0.4s ease;
}

.nav-top {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  max-width: 1280px;
  margin: 0 auto;
  transition: background-color 0.4s ease;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  cursor: pointer;
}
.nav-logo img {
  height: 36px;
  width: auto;
}
.nav-logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--red);
  letter-spacing: -0.5px;
}

/* Location selector */
.nav-location {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-mid);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  flex: 1;
  min-width: 80px;
  max-width: 480px;
}
#location-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  flex: 1;
  min-width: 0;
  text-align: left;
}
@media (min-width: 769px) {
  .nav-location { max-width: 480px; }
}

.nav-location:hover { border-color: var(--red); color: var(--red); box-shadow: var(--shadow); }
.nav-location svg { color: var(--red); flex-shrink: 0; }

/* Explore button in top navbar */
.nav-explore-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  background: var(--red-bg);
  border: 1.5px dashed var(--red-border);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
  color: var(--red-light);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.nav-explore-btn:hover {
  background: var(--red-light);
  color: var(--white);
  border-color: var(--red-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.nav-explore-btn svg {
  flex-shrink: 0;
}

/* Search bar */
.nav-search-row {
  height: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 16px 12px;
  background-color: inherit;
  transition: background-color 0.4s ease;
}
.nav-search {
  flex: 1;
  position: relative;
  max-width: 600px;
}
.nav-search input {
  width: 100%;
  height: 40px;
  padding: 0 14px 0 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
  background: var(--surface);
  outline: none;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
  transition: var(--transition);
}
.nav-search input:focus {
  background: var(--white);
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(165,5,13,.08);
}
.nav-search input::placeholder { color: var(--text-light); }
.nav-search .search-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
}
.search-btn {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  padding: 0 16px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
  font-family: 'Outfit', sans-serif;
}
.search-btn:hover { background: var(--red-dark); }

/* Nav actions (right side) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-shrink: 0;
}

.nav-icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  position: relative;
  transition: var(--transition);
}
.nav-icon-btn:hover { background: var(--surface); color: var(--red); }

.nav-cart-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mid);
  transition: var(--transition);
  position: relative;
  box-shadow: var(--shadow-sm);
}
.nav-cart-btn:hover { border-color: var(--red); color: var(--red); box-shadow: var(--shadow); }

.badge {
  position: absolute;
  top: -6px; right: -6px;
  min-width: 18px; height: 18px;
  padding: 0 4px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 99px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--white);
}

/* ─── CATEGORY TAB BAR ─── */
.nav-subnav-wrapper {
  position: sticky;
  top: var(--nav-h);
  z-index: 100;
  transition: background-color 0.4s ease;
}
.nav-subnav-wrapper::before {
  content: "";
  position: absolute;
  top: 0; left: -50vw; right: -50vw; bottom: 0;
  background-color: inherit;
  z-index: -1;
}
.nav-subnav {
  height: var(--subnav-h);
  display: flex;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 16px;
  gap: 8px;
  background: transparent;
}
.nav-subnav::-webkit-scrollbar { display: none; }

.cat-tab {
  flex-shrink: 0;
  height: 32px;
  padding: 0 16px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-mid);
  white-space: nowrap;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  background: var(--white);
  box-shadow: none;
}
.cat-tab:hover { color: var(--red); }
.cat-tab.active {
  color: var(--red);
  background: var(--red-bg);
  border-color: var(--red-border);
  font-weight: 700;
}

/* When header is colored (a category is selected) */
.nav-subnav-wrapper.colored-header {
  background: var(--white); /* White layer under tabs */
}
.nav-subnav-wrapper.colored-header .cat-tab.active {
  background: var(--active-bg, transparent);
  border-color: var(--active-bg, transparent);
  color: var(--text);
  font-size: 14px;
  border-radius: 0 0 8px 8px;
  border-bottom: none;
  height: 48px;
  line-height: 48px;
  font-weight: 700;
  box-shadow: none;
  margin-top: 0;
}

#home-top-section {
  position: relative;
  transition: background-color 0.4s ease;
  padding-top: 16px;
}
#home-top-section::before {
  content: "";
  position: absolute;
  top: 0; left: -50vw; right: -50vw; bottom: 0;
  background-color: inherit;
  z-index: -1;
}

/* ─── MAIN ─── */
.main {
  padding-top: var(--nav-h);
  min-height: 100vh;
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

.view { display: none; }
.view.active { display: block; }

/* ─── TAGLINE ─── */
.tagline {
  padding: 12px 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.tagline span { color: var(--green); }

/* ─── HERO CAROUSEL ─── */
.carousel-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  background: var(--surface);
}
.carousel-track {
  display: flex;
  transition: transform .5s cubic-bezier(.77,0,.175,1);
  will-change: transform;
}
.carousel-slide {
  min-width: 100%;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
}
.carousel-slide img {
  width: 100%;
  aspect-ratio: 3 / 1;
  object-fit: cover;
  display: block;
}
.carousel-slide .slide-content {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 32px;
  background: linear-gradient(to right, rgba(0,0,0,.55) 0%, transparent 100%);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}
.carousel-slide .slide-content h2 {
  font-size: clamp(1rem, 3vw, 1.7rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 8px;
}
.carousel-slide .slide-content p {
  font-size: clamp(.75rem, 1.5vw, .95rem);
  color: rgba(255,255,255,.85);
  margin-bottom: 14px;
}
.slide-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 18px;
  background: var(--red);
  color: #fff;
  border-radius: 99px;
  font-weight: 700;
  font-size: 13px;
  width: fit-content;
  transition: var(--transition);
}
.slide-cta:hover { background: var(--red-dark); transform: scale(1.04); }

/* Carousel nav arrows */
.carousel-arrow {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  z-index: 2;
  transition: var(--transition);
}
.carousel-arrow:hover { background: var(--red); color: #fff; }
.carousel-arrow.prev { left: 12px; }
.carousel-arrow.next { right: 12px; }

/* Carousel dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 0 4px;
}
.carousel-dot {
  width: 7px; height: 7px;
  border-radius: 99px;
  background: var(--border);
  transition: var(--transition);
  cursor: pointer;
}
.carousel-dot.active { width: 22px; background: var(--red); }

/* ─── Feature badges (₹0 rain charge etc) ─── */
.feature-badges {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.feature-badges::-webkit-scrollbar { display: none; }

.feature-badge {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--green-light);
  border-radius: var(--radius);
  border: 1px solid #C8E6C9;
  min-width: 150px;
}
.feature-badge .fb-icon { font-size: 1.3rem; }
.feature-badge .fb-text { font-size: 12px; font-weight: 600; color: var(--green); line-height: 1.3; }

/* ─── Section header ─── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.see-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 2px;
  cursor: pointer;
}
.see-all:hover { text-decoration: underline; }

/* ─── Product Section ─── */
.product-section { margin-bottom: 28px; }

/* Horizontal scroll for products */
.product-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.product-scroll::-webkit-scrollbar { display: none; }

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

/* ─── Product Card ─── */
.p-card {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  width: 155px;
  position: relative;
}
.p-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--border);
}

.p-card__img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #FAFAFA;
}
.p-card__img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.p-card:hover .p-card__img-wrap img { transform: scale(1.05); }

/* Wishlist heart */
.p-card__heart {
  position: absolute;
  top: 6px; right: 6px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-light);
  font-size: 13px;
  z-index: 1;
  transition: var(--transition);
}
.p-card__heart:hover { color: var(--red); background: #fff; }

/* Discount badge */
.p-card__disc {
  position: absolute;
  top: 6px; left: 6px;
  padding: 2px 6px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  z-index: 1;
}

.p-card__body { padding: 8px 8px 10px; }

.p-card__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.p-card__sub {
  font-size: 11px;
  color: var(--text-light);
  margin-bottom: 6px;
}

/* Price + Add row */
.p-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.p-card__prices {}
.p-card__price {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  display: block;
}
.p-card__mrp {
  font-size: 11px;
  color: var(--text-light);
  text-decoration: line-through;
}

/* Add button */
.add-btn {
  flex-shrink: 0;
  height: 32px;
  padding: 0 14px;
  background: rgba(255, 90, 105, 0.15); /* Translucent pinkish-red from salonap */
  border: 1px solid #C40202; /* salonap red */
  border-radius: 10px;
  color: #C40202;
  font-size: 13px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 2px;
  transition: var(--transition);
  font-family: 'Outfit', sans-serif;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.add-btn:hover {
  background: #C40202;
  color: var(--white);
  box-shadow: 0 4px 8px rgba(196, 2, 2, 0.2);
}

/* Qty ctrl (in card) */
.qty-ctrl {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  border: none;
  border-radius: 10px;
  background: #C40202; /* Solid red from salonap */
  height: 32px;
  padding: 0 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.12);
}
.qty-btn {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  color: var(--white) !important; /* White icons */
  font-size: 18px;
  font-weight: 700;
  transition: var(--transition);
  font-family: 'Outfit', sans-serif;
  line-height: 1;
  border-radius: 6px;
  cursor: pointer;
}
.qty-btn:hover { background: rgba(255,255,255,0.15); }
.qty-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--white); /* White text */
  min-width: 22px;
  text-align: center;
}

.out-btn {
  flex-shrink: 0;
  height: 32px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-light);
  font-size: 11px;
  font-weight: 600;
  cursor: not-allowed;
  font-family: 'Outfit', sans-serif;
}

/* ─── Skeleton ─── */
.skeleton {
  background: linear-gradient(90deg, #eeeeee 25%, #e0e0e0 50%, #eeeeee 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ─── Explore (Blinkit style) ─── */
.explore-layout {
  display: flex;
  height: calc(100vh - var(--nav-h) - var(--subnav-h));
  overflow: hidden;
}

.explore-sidebar {
  width: 110px;
  flex-shrink: 0;
  overflow-y: auto;
  background: var(--surface);
  border-right: 1px solid var(--border-light);
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scrollbar-width: none;
}
.explore-sidebar::-webkit-scrollbar { display: none; }

.sidebar-cat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}
.sidebar-cat:hover { background: var(--white); }
.sidebar-cat.active { background: var(--white); }
.sidebar-cat.active .sidebar-cat-label { color: var(--red); font-weight: 700; }
.sidebar-cat.active { border-left: 3px solid var(--red); }

.sidebar-cat-img {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--white);
}
.sidebar-cat-img img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-cat-label { font-size: 11px; font-weight: 500; color: var(--text-muted); line-height: 1.2; }

.explore-products {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}
.explore-section { margin-bottom: 20px; }
.explore-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}
.explore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

/* ─── SEARCH ─── */
.search-view { padding: 16px 0; }
.search-count { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.search-empty, .search-initial {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-emoji { font-size: 3rem; margin-bottom: 12px; }
.search-empty h3, .search-initial h3 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; color: var(--text); }

/* ─── CART ─── */
.cart-view {
  max-width: 700px;
  margin: 0 auto;
  padding: 20px 0;
}
.cart-page-title { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.cart-empty {
  text-align: center;
  padding: 80px 20px;
}
.cart-empty .empty-emoji { font-size: 4rem; margin-bottom: 16px; }
.cart-empty h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.cart-empty p { color: var(--text-muted); margin-bottom: 20px; }

.cart-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  background: var(--card);
  border-radius: var(--radius);
  margin-bottom: 8px;
  border: 1px solid var(--border-light);
}
.cart-item-img {
  width: 64px; height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
  flex-shrink: 0;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-item-sub  { font-size: 12px; color: var(--text-light); margin-bottom: 6px; }
.cart-item-price { font-size: 14px; font-weight: 700; }
.cart-item-qty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: none;
  border-radius: 10px;
  background: #C40202;
  height: 32px;
  padding: 0 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.12);
}
.cart-item-qty .qb {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  color: var(--white) !important;
  font-size: 18px;
  font-weight: 700;
  transition: var(--transition);
  border-radius: 6px;
  cursor: pointer;
}
.cart-item-qty .qb:hover { background: rgba(255, 255, 255, 0.15); }
.cart-item-qty .qn {
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  min-width: 22px;
  text-align: center;
}

.cart-summary {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border-light);
  margin-top: 16px;
}
.cart-summary-title { font-size: 14px; font-weight: 700; margin-bottom: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em; }
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 14px;
  color: var(--text-muted);
}
.summary-row.total {
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.summary-row.savings { color: var(--green); font-weight: 600; }

.checkout-btn {
  width: 100%;
  height: 50px;
  margin-top: 16px;
  border-radius: var(--radius);
  background: var(--red);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: var(--transition);
}
.checkout-btn:hover { background: var(--red-dark); }

/* Free delivery bar */
.free-del-bar {
  margin-top: 12px;
  height: 6px;
  border-radius: 99px;
  background: var(--border);
  overflow: hidden;
}
.free-del-bar-fill { height: 100%; border-radius: 99px; background: var(--green); transition: width .4s ease; }
.free-del-hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

/* ─── ORDERS ─── */
.orders-view { max-width: 700px; margin: 0 auto; padding: 20px 0; }
.page-title { font-size: 18px; font-weight: 700; margin-bottom: 16px; }

.order-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  margin-bottom: 10px;
  overflow: hidden;
}
.order-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
}
.order-card-id { font-size: 12px; color: var(--text-light); }
.order-card-date { font-size: 13px; color: var(--text-muted); }
.order-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
}
.order-status.delivered     { background: #E8F5E9; color: #2E7D32; }
.order-status.pending       { background: #FFF8E1; color: #F57F17; }
.order-status.cancelled     { background: #FFEBEE; color: #C62828; }
.order-status.preparing     { background: #EDE7F6; color: #512DA8; }
.order-status.out           { background: #E3F2FD; color: #1565C0; }
.order-card-body { padding: 12px 14px; }
.order-items-text { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.order-total { font-size: 15px; font-weight: 700; }

/* ─── PROFILE ─── */
.profile-view { max-width: 520px; margin: 0 auto; padding: 20px 0; }
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0 20px;
}
.profile-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red-light), var(--red-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}
.profile-name  { font-size: 1.2rem; font-weight: 700; margin-bottom: 2px; }
.profile-phone { font-size: 14px; color: var(--text-muted); }

.profile-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  overflow: hidden;
  margin-bottom: 12px;
}
.profile-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: var(--transition);
}
.profile-row:last-child { border-bottom: none; }
.profile-row:hover { background: var(--surface); }
.profile-row-icon { width: 20px; color: var(--red); flex-shrink: 0; }
.profile-row-label { flex: 1; font-size: 14px; font-weight: 500; }
.profile-row-chevron { color: var(--text-light); }

/* ─── AUTH MODAL ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.auth-modal {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  transform: translateY(16px) scale(.98);
  transition: transform .3s cubic-bezier(.22,1,.36,1);
  position: relative;
}
.modal-overlay.open .auth-modal { transform: translateY(0) scale(1); }
.auth-modal-title { font-size: 1.3rem; font-weight: 800; margin-bottom: 4px; }
.auth-modal-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }

.auth-input {
  width: 100%;
  height: 48px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0 14px;
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: var(--transition);
  margin-bottom: 12px;
}
.auth-input:focus { border-color: var(--red); background: var(--white); box-shadow: 0 0 0 3px rgba(165,5,13,.08); }
.auth-input::placeholder { color: var(--text-light); }

.phone-row { display: flex; gap: 8px; margin-bottom: 12px; }
.phone-prefix {
  height: 48px;
  padding: 0 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  display: flex; align-items: center;
  font-size: 15px;
  color: var(--text-muted);
  flex-shrink: 0;
  font-family: 'Outfit', sans-serif;
}

.auth-btn {
  width: 100%;
  height: 48px;
  border-radius: var(--radius);
  background: var(--red);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: var(--transition);
}
.auth-btn:hover { background: var(--red-dark); }
.auth-btn:disabled { opacity: .6; cursor: not-allowed; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  font-size: 13px;
  color: var(--text-light);
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.google-btn {
  width: 100%;
  height: 48px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1.5px solid var(--border);
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: var(--transition);
}
.google-btn:hover { border-color: var(--red); background: var(--red-bg); }
.google-btn img { width: 20px; }

.otp-inputs { display: flex; gap: 8px; justify-content: center; margin-bottom: 16px; }
.otp-input {
  width: 44px; height: 52px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  background: var(--surface);
  outline: none;
  font-family: 'Outfit', sans-serif;
  transition: var(--transition);
}
.otp-input:focus { border-color: var(--red); background: var(--white); box-shadow: 0 0 0 3px rgba(165,5,13,.08); }

.auth-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
}
.auth-close:hover { background: var(--surface); color: var(--red); }

/* ─── LOCATION MODAL ─── */
#location-modal .modal-content {
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  transform: translateY(16px) scale(.98);
  transition: transform .3s cubic-bezier(.22,1,.36,1);
}
.modal-overlay.open #location-modal .modal-content {
  transform: translateY(0) scale(1);
}

/* ─── PRODUCT MODAL ─── */
.product-modal {
  width: 100%;
  max-width: 520px;
  background: var(--card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  transform: translateY(24px);
  transition: transform .35s cubic-bezier(.22,1,.36,1);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-overlay.open .product-modal { transform: translateY(0); }

.pm-img {
  width: 100%;
  height: 180px;
  background: var(--surface);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pm-img img { 
  max-width: 100%; 
  max-height: 100%; 
  object-fit: contain; 
}
.pm-close {
  position: absolute;
  top: 10px; right: 10px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(0,0,0,.4);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
  font-size: 18px;
}
.pm-body { padding: 18px; }
.pm-cat { font-size: 11px; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.pm-name { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.pm-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.pm-price-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px; }
.pm-price { font-size: 1.4rem; font-weight: 800; color: var(--text); }
.pm-mrp { font-size: 1rem; color: var(--text-light); text-decoration: line-through; }
.pm-disc { font-size: 12px; font-weight: 700; color: var(--green); background: var(--green-light); padding: 2px 6px; border-radius: 4px; }
.pm-desc-title { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.pm-desc { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; }
.pm-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.pm-tag { padding: 3px 10px; border-radius: 99px; background: var(--red-bg); color: var(--red); font-size: 11px; font-weight: 600; border: 1px solid var(--red-border); }
.pm-add-btn {
  width: 100%;
  height: 48px;
  border-radius: var(--radius);
  background: var(--red);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: var(--transition);
}
.pm-add-btn:hover { background: var(--red-dark); }
.pm-qty-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pm-qty-row .pm-add-btn { flex: 1; }
.pm-qty-display {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--red);
  min-width: 30px;
  text-align: center;
}

/* ─── Serviceability banner ─── */
.service-banner {
  margin: 10px 0;
  padding: 10px 14px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
}
.service-banner.success { background: var(--green-light); color: var(--green); border: 1px solid #A5D6A7; }
.service-banner.error   { background: #FFEBEE; color: #C62828; border: 1px solid #FFCDD2; }
.service-banner.warn    { background: #FFF8E1; color: #F57F17; border: 1px solid #FFE082; }

/* ─── Toast ─── */
.toast-container {
  position: fixed;
  bottom: 80px; left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.toast {
  padding: 12px 18px;
  border-radius: 16px;
  background: #212121;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  display: flex; align-items: flex-start; gap: 8px;
  animation: tin .3s cubic-bezier(.22,1,.36,1);
  white-space: normal;
  max-width: 340px;
  line-height: 1.4;
}
.toast.fade-out {
  animation: tout .3s cubic-bezier(.22,1,.36,1) forwards;
}
.toast.success .ti { color: #4CAF50; }
.toast.error   .ti { color: #EF5350; }
@keyframes tin  { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes tout { to { transform: translateY(12px); opacity: 0; } }

/* ─── Spinner ─── */
.spinner {
  width: 24px; height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Bottom Nav (mobile) ─── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 999;
  height: 60px;
  background: var(--white);
  border-top: 1px solid var(--border);
}
.bnav-inner { display: flex; height: 100%; }
.bnav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-light);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.bnav-item.active { color: var(--red); }
.bnav-item svg { width: 20px; height: 20px; }
.b-badge {
  position: absolute;
  top: 4px; right: calc(50% - 22px);
  min-width: 16px; height: 16px;
  padding: 0 3px;
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  border-radius: 99px;
  display: flex; align-items: center; justify-content: center;
}

/* ─── Login prompt ─── */
.login-prompt {
  text-align: center;
  padding: 80px 20px;
}
.login-prompt .ep { font-size: 3.5rem; margin-bottom: 16px; }
.login-prompt h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.login-prompt p { color: var(--text-muted); margin-bottom: 20px; }
.btn-red {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 24px;
  border-radius: var(--radius);
  background: var(--red);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  transition: var(--transition);
}
.btn-red:hover { background: var(--red-dark); }
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  background: transparent;
  transition: var(--transition);
  cursor: pointer;
}
.btn-ghost:hover { border-color: var(--red); color: var(--red); }

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .nav-explore-btn { display: none !important; }
  .nav-subnav { padding: 0 12px; }
  .bottom-nav { display: block; }
  .main { padding-bottom: 64px; }
  .main { padding-left: 12px; padding-right: 12px; }
  .search-btn { display: none; }
  .nav-search input { padding-right: 14px; border-radius: var(--radius); }
  .carousel-slide img { aspect-ratio: 2/1; }
  .explore-grid, .product-grid { grid-template-columns: repeat(2, 1fr); }
  .p-card { width: 100%; }
  .product-scroll .p-card { width: 145px; }

  /* Make location bar highly responsive on tablet and mobile viewports */
  .nav-location {
    flex: 1;
    min-width: 80px;
    max-width: none;
    padding: 0 8px;
    gap: 4px;
  }
  #location-label {
    max-width: none;
    font-size: 12px;
  }
  #nav-cart-label {
    display: none; /* Hide "My Cart" text to save horizontal space on all mobile viewports */
  }
  .nav-cart-btn {
    padding: 0 10px;
  }
}

@media (max-width: 480px) {
  .nav-actions .nav-icon-btn:not(#nav-cart) { display: none; }
  .carousel-slide .slide-content { padding: 16px; }
  .feature-badge { min-width: 120px; }
  .explore-sidebar { width: 90px; }

  .nav-logo-text {
    font-size: 1.3rem; /* Slightly smaller logo text on small screens */
  }
  .nav-location {
    max-width: none;
  }
  #location-label {
    max-width: none;
    font-size: 11px;
  }
}

@media (max-width: 360px) {
  .nav-logo-text {
    display: none; /* Hide logo text completely on ultra-narrow screens to prevent any overflow */
  }
  .nav-location {
    max-width: none;
  }
  #location-label {
    max-width: none;
  }
}

/* ─── Interactive Google Map & Address Forms ─── */
.map-container-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.map-view-block {
  position: relative;
  flex: 1;
  width: 100%;
  background: var(--bg);
}
.map-div {
  width: 100%;
  height: 100%;
}
.map-center-pin-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -100%);
  margin-top: -15px; /* Offset for pointer tip positioning */
  pointer-events: none;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.map-pin-circle {
  width: 32px; height: 32px;
  background: #000;
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  font-size: 16px;
  font-weight: 700;
}
.map-pin-stick {
  width: 2.5px; height: 12px;
  background: #000;
}
.map-pin-pulse {
  width: 8px; height: 3px;
  background: rgba(0,0,0,0.4);
  border-radius: 50%;
  margin-top: -1px;
  animation: mapPulse 1s infinite alternate;
}
@keyframes mapPulse {
  from { transform: scale(0.8); opacity: 0.6; }
  to { transform: scale(1.3); opacity: 0.2; }
}
.map-search-wrapper {
  position: absolute;
  top: 14px; left: 14px; right: 14px;
  z-index: 600;
}
.map-search-input {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--white);
  padding: 0 16px 0 42px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.map-search-input:focus {
  border-color: var(--red);
}
.map-search-icon-fixed {
  position: absolute;
  top: 15px; left: 15px;
  color: var(--red);
  pointer-events: none;
  font-size: 16px;
}
.map-gps-btn {
  position: absolute;
  bottom: 20px; right: 16px;
  z-index: 600;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--red);
  font-size: 18px;
  transition: transform 0.2s;
}
.map-gps-btn:active {
  transform: scale(0.92);
}
.map-details-card {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 16px 20px 24px;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.06);
  z-index: 700;
}
.map-details-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.map-details-card-icon {
  background: rgba(196,2,2,0.1);
  color: var(--red);
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.map-details-card-info {
  flex: 1;
}
.map-details-card-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}
.map-details-card-address {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Slide-up details form overlay */
.address-form-overlay {
  position: absolute;
  inset: 0;
  background: var(--white);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  overflow-y: auto;
}
.address-form-overlay.open {
  transform: translateY(0);
}
.address-form-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.address-form-body {
  padding: 20px;
  flex: 1;
}
.tag-chips-wrapper {
  display: flex;
  gap: 10px;
  margin: 8px 0 16px;
}
.tag-chip {
  padding: 8px 18px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}
.tag-chip.active {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 14px;
  margin-bottom: 6px;
}

/* Google Places Autocomplete Dropdown Custom Styling */
.pac-container {
  z-index: 3000 !important;
  border-radius: 16px !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 12px 36px rgba(0,0,0,0.14) !important;
  font-family: 'Outfit', sans-serif !important;
  margin-top: 6px !important;
  overflow: hidden !important;
  background-color: var(--white) !important;
}

.pac-item {
  padding: 12px 16px !important;
  font-size: 13px !important;
  color: var(--text) !important;
  border-bottom: 1px solid var(--border) !important;
  cursor: pointer !important;
  transition: background-color 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
}

.pac-item:hover {
  background-color: var(--surface) !important;
}

.pac-item-query {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: var(--text) !important;
  padding-right: 4px !important;
}

.pac-matched {
  color: var(--red) !important;
  font-weight: 700 !important;
}

.pac-icon {
  margin-right: 10px !important;
  margin-top: 0 !important;
}


/* --------------------------------------------------------------
   TRACK ORDER WIDGET � Home screen live order tracking
   -------------------------------------------------------------- */

/* Outer container */
#home-track-order {
  margin: 0 0 18px 0;
}

/* Card wrapper */
.tow-card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(165,5,13,.08), 0 1px 4px rgba(0,0,0,.04);
  position: relative;
  transition: box-shadow .3s ease;
}
.tow-card:hover { box-shadow: 0 8px 36px rgba(165,5,13,.12), 0 2px 8px rgba(0,0,0,.07); }

/* Gradient status accent strip at the top */
.tow-header-strip {
  height: 4px;
  background: linear-gradient(90deg, var(--red), #FF6B6B);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.tow-header-strip.placed  { background: linear-gradient(90deg, #00897B, #26A69A); }
.tow-header-strip.packing { background: linear-gradient(90deg, #F57C00, #FFA726); }
.tow-header-strip.ready   { background: linear-gradient(90deg, #00897B, #26A69A); }
.tow-header-strip.outfordelivery { background: linear-gradient(90deg, #3949AB, #5C6BC0); }
.tow-header-strip.delivered { background: linear-gradient(90deg, #2E7D32, #43A047); }

/* Card body */
.tow-body {
  padding: 14px 16px 16px;
}

/* Top row � order label + status badge */
.tow-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.tow-order-label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tow-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--red-bg);
  font-size: 1rem;
  flex-shrink: 0;
}
.tow-order-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.tow-order-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}
.tow-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.tow-status-badge.placed  { background: #E0F2F1; color: #00695C; }
.tow-status-badge.packing { background: #FFF3E0; color: #E65100; }
.tow-status-badge.ready   { background: #E0F2F1; color: #00695C; }
.tow-status-badge.outfordelivery { background: #E8EAF6; color: #283593; }
.tow-status-badge.delivered { background: #E8F5E9; color: #1B5E20; }
.tow-status-badge::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: tow-pulse 1.4s ease-in-out infinite;
}
.tow-status-badge.delivered::before { animation: none; }

@keyframes tow-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

/* Progress steps */
.tow-steps {
  display: flex;
  align-items: center;
  margin-bottom: 14px;
}
.tow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 1;
}
.tow-step-dot {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  z-index: 1;
  transition: all .3s ease;
}
.tow-step.done .tow-step-dot {
  background: #2E7D32;
  border-color: #2E7D32;
  color: #fff;
}
.tow-step.active .tow-step-dot {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(165,5,13,.2);
  animation: tow-step-glow .8s ease-in-out infinite alternate;
}
@keyframes tow-step-glow {
  from { box-shadow: 0 0 0 3px rgba(165,5,13,.2); }
  to   { box-shadow: 0 0 0 5px rgba(165,5,13,.35); }
}
.tow-step-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 4px;
  text-align: center;
  line-height: 1.2;
}
.tow-step.done .tow-step-label { color: #2E7D32; }
.tow-step.active .tow-step-label { color: var(--red); font-weight: 700; }

/* Connector line between steps */
.tow-connector {
  flex: 1;
  height: 2px;
  background: var(--border-light);
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.tow-connector.done { background: #2E7D32; }
.tow-connector.animated {
  background: linear-gradient(90deg, #2E7D32 0%, var(--red) 50%, var(--border-light) 100%);
  background-size: 200% 100%;
  animation: tow-flow 2s linear infinite;
}
@keyframes tow-flow {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Map area (Leaflet integration) */
.tow-map-area {
  height: 160px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #e9effa;
  margin-bottom: 12px;
  position: relative;
}
.tow-map-area .leaflet-container { height: 100%; }
.tow-map-placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #EDE7F6, #E8EAF6);
  border-radius: var(--radius);
  gap: 6px;
}
.tow-map-placeholder .tow-map-emoji { font-size: 2.4rem; }
.tow-map-placeholder p { font-size: 12px; color: #5C6BC0; font-weight: 600; }

/* Delivered animation box */
.tow-delivered-box {
  height: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
  border-radius: var(--radius);
  margin-bottom: 12px;
  gap: 8px;
}
.tow-delivered-box .tow-del-icon { font-size: 2.8rem; animation: tow-bounce .6s ease-out; }
@keyframes tow-bounce {
  0% { transform: scale(0.4); opacity: 0; }
  70% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); }
}
.tow-delivered-box p { font-size: 13px; color: #1B5E20; font-weight: 700; }

/* Driver card info row */
.tow-driver-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: var(--radius);
  margin-bottom: 10px;
  border: 1px solid var(--border-light);
}
.tow-driver-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3949AB, #5C6BC0);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.tow-driver-info { flex: 1; min-width: 0; }
.tow-driver-name { font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tow-driver-vehicle { font-size: 11px; color: var(--text-muted); }
.tow-driver-rating { font-size: 12px; font-weight: 700; color: #F57C00; }

/* View all orders btn at bottom */
.tow-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
  margin-top: 2px;
}
.tow-order-id {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}
.tow-view-btn {
  font-size: 12px;
  font-weight: 700;
  color: var(--red);
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 3px;
  transition: var(--transition);
}
.tow-view-btn:hover { text-decoration: underline; }

/* --------------------------------------------------------------
   RATING MODAL
   -------------------------------------------------------------- */
.rating-modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 28px 24px 24px;
  width: 100%;
  max-width: 400px;
  position: relative;
  animation: rating-modal-in .35s cubic-bezier(.34,1.56,.64,1);
}
@keyframes rating-modal-in {
  from { transform: scale(0.85) translateY(20px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
.rating-modal-close {
  position: absolute;
  top: 14px; right: 16px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}
.rating-modal-close:hover { background: var(--red); color: #fff; }

.rating-modal-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  text-align: center;
  margin-bottom: 4px;
}
.rating-modal-sub {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 20px;
}

.rating-section { margin-bottom: 18px; }
.rating-section-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 8px;
}
.rating-stars {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.rating-star {
  font-size: 1.8rem;
  cursor: pointer;
  transition: transform .15s ease;
  filter: grayscale(1) opacity(0.4);
}
.rating-star.filled {
  filter: none;
  transform: scale(1.05);
}
.rating-star:hover { transform: scale(1.2); filter: none; }

.rating-submit-btn {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  margin-top: 4px;
  font-family: 'Outfit', sans-serif;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(165,5,13,.25);
}
.rating-submit-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(165,5,13,.35); }
.rating-submit-btn:disabled { background: var(--border); color: var(--text-muted); box-shadow: none; cursor: not-allowed; transform: none; }

/* Mobile: hide nav-explore-btn on small screens */
@media (max-width: 600px) {
  .nav-explore-btn { display: none; }
  .tow-map-area { height: 130px; }
}

/* ── Track Order ETA pill ── */
.tow-eta-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 99px;
  padding: 6px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
.tow-eta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 10px;
}
.tow-eta-icon { font-size: 1.1rem; }
.tow-eta-label { font-size: 10px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing:.04em; }
.tow-eta-value { font-size: 13px; color: var(--text); font-weight: 700; }
.tow-eta-divider { width: 1px; height: 30px; background: var(--border-light); flex-shrink: 0; }

/* ======================================================
   ORDERS PAGE
   ====================================================== */
.orders-view { padding: 0 0 32px; }

.orders-header { padding: 20px 20px 0; }
.orders-title {
  font-size: 1.5rem; font-weight: 800;
  color: var(--text); margin-bottom: 14px;
}
.orders-filter-row {
  display: flex; gap: 8px; overflow-x: auto;
  padding-bottom: 4px; scrollbar-width: none;
}
.orders-filter-row::-webkit-scrollbar { display: none; }
.orders-filter-btn {
  border: 1.5px solid var(--border-light);
  background: var(--surface); color: var(--text-muted);
  border-radius: 99px; padding: 5px 16px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  white-space: nowrap; transition: all .18s;
}
.orders-filter-btn.active {
  background: var(--primary); color: #fff;
  border-color: var(--primary);
}
.orders-list { padding: 16px; display: flex; flex-direction: column; gap: 14px; }

.order-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .2s;
}
.order-card:hover { box-shadow: var(--shadow-md); }

.order-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border-light);
}
.order-card-id { display: flex; align-items: center; gap: 12px; }
.order-icon-circle {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.order-icon-circle svg { width: 18px; height: 18px; }
.order-icon-circle.delivered  { background: #d1fae5; color: #065f46; }
.order-icon-circle.cancelled  { background: #fee2e2; color: #991b1b; }
.order-icon-circle.out-for-delivery { background: #dbeafe; color: #1e40af; }
.order-icon-circle.packing    { background: #fef3c7; color: #92400e; }
.order-icon-circle.ready      { background: #ede9fe; color: #5b21b6; }
.order-icon-circle.placed     { background: #f3f4f6; color: #374151; }

.order-number { font-size: 15px; font-weight: 700; color: var(--text); }
.order-date   { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.order-status-badge {
  font-size: 11px; font-weight: 700; border-radius: 99px;
  padding: 4px 12px; text-transform: capitalize;
}
.order-status-badge.delivered    { background: #d1fae5; color: #065f46; }
.order-status-badge.cancelled    { background: #fee2e2; color: #991b1b; }
.order-status-badge.out-for-delivery { background: #dbeafe; color: #1e40af; }
.order-status-badge.packing      { background: #fef3c7; color: #92400e; }
.order-status-badge.ready        { background: #ede9fe; color: #5b21b6; }
.order-status-badge.placed       { background: #f3f4f6; color: #374151; }
.order-status-badge.orderplaced  { background: #f3f4f6; color: #374151; }

.order-items-preview {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 10px 16px;
}
.order-item-chip {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg); border-radius: 8px;
  padding: 5px 10px; font-size: 12px; color: var(--text);
}
.order-item-thumb {
  width: 28px; height: 28px; border-radius: 6px;
  object-fit: cover;
}
.order-item-thumb-placeholder {
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--border-light);
}
.order-item-more {
  background: var(--bg); border-radius: 8px;
  padding: 5px 10px; font-size: 12px; color: var(--text-muted);
  align-self: center;
}
.order-address {
  font-size: 12px; color: var(--text-muted);
  padding: 0 16px 8px;
  display: flex; align-items: flex-start; gap: 4px;
}
.order-addr-icon { flex-shrink: 0; }

.order-charges-section {
  padding: 8px 16px 4px;
  border-top: 1px dashed var(--border-light);
  display: flex; flex-direction: column; gap: 4px;
}
.order-charge-row {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--text-muted);
}
.order-charge-row.wallet  { color: #059669; }
.order-charge-row.coupon  { color: #7c3aed; }
.order-total-row {
  display: flex; justify-content: space-between;
  font-size: 14px; font-weight: 700; color: var(--text);
  padding-top: 6px; margin-top: 4px;
  border-top: 1px solid var(--border-light);
}
.order-total-amount { color: var(--primary); }

.order-card-footer {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px 14px;
}
.order-pay-badge {
  font-size: 11px; font-weight: 600;
  background: rgba(165,5,13,0.08); color: var(--primary);
  border-radius: 99px; padding: 3px 10px;
}
.order-track-btn {
  background: var(--primary); color: #fff;
  border: none; border-radius: 99px;
  padding: 7px 18px; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: opacity .18s;
}
.order-track-btn:hover { opacity: .85; }
.order-detail-btn {
  border: 1.5px solid var(--border-light);
  background: transparent; color: var(--text-muted);
  border-radius: 99px; padding: 6px 14px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all .18s;
}
.order-detail-btn:hover { background: var(--bg); }

.load-more-btn {
  background: var(--surface); border: 1.5px solid var(--border-light);
  color: var(--text-muted); border-radius: 99px;
  padding: 10px 32px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .18s;
}
.load-more-btn:hover { background: var(--bg); }

.orders-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 60px 24px; gap: 12px;
}
.orders-empty-icon svg { opacity: .4; }
.orders-empty-text { font-size: 15px; color: var(--text-muted); text-align: center; }

/* Skeleton */
.skeleton { background: linear-gradient(90deg, var(--border-light) 25%, var(--bg) 50%, var(--border-light) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; }
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.skeleton-card { padding: 20px; min-height: 140px; }

/* Order detail modal */
.detail-order-id { font-size: 18px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.detail-date     { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.detail-status-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.detail-section-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin: 12px 0 6px; }
.detail-items-list { display: flex; flex-direction: column; gap: 8px; }
.detail-item-row { display: flex; align-items: center; gap: 10px; }
.detail-item-img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.detail-item-info { flex: 1; }
.detail-item-name { font-size: 13px; font-weight: 600; color: var(--text); }
.detail-item-qty  { font-size: 12px; color: var(--text-muted); }
.detail-item-price { font-size: 13px; font-weight: 700; color: var(--text); }
.detail-address { font-size: 13px; color: var(--text-muted); }

/* ======================================================
   PAYMENT SHEET
   ====================================================== */
.pay-overlay {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: flex-end; justify-content: center;
}
.pay-overlay.pay-closing .pay-sheet { transform: translateY(100%); }

.pay-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
}
.pay-sheet {
  position: relative; z-index: 1;
  background: var(--surface);
  width: 100%; max-width: 480px; max-height: 92vh;
  border-radius: 24px 24px 0 0;
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: slideUp .3s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.pay-handle {
  width: 40px; height: 4px; background: var(--border-light);
  border-radius: 99px; margin: 12px auto 0;
}
.pay-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px 8px;
  border-bottom: 1px solid var(--border-light);
}
.pay-title { font-size: 1.1rem; font-weight: 800; color: var(--text); }
.pay-close-btn {
  width: 32px; height: 32px; border-radius: 50%;
  border: none; background: var(--bg); cursor: pointer;
  font-size: 14px; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
}

/* Scrollable body */
.pay-sheet > .pay-section,
.pay-sheet > .pay-wallet-row {
  padding: 14px 20px 0;
  flex-shrink: 0;
}
.pay-sheet { overflow-y: auto; }
.pay-footer { margin-top: auto; flex-shrink: 0; }

.pay-section-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-muted); margin-bottom: 8px;
}

/* Bill */
.pay-bill { display: flex; flex-direction: column; gap: 5px; }
.pay-bill-row {
  display: flex; justify-content: space-between;
  font-size: 13px; color: var(--text-muted);
}
.pay-bill-row.wallet { color: #059669; font-weight: 600; }
.pay-bill-row.coupon { color: #7c3aed; font-weight: 600; }
.pay-bill-row.total  {
  font-size: 15px; font-weight: 800; color: var(--text);
  border-top: 1px solid var(--border-light); padding-top: 6px; margin-top: 4px;
}

/* Wallet row */
.pay-wallet-row {
  display: flex; align-items: center; justify-content: space-between;
  background: #f0fdf4; border: 1px solid #bbf7d0;
  border-radius: 14px; padding: 12px 16px; margin: 14px 20px 0;
}
.pay-wallet-info { display: flex; align-items: center; gap: 10px; }
.pay-wallet-icon { font-size: 1.5rem; }
.pay-wallet-label { font-size: 14px; font-weight: 700; color: var(--text); }
.pay-wallet-bal   { font-size: 12px; color: #059669; }

/* Toggle */
.pay-toggle { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.pay-toggle input { opacity: 0; width: 0; height: 0; }
.pay-toggle-slider {
  position: absolute; inset: 0; background: #ccc;
  border-radius: 99px; cursor: pointer; transition: .2s;
}
.pay-toggle-slider::before {
  content: ''; position: absolute;
  height: 18px; width: 18px; left: 3px; top: 3px;
  background: white; border-radius: 50%; transition: .2s;
}
.pay-toggle input:checked + .pay-toggle-slider { background: #059669; }
.pay-toggle input:checked + .pay-toggle-slider::before { transform: translateX(20px); }

/* Notes */
.pay-notes-input {
  width: 100%; border: 1.5px solid var(--border-light);
  border-radius: 10px; padding: 9px 12px;
  font-size: 13px; color: var(--text); background: var(--bg);
  outline: none; transition: border-color .18s;
  box-sizing: border-box;
}
.pay-notes-input:focus { border-color: var(--primary); }

/* Payment methods */
.pay-methods { display: flex; flex-direction: column; gap: 8px; }
.pay-method-btn {
  display: flex; align-items: center; gap: 14px;
  border: 2px solid var(--border-light);
  border-radius: 14px; padding: 12px 16px;
  background: var(--surface); cursor: pointer;
  text-align: left; transition: all .18s;
}
.pay-method-btn.active {
  border-color: var(--primary);
  background: rgba(165,5,13,.04);
}
.pm-icon { font-size: 1.5rem; flex-shrink: 0; }
.pm-label { font-size: 14px; font-weight: 700; color: var(--text); }
.pm-sub   { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Footer */
.pay-footer {
  border-top: 1px solid var(--border-light);
  padding: 14px 20px 24px;
  background: var(--surface);
  display: flex; align-items: center; gap: 14px;
}
.pay-amount-label { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.pay-amount-val   { display: block; font-size: 18px; font-weight: 800; color: var(--text); }
.pay-confirm-btn {
  flex: 1; background: var(--primary); color: #fff;
  border: none; border-radius: 14px; padding: 14px;
  font-size: 15px; font-weight: 800; cursor: pointer;
  transition: opacity .18s; min-width: 0;
}
.pay-confirm-btn:hover:not(:disabled) { opacity: .88; }
.pay-confirm-btn:disabled { opacity: .5; cursor: not-allowed; }

/* Processing overlay */
.pay-processing {
  position: absolute; inset: 0; z-index: 10;
  background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center;
}
.pay-processing-card {
  background: var(--surface); border-radius: 20px;
  padding: 36px 32px; text-align: center; min-width: 240px;
}
.pay-spinner {
  width: 48px; height: 48px; border-radius: 50%;
  border: 4px solid var(--border-light);
  border-top-color: var(--primary);
  animation: spin .8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.pay-processing-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.pay-processing-sub   { font-size: 12px; color: var(--text-muted); }

/* Success */
.pay-success {
  position: absolute; inset: 0; z-index: 11;
  background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
}
.pay-success-card {
  background: var(--surface); border-radius: 24px;
  padding: 40px 32px; text-align: center;
  animation: popIn .3s ease;
}
@keyframes popIn { from { transform: scale(.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.pay-success-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: #d1fae5; color: #059669;
  font-size: 2rem; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.pay-success-title { font-size: 1.4rem; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.pay-success-sub   { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
.pay-success-btn {
  background: var(--primary); color: #fff;
  border: none; border-radius: 14px; padding: 13px 32px;
  font-size: 15px; font-weight: 700; cursor: pointer;
}

/* Verification pending dialog */
.pay-verify-dialog {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.pay-verify-inner {
  background: var(--surface); border-radius: 20px;
  padding: 28px 24px; max-width: 360px; text-align: center;
}
.pay-verify-inner h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 8px; }
.pay-verify-inner p  { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }

/* ─── DOWNLOAD APP MODAL ─── */
.download-modal {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  transform: translateY(16px) scale(.98);
  transition: transform .3s cubic-bezier(.22,1,.36,1);
  position: relative;
  text-align: center;
}
.modal-overlay.open .download-modal { transform: translateY(0) scale(1); }

.download-modal-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  animation: phoneBounce 2s infinite alternate;
}
@keyframes phoneBounce {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(-8px) scale(1.03); }
}

.download-modal-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}
.download-modal-sub {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 24px;
  padding: 0 8px;
}

.download-badges {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}
.store-badge-link, .store-badge-btn {
  display: block;
  width: 170px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: var(--transition);
}
.store-badge-link:hover, .store-badge-btn:hover {
  transform: translateY(-2px);
}
.store-badge-link img, .store-badge-btn img {
  width: 100%;
  height: auto;
}

.download-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
  font-size: 12px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 600;
}
.download-divider::before, .download-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light);
}

.pwa-install-btn {
  width: 100%;
  height: 48px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1.5px solid var(--border);
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 14px;
}
.pwa-install-btn:hover {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-bg);
}

.continue-web-btn {
  width: 100%;
  padding: 10px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Outfit', sans-serif;
  text-decoration: underline;
}
.continue-web-btn:hover {
  color: var(--red);
}

.download-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: var(--surface);
  transition: var(--transition);
  cursor: pointer;
}
.download-close:hover {
  background: var(--red);
  color: #fff;
}

/* ============================================================
   Product Ratings & Wishlist Styles
   ============================================================ */

/* Wishlist Active State on Product Card */
.p-card__heart.active {
  color: #C40202 !important;
}

/* Gold E-Commerce Ratings Badge on Card */
.p-card__rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #FFF9E6;
  border: 1px solid #FFE0B2;
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #E65100;
  margin-top: 5px;
  width: fit-content;
}
.p-card__rating .star-icon {
  color: #FFA000;
  font-size: 11px;
  line-height: 1;
}
.p-card__rating .rating-count {
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 2px;
}

/* Modal Heart Toggle Button */
.pm-heart {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 18px;
  z-index: 10;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
  border: none;
  outline: none;
}
.pm-heart:hover {
  background: var(--white);
  color: #C40202;
  transform: scale(1.08);
}
.pm-heart.active {
  color: #C40202 !important;
}

/* Product Modal Ratings Row Summary */
.pm-rating-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 12px 0;
  flex-wrap: wrap;
}
.pm-stars-badge {
  display: inline-flex;
  gap: 2px;
}
.pm-star {
  font-size: 16px;
  color: #E0E0E0;
}
.pm-star.filled {
  color: #FFA000;
}
.pm-star.half {
  position: relative;
  color: #E0E0E0;
}
.pm-star.half::after {
  content: '★';
  position: absolute;
  left: 0; top: 0;
  width: 50%;
  overflow: hidden;
  color: #FFA000;
}
.pm-rating-avg {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.pm-rating-count {
  font-size: 12px;
  color: var(--text-muted);
}
.pm-rating-empty {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

/* Interactive Review Input Section */
.pm-rating-section {
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin: 16px 0;
  text-align: center;
}
.pm-rating-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mid);
  margin-bottom: 6px;
}
.pm-rating-stars-input {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 26px;
  cursor: pointer;
  user-select: none;
}
.pm-rating-stars-input .input-star {
  color: #BDBDBD;
  transition: transform 0.1s ease, color 0.1s ease;
}
.pm-rating-stars-input .input-star:hover {
  transform: scale(1.15);
}
.pm-rating-stars-input .input-star.hovered,
.pm-rating-stars-input .input-star.selected {
  color: #FFA000;
}
.pm-rating-status {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ============================================================
   Navigation Download App Button Styles
   ============================================================ */
.nav-download-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius);
  background: var(--green-light);
  color: var(--green);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  border: 1px solid #C8E6C9;
  flex-shrink: 0;
}
.nav-download-btn:hover {
  background: #C8E6C9;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.nav-download-btn svg {
  flex-shrink: 0;
}

/* On mobile viewports, collapse to a round icon button to save space */
@media (max-width: 768px) {
  .nav-download-btn {
    width: 36px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }
  .nav-download-btn .btn-text {
    display: none;
  }
}
