/* Exact NUVERA Android Color Palette (from app/src/main/java/com/example/ui/theme/Color.kt) */
:root {
  --crimson: #4A154B;
  --crimson-dark: #380C38;
  --crimson-deep: #2A082A;
  --crimson-soft: #6B2D5E;
  --crimson-tint: #FBF2F7;
  --crimson-chip-bg: #5C1F4D;

  --gold: #D8A7C8;
  --gold-light: #F5E8F0;
  --gold-deep: #8E4A7A;
  --orange: #E86F1F;
  --orange-soft: #FFF1E6;

  --canvas: #FAF7FA;
  --surface: #FFFFFF;
  --blush: #F7F0F5;
  --border: #E8DEE6;
  --ink: #221420;
  --ink-secondary: #6B5866;
  --ink-muted: #998693;

  --success: #15844E;
  --success-tint: #E8F7EF;
  --warning: #B36B00;
  --warning-tint: #FFF8E1;
  --warning-border: #E8CE7C;
  --error: #C62828;
  --error-tint: #FFEBEE;
  --whatsapp: #25D366;
  --info: #1565C0;
  --info-tint: #E8F1FC;

  --font-heading: 'Cairo', system-ui, sans-serif;
  --font-body: 'Tajawal', 'Cairo', system-ui, sans-serif;

  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-card: 18px;
  --radius-lg: 22px;
  --radius-xl: 24px;
}

*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, strong, button, .font-heading {
  font-family: var(--font-heading);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
}

.hidden {
  display: none !important;
}

/* App Shell */
.app-shell {
  min-height: 100dvh;
  display: flex;
  background: var(--canvas);
}

/* Desktop/Tablet Navigation Rail (hidden on mobile, mirrors IbbGoNavRail >= 768px) */
.nav-rail {
  display: none;
}

@media (min-width: 768px) {
  .nav-rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 88px;
    flex-shrink: 0;
    background: var(--crimson);
    color: #fff;
    position: sticky;
    top: 0;
    height: 100dvh;
    padding: 16px 8px;
    z-index: 50;
    box-shadow: -4px 0 18px rgba(35, 20, 23, 0.14);
  }
}

.rail-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 18px;
  cursor: pointer;
}

.rail-logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1.5px solid var(--gold);
  object-fit: cover;
}

.rail-brand-title {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 800;
  color: var(--gold-light);
}

.rail-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.rail-item {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.84);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: 14px;
  cursor: pointer;
}

.rail-item .nav-icon-wrap {
  position: relative;
  width: 42px;
  height: 32px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.rail-item.active .nav-icon-wrap {
  background: #fff;
  color: var(--crimson);
}

.rail-item.active {
  color: #fff;
  font-weight: 700;
}

.rail-item .nav-label {
  font-size: 11px;
}

/* Main Column */
.app-main-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

/* Top Header (exact replica of IbbGoTopHeader) */
.top-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--crimson);
  color: #fff;
  padding: 10px 0 10px;
  box-shadow: 0 3px 12px rgba(86, 10, 24, 0.22);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 12px;
}

.header-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-pill {
  flex: 1;
  height: 44px;
  background: #fff;
  border-radius: 24px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
  min-width: 0;
}

.search-svg {
  width: 20px;
  height: 20px;
  color: var(--crimson);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 13.5px;
  outline: none;
}

.search-input::placeholder {
  color: var(--ink-muted);
}

.search-clear-btn {
  border: none;
  background: var(--blush);
  color: var(--ink-secondary);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 11px;
  cursor: pointer;
  flex-shrink: 0;
}

.header-icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.header-icon-btn:active {
  background: rgba(255, 255, 255, 0.14);
}

.header-icon-btn svg {
  width: 22px;
  height: 22px;
}

.gold-badge {
  position: absolute;
  top: 1px;
  left: 1px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  border: 1px solid var(--crimson);
  font-size: 10px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Header Category Chips Strip */
.header-chips-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-top: 10px;
  scrollbar-width: none;
}

