/* ==========================================================================
   Amman AI — Design System & Stylesheet (Cairo + Montserrat RTL)
   Based on Official Design Handoff & Specs (November 2026)
   ========================================================================== */

:root {
  --primary-navy: #06234A;
  --primary-navy-hover: #041A38;
  --primary-navy-dark: #020F24;
  --primary-accent: #1B4582;
  --surface-light: #F9FAFE;
  --surface-card: #FFFFFF;
  --surface-hover: #EBEDF1;
  --border-subtle: #B4BDC9;
  --border-focus: #06234A;
  --text-primary: #0B1930;
  --text-secondary: #4A5878;
  --text-muted: #7E8DA6;
  --color-discount: #B23A0B;
  --color-discount-bg: #FFF0EB;
  --color-success: #15803D;
  --color-success-bg: #EDFDF2;
  --color-sponsored: #B45309;
  --color-sponsored-bg: #FEF3C7;
  --color-danger: #DC2626;
  --shadow-sm: 0 1px 3px rgba(11, 33, 80, 0.05);
  --shadow-md: 0 4px 14px rgba(11, 33, 80, 0.08);
  --shadow-lg: 0 12px 30px rgba(11, 33, 80, 0.12);
  --shadow-float: 0 20px 45px rgba(11, 33, 80, 0.16);
  --radius-card: 20px;
  --radius-card-sm: 16px;
  --radius-card-lg: 24px;
  --radius-pill: 999px;
  --font-arabic: 'Cairo', system-ui, -apple-system, sans-serif;
  --font-latin: 'Montserrat', system-ui, sans-serif;
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --primary-navy: #1D4ED8;
  --primary-navy-hover: #2563EB;
  --primary-navy-dark: #071533;
  --primary-accent: #38BDF8;
  --surface-light: #061126;
  --surface-card: #0D2044;
  --surface-hover: #142E5C;
  --border-subtle: #193563;
  --border-focus: #38BDF8;
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --color-discount: #F97316;
  --color-discount-bg: rgba(249, 115, 22, 0.15);
  --color-success: #22C55E;
  --color-success-bg: rgba(34, 197, 94, 0.15);
  --color-sponsored: #FBBF24;
  --color-sponsored-bg: rgba(251, 191, 36, 0.15);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.6);
  --shadow-float: 0 20px 45px rgba(0, 0, 0, 0.7);
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  direction: rtl;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-arabic);
  background-color: var(--surface-light);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Latin numerals and text */
.latin-text, .price-number, .date-number {
  font-family: var(--font-latin), var(--font-arabic);
  direction: ltr;
  display: inline-block;
  unicode-bidi: isolate;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  outline: none;
  transition: all var(--transition-fast);
}

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

/* ==========================================================================
   Typography Scale
   ========================================================================== */
h1, h2, h3, h4, h5 {
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-primary);
}

.title-hero {
  font-size: clamp(2rem, 5vw, 3.75rem); /* ~60px on desktop */
  letter-spacing: -0.03em;
  font-weight: 900;
  color: var(--primary-navy);
}

.subtitle-hero {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  color: var(--text-secondary);
  font-weight: 500;
  max-width: 640px;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 620px;
  margin: 0 auto 3rem auto;
}

