/* ==========================================================================
   Official Saudi Riyal Font Declarations (emran-alhaddad / saudi_riyal)
   ========================================================================== */
@font-face {
  font-family: 'saudi_riyal';
  src: url('../FONTS/RIYAL%20FONT/saudi_riyal.woff2') format('woff2'),
       url('../FONTS/RIYAL%20FONT/saudi_riyal.woff') format('woff'),
       url('../FONTS/RIYAL%20FONT/saudi_riyal.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'saudi_riyal';
  src: url('../FONTS/RIYAL%20FONT/saudi_riyal_bold.woff2') format('woff2'),
       url('../FONTS/RIYAL%20FONT/saudi_riyal_bold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'RubikRiyal';
  src: url('../FONTS/RIYAL%20FONT/Rubik-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light !important;
  /* Color Palette (Royal Warm Cream #FBF1D7 Theme) */
  --bg-main: #FBF1D7;
  --bg-surface: #FBF1D7;
  --bg-card: #FFFBF0;
  --bg-subtle: #F5E6C2;
  --bg-input: #FAF3E3;
  
  --text-main: #111827;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  
  --brand-choc: #3D231D;
  --brand-choc-dark: #2A1810;
  --brand-choc-hover: #4A2E2B;
  
  --brand-yellow: #FACC15;
  --brand-yellow-dark: #EAB308;
  --brand-red: #EF4444;
  --brand-green: #10B981;
  --brand-orange: #F97316;
  --brand-blue: #3B82F6;

  --border-light: #E5E7EB;
  --border-subtle: #F3F4F6;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-main: 'RubikRiyal', 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-arabic: 'RubikRiyal', 'Tajawal', sans-serif;
  --font-riyal: 'RubikRiyal', 'Outfit', 'Tajawal', sans-serif;

  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  color-scheme: light !important;
  font-size: 16px;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-surface) !important;
  color: var(--text-main) !important;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

[dir="rtl"] body {
  font-family: var(--font-arabic);
}

.app-container {
  width: 100%;
  max-width: 600px; /* Default mobile viewport container */
  margin: 0 auto;
  background-color: #FBF1D7 !important;
  color: #111827 !important;
  min-height: 100vh;
  position: relative;
  padding-bottom: 85px; /* Space for persistent bottom bar */
  box-shadow: 0 0 40px rgba(61, 35, 29, 0.1);
  transition: max-width 0.3s ease;
}

/* Responsive Desktop Monitor Resolution Auto-Adjusting Layout */
@media (min-width: 768px) {
  .app-container {
    max-width: 880px;
  }

  .banner-image-container {
    height: 240px;
  }

  .floating-store-card {
    margin-top: -60px;
    padding: 20px;
  }

  .products-container.view-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 18px;
  }

  .products-container.view-large {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px;
  }
}

@media (min-width: 1024px) {
  .app-container {
    max-width: 1200px;
    border-left: 1px solid var(--border-light);
    border-right: 1px solid var(--border-light);
  }

  .banner-image-container {
    height: 300px;
  }

  .floating-store-card {
    margin-top: -75px;
    padding: 24px;
  }

  .products-container.view-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px;
  }

  .products-container.view-list {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px;
  }

  .products-container.view-large {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 24px;
  }

  .persistent-bottom-bar {
    max-width: 650px;
  }
}

/* ==========================================================================
   1. Floating Top Navigation Header Over Banner
   ========================================================================== */
.top-floating-header {
  position: absolute;
  top: 12px;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.header-circle-btn {
  pointer-events: auto;
  background-color: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.header-lang-btn, .header-admin-btn {
  pointer-events: auto;
  background-color: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--text-main);
  height: 38px;
  padding: 0 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.header-lang-btn:active, .header-admin-btn:active, .header-circle-btn:active {
  transform: scale(0.94);
  background-color: var(--bg-subtle);
}

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

/* ==========================================================================
   2. Store Hero Banner & Floating Store Card
   ========================================================================== */
.store-hero-wrap {
  position: relative;
  background-color: var(--bg-surface);
}

.banner-image-container {
  width: 100%;
  aspect-ratio: 2 / 1;
  max-height: 440px;
  overflow: hidden;
  position: relative;
  background-color: var(--bg-surface);
}

.hero-cover-banner {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  will-change: transform, opacity;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.floating-store-card {
  position: relative;
  margin: -45px 16px 0 16px;
  background-color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-light);
  z-index: 10;
}

.store-card-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.store-long-logo-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 4px 0 8px 0;
}

.store-long-logo-img {
  width: 100%;
  max-width: 380px;
  max-height: 85px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
}

.life-sweet-quote-img {
  height: 24px;
  max-width: 220px;
  object-fit: contain;
}

.store-tags-rating-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-top: 4px;
}

.store-logo-box {
  width: 60px;
  height: 60px;
  min-width: 60px;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  overflow: hidden;
  background-color: #FFFFFF;
  box-shadow: var(--shadow-sm);
}

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

.store-info-text {
  flex: 1;
}

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

.store-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.store-rating-badge {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--brand-choc);
  background: linear-gradient(135deg, #FFD700, #FACC15);
  padding: 4px 10px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(250, 204, 21, 0.45);
  border: 1px solid #EAB308;
  display: flex;
  align-items: center;
  gap: 4px;
}

.star-icon {
  color: #3D231D;
}

.rating-count {
  color: #573229;
  font-weight: 700;
  font-size: 0.82rem;
}

.store-tags {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--brand-choc);
  background: linear-gradient(135deg, #FFF0B3, #FDE047);
  border: 1px solid #EAB308;
  padding: 4px 12px;
  border-radius: 12px;
  display: inline-block;
  box-shadow: 0 2px 6px rgba(250, 204, 21, 0.25);
}

/* Delivery vs Pickup vs Branches Switcher Pill */
.delivery-picker-switch {
  display: flex;
  background-color: #F5E6C2;
  border: 1px solid rgba(234, 179, 8, 0.4);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 14px;
  gap: 4px;
}

.switch-opt {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 10px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--brand-choc);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.switch-opt.active {
  background: linear-gradient(135deg, #FFD700 0%, #FACC15 50%, #EAB308 100%) !important;
  color: #3D231D !important;
  font-weight: 900 !important;
  box-shadow: 0 4px 14px rgba(234, 179, 8, 0.5) !important;
  border: 1px solid #D97706 !important;
}

.discount-tag-pill {
  background-color: #FF2D55;
  color: #FFFFFF;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Delivery Stats Row */
.delivery-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 12px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 14px;
  text-align: center;
}

.stat-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.stat-val {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-main);
}

.stat-divider {
  width: 1px;
  height: 24px;
  background-color: var(--border-light);
}

/* Promo Cards */
.promos-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.promo-card {
  background-color: #FFFFFF;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid var(--border-light);
}

.promo-badge {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 900;
  flex-shrink: 0;
  margin-top: 1px;
}

.green-badge {
  background-color: #059669;
  color: #FFFFFF;
}

.orange-badge {
  background-color: #EA580C;
  color: #FFFFFF;
}

.promo-text {
  display: flex;
  flex-direction: column;
}

.promo-title {
  font-size: 0.8rem;
  font-weight: 800;
}

.green-title { color: #059669; }
.orange-title { color: #EA580C; }

.promo-desc {
  font-size: 0.74rem;
  color: #374151;
  font-weight: 600;
  line-height: 1.25;
}

.promo-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.promo-action {
  font-size: 0.68rem;
  color: #9CA3AF;
  margin-top: 1px;
}

/* ==========================================================================
   3. Category Navigation Bar (With Menu Icon & Active Underline Bar)
   ========================================================================== */
.category-nav-wrapper {
  position: sticky;
  top: 0;
  z-index: 80;
  background-color: #FBF1D7 !important;
  border-bottom: 1px solid var(--border-light);
  padding: 0 16px;
}

.category-nav-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-menu-btn {
  background: linear-gradient(135deg, #FFD700, #FACC15);
  border: 1px solid #EAB308;
  border-radius: 10px;
  font-size: 1.1rem;
  color: #3D231D;
  font-weight: 800;
  cursor: pointer;
  padding: 6px 12px;
  box-shadow: 0 2px 6px rgba(250, 204, 21, 0.35);
  transition: transform 0.15s ease;
}

.category-menu-btn:active {
  transform: scale(0.94);
}

.category-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  padding: 8px 0;
}

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

.cat-tab {
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--brand-choc);
  background-color: #FAF3E3;
  border: 1px solid rgba(234, 179, 8, 0.4);
  border-radius: 20px;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cat-tab:hover {
  background-color: #FEF08A;
  border-color: #FACC15;
}

.cat-tab.active {
  color: #3D231D !important;
  background: linear-gradient(135deg, #FFD700 0%, #FACC15 50%, #EAB308 100%) !important;
  font-weight: 900 !important;
  border-radius: 20px;
  padding: 8px 18px !important;
  box-shadow: 0 4px 14px rgba(234, 179, 8, 0.5) !important;
  border: 1px solid #D97706 !important;
}

.cat-tab.active::after {
  display: none;
}

/* ==========================================================================
   4. Menu Header & View Layout Switcher
   ========================================================================== */
.menu-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 10px 16px;
}

.menu-section-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
}

.view-mode-toggle {
  display: flex;
  background-color: var(--bg-subtle);
  border-radius: var(--radius-sm);
  padding: 2px;
  border: 1px solid var(--border-light);
}

.view-btn {
  background: transparent;
  border: none;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
}

.view-btn.active {
  background-color: var(--brand-choc) !important;
  color: #FFFFFF !important;
  font-weight: 800;
}

/* ==========================================================================
   5. Product Card Layout Views (2-Column Grid, Horizontal List, Large Card)
   ========================================================================== */
.products-container {
  padding: 0 16px 20px 16px;
}

/* FLOATING CIRCULAR '+' ACTION BUTTON INSIDE IMAGE */
.floating-add-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #FFFFFF;
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
  z-index: 5;
}

[dir="rtl"] .floating-add-btn {
  right: auto;
  left: 8px;
}

.floating-add-btn:active,
.floating-add-btn:hover {
  transform: scale(0.94);
  background-color: var(--brand-choc) !important;
  color: #FFFFFF !important;
  border-color: var(--brand-choc) !important;
}

/* FLOATING CIRCULAR WHATSAPP ACTION BUTTON INSIDE IMAGE */
.floating-wa-btn {
  position: absolute;
  bottom: 8px;
  left: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #25D366;
  border: 1px solid #1EBE57;
  color: #FFFFFF;
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.4);
  cursor: pointer;
  transition: transform 0.15s ease;
  z-index: 5;
}

