/* ==========================================================================
   KOÜS Mobile App — Header, Overlapping Store Card, Menu Cards & Tab Bar
   ========================================================================== */

/* Hero Banner & Floating Glass Controls */
.hero-header {
  position: relative;
  height: 224px;
  width: 100%;
  overflow: hidden;
  background-color: var(--kous-obsidian);
}

.hero-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(14, 14, 14, 0.56) 0%,
    rgba(14, 14, 14, 0.14) 50%,
    rgba(14, 14, 14, 0.72) 100%
  );
}

.hero-topbar {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  z-index: 3;
}

.mode-pill-group {
  display: inline-flex;
  background: rgba(14, 14, 14, 0.76);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-pill);
  padding: 3px;
}

.mode-pill-btn {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.78);
  transition: background-color 0.18s ease, color 0.18s ease;
}

.mode-pill-btn.is-active {
  background: var(--gold-gradient);
  color: var(--kous-obsidian);
}

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

.glass-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  background: rgba(14, 14, 14, 0.76);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
}

.glass-lens-btn {
  border-color: rgba(232, 215, 158, 0.55);
  color: var(--gold-light);
}

/* Store Identity Card Overlapping Hero Banner (Layering Rule) */
.store-card-wrap {
  position: relative;
  z-index: 4;
  margin: -44px 14px 12px;
}

.store-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 14px 16px 16px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-subtle);
}

.store-identity-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.store-emblem {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-pill);
  background: var(--kous-obsidian);
  border: 2.5px solid var(--gold-primary);
  margin-top: -34px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.store-emblem-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 75% center;
}

.store-title-block {
  flex: 1;
  min-width: 0;
}

.store-name {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.store-subtitle {
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.store-rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--kous-obsidian);
  color: var(--gold-light);
  padding: 5px 9px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}

.store-meta-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-app);
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  color: var(--text-primary);
}

.meta-chip-halal {
  background: var(--status-popular-bg);
  color: var(--status-popular);
}

/* KOÜS Lens AI Callout Card */
.lens-promo-card {
  margin: 0 14px 14px;
  background: var(--kous-obsidian);
  background-image:
    linear-gradient(125deg, rgba(14, 14, 14, 0.96) 35%, rgba(36, 30, 18, 0.92) 100%),
    url('/assets/brand/zellige-pattern.png');
  background-size: auto, 180px;
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(197, 167, 89, 0.36);
  box-shadow: var(--shadow-card);
  cursor: pointer;
}

.lens-promo-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.lens-promo-orb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--gold-gradient);
  color: var(--kous-obsidian);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lens-promo-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--gold-light);
}

.lens-promo-sub {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.78);
  margin-top: 2px;
  line-height: 1.3;
}

.lens-promo-cta {
  background: rgba(232, 215, 158, 0.16);
  border: 1px solid var(--gold-primary);
  color: var(--gold-light);
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* Inline Search Bar */
.search-bar-box {
  margin: 0 14px 10px;
  position: relative;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: 10px 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.88rem;
}

.search-clear-btn {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 2px 6px;
}

/* Sticky Category Pills */
.category-nav-sticky {
  position: sticky;
  top: 0;
  z-index: 15;
  background: rgba(246, 245, 242, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 14px;
}

.category-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  cursor: grab;
  user-select: none;
}

.category-pills.is-dragging,
.featured-carousel.is-dragging {
  cursor: grabbing;
}

.category-pills::-webkit-scrollbar {
  display: none;
}

.category-pill {
  white-space: nowrap;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  transition: all 0.16s ease;
}

.category-pill.is-active {
  background: var(--kous-obsidian);
  color: var(--gold-light);
  border-color: var(--kous-obsidian);
}

/* Featured Horizontal Carousel */
.featured-section {
  padding: 14px 0 4px;
}

.section-header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 14px 10px;
}

.section-title {
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-count {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 600;
}

.featured-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 14px 10px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  cursor: grab;
  user-select: none;
}

.featured-carousel::-webkit-scrollbar {
  display: none;
}

.featured-card {
  width: 210px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  text-align: left;
  position: relative;
}

.featured-card-media {
  position: relative;
  height: 126px;
  background: var(--kous-charcoal);
}

.featured-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-kcal-pill {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(14, 14, 14, 0.82);
  color: var(--gold-light);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 700;
}

.featured-card-body {
  padding: 10px 12px 12px;
}

.featured-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.25;
}

.featured-card-price {
  margin-top: 4px;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--gold-dark);
}