.header-chips-row::-webkit-scrollbar {
  display: none;
}

.header-chip {
  flex-shrink: 0;
  height: 34px;
  padding: 0 14px;
  border-radius: 20px;
  border: none;
  background: var(--crimson-chip-bg);
  color: #fff;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.header-chip.active {
  background: #fff;
  color: var(--crimson);
  font-weight: 700;
}

/* Main Stage */
.main-stage {
  flex: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 12px 92px;
}

@media (min-width: 768px) {
  .main-stage {
    padding: 18px 20px 36px;
  }
}

.tab-view {
  display: none;
}

.tab-view.active {
  display: block;
}

/* Hero Banner Card (mirrors HeroBannerCarousel) */
.hero-card {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  padding: 20px 18px;
  min-height: 162px;
  color: #fff;
  background: linear-gradient(135deg, var(--crimson) 0%, var(--crimson-dark) 100%);
  box-shadow: 0 6px 20px rgba(123, 17, 36, 0.22);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.hero-card.style-gold {
  background: linear-gradient(135deg, #8E4A7A 0%, #5B3E07 100%);
}

.hero-card.style-orange {
  background: linear-gradient(135deg, #E86F1F 0%, #9A3B06 100%);
}

.hero-card.style-royal {
  background: linear-gradient(135deg, #380C38 0%, #221420 100%);
}

.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.26;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  background: rgba(212, 161, 55, 0.24);
  border: 1px solid rgba(245, 230, 196, 0.55);
  color: var(--gold-light);
  border-radius: 999px;
  padding: 2px 11px;
  font-size: 11.5px;
  font-weight: 700;
  margin-bottom: 6px;
}

.hero-title {
  margin: 0 0 4px;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.3;
}

.hero-subtitle {
  margin: 0 0 12px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.88);
  max-width: 520px;
}

.hero-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: var(--crimson);
  border: none;
  border-radius: 14px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}

.hero-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: none;
  background: #D8C7C5;
  padding: 0;
  cursor: pointer;
}

.hero-dot.active {
  width: 22px;
  background: var(--crimson);
}

/* Smart App Strip */
.smart-app-strip {
  margin-top: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.smart-app-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.smart-app-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--gold);
  flex-shrink: 0;
}

.smart-app-left strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
}

.smart-app-left span {
  display: block;
  font-size: 11.5px;
  color: var(--ink-secondary);
}

.smart-app-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-gold-chip {
  background: var(--gold);
  color: var(--ink);
  border: none;
  border-radius: 12px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn-crimson-chip {
  background: var(--crimson);
  color: #fff;
  border-radius: 12px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* Home Filter Bar */
.home-filter-bar {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.showcase-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-pill {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-secondary);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.filter-pill.active {
  background: var(--crimson-tint);
  border-color: var(--crimson);
  color: var(--crimson);
}

.sort-select {
  height: 34px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
}

/* Section Header (mirrors SectionHeader with 4px x 22px GoldAccent bar) */
.section-header {
  margin: 16px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

.gold-accent-bar {
  width: 4px;
  height: 22px;
  border-radius: 4px;
  background: var(--gold);
  flex-shrink: 0;
}

.section-header h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.section-header p {
  margin: 0;
  font-size: 12px;
  color: var(--ink-secondary);
}

.results-count {
  font-size: 12px;
  color: var(--ink-secondary);
  font-weight: 600;
}

/* Product Grid (2 columns mobile-first, 3-4 on wider screens) */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 600px) {
  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (min-width: 960px) {
  .products-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }
}

/* Exact Android ProductCard Replica */
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(35, 20, 23, 0.05);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.16s, box-shadow 0.16s;
}

.product-card:active {
  transform: scale(0.985);
}

.product-media {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--blush);
  overflow: hidden;
}

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

.product-img.is-fallback-logo {
  object-fit: contain;
  padding: 20%;
  background: #4A154B;
}

.badge-discount {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--orange);
  color: #fff;
  border-radius: 10px;
  padding: 2px 7px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.4;
}