/* ==========================================================================
   Buttons & Badges (Capsule 999px)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
  white-space: nowrap;
  user-select: none;
  min-height: 48px;
}

.btn-primary {
  background-color: var(--primary-navy);
  color: #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(11, 33, 80, 0.22);
}

.btn-primary:hover {
  background-color: var(--primary-navy-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(11, 33, 80, 0.28);
}

.btn-secondary {
  background-color: var(--surface-card);
  color: var(--primary-navy);
  border: 1.5px solid var(--border-subtle);
}

.btn-secondary:hover {
  border-color: var(--primary-navy);
  background-color: var(--surface-hover);
}

.btn-accent {
  background-color: #FFFFFF;
  color: var(--primary-navy) !important;
  font-weight: 800;
}

.btn-accent:hover {
  background-color: #F8FAFC;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.btn-sm {
  min-height: 36px;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  line-height: 1;
}

.badge-discount {
  background-color: var(--color-discount-bg);
  color: var(--color-discount);
  font-weight: 800;
}

.badge-sponsored {
  background-color: var(--color-sponsored-bg);
  color: var(--color-sponsored);
  border: 1px solid rgba(180, 83, 9, 0.2);
}

.badge-success {
  background-color: var(--color-success-bg);
  color: var(--color-success);
}

.badge-demo {
  background: rgba(11, 33, 80, 0.08);
  color: var(--primary-navy);
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(245, 248, 253, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.header-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(11, 33, 80, 0.15);
  overflow: hidden;
  background: #FFFFFF;
}

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

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

.brand-name {
  font-family: var(--font-latin);
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--primary-navy);
  line-height: 1.1;
}

.brand-tagline {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  position: relative;
  padding: 0.4rem 0;
}

.nav-link:hover {
  color: var(--primary-navy);
}

.nav-link.active {
  color: var(--primary-navy);
  font-weight: 800;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle-btn {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.theme-toggle-btn:hover {
  color: var(--primary-navy);
  border-color: var(--primary-navy);
}

.mobile-menu-btn {
  display: none;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding: 4.5rem 1.5rem 6rem 1.5rem;
  background-color: var(--surface-light);
  position: relative;
  overflow: hidden;
}

.hero-container {
  max-width: 1360px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 3.5rem;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-pill-badge {
  align-self: flex-start;
  background-color: var(--surface-card);
  border: 1px solid var(--border-subtle);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-navy);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-sm);
}

.hero-pill-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-success);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.hero-guarantee {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.guarantee-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.guarantee-item svg {
  color: var(--color-success);
  flex-shrink: 0;
}

/* ==========================================================================
   Hero Interactive Chat Mock Preview (Desktop & Mobile)
   ========================================================================== */
.chat-mock-frame {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card-lg);
  box-shadow: var(--shadow-float);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-normal);
}

.chat-mock-frame:hover {
  transform: translateY(-4px);
}

.mock-frame-header {
  background: var(--surface-light);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mock-agent-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.mock-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-navy);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
}

.mock-city-chip {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.mock-conversation-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--surface-light);
}

/* Chat Bubbles */
.bubble-user {
  align-self: flex-start;
  background-color: var(--primary-navy);
  color: #FFFFFF;
  padding: 0.75rem 1.15rem;
  border-radius: 18px 18px 4px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  max-width: 85%;
  box-shadow: var(--shadow-sm);
}

.bubble-agent {
  align-self: flex-end;
  background-color: var(--surface-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  padding: 0.85rem 1.15rem;
  border-radius: 18px 18px 18px 4px;
  font-size: 0.92rem;
  line-height: 1.5;
  max-width: 95%;
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Deal Card (بطاقة العرض) — Core Product Spec
   ========================================================================== */
/* Deal Card Product Visuals */
.deal-card-image-wrap {
  position: relative;
  width: 100%;
  height: 160px;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--surface-light) 100%);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.deal-product-img {
  max-width: 82%;
  max-height: 82%;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.deal-card:hover .deal-product-img {
  transform: scale(1.06);
}

.deal-retailer-badge-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.deal-retailer-badge-overlay img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 3px;
}

.deal-discount-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.2);
}