[dir="rtl"] .floating-wa-btn {
  left: auto;
  right: 8px;
}

.floating-wa-btn:active {
  transform: scale(0.92);
}

/* --------------------------------------------------
   MODE A: 2-COLUMN DUAL GRID VIEW (Screenshot 3)
   -------------------------------------------------- */
.products-container.view-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.products-container.view-grid .grid-card {
  background-color: #FFFFFF;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.products-container.view-grid .grid-card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #F3F4F6;
}

.products-container.view-grid .grid-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.products-container.view-grid .grid-card-info {
  padding: 10px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.products-container.view-grid .grid-card-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.products-container.view-grid .grid-card-price,
.products-container.view-list .list-card-price,
.products-container.view-large .large-card-price,
.drawer-price,
.cart-bar-total,
#cartGrandTotal,
#drawerCtaPrice,
.stat-val,
.riyal-symbol {
  font-family: var(--font-riyal) !important;
}

.riyal-symbol {
  font-family: 'saudi_riyal', 'RubikRiyal', sans-serif !important;
  display: inline-block;
  font-size: 1.38em !important;
  font-weight: bold !important;
  font-style: normal;
  line-height: 1;
  vertical-align: -0.06em;
  margin: 0 3px;
}

.products-container.view-grid .grid-card-price {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: auto;
}

/* --------------------------------------------------
   MODE B: HORIZONTAL LIST ROW VIEW (Screenshots 1 & 2)
   -------------------------------------------------- */
.products-container.view-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.products-container.view-list .list-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #FFFFFF;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  gap: 12px;
}