.card-fav-btn {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  color: var(--crimson);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.card-fav-btn svg {
  width: 18px;
  height: 18px;
}

.card-bag-btn {
  position: absolute;
  bottom: 6px;
  left: 6px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--crimson);
  color: #fff;
  box-shadow: 0 3px 8px rgba(123, 17, 36, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.card-bag-btn svg {
  width: 17px;
  height: 17px;
}

.out-of-stock-pill {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border-radius: 10px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.product-meta {
  padding: 7px 9px 9px;
}

.product-title {
  margin: 0;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-cat-label {
  font-size: 10.5px;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-price-row {
  margin-top: 3px;
  display: flex;
  align-items: baseline;
  gap: 5px;
  flex-wrap: wrap;
}

.product-price {
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 800;
  color: var(--crimson);
}

.product-old-price {
  font-size: 10.5px;
  color: var(--ink-muted);
  text-decoration: line-through;
}

/* Skeleton Loader */
.skeleton-card {
  aspect-ratio: 3 / 4.8;
  border-radius: var(--radius-card);
  background: linear-gradient(90deg, #F0E6E5 25%, #FAF4F3 50%, #F0E6E5 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
}

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

/* Categories Grid (Tab 2) */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 640px) {
  .categories-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.category-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(35, 20, 23, 0.04);
}

.category-avatar {
  width: 66px;
  height: 66px;
  border-radius: 18px;
  background: var(--crimson-tint);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-avatar img.is-fallback-logo {
  object-fit: contain;
  padding: 16%;
  background: #4A154B;
}

.category-name {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.category-count {
  font-size: 11.5px;
  color: var(--ink-secondary);
}

/* Empty State Card (mirrors EmptyStateCard) */
.empty-state-card {
  grid-column: 1 / -1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.empty-state-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--crimson-tint);
  color: var(--crimson);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin-bottom: 4px;
}

.empty-state-card h3 {
  margin: 0;
  font-size: 17px;
  color: var(--ink);
}

.empty-state-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-secondary);
  max-width: 340px;
}

/* Buttons */
.btn-crimson {
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 16px;
  background: var(--crimson);
  color: #fff;
  font-size: 14.5px;
  font-weight: 700;
  padding: 12px 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-crimson:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-outline {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--crimson);
  font-size: 13.5px;
  font-weight: 700;
  padding: 10px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-whatsapp {
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 16px;
  background: var(--whatsapp);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Cart & Checkout Cards */
.surface-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
}

.cart-item-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.cart-item-thumb {
  width: 74px;
  height: 74px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--blush);
  flex-shrink: 0;
}

.cart-item-thumb.is-fallback-logo {
  object-fit: contain;
  padding: 12px;
  background: #4A154B;
}

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

.cart-item-name {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.cart-item-spec {
  font-size: 12px;
  color: var(--ink-secondary);
}

.cart-item-footer {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2px 6px;
}

.qty-stepper button {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--crimson);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.qty-stepper span {
  min-width: 20px;
  text-align: center;
  font-weight: 700;
}

.delete-link {
  border: none;
  background: transparent;
  color: var(--error);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.field-label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-secondary);
  margin: 8px 0 4px;
}

.form-control {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 13.5px;
  background: var(--canvas);
  color: var(--ink);
  outline: none;
}

.form-control:focus {
  border-color: var(--crimson);
  background: #fff;
}

.coupon-row {
  display: flex;
  gap: 8px;
}

.coupon-row .btn-crimson {
  width: auto;
  min-height: 44px;
  padding: 0 18px;
}

.payment-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.pay-opt {
  border: 1.5px solid var(--border);
  background: var(--canvas);
  color: var(--ink);
  border-radius: 12px;
  padding: 9px 6px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

.pay-opt.active {
  border-color: var(--crimson);
  background: var(--crimson-tint);
  color: var(--crimson);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  padding: 4px 0;
}

.summary-row.discount {
  color: var(--success);
  font-weight: 700;
}

.summary-row.total {
  border-top: 1px solid var(--border);
  margin-top: 6px;
  padding-top: 10px;
  font-size: 16px;
  font-weight: 800;
  color: var(--crimson);
}

/* Account Profile Gradient Card (exact mirror of AccountScreen) */
.account-hero-card {
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--crimson) 0%, var(--crimson-dark) 100%);
  color: #fff;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.account-avatar {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: #fff;
  color: var(--crimson);
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.account-hero-meta {
  flex: 1;
  min-width: 0;
}

.account-hero-meta h3 {
  margin: 0;
  font-size: 17px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-hero-meta p {
  margin: 2px 0 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-hero-stats {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
}

.quick-tiles-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.quick-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
}

.quick-tile-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--crimson-tint);
  color: var(--crimson);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
}

.menu-list-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 14px;
}

.menu-section-title {
  padding: 12px 16px 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-secondary);
}

.menu-row {
  width: 100%;
  border: none;
  background: transparent;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  text-align: right;
  border-top: 1px solid var(--border);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.menu-row:first-of-type {
  border-top: none;
}

/* Order Cards */
.order-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 12px;
}

.order-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.order-num {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 800;
  color: var(--crimson);
}

.status-badge {
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 700;
  background: var(--warning-tint);
  color: var(--warning);
}

.status-badge.status-delivered {
  background: var(--success-tint);
  color: var(--success);
}

.status-badge.status-cancelled {
  background: var(--error-tint);
  color: var(--error);
}

.status-badge.status-confirmed,
.status-badge.status-preparing,
.status-badge.status-shipped,
.status-badge.status-on_the_way {
  background: var(--info-tint);
  color: var(--info);
}

/* Sub-screen Top Bar */
.subscreen-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.subscreen-topbar h2 {
  margin: 0;
  font-size: 18px;
  color: var(--ink);
}

.back-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  cursor: pointer;
}