.deal-card {
  background: var(--surface-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-card-sm);
  overflow: hidden;
  margin-top: 0.75rem;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.deal-card:hover {
  border-color: var(--primary-navy);
  box-shadow: var(--shadow-md);
}

.deal-card-header {
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(11, 33, 80, 0.03);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.85rem;
}

.deal-card-number {
  font-weight: 800;
  color: var(--primary-navy);
}

.deal-card-retailer {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.deal-card-body {
  padding: 1rem;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1rem;
  align-items: center;
}

.deal-card-img-wrap {
  width: 80px;
  height: 80px;
  background: var(--surface-light);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.deal-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.deal-card-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.deal-product-name {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
}

.deal-product-pack {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.deal-pricing-row {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  margin-top: 0.25rem;
  flex-wrap: wrap;
}

.deal-price-current {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--primary-navy);
  font-family: var(--font-latin), var(--font-arabic);
}

.deal-price-old {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: line-through;
  font-family: var(--font-latin), var(--font-arabic);
}

.deal-unit-price {
  font-size: 0.78rem;
  color: var(--text-secondary);
  background: var(--surface-light);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
}

.deal-expiry-row {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.deal-expiry-row.expiring-soon {
  color: var(--color-discount);
  font-weight: 700;
}

/* Deal Card Action Buttons */
.deal-actions-row {
  padding: 0.65rem 1rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: var(--surface-card);
  flex-wrap: wrap;
}

.deal-action-buttons-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.btn-card-action {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--surface-light);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-card-action:hover {
  border-color: var(--primary-navy);
  color: var(--primary-navy);
  background: var(--surface-hover);
}

.btn-card-action.btn-add-list {
  background: var(--primary-navy);
  color: #FFFFFF;
  border-color: var(--primary-navy);
}

.btn-card-action.btn-add-list:hover {
  background: var(--primary-navy-hover);
}

.btn-report-wrong {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-decoration: underline;
  padding: 0.2rem 0.4rem;
}

.btn-report-wrong:hover {
  color: var(--color-danger);
}

/* Suggestion Chips */
.mock-suggestion-chips {
  padding: 0.75rem 1.25rem;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--surface-card);
  border-top: 1px solid var(--border-subtle);
}

.mock-suggestion-chips::-webkit-scrollbar {
  display: none;
}

.chip {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  background: var(--surface-light);
  border: 1px solid var(--border-subtle);
  color: var(--primary-navy);
  white-space: nowrap;
}

.chip:hover {
  background: var(--primary-navy);
  color: #FFFFFF;
  border-color: var(--primary-navy);
}

/* Mock Input Bar */
.mock-input-bar {
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--surface-card);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mock-input-field {
  flex: 1;
  background: var(--surface-light);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 0.6rem 1.15rem;
  font-size: 0.88rem;
  color: var(--text-primary);
  font-family: inherit;
  outline: none;
}

.mock-input-field:focus {
  border-color: var(--primary-navy);
}

/* ==========================================================================
   Section: How It Works (كيف يشتغل)
   ========================================================================== */
.section-wrap {
  padding: 6rem 1.5rem;
  max-width: 1360px;
  margin: 0 auto;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.step-card {
  background: var(--surface-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 2.25rem 1.75rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.step-card:hover {
  border-color: var(--primary-navy);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.step-number {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-light);
  border: 2px solid var(--primary-navy);
  color: var(--primary-navy);
  font-family: var(--font-latin);
  font-weight: 900;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.step-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.step-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.step-badge {
  margin-top: 1.25rem;
  align-self: flex-start;
}

/* ==========================================================================
   Section: Family Basket & Savings (سلّة العيلة وعدّاد التوفير)
   ========================================================================== */
.basket-feature-wrap {
  background: var(--surface-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-card-lg);
  padding: 3.5rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 3.5rem;
  box-shadow: var(--shadow-md);
}

.basket-feature-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.savings-counter-card {
  background: linear-gradient(135deg, var(--primary-navy) 0%, #153775 100%);
  color: #FFFFFF;
  border-radius: var(--radius-card);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: var(--shadow-lg);
}

.savings-counter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.savings-counter-label {
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0.85;
}

.savings-amount-big {
  font-size: 2.75rem;
  font-weight: 900;
  font-family: var(--font-latin), var(--font-arabic);
  line-height: 1;
}

.savings-plan-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1rem;
}

.basket-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.4rem;
}

.basket-item-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.basket-store-tag {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
}

/* ==========================================================================
   Section: For Merchants (للتجار — Dark Navy Theme)
   ========================================================================== */
.merchants-section-outer {
  background-color: var(--primary-navy);
  color: #FFFFFF;
  padding: 6rem 1.5rem;
  position: relative;
}

.merchants-container {
  max-width: 1360px;
  margin: 0 auto;
}

.merchants-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3.5rem auto;
}

.merchants-header h2 {
  color: #FFFFFF;
  margin-bottom: 0.75rem;
}

.merchants-header p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.15rem;
}

.merchants-perks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 3.5rem;
}

.perk-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-card);
  padding: 2.25rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all var(--transition-fast);
}

.perk-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
}

.perk-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
}

.perk-card h3 {
  color: #FFFFFF;
  font-size: 1.25rem;
}

.perk-card p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
  line-height: 1.6;
}

.merchant-cta-bar {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-card);
  padding: 2rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   Section: FAQ (أسئلة شائعة)
   ========================================================================== */
.faq-section {
  padding: 6rem 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2.5rem;
}

.faq-item {
  background: var(--surface-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-card-sm);
  overflow: hidden;
  transition: all var(--transition-fast);
}

.faq-item:hover {
  border-color: var(--primary-navy);
}

.faq-question-btn {
  width: 100%;
  padding: 1.35rem 1.5rem;
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-primary);
  background: none;
}

.faq-toggle-icon {
  width: 24px;
  height: 24px;
  transition: transform var(--transition-fast);
  color: var(--text-secondary);
}

.faq-item.open .faq-toggle-icon {
  transform: rotate(180deg);
  color: var(--primary-navy);
}