/* Menu Category List Cards (Uber Eats Style) */
.menu-section {
  padding: 14px 14px 6px;
}

.menu-section-heading {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.menu-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menu-item-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: border-color 0.15s ease, transform 0.12s ease;
}

.menu-item-card:active {
  transform: scale(0.99);
}

.menu-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.menu-item-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

.badge-popular {
  background: var(--status-popular-bg);
  color: var(--status-popular);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}

.badge-kcal {
  background: var(--bg-app);
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}

.menu-item-name {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

.menu-item-desc {
  font-size: 0.77rem;
  color: var(--text-secondary);
  line-height: 1.38;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.menu-item-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.menu-item-price {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-primary);
}

.menu-item-rating {
  font-size: 0.74rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.menu-item-thumb-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-muted);
}

.menu-item-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.menu-item-thumb-contain {
  object-fit: contain;
  padding: 6px;
  background: #FAF8F4;
}

.quick-add-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: rgba(14, 14, 14, 0.84);
  backdrop-filter: blur(4px);
  color: var(--gold-light);
  border: 1.5px solid var(--gold-primary);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

/* Floating Sticky Basket Bar */
.sticky-cart-bar {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tab-bar-height) + 10px + var(--safe-bottom));
  transform: translateX(-50%);
  width: calc(100% - 28px);
  max-width: calc(var(--app-max-width) - 28px);
  background: var(--kous-obsidian);
  color: #FFFFFF;
  border: 1px solid rgba(197, 167, 89, 0.55);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-float);
  z-index: 40;
}

.sticky-cart-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sticky-cart-count {
  background: var(--gold-gradient);
  color: var(--kous-obsidian);
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sticky-cart-label {
  font-size: 0.9rem;
  font-weight: 700;
}

.sticky-cart-total {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--gold-light);
}

/* Bottom Mobile Navigation Bar */
.bottom-tab-bar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--app-max-width);
  height: calc(var(--tab-bar-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  z-index: 50;
}

@media (min-width: 520px) {
  .bottom-tab-bar {
    bottom: 18px;
    border-bottom-left-radius: 34px;
    border-bottom-right-radius: 34px;
  }

  .sticky-cart-bar {
    bottom: calc(var(--tab-bar-height) + 28px);
  }
}

.tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  position: relative;
  height: 100%;
}

.tab-btn.is-active {
  color: var(--kous-obsidian);
}

.tab-btn-lens {
  margin-top: -18px;
  color: var(--kous-obsidian);
}

.tab-lens-orb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-pill);
  background: var(--kous-obsidian);
  border: 3px solid var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(14, 14, 14, 0.28);
  color: var(--gold-primary);
}

.tab-badge {
  position: absolute;
  top: 9px;
  right: calc(50% - 18px);
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--gold-primary);
  color: var(--kous-obsidian);
  font-size: 0.65rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Empty & Orders Tracking Panels */
.panel-header-bar {
  background: var(--kous-obsidian);
  color: #FFFFFF;
  padding: 18px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-header-title {
  font-size: 1.12rem;
  font-weight: 800;
}

.orders-container {
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.order-tracking-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 16px;
  box-shadow: var(--shadow-card);
}

.order-eta-banner {
  background: var(--kous-obsidian);
  color: #FFFFFF;
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.order-eta-mins {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--gold-light);
}

.tracking-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 12px 0;
}

.tracking-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.tracking-step.is-done {
  color: var(--text-primary);
  font-weight: 700;
}

.tracking-dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-pill);
  background: var(--border-strong);
  flex-shrink: 0;
}

.tracking-step.is-done .tracking-dot {
  background: var(--status-popular);
  box-shadow: 0 0 0 4px var(--status-popular-bg);
}

.empty-state-box {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 32px 20px;
  text-align: center;
  margin: 18px 14px;
}

.empty-state-title {
  font-size: 1.02rem;
  font-weight: 800;
  margin-top: 10px;
}

.empty-state-sub {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.45;
}

/* Client Delivery Location Strip inside Store Card */
.client-location-bar {
  width: 100%;
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: var(--radius-md);
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  transition: border-color 0.15s ease;
}

.client-location-bar:active {
  border-color: var(--gold-dark);
}

.client-location-pin {
  font-size: 1rem;
  flex-shrink: 0;
}

.client-location-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.client-location-address {
  font-size: 0.79rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-location-email {
  font-size: 0.7rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-location-edit {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--gold-dark);
  background: var(--gold-tint);
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}