/* Notifications */
.notif-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 10px;
}

.notif-card h4 {
  margin: 0 0 4px;
  font-size: 14.5px;
  color: var(--crimson);
}

.notif-card p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-secondary);
}

/* Floating Bottom Nav Bar — white pill, big center cart (aubergine #4A154B) */
.bottom-nav {
  position: fixed;
  bottom: calc(6px + env(safe-area-inset-bottom, 0px));
  left: 12px;
  right: 12px;
  z-index: 50;
  background: #FFFFFF;
  border-radius: 36px;
  border-top: 2px solid #D5C8B8;
  min-height: 68px;
  padding: 6px 6px 8px;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  box-shadow: 0 8px 28px rgba(74, 21, 75, 0.22);
}

@media (min-width: 768px) {
  .bottom-nav {
    display: none;
  }
}

.bottom-nav-item {
  flex: 1;
  min-height: 60px;
  border: none;
  background: transparent;
  color: #4A154B;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  cursor: pointer;
  padding: 4px 0 2px;
  padding-bottom: calc(2px + env(safe-area-inset-bottom, 0px));
}

.bottom-nav-icon-wrap {
  position: relative;
  display: inline-flex;
}

.bottom-nav-icon-circle {
  min-width: 46px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.16s;
  color: #4A154B;
  background: transparent;
}

.bottom-nav-icon-circle svg {
  width: 22px;
  height: 22px;
}

/* active side tab: aubergine pill behind icon only, icon turns white, label stays aubergine */
.bottom-nav-item.active .bottom-nav-icon-circle {
  background: #4A154B;
  color: #FFFFFF;
  min-width: 56px;
}

.bottom-nav-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  color: #4A154B;
}

.bottom-nav-item.active .bottom-nav-label {
  color: #4A154B;
  font-weight: 700;
}

/* center cart: big raised circle overlapping the bar */
.bottom-nav-item[data-tab="cart"] {
  overflow: visible;
}

.bottom-nav-item[data-tab="cart"] .bottom-nav-icon-wrap {
  margin-top: -34px;
}