.faq-answer {
  padding: 0 1.5rem 1.35rem 1.5rem;
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.7;
  display: none;
}

.faq-item.open .faq-answer {
  display: block;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--surface-card);
  border-top: 1px solid var(--border-subtle);
  padding: 3.5rem 1.5rem 2rem 1.5rem;
}

.footer-container {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  flex-wrap: wrap;
}

.footer-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.footer-link:hover {
  color: var(--primary-navy);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==========================================================================
   Full Chat App Interface (`app.html` specific styles)
   ========================================================================== */
.app-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background: var(--surface-light);
  transition: grid-template-columns 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-layout.sidebar-collapsed {
  grid-template-columns: 0px 1fr;
}

.app-main-chat {
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
  background: var(--surface-light);
  min-width: 0;
  width: 100%;
  overflow: hidden;
}

.app-sidebar {
  background: var(--surface-card);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 280px;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, margin 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-layout.sidebar-collapsed .app-sidebar {
  width: 0;
  margin-right: -280px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  border-left: none;
}

.app-sidebar-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.conversations-list {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.conversation-item {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.conversation-item:hover, .conversation-item.active {
  background: var(--surface-hover);
  color: var(--primary-navy);
}

.conversation-item.active {
  font-weight: 800;
}

.app-main-chat {
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
  background: var(--surface-light);
}

.app-chat-header {
  background: var(--surface-card);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.app-chat-header-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.app-messages-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  scroll-behavior: smooth;
}

.message-row {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.message-feedback-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.5rem;
  padding: 0 0.5rem;
}

.btn-feedback {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border: 1px solid transparent;
}

.btn-feedback:hover {
  background: var(--surface-card);
  color: var(--primary-navy);
  border-color: var(--border-subtle);
}

.btn-retry-action {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-pill);
}

.btn-retry-action:hover {
  background: var(--surface-card);
  color: var(--primary-navy);
}

/* Typing / Streaming Cursor Effect */
.typing-cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--primary-navy);
  margin-right: 4px;
  animation: blink 0.8s infinite;
  vertical-align: middle;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Chat Input Bar at bottom */
.app-chat-input-container {
  padding: 1rem 1.5rem 1.25rem 1.5rem;
  background: var(--surface-card);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.input-controls-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.app-text-input {
  flex: 1;
  background: var(--surface-light);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  color: var(--text-primary);
  font-family: inherit;
  outline: none;
  transition: all var(--transition-fast);
}

.app-text-input:focus {
  border-color: var(--primary-navy);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(11, 33, 80, 0.1);
}

/* Shopping List Slide-Over Drawer (Universally Responsive) */
.app-drawer-panel,
.drawer-panel {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  width: 380px;
  max-width: 90vw;
  background: var(--surface-card);
  box-shadow: -8px 0 35px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  height: 100vh;
  z-index: 2000;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
  border-left: 1px solid var(--border-subtle);
}

.app-drawer-panel.open,
.drawer-panel.open {
  transform: translateX(0);
  visibility: visible;
}

.drawer-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-drawer-close {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 50%;
  background: var(--surface-light);
  border: 1.5px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  box-shadow: 0 1px 3px rgba(6, 35, 74, 0.06);
}

.btn-drawer-close:hover {
  background: #FEE2E2;
  color: #DC2626;
  border-color: #FECACA;
  transform: rotate(90deg) scale(1.08);
  box-shadow: 0 3px 8px rgba(220, 38, 38, 0.2);
}

.btn-drawer-close:active {
  transform: scale(0.92);
}

.btn-drawer-close svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.store-list-group {
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-card-sm);
  overflow: hidden;
}

.store-group-header {
  background: var(--surface-light);
  padding: 0.65rem 1rem;
  font-weight: 800;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.store-group-items {
  padding: 0.5rem 1rem;
  display: flex;
  flex-direction: column;
}

.store-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 0.85rem;
}

.store-item-row:last-child {
  border-bottom: none;
}

/* Modals & Dialogs */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 33, 80, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.open {
  display: flex;
}

.modal-dialog {
  background: var(--surface-card);
  border-radius: var(--radius-card);
  max-width: 480px;
  width: 100%;
  padding: 2rem;
  box-shadow: var(--shadow-float);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
}

/* ==========================================================================
   Responsive & Mobile First Adaptations (390px, 768px, 1440px)
   ========================================================================== */
.app-backdrop, .mobile-nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(6, 35, 74, 0.55);
  backdrop-filter: blur(3px);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.app-backdrop.active, .mobile-nav-backdrop.active {
  display: block;
  opacity: 1;
}

/* Mobile Nav Drawer for Landing Page */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  bottom: 0;
  width: 290px;
  background: var(--surface-card);
  box-shadow: var(--shadow-float);
  z-index: 999;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-nav-drawer.open {
  right: 0;
}

.mobile-nav-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-nav-list {
  list-style: none;
  padding: 1rem 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.mobile-nav-link {
  display: block;
  padding: 0.85rem 1.5rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  transition: background 0.2s;
}

.mobile-nav-link:hover {
  background: var(--surface-light);
  color: var(--primary-navy);
}

.mobile-menu-btn {
  display: none;
}

@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .basket-feature-wrap {
    grid-template-columns: 1fr;
    padding: 2rem;
  }
  .steps-grid, .merchants-perks-grid {
    grid-template-columns: 1fr;
  }
  .app-layout {
    grid-template-columns: 1fr;
  }
  .app-sidebar {
    display: none;
    position: fixed;
    top: 0;
    right: -340px;
    bottom: 0;
    z-index: 1000;
    width: 85%;
    max-width: 320px;
    box-shadow: var(--shadow-float);
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .app-sidebar.open {
    display: flex;
    right: 0;
  }
  .app-drawer-panel {
    width: 90%;
    max-width: 380px;
  }
}

@media (max-width: 768px) {
  .nav-links, .header-cta {
    display: none !important;
  }
  .mobile-menu-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }
  .hero-section {
    padding: 2.5rem 1rem 3.5rem 1rem;
  }
  .title-hero {
    font-size: 1.85rem;
    line-height: 1.3;
  }
  .subtitle-hero {
    font-size: 0.95rem;
  }
  /* Deal Card Product Visuals */
.deal-card-image-wrap {
  position: relative;
  width: 100%;
  height: 160px;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--surface-light) 100%);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.deal-product-img {
  max-width: 82%;
  max-height: 82%;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.deal-card:hover .deal-product-img {
  transform: scale(1.06);
}

.deal-retailer-badge-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.deal-retailer-badge-overlay img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 3px;
}

.deal-discount-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.2);
}