.products-container.view-list .list-card-details {
  flex: 1;
}

.products-container.view-list .list-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.products-container.view-list .list-card-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.products-container.view-list .list-card-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.pill-badge {
  font-size: 0.72rem;
  color: var(--text-muted);
  background-color: var(--bg-subtle);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.products-container.view-list .list-card-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
}

.products-container.view-list .list-card-img-wrap {
  position: relative;
  width: 100px;
  height: 100px;
  min-width: 100px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: #F3F4F6;
  border: 1px solid var(--border-light);
}

.products-container.view-list .list-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --------------------------------------------------
   MODE C: FULL WIDTH LARGE CARD VIEW (Screenshot 4)
   -------------------------------------------------- */
.products-container.view-large {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.products-container.view-large .large-card {
  background-color: #FFFFFF;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.products-container.view-large .large-card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1.4 / 1;
  background-color: #F3F4F6;
}

.products-container.view-large .large-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.products-container.view-large .large-card-info {
  padding: 14px 16px;
}

.products-container.view-large .large-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.products-container.view-large .large-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

.products-container.view-large .large-card-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

.products-container.view-large .large-card-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ==========================================================================
   6. Persistent Bottom Order Progress Bar
   ========================================================================== */
.persistent-bottom-bar {
  position: fixed;
  bottom: calc(12px + var(--safe-area-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 568px;
  z-index: 200;
}

.progress-bar-card {
  background-color: #FFFFFF;
  border-radius: var(--radius-full);
  padding: 12px 20px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.progress-text {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.progress-chevron {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Solid Cart Floating Bar when items added */
.solid-cart-bar {
  background: linear-gradient(135deg, var(--brand-choc), var(--brand-choc-dark)) !important;
  color: #FFFFFF !important;
  border-radius: var(--radius-full);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 8px 25px rgba(61, 35, 29, 0.4);
  cursor: pointer;
}

.cart-badge-circle {
  background-color: #FFFFFF !important;
  color: var(--brand-choc) !important;
  font-weight: 900;
  font-size: 0.88rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-bar-title {
  font-size: 1rem;
  font-weight: 800;
}

.cart-bar-total {
  font-size: 1.1rem;
  font-weight: 900;
}

/* ==========================================================================
   7. Modals & Bottom Drawers
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.product-drawer, .cart-drawer {
  background-color: #FFFFFF;
  width: 100%;
  max-width: 580px;
  max-height: 88vh;
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-lg);
}

.modal-backdrop.open .product-drawer,
.modal-backdrop.open .cart-drawer {
  transform: translateY(0);
}

.close-drawer-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  background-color: rgba(0, 0, 0, 0.5);
  color: #FFFFFF;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
}

.drawer-scroll-content {
  overflow-y: auto;
  flex: 1;
}

.drawer-img-container {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #F3F4F6;
}

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

.drawer-details {
  padding: 18px;
}

.drawer-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.drawer-price {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 12px;
}

.drawer-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.drawer-footer {
  padding: 16px 20px;
  background-color: #FFFFFF;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 14px;
}

.add-to-cart-cta {
  flex: 1;
  background-color: var(--brand-choc) !important;
  color: #FFFFFF !important;
  border: none;
  border-radius: var(--radius-full);
  padding: 14px 20px;
  font-size: 0.95rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(61, 35, 29, 0.3);
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.add-to-cart-cta:active,
.add-to-cart-cta:hover {
  background-color: var(--brand-choc-dark) !important;
  transform: scale(0.98);
}

/* ==========================================================================
   7. Branches Modal Drawer Styles
   ========================================================================== */
.branches-drawer {
  background-color: #FFFBF0;
  width: 100%;
  max-width: 580px;
  max-height: 85vh;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
  padding: 20px;
}

.modal-backdrop.open .branches-drawer {
  transform: translateY(0);
}

.branches-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 14px;
}

.branches-drawer-header h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--brand-choc);
}

.branches-list-content {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 10px;
}

.branch-card {
  background-color: #FFFFFF;
  border: 1px solid rgba(234, 179, 8, 0.4);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.branch-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.branch-pin-icon {
  font-size: 1.2rem;
  background-color: #FEF08A;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #EAB308;
  flex-shrink: 0;
}

.branch-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--brand-choc);
}

.branch-address {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 12px;
}

.branch-map-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: linear-gradient(135deg, #FFD700 0%, #FACC15 50%, #EAB308 100%);
  color: #3D231D;
  font-weight: 900;
  font-size: 0.9rem;
  padding: 11px 16px;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.45);
  border: 1px solid #D97706;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.branch-map-btn:active {
  transform: scale(0.97);
}