.bottom-nav-item[data-tab="cart"] .bottom-nav-icon-circle {
  width: 66px;
  height: 66px;
  min-width: 66px;
  padding: 0;
  border-radius: 50%;
  background: #4A154B;
  color: #FFFFFF;
  border: 5px solid #FFFFFF;
  box-shadow: 0 6px 18px rgba(74, 21, 75, 0.35);
  flex-direction: column;
  gap: 0;
}

.bottom-nav-item[data-tab="cart"] .bottom-nav-icon-circle svg {
  width: 24px;
  height: 24px;
}

.bottom-nav-item[data-tab="cart"] .bottom-nav-icon-circle::after {
  content: "السلة";
  font-size: 10px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.2;
}

.bottom-nav-item[data-tab="cart"] .bottom-nav-label {
  display: none;
}

/* cart badge stays visible on the raised circle */
.bottom-nav-item[data-tab="cart"] .gold-badge {
  position: absolute;
  top: -2px;
  inset-inline-end: -2px;
  z-index: 2;
}

/* reserve space so content is not hidden behind floating bar */
.tab-view {
  padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
}

/* Modals (Product Detail & Policy) */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(35, 20, 23, 0.56);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

@media (min-width: 768px) {
  .modal-overlay {
    align-items: center;
    padding: 20px;
  }
}

.modal-sheet {
  width: 100%;
  max-width: 860px;
  max-height: 94dvh;
  background: var(--canvas);
  border-radius: 24px 24px 0 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .modal-sheet {
    border-radius: 24px;
  }
}

.policy-sheet {
  max-width: 680px;
}

.modal-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.modal-topbar-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.modal-topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pill-btn-outline {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.pill-btn-crimson {
  background: var(--crimson);
  color: #fff;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
}

/* Product Detail Content */
.pd-content {
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 768px) {
  .pd-content {
    grid-template-columns: 1fr 1fr;
    padding: 20px;
  }
}

.pd-hero-img-wrap {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  aspect-ratio: 3 / 4;
  cursor: zoom-in;
}

.pd-hero-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.pd-hero-img.is-fallback-logo {
  padding: 18%;
  background: #4A154B;
}

.pd-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
}

.pd-thumb {
  width: 62px;
  height: 62px;
  border-radius: 12px;
  border: 2px solid transparent;
  object-fit: cover;
  cursor: pointer;
  flex-shrink: 0;
  background: var(--blush);
}

.pd-thumb.active {
  border-color: var(--crimson);
}

.pd-info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
}

.pd-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.pd-tag {
  border-radius: 10px;
  padding: 3px 9px;
  font-size: 11.5px;
  font-weight: 700;
  background: var(--crimson-tint);
  color: var(--crimson);
}

.pd-tag.in-stock {
  background: var(--success-tint);
  color: var(--success);
}

.pd-tag.out-stock {
  background: var(--error-tint);
  color: var(--error);
}

.pd-title {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
}

.pd-price-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}

.pd-price {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: var(--crimson);
}

.pd-desc {
  margin: 0 0 12px;
  font-size: 13.5px;
  color: var(--ink-secondary);
  white-space: pre-line;
}

.pd-features {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

.chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.spec-chip {
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  border-radius: 12px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.spec-chip.active {
  border-color: var(--crimson);
  background: var(--crimson-tint);
  color: var(--crimson);
}

.color-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.22);
}

.pd-cta-group {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 14px;
}

/* Policy Body */
.policy-content {
  padding: 18px;
  white-space: pre-line;
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink);
  background: var(--surface);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.lightbox img {
  max-width: 100%;
  max-height: 92dvh;
  object-fit: contain;
  border-radius: 12px;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

/* Snackbar */
.snackbar {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 150;
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.26);
  max-width: calc(100vw - 32px);
  text-align: center;
}

@media (min-width: 768px) {
  .snackbar {
    bottom: 24px;
  }
}