.deal-card {
    padding: 0.85rem;
  }
  .deal-card-body {
    grid-template-columns: 85px 1fr;
    gap: 0.75rem;
    text-align: right;
  }
  .deal-card-img-wrap {
    width: 85px;
    height: 85px;
    margin: 0;
  }
  .deal-pricing-row {
    justify-content: flex-start;
    gap: 0.4rem;
  }
  .deal-price-current {
    font-size: 1.15rem;
  }
  .deal-price-old {
    font-size: 0.82rem;
  }
  .deal-actions-row {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.65rem;
    padding-top: 0.65rem;
  }
  .deal-action-buttons-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
  }
  .btn-card-action {
    font-size: 0.75rem;
    padding: 0.35rem 0.6rem;
  }
  .deal-expiry-row {
    font-size: 0.72rem;
  }
}

@media (max-width: 480px) {
  .app-chat-header {
    padding: 0.65rem 0.85rem;
  }
  .app-chat-input-container {
    padding: 0.6rem 0.65rem 0.75rem 0.65rem;
    gap: 0.5rem;
  }
  .input-controls-row {
    gap: 0.35rem;
  }
  .btn-icon.btn-secondary {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
  }
  .app-text-input {
    padding: 0.6rem 0.85rem;
    font-size: 0.88rem;
  }
  #sendBtn {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
  }
  .chip-action, .chip {
    font-size: 0.78rem;
    padding: 0.35rem 0.75rem;
  }
  .bubble-user, .bubble-agent {
    max-width: 92%;
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
  }
}

/* ==========================================================================
   Brands Directory & Single Store Page Styles
   ========================================================================== */
.store-directory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}

@media (max-width: 1024px) {
  .store-directory-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .store-directory-grid {
    grid-template-columns: 1fr;
  }
}