/* WhatsApp Channel Buttons */
.btn-whatsapp-chip {
  background: var(--whatsapp);
  color: #fff;
  border-radius: 12px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pill-btn-whatsapp {
  background: var(--whatsapp);
  color: #fff;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* 3-Tab Categories Browse View (الفئات / الأقسام / المتاجر) */
.browse-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 5px;
  margin-bottom: 14px;
}

.browse-tab {
  border: none;
  background: transparent;
  color: var(--ink-secondary);
  border-radius: 12px;
  padding: 9px 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.16s, color 0.16s;
}

.browse-tab.active {
  background: var(--crimson);
  color: #fff;
}

.browse-section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 14px;
  margin-bottom: 12px;
}

.browse-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.browse-section-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.browse-section-link {
  border: none;
  background: var(--crimson-tint);
  color: var(--crimson);
  border-radius: 12px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.subcat-tiles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 640px) {
  .subcat-tiles-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.subcat-tile {
  border: 1px solid var(--border);
  background: var(--canvas);
  border-radius: 14px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  cursor: pointer;
}

.subcat-tile-img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--crimson-tint);
  border: 1.5px solid var(--border);
}

.subcat-tile-img.is-fallback-logo {
  object-fit: contain;
  padding: 10px;
  background: #4A154B;
}

.subcat-tile span {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.stores-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 640px) {
  .stores-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.store-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(35, 20, 23, 0.04);
}

.store-logo-wrap {
  width: 62px;
  height: 62px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--crimson-tint);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.store-logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.store-logo-wrap img.is-fallback-logo {
  object-fit: contain;
  padding: 12px;
  background: #4A154B;
}

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

.store-card-body h3 {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.store-card-body p {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--ink-secondary);
}

.store-meta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.store-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--crimson-tint);
  color: var(--crimson);
}

.active-store-banner {
  margin-top: 12px;
  background: var(--crimson-tint);
  border: 1px solid var(--crimson);
  border-radius: 16px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* Similar Products Inside Product Detail Modal */
.pd-similar-section {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.pd-similar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 600px) {
  .pd-similar-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Single Cash-On-Delivery Card (Android Mirror) */
.cod-card {
  margin-top: 6px;
  background: var(--blush);
  border: 1.5px solid var(--crimson);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cod-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--crimson);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.cod-card strong {
  display: block;
  font-size: 13.5px;
  color: var(--crimson);
}

.cod-card span {
  display: block;
  font-size: 12px;
  color: var(--ink-secondary);
}

/* Dismissible Notifications & Activation Banner */
.notif-enable-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.notif-enable-banner.is-enabled {
  background: var(--success-tint);
  border-color: rgba(21, 132, 78, 0.35);
}

.notif-card {
  cursor: pointer;
  transition: transform 0.14s, border-color 0.14s;
}

.notif-card:hover {
  border-color: var(--crimson);
}

.notif-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.notif-dismiss-btn {
  border: none;
  background: var(--blush);
  color: var(--ink-secondary);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
}

.notif-card-hint {
  margin-top: 6px;
  font-size: 11px;
  color: var(--ink-muted);
}

/* WhatsApp Order Transfer Banner */
.wa-transfer-card {
  background: var(--success-tint);
  border: 1.5px solid var(--success);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
}

.wa-transfer-card h4 {
  margin: 0 0 4px;
  font-size: 14.5px;
  color: var(--success);
}

.wa-transfer-card p {
  margin: 0 0 10px;
  font-size: 12.5px;
  color: var(--ink);
}

.wa-transfer-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}


/* NUVERA Big Hero - lightweight enlargement (no images) */
.hero-card{min-height:250px !important;padding:30px 22px !important;border-radius:22px !important}
.hero-title{font-size:30px !important;line-height:1.5 !important;font-weight:800 !important}
.hero-subtitle{font-size:15px !important}
.hero-inner{max-width:85% !important}
#hero-carousel{margin:12px 0 16px !important}
@media(max-width:480px){
  .hero-card{min-height:230px !important;padding:26px 18px !important}
  .hero-title{font-size:26px !important}
}