.store-directory-card {
  background: var(--surface-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.store-directory-card:hover {
  border-color: var(--primary-navy);
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(6, 35, 74, 0.08);
}

.store-card-top {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.store-card-logo-wrap {
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  border-radius: 16px;
  background: #FFFFFF;
  border: 1.5px solid var(--border-subtle);
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(6,35,74,0.04);
}

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

.store-card-title-group h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.store-card-title-group .store-en-name {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--font-latin);
  font-weight: 600;
}

.store-card-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.store-badge-tag {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.store-badge-offers {
  background: rgba(13, 148, 136, 0.1);
  color: var(--color-teal);
  border: 1px solid rgba(13, 148, 136, 0.2);
}

.store-badge-branches {
  background: var(--surface-light);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.store-badge-type {
  background: rgba(6, 35, 74, 0.06);
  color: var(--primary-navy);
}

.store-card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex: 1;
}

.store-card-branches-preview {
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--text-muted);
  background: var(--surface-light);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  min-height: 52px;
}

.store-card-btn,
a.store-card-btn,
.store-directory-card a.store-card-btn {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.55rem !important;
  padding: 0.85rem 1.25rem !important;
  border-radius: 9999px !important;
  background: #06234A !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
  font-size: 0.92rem !important;
  text-decoration: none !important;
  border: 1px solid #06234A !important;
  box-shadow: 0 4px 14px rgba(6, 35, 74, 0.18) !important;
  transition: all 0.22s ease !important;
  cursor: pointer !important;
}

.store-card-btn:visited,
a.store-card-btn:visited {
  color: #FFFFFF !important;
}

.store-card-btn span {
  color: #FFFFFF !important;
  font-weight: 700 !important;
  letter-spacing: normal !important;
}

.store-card-btn svg {
  stroke: #FFFFFF !important;
  color: #FFFFFF !important;
  transition: transform 0.2s ease !important;
}

.store-directory-card:hover .store-card-btn,
.store-card-btn:hover {
  background: #1B559B !important;
  border-color: #1B559B !important;
  color: #FFFFFF !important;
  box-shadow: 0 6px 18px rgba(27, 85, 155, 0.32) !important;
  transform: translateY(-2px) !important;
}

.store-directory-card:hover .store-card-btn svg,
.store-card-btn:hover svg {
  transform: translateX(-3px) !important;
}

/* Breadcrumbs */
.breadcrumb-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.breadcrumb-bar a {
  color: var(--primary-navy);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}

.breadcrumb-bar a:hover {
  color: var(--color-teal);
  text-decoration: underline;
}

.breadcrumb-sep {
  display: flex;
  align-items: center;
  color: var(--text-muted);
}

/* Store Profile Hero (Single Store Page) */
.store-single-hero {
  background: var(--surface-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.store-single-top {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.store-single-logo {
  width: 90px;
  height: 90px;
  border-radius: 18px;
  background: #FFF;
  border: 2px solid var(--border-subtle);
  padding: 8px;
  box-shadow: 0 6px 18px rgba(6,35,74,0.06);
  flex-shrink: 0;
}

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

.store-single-info h1 {
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--primary-navy);
  margin-bottom: 0.35rem;
}

.store-single-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.store-branches-list-box {
  background: var(--surface-light);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.25rem;
  margin-top: 1.5rem;
}

.branches-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.branch-pill-item {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 0.45rem 0.95rem;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .store-directory-grid {
    grid-template-columns: 1fr;
  }
  .store-single-top {
    flex-direction: column;
    text-align: center;
  }
  .store-single-actions {
    justify-content: center;
  }
}

/* ==========================================================================
   Dark Mode & Hero Enhancements for Brands & Store Pages
   ========================================================================== */
.brands-page-header {
  background: linear-gradient(180deg, #FFFFFF 0%, var(--surface-light) 100%);
  border-bottom: 1px solid var(--border-subtle);
  padding: 2.75rem 1rem 2.25rem 1rem;
  text-align: center;
}

[data-theme="dark"] .brands-page-header {
  background: linear-gradient(180deg, #0B1933 0%, #061126 100%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Header styling in dark mode */
[data-theme="dark"] .site-header {
  background-color: rgba(6, 17, 38, 0.94) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .brand-name {
  color: #FFFFFF !important;
}

[data-theme="dark"] .brand-tagline {
  color: #94A3B8 !important;
}

/* Page Hero Badge Pill */
.page-hero-badge {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.45rem 1.25rem;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 700;
  background: rgba(27, 85, 155, 0.08);
  color: var(--primary-navy);
  border: 1px solid rgba(27, 85, 155, 0.16);
  box-shadow: 0 2px 8px rgba(6, 35, 74, 0.04);
}

[data-theme="dark"] .page-hero-badge {
  background: rgba(56, 189, 248, 0.12) !important;
  color: #38BDF8 !important;
  border: 1px solid rgba(56, 189, 248, 0.28) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.page-hero-title {
  font-size: 2.15rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--primary-navy);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

[data-theme="dark"] .page-hero-title {
  color: #FFFFFF !important;
}

.page-hero-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 720px;
  margin: 0 auto 1.75rem auto;
}

[data-theme="dark"] .page-hero-subtitle {
  color: #CBD5E1 !important;
}

/* Store Search Box */
.store-search-box-wrap {
  max-width: 620px;
  margin: 0 auto 1.5rem auto;
  position: relative;
}

.store-search-input {
  width: 100%;
  padding: 0.85rem 1.25rem 0.85rem 3.5rem;
  font-size: 0.95rem;
  border-radius: var(--radius-pill);
  background: var(--surface-card);
  border: 1.5px solid var(--border-subtle);
  color: var(--text-primary);
  box-shadow: 0 4px 16px rgba(6, 35, 74, 0.05);
  transition: all 0.2s ease;
}

.store-search-input:focus {
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

[data-theme="dark"] .store-search-input {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #FFFFFF !important;
}

[data-theme="dark"] .store-search-input::placeholder {
  color: #64748B !important;
}

.store-search-clear-btn {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: none;
  padding: 4px;
}

/* Store Type Filters */
.store-type-filters {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.store-type-filter-btn {
  border: 1.5px solid var(--border-subtle);
  background: var(--surface-card);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.store-type-filter-btn:hover {
  border-color: var(--primary-navy);
  color: var(--primary-navy);
}

.store-type-filter-btn.active {
  background: var(--primary-navy);
  color: #FFFFFF;
  border-color: var(--primary-navy);
  box-shadow: 0 4px 12px rgba(6, 35, 74, 0.15);
}

[data-theme="dark"] .store-type-filter-btn {
  background: #0D2044 !important;
  color: #CBD5E1 !important;
  border-color: #193563 !important;
}

[data-theme="dark"] .store-type-filter-btn:hover,
[data-theme="dark"] .store-type-filter-btn.active {
  background: #2563EB !important;
  color: #FFFFFF !important;
  border-color: #2563EB !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35) !important;
}

[data-theme="dark"] .store-card-title-group h3 {
  color: #FFFFFF !important;
}

[data-theme="dark"] .store-card-title-group .store-en-name {
  color: #94A3B8 !important;
  font-weight: 600;
}

[data-theme="dark"] .store-card-desc {
  color: #E2E8F0 !important;
  line-height: 1.6;
}

[data-theme="dark"] .store-card-branches-preview {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #E2E8F0 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  line-height: 1.55;
}

[data-theme="dark"] .store-card-branches-preview strong {
  color: #38BDF8 !important;
}

[data-theme="dark"] .store-badge-tag.store-badge-offers {
  background: rgba(45, 212, 191, 0.15) !important;
  color: #2DD4BF !important;
  border-color: rgba(45, 212, 191, 0.3) !important;
}

[data-theme="dark"] .store-badge-tag.store-badge-branches {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #E2E8F0 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .store-badge-tag.store-badge-type {
  background: rgba(56, 189, 248, 0.15) !important;
  color: #38BDF8 !important;
  border: 1px solid rgba(56, 189, 248, 0.25) !important;
}

[data-theme="dark"] .store-card-btn,
[data-theme="dark"] a.store-card-btn,
[data-theme="dark"] .store-directory-card a.store-card-btn {
  background: #2563EB !important;
  border-color: #2563EB !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3) !important;
}

[data-theme="dark"] .store-directory-card:hover .store-card-btn,
[data-theme="dark"] .store-card-btn:hover {
  background: #3B82F6 !important;
  border-color: #3B82F6 !important;
  color: #FFFFFF !important;
  box-shadow: 0 6px 22px rgba(59, 130, 246, 0.45) !important;
}

[data-theme="dark"] .store-type-filter-btn {
  background: #0D2044 !important;
  color: #CBD5E1 !important;
  border-color: #193563 !important;
}

[data-theme="dark"] .store-type-filter-btn:hover,
[data-theme="dark"] .store-type-filter-btn.active {
  background: #2563EB !important;
  color: #FFFFFF !important;
  border-color: #2563EB !important;
}

[data-theme="dark"] .highlight-num {
  color: #FFFFFF !important;
}

[data-theme="dark"] .highlight-label {
  color: #CBD5E1 !important;
}

/* Navbar action buttons & links in Dark Mode */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.btn-cart {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: var(--radius-pill);
  padding: 0.45rem 0.95rem;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-cart:hover {
  border-color: var(--primary-accent);
  color: var(--primary-accent);
}

.cart-badge-count {
  background: var(--color-discount);
  color: #FFFFFF;
  border-radius: var(--radius-pill);
  padding: 0.1rem 0.45rem;
  font-size: 0.75rem;
  font-weight: 800;
}

.btn-theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-theme-toggle:hover {
  color: var(--primary-accent);
  border-color: var(--primary-accent);
  background: var(--surface-hover);
}

[data-theme="dark"] .btn-cart {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #F8FAFC !important;
}

[data-theme="dark"] .btn-cart:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  border-color: #38BDF8 !important;
  color: #38BDF8 !important;
}

[data-theme="dark"] .btn-theme-toggle {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #F8FAFC !important;
}

[data-theme="dark"] .btn-theme-toggle:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  border-color: #38BDF8 !important;
  color: #38BDF8 !important;
}

[data-theme="dark"] .nav-link.active {
  color: #38BDF8 !important;
  font-weight: 800;
}

[data-theme="dark"] .nav-link {
  color: #94A3B8;
}

[data-theme="dark"] .nav-link:hover {
  color: #FFFFFF;
}

/* ==========================================================================
   Store Single Page (brand.html) Components
   ========================================================================== */
.store-page-header-wrap {
  background: var(--surface-card);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.25rem 1rem;
}

.products-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.filter-chips-row {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
}

.filter-chips-row::-webkit-scrollbar {
  height: 4px;
}
.filter-chips-row::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 4px;
}

.deal-product-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary-navy);
  margin-bottom: 0.35rem;
  line-height: 1.4;
}

.deal-price-val {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--primary-navy);
  font-family: var(--font-latin), var(--font-arabic);
}

.store-search-heading {
  color: var(--primary-navy);
}

.store-visible-offers-count {
  color: var(--primary-navy);
}

.store-branches-heading {
  color: var(--primary-navy);
}

.store-badge-verified {
  background: #DCFCE7;
  color: #15803D;
  border: 1px solid #BBF7D0;
}

.flyer-modal-h4 {
  color: var(--primary-navy);
}

/* Dark Mode Overrides for brand.html */
[data-theme="dark"] .store-page-header-wrap {
  background: linear-gradient(180deg, #0B1933 0%, #061126 100%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .breadcrumb-bar a {
  color: #38BDF8 !important;
}

[data-theme="dark"] .breadcrumb-active-name,
[data-theme="dark"] #breadcrumbStoreName {
  color: #FFFFFF !important;
}

[data-theme="dark"] .btn-back-directory {
  color: #CBD5E1 !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

[data-theme="dark"] .btn-back-directory:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #FFFFFF !important;
}

[data-theme="dark"] .store-single-hero {
  background: #0B1933 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .store-hero-title,
[data-theme="dark"] .store-single-info h1 {
  color: #FFFFFF !important;
}

[data-theme="dark"] .store-badge-verified {
  background: rgba(45, 212, 191, 0.15) !important;
  color: #2DD4BF !important;
  border-color: rgba(45, 212, 191, 0.3) !important;
}

[data-theme="dark"] .store-single-logo {
  background: #08152B !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .store-branches-list-box {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .store-branches-heading {
  color: #FFFFFF !important;
}

[data-theme="dark"] .branch-pill-item {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #E2E8F0 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .store-filter-card {
  background: #0B1933 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .store-search-heading {
  color: #FFFFFF !important;
}

[data-theme="dark"] .store-visible-offers-count,
[data-theme="dark"] #storeVisibleOffersCount {
  color: #FFFFFF !important;
}

[data-theme="dark"] .deal-card {
  background: #0B1933 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .deal-card-image-wrap {
  background: linear-gradient(180deg, #102142 0%, #08152B 100%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .deal-retailer-badge-overlay {
  background: rgba(8, 21, 43, 0.92) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #FFFFFF !important;
}

[data-theme="dark"] .deal-retailer-badge-overlay span {
  color: #FFFFFF !important;
}

[data-theme="dark"] .deal-product-title {
  color: #FFFFFF !important;
}

[data-theme="dark"] .deal-price-val {
  color: #38BDF8 !important;
}

[data-theme="dark"] .deal-actions-row {
  background: #08152B !important;
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .flyer-modal-card,
[data-theme="dark"] .modal-dialog {
  background: #0B1933 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

[data-theme="dark"] .flyer-modal-h4,
[data-theme="dark"] #flyerModalTitle {
  color: #FFFFFF !important;
}
