/* =============================================
   DAWARTLK — GLOBAL STYLES
   Pixel-perfect match to design reference
   Responsive: mobile-first + tablet + desktop
============================================= */

/* ── Design Tokens ────────────────────────── */
:root {
  --green:        #11934a;
  --green-light:  #21a65b;
  --green-bg:     #e8f5e9;
  --green-mid:    #c8e6c9;
  --yellow:       #ffd000;
  --yellow-dark:  #f9a825;
  --yellow-bg:    #fffde7;
  --red:          #e53935;
  --white:        #ffffff;
  --bg:           #f5f5f5;
  --card-bg:      #ffffff;
  --border:       #eeeeee;
  --text:         #1a1a1a;
  --text-muted:   #757575;
  --text-light:   #9e9e9e;
  --shadow-xs:    0 1px 4px rgba(0,0,0,0.07);
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.09);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.12);
  --r-sm:         10px;
  --r-md:         14px;
  --r-lg:         18px;
  --r-xl:         24px;
  --r-pill:       999px;
  --bnav-h:       64px;
  --font:         'Cairo', sans-serif;
  --header-h:     58px;
  --max-w:        1200px;
}

/* ── Reset ────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { font-family: var(--font); direction: rtl; scroll-behavior: smooth; overflow-x: hidden; }
body  { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; overflow-x: hidden; }
a     { text-decoration: none; color: inherit; }
button { border: none; background: none; cursor: pointer; font-family: var(--font); }
img   { display: block; max-width: 100%; }
ul    { list-style: none; }

/* ═══════════════════════════════════════════
   SIDE MENU OVERLAY
═══════════════════════════════════════════ */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 290;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.menu-overlay.open { opacity: 1; pointer-events: all; }

/* ═══════════════════════════════════════════
   SIDE MENU
═══════════════════════════════════════════ */
.side-menu {
  position: fixed;
  top: 0;
  left: -290px;
  right: auto;
  width: 290px;
  height: 100%;
  background: var(--white);
  z-index: 300;
  transition: left 0.32s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
  overflow-y: auto;
}
.side-menu.open { left: 0; }

.side-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px;
  background: var(--green);
  color: #fff;
}
.side-menu-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.side-menu-logo .logo-text {
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff;
}
.side-menu-logo .logo-icon-wrap {
  background: rgba(255,255,255,0.2);
  border-radius: 8px;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem; color: #fff;
}
.side-menu-close {
  color: rgba(255,255,255,0.9);
  font-size: 1.1rem;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.side-menu-close:hover { background: rgba(255,255,255,0.18); }

.side-menu-list { padding: 10px 0; }
.side-menu-list li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  transition: background 0.2s, color 0.2s;
}
.side-menu-list li a i {
  width: 20px; color: var(--green); font-size: 0.95rem; text-align: center;
}
.side-menu-list li > a:hover {
  background: var(--green-bg); color: var(--green);
}

/* Premium Submenu Styles */
.submenu-list {
  display: none;
  background: #fafafa;
  padding: 4px 0;
  border-right: 3px solid var(--green-mid);
  margin: 0 20px 8px 12px;
  border-radius: 4px;
}
.submenu-list li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px !important;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  color: var(--text-muted) !important;
  transition: background 0.2s, color 0.2s;
}
.submenu-list li a i {
  font-size: 0.85rem !important;
  color: var(--text-light) !important;
  width: 16px !important;
}
.submenu-list li a:hover {
  background: rgba(17,147,74,0.06) !important;
  color: var(--green) !important;
}
.submenu-list li a:hover i {
  color: var(--green) !important;
}
.submenu-arrow {
  margin-inline-start: auto;
  font-size: 0.75rem;
  color: var(--text-light);
  transition: transform 0.25s ease;
}
.has-submenu.open .submenu-arrow {
  transform: rotate(180deg);
  color: var(--green);
}

/* ═══════════════════════════════════════════
   HEADER
═══════════════════════════════════════════ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  gap: 10px;
  min-height: var(--header-h);
}

/* Left cluster: hamburger + bell + location */
.header-left {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.icon-btn {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  font-size: 1.05rem;
  position: relative;
  transition: background 0.2s;
}
.icon-btn:hover { background: var(--bg); }

.notif-badge {
  position: absolute;
  top: 7px; left: 9px;
  background: var(--red);
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px solid var(--white);
}

.location-select {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  max-width: 200px;
  height: 40px;
  padding: 0 14px;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-size: 0.78rem;
  font-weight: 700;
  direction: rtl;
  white-space: nowrap;
  overflow: hidden;
}
.location-select span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.location-select .fa-location-dot { color: var(--green); font-size: 0.95rem; flex-shrink: 0; }
.location-select .fa-chevron-down { font-size: 0.7rem; flex-shrink: 0; color: var(--text-muted); }

/* Logo */
.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.logo-link img {
  width: 108px;
  height: auto;
  object-fit: contain;
}

/* Shared reusable logo parts */
.logo-text {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--green);
}
.logo-icon-wrap {
  background: var(--green);
  border-radius: 8px;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.85rem;
}
.logo-icon-wrap.sm { width: 24px; height: 24px; font-size: 0.72rem; }

/* ═══════════════════════════════════════════
   MAIN CONTENT
═══════════════════════════════════════════ */
.main-content {
  padding-bottom: calc(var(--bnav-h) + 10px);
}
.main-content:has(.app-footer-custom) {
  padding-bottom: 0;
}

/* ═══════════════════════════════════════════
   HERO SECTION
═══════════════════════════════════════════ */
.hero-section {
  background: var(--white);
}

.hero-bg {
  background: var(--white);
  padding: 4px 14px 20px;
  position: relative;
  overflow: hidden;
}

@media (max-width: 767px) {
  .hero-bg {
    background: var(--white);
  }
}

.hero-layout {
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
}

/* Basket col */
.hero-basket-col {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  width: 100%;
}

.discount-badge-hero {
  position: absolute;
  top: 10px;
  left: calc(50% - 160px);
  background: var(--yellow);
  color: #111;
  border-radius: 28px 20px 32px 20px;
  width: 86px; height: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transform: rotate(-8deg);
  line-height: 1.15;
}
.badge-top { font-size: 0.88rem; font-weight: 900; }
.badge-pct { font-size: 1.55rem; font-weight: 900; }

.hero-basket-img {
  position: relative;
  z-index: 2;
  width: min(88vw, 340px);
  filter: drop-shadow(0 12px 18px rgba(20,20,20,0.09));
}

.hero-spark {
  position: absolute;
  z-index: 4;
  color: var(--yellow);
  font-size: 1.3rem;
  line-height: 1;
}
.spark-a { top: 46px; right: calc(50% - 158px); }
.spark-b { top: 96px; right: calc(50% - 174px); font-size: 0.9rem; }

.hero-percent {
  position: absolute;
  bottom: 38px;
  left: calc(50% - 166px);
  z-index: 4;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: #111;
  background: var(--yellow);
  border-radius: 50%;
  font-size: 0.95rem;
  font-weight: 900;
}

/* Text col */
.hero-text-col {
  width: 100%;
  direction: rtl;
}
.hero-title {
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  font-size: clamp(1.55rem, 7.5vw, 2.2rem);
  font-weight: 900;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 6px;
  text-align: center;
}
.hero-subtitle {
  font-size: clamp(0.85rem, 4vw, 1rem);
  font-weight: 500;
  color: #565656;
  text-align: center;
  margin-bottom: 16px;
}

/* ── Search ───────────────────────────────── */
.search-container { width: 100%; }

.search-bar {
  display: flex;
  align-items: center;
  background: var(--white);
  border-radius: var(--r-pill);
  border: 1px solid #e0e3e7;
  box-shadow: 0 4px 18px rgba(15,23,42,0.09);
  height: 52px;
  padding: 0 6px 0 16px;
  direction: rtl;
  gap: 0;
}
.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  text-align: right;
  direction: rtl;
  padding: 0 10px;
}
.search-input::placeholder { color: var(--text-light); }

.search-btn {
  flex-shrink: 0;
  width: 42px; height: 42px;
  background: var(--yellow);
  color: #111;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: transform 0.15s;
}
.search-btn:hover { transform: scale(1.05); }

.search-left-icon {
  flex-shrink: 0;
  color: #aaa;
  font-size: 1rem;
  margin-inline-start: 8px;
}

/* AI assistant row */
.ai-assistant-row {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  margin-top: 10px;
  background: var(--white);
  border-radius: var(--r-pill);
  padding: 0 16px;
  border: 1px solid #e0e3e7;
  box-shadow: 0 4px 18px rgba(15,23,42,0.09);
  direction: rtl;
}
.ai-avatar {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, #2bc6d2, #7868f2);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1rem;
  flex-shrink: 0;
}
.ai-text {
  flex: 1;
  color: #343434;
  font-size: 0.78rem;
  font-weight: 700;
  margin: 0;
  text-align: right;
}
.ai-text strong { color: #202020; }
.ai-bubbles { display: flex; gap: 4px; margin-inline-start: auto; align-items: center; }
.ai-bubbles span {
  width: 8px; height: 8px; border-radius: 50%;
  animation: aiBounce 1.4s ease-in-out infinite;
}
.ai-bubbles span:nth-child(1) { background: #55d7d0; animation-delay: 0s; }
.ai-bubbles span:nth-child(2) { background: #60a5fa; animation-delay: 0.2s; }
.ai-bubbles span:nth-child(3) { background: #ec5fb6; animation-delay: 0.4s; }

@keyframes aiBounce {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.5; }
  40%           { transform: scale(1);   opacity: 1;   }
}

/* AI Suggestions Row Styling */
.ai-suggestions-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
  direction: rtl;
}
.ai-suggestions-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.ai-suggestions-label i {
  color: var(--green);
  font-size: 0.8rem;
}
.ai-suggestions-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ai-badge {
  font-family: var(--font);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--green);
  background: rgba(17,147,74,0.05);
  border: 1px solid rgba(17,147,74,0.12);
  border-radius: var(--r-pill);
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}
.ai-badge:hover {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(17,147,74,0.18);
}

/* ═══════════════════════════════════════════
   CATEGORIES
═══════════════════════════════════════════ */
.categories-section {
  background: transparent;
  margin-top: 8px;
  padding: 14px 14px 12px;
  border-top: none;
}
.categories-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.categories-scroll::-webkit-scrollbar { display: none; }

.categories-slider-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 75px;
  padding: 11px 8px 10px;
  background: var(--white);
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.15s;
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}
.cat-card:hover {
  border-color: var(--green-mid);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.cat-card.active {
  background: var(--green-bg);
  border-color: var(--green);
}
.cat-card.active .cat-icon { color: var(--green); }
.cat-card.active .cat-name { color: var(--green); }
.cat-card.active .cat-count { color: var(--green-light); }

.cat-icon {
  font-size: 1.35rem;
  color: var(--text-muted);
  line-height: 1;
  transition: color 0.2s;
}
.cat-card:hover .cat-icon { color: var(--green); }

.cat-name {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  white-space: nowrap;
  line-height: 1.2;
}
.cat-count {
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--text-light);
  text-align: center;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════
   PRODUCT / BROCHURE SECTIONS
═══════════════════════════════════════════ */
.products-section,
.brochures-section {
  background: var(--white);
  margin-top: 8px;
  padding: 14px 0 10px;
}

/* Section header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px 10px;
  flex-wrap: wrap;
  gap: 6px;
}
.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
}
.section-title {
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  font-size: 0.93rem;
  font-weight: 800;
  color: var(--text);
}
.section-badge {
  background: var(--green-bg);
  color: var(--green);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}
.badge-blue { background: #e3f2fd; color: #1565c0; }
.badge-pink { background: #fce4ec; color: #ad1457; }

.view-all-btn {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--green);
  padding: 4px 11px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--green);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: all 0.2s;
}
.view-all-btn:hover { background: var(--green); color: #fff; }

/* Slider wrapper */
.products-slider-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.products-slider {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 14px 8px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  flex: 1;
}
.products-slider::-webkit-scrollbar { display: none; }

/* Slider arrows */
.slider-arrow {
  position: absolute;
  z-index: 5;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 0.7rem;
  top: 50%; transform: translateY(-50%);
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.slider-arrow:hover { background: var(--green); color: #fff; border-color: var(--green); }
.arrow-prev { right: 2px; }
.arrow-next { left: 2px; }

/* Slider dots */
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  padding: 6px 0 2px;
}
.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.3s;
  cursor: pointer;
}
.dot.active { background: var(--green); width: 18px; border-radius: 3px; }

/* ── Product Card ─────────────────────────── */
.product-card {
  min-width: 130px;
  max-width: 130px;
  background: var(--card-bg);
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  overflow: hidden;
  scroll-snap-align: start;
  flex-shrink: 0;
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

.product-img-wrap {
  position: relative;
  height: 112px;
  overflow: hidden;
  background: #f9f9f9;
}
/* Real product image */
.product-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 6px;
}
/* Placeholder fallback */
.product-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.prod-img-lbl {
  font-size: 0.58rem;
  font-weight: 700;
  margin-top: 2px;
}

/* Discount badge */
.discount-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--red);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 6px;
  z-index: 2;
}

/* Heart button */
.heart-btn {
  position: absolute;
  top: 5px; left: 5px;
  width: 26px; height: 26px;
  background: rgba(255,255,255,0.92);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-light);
  font-size: 0.74rem;
  z-index: 2;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s;
}
.heart-btn:hover { color: var(--red); }
.heart-btn.liked { color: var(--red); }
.heart-btn.liked i::before { font-weight: 900; }

/* Product info */
.product-info { padding: 8px 10px 10px; }
.product-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-offers {
  font-size: 0.63rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 3px;
}
.product-offers i { color: var(--yellow-dark); }
.product-stores {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--green);
  background: var(--green-bg);
  padding: 2px 7px;
  border-radius: 12px;
}

/* ── Brochure Card ────────────────────────── */
.brochure-card {
  min-width: 130px;
  max-width: 130px;
  background: var(--card-bg);
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  overflow: hidden;
  scroll-snap-align: start;
  flex-shrink: 0;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
}
.brochure-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

.brochure-img-area {
  height: 96px;
  overflow: hidden;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brochure-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.brochure-store-lbl {
  font-size: 1.1rem;
  font-weight: 900;
  color: rgba(255,255,255,0.95);
  text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.brochure-info { padding: 8px 10px 10px; }
.brochure-store { font-size: 0.74rem; font-weight: 800; color: var(--text); margin-bottom: 2px; }
.brochure-validity { font-size: 0.63rem; color: var(--green); font-weight: 600; margin-bottom: 4px; }
.brochure-date {
  font-size: 0.58rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 3px;
}
.brochure-date i { color: var(--yellow-dark); }

/* ═══════════════════════════════════════════
   RETAILERS SECTION
═══════════════════════════════════════════ */
.retailers-section {
  background: var(--white);
  margin-top: 8px;
  padding: 14px 0 18px;
}
.retailers-section .section-header {
  padding: 0 14px 12px;
}

.retailers-carousel-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
}
.retailers-track-outer {
  flex: 1;
  overflow: hidden;
}
.retailers-track {
  display: flex;
  gap: 0;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.retailer-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  flex: 0 0 25%;
  padding: 6px 4px;
  cursor: pointer;
  transition: transform 0.2s;
  text-decoration: none;
}
.retailer-item:hover { transform: scale(1.06); }

/* Logo circle */
.retailer-logo-circle {
  width: 66px; height: 66px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.retailer-logo-circle img {
  width: 80%;
  height: 80%;
  object-fit: contain;
}
.retailer-logo-circle.ret-extra-bg {
  background: #fff3e0;
}
.ret-text {
  font-size: 0.65rem;
  font-weight: 900;
  text-align: center;
}

.retailer-name {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
}

/* Carousel arrows */
.ret-arrow {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--white);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 0.72rem;
  flex-shrink: 0;
  transition: all 0.2s;
}
.ret-arrow:hover { background: var(--green); color: #fff; border-color: var(--green); }
.ret-arrow:disabled { opacity: 0.3; cursor: default; pointer-events: none; }

/* ═══════════════════════════════════════════
   BENEFITS
═══════════════════════════════════════════ */
.benefits-section {
  background: var(--white);
  margin-top: 8px;
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px;
  background: var(--bg);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
}
.benefit-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--green-bg);
  color: var(--green);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.benefit-icon.refresh-icon { background: #e3f2fd; color: #1565c0; }
.benefit-icon.money-icon   { background: #fff8e1; color: #f9a825; }
.benefit-icon.ai-icon      { background: #f3e5f5; color: #6a1b9a; }
.benefit-title {
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.benefit-desc {
  font-family: 'Cairo', sans-serif;
  font-size: 0.65rem;
  color: var(--text-light);
  line-height: 1.4;
}

/* ═══════════════════════════════════════════
   BOTTOM NAVIGATION
═══════════════════════════════════════════ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  height: var(--bnav-h);
  background: var(--white);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  z-index: 180;
  box-shadow: 0 -3px 14px rgba(0,0,0,0.07);
  padding: 0 4px;
}
.bnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-light);
  font-size: 0.58rem;
  font-weight: 600;
  padding: 6px 6px;
  border-radius: 0;
  transition: color 0.2s;
  flex: 1;
  position: relative;
}
.bnav-item i { font-size: 1.18rem; }
.bnav-item:hover,
.bnav-item.active { color: var(--green); }
/* Active indicator top line */
.bnav-item.active::before {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 2.5px;
  background: var(--green);
  border-radius: 0 0 3px 3px;
}

/* Center green bubble floats above the nav bar */
.bnav-center {
  position: relative;
  overflow: visible;
}
.bnav-center-btn {
  width: 50px; height: 50px;
  background: linear-gradient(145deg, #14a855, #0f7a3e);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  box-shadow: 0 -2px 18px rgba(17,147,74,0.45), 0 4px 12px rgba(17,147,74,0.3);
  margin-top: -18px;
  margin-bottom: 2px;
  border: 3px solid var(--white);
}

/* ═══════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroFloat {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-6px); }
}
.hero-basket-img {
  animation: heroFloat 3.5s ease-in-out infinite;
}
.products-section,
.brochures-section,
.categories-section,
.retailers-section,
.benefits-section {
  animation: fadeUp 0.45s ease both;
}

/* ═══════════════════════════════════════════
   RESPONSIVE — TABLET (≥ 600px)
═══════════════════════════════════════════ */
@media (min-width: 600px) {
  /* Header */
  .header-inner { padding: 10px 20px; }
  .logo-link img { width: 120px; }
  .location-select { max-width: 250px; }

  /* Hero */
  .hero-bg { padding: 8px 20px 24px; }
  .hero-title { font-size: clamp(1.7rem, 5vw, 2.4rem); }
  .hero-subtitle { font-size: clamp(0.9rem, 2.5vw, 1.05rem); }
  .search-bar { height: 56px; }
  .search-btn { width: 46px; height: 46px; }
  .ai-assistant-row { height: 56px; }

  /* Hero basket */
  .hero-basket-col { min-height: 260px; }
  .hero-basket-img { width: min(80vw, 400px); }
  .discount-badge-hero {
    width: 98px; height: 86px;
    top: 12px;
    left: calc(50% - 200px);
  }
  .badge-top { font-size: 1rem; }
  .badge-pct { font-size: 1.75rem; }
  .hero-percent {
    width: 36px; height: 36px;
    font-size: 1rem;
    left: calc(50% - 206px);
    bottom: 46px;
  }
  .spark-a { top: 56px; right: calc(50% - 190px); font-size: 1.5rem; }
  .spark-b { top: 116px; right: calc(50% - 210px); font-size: 1rem; }

  /* Cards */
  .product-card { min-width: 148px; max-width: 148px; }
  .product-img-wrap { height: 128px; }
  .brochure-card { min-width: 148px; max-width: 148px; }
  .brochure-img-area { height: 108px; }

  /* Categories */
  .categories-section { padding: 14px 20px 12px; }
  .cat-card { min-width: 80px; padding: 11px 9px; }
  .cat-icon { font-size: 1.5rem; }
  .cat-name { font-size: 0.7rem; }

  /* Retailers */
  .retailer-logo-circle { width: 72px; height: 72px; }
  .retailer-name { font-size: 0.68rem; }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — DESKTOP (≥ 768px)
═══════════════════════════════════════════ */
@media (min-width: 768px) {
  /* No bottom nav on desktop/tablet landscape */
  .bottom-nav { display: none; }
  .main-content { padding-bottom: 0; }

  /* Header */
  :root { --header-h: 64px; }
  .header-inner { padding: 12px 28px; }
  .icon-btn { width: 44px; height: 44px; font-size: 1.1rem; }
  .location-select { max-width: 280px; height: 44px; font-size: 0.82rem; gap: 8px; }
  .logo-link img { width: 130px; }

  /* Hero: side by side with proper beige blob */
  .hero-bg {
    background: var(--white);
    padding: 0 32px 18px;
  }
  .hero-layout {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    min-height: 360px;
  }
  .hero-basket-col {
    flex: 0 0 42%;
    min-height: 340px;
  }
  .hero-text-col {
    flex: 1;
    max-width: 56%;
  }
  .hero-title { text-align: right; font-size: clamp(1.85rem, 3.5vw, 2.8rem); }
  .hero-subtitle { text-align: right; }

  /* Basket positioning */
  .hero-basket-img { width: min(100%, 380px); }
  .discount-badge-hero {
    top: 24px;
    right: 10px;
    left: auto;
    width: 106px; height: 94px;
  }
  .badge-top { font-size: 1.1rem; }
  .badge-pct { font-size: 2rem; }
  .hero-percent {
    bottom: 72px;
    right: -2px;
    left: auto;
    width: 42px; height: 42px;
    font-size: 1.1rem;
  }
  .spark-a { top: 76px; left: 12px; right: auto; font-size: 1.6rem; }
  .spark-b { top: 150px; left: -4px; right: auto; font-size: 1.1rem; }

  /* Product cards */
  .product-card { min-width: 162px; max-width: 162px; }
  .product-img-wrap { height: 140px; }
  .brochure-card { min-width: 162px; max-width: 162px; }
  .brochure-img-area { height: 118px; }

  .products-slider { padding: 4px 28px 10px; gap: 12px; }
  .section-header { padding: 0 28px 12px; }

  /* Retailers */
  .retailer-item { flex: 0 0 20%; }
  .retailer-logo-circle { width: 76px; height: 76px; }

  /* Benefits */
  .benefits-section {
    grid-template-columns: repeat(4, 1fr);
    padding: 16px 28px;
  }

  /* Categories */
  .categories-section { padding: 14px 28px 12px; }
  .categories-scroll {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 12px;
    padding: 16px;
    overflow-x: visible;
  }
  .cat-card {
    min-width: 0;
    width: 100%;
  }
  .categories-slider-wrap .slider-arrow {
    display: none !important;
  }

  /* Arrow bigger */
  .slider-arrow { width: 32px; height: 32px; font-size: 0.8rem; }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — LARGE DESKTOP (≥ 1100px)
═══════════════════════════════════════════ */
@media (min-width: 1100px) {
  :root { --header-h: 72px; }
  .header-inner { padding: 14px 48px; }
  .icon-btn { width: 48px; height: 48px; }
  .location-select { max-width: 320px; height: 48px; font-size: 0.88rem; }
  .logo-link img { width: 150px; }

  /* Hero */
  .hero-bg {
    padding: 0 48px 22px;
    background: var(--white);
  }
  .hero-layout { min-height: 440px; gap: 40px; }
  .hero-basket-col { flex: 0 0 44%; min-height: 420px; }
  .hero-basket-img { width: min(100%, 480px); }
  .hero-title { font-size: clamp(2.2rem, 3vw, 3.2rem); }
  .hero-subtitle { font-size: 1.1rem; }
  .search-bar { height: 62px; }
  .search-btn { width: 52px; height: 52px; font-size: 1.1rem; }
  .ai-assistant-row { height: 62px; }

  /* Cards */
  .product-card { min-width: 180px; max-width: 180px; }
  .product-img-wrap { height: 155px; }
  .brochure-card { min-width: 180px; max-width: 180px; }
  .brochure-img-area { height: 132px; }

  .products-slider { padding: 4px 48px 10px; gap: 14px; }
  .section-header { padding: 0 48px 14px; }
  .categories-section { padding: 14px 48px 12px; }
  .categories-scroll {
    gap: 16px;
    padding: 20px;
  }
  .retailer-item { flex: 0 0 12.5%; }
  .benefits-section { padding: 18px 48px; }
}

/* ═══════════════════════════════════════════
   EXTRA SMALL (< 375px)
═══════════════════════════════════════════ */
@media (max-width: 374px) {
  .hero-title { font-size: 1.4rem; }
  .hero-subtitle { font-size: 0.8rem; }
  .product-card { min-width: 118px; max-width: 118px; }
  .cat-card { min-width: 66px; }
}

/* ──────────── CUSTOM FOOTER ──────────── */
.app-footer-custom {
  background: var(--white);
  border-top: 1.5px solid var(--border);
  padding: 32px 0 calc(var(--bnav-h) + 16px); /* Clear mobile bottom navigation */
  text-align: center;
  box-sizing: border-box;
  font-family: 'Cairo', sans-serif !important;
}

.footer-inner-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 14px;
  box-sizing: border-box;
  width: 100%;
}

.footer-sec-title {
  font-family: 'Cairo', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  color: #3b4252;
  margin-bottom: 12px;
}

/* Footer Top Row layout (Download & Social Columns) */
.footer-top-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
}

.footer-download-block {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-social-block {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* App download badges row */
.app-download-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
  direction: ltr; /* Badges order left-to-right: App Store, Google Play, AppGallery */
  flex-wrap: nowrap; /* Ensure they remain in a single row on mobile */
}

.app-download-btn {
  background: #000000;
  color: #ffffff;
  border-radius: 6px;
  padding: 5px 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  width: 108px;
  height: 38px;
  box-sizing: border-box;
  cursor: pointer;
  border: 1px solid #222;
  text-decoration: none;
  transition: background 0.2s;
}

.app-download-btn:hover {
  background: #151515;
  color: #ffffff;
}

.btn-logo {
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.apple-logo {
  color: #ffffff;
}

.huawei-logo {
  color: #ea1d22;
}

.play-logo {
  color: #3ddc84;
}

.btn-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.1;
  flex: 1;
}

.btn-text .text-top {
  font-size: 0.38rem;
  font-weight: 500;
  color: #aaa;
}

.btn-text .text-bot {
  font-size: 0.62rem;
  font-weight: 700;
  font-family: sans-serif;
}

.footer-social-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 0;
  direction: ltr; /* Match the layout order visually */
}

/* Brand Colored Social Icons */
.social-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff !important;
  font-size: 1rem;
  transition: all 0.2s ease;
  text-decoration: none;
  box-shadow: 0 2px 5px rgba(0,0,0,0.06);
}

.social-circle.sc-facebook {
  background-color: #1877f2;
}

.social-circle.sc-x {
  background-color: #000000;
}

.social-circle.sc-instagram {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}

.social-circle.sc-linkedin {
  background-color: #0077b5;
}

.social-circle:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  filter: brightness(1.08);
}

/* Bottom grey background section */
.footer-bottom-container {
  background-color: #f7f9fa;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  margin-top: 24px;
  width: 100%;
}

.footer-bottom-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.footer-copyright {
  font-family: 'Cairo', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #718096;
  margin-bottom: 0;
  text-align: center;
}

.pay-badges-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
  flex-wrap: wrap;
  direction: ltr; /* LTR ordering of payment badges */
}

.pay-badge {
  height: 26px;
  width: 48px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  flex-shrink: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.mada-badge {
  background: #fff;
  border: 1px solid #e2e8f0;
  padding: 2px 4px;
}

.mada-logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
  height: 100%;
}

.mada-icon {
  position: relative;
  width: 12px;
  height: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
}

.mada-blue-wave {
  width: 100%;
  height: 4px;
  background: #0077b5;
  border-radius: 3px 3px 0 0;
}

.mada-green-wave {
  width: 100%;
  height: 4px;
  background: #8cc63f;
  border-radius: 0 0 3px 3px;
}

.mada-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 0.95;
  font-family: 'Cairo', sans-serif;
  margin-top: -1px;
}

.mada-ar {
  font-size: 0.35rem;
  font-weight: 900;
  color: #0077b5;
}

.mada-en {
  font-size: 0.3rem;
  font-weight: 800;
  color: #4a5568;
  letter-spacing: -0.2px;
}

.mc-badge {
  background: #fff;
  position: relative;
  border: 1px solid #e2e8f0;
}

.mc-badge::before, .mc-badge::after {
  content: '';
  width: 13px;
  height: 13px;
  border-radius: 50%;
  position: absolute;
  top: 5px;
}

.mc-badge::before {
  background: #ff5f00;
  left: 12px;
  z-index: 2;
}

.mc-badge::after {
  background: #eb001b;
  left: 20px;
  z-index: 1;
  opacity: 0.95;
}

.visa-badge {
  background: #1a1f71;
  color: #fff;
  font-family: 'Arial', sans-serif;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.5px;
  font-size: 0.6rem;
  border-color: #1a1f71;
}

.tabby-badge {
  background: #00e5a3;
  color: #000000;
  font-family: 'Arial', sans-serif;
  font-weight: 900;
  font-size: 0.55rem;
  border-color: #00e5a3;
}

.tamara-badge {
  background: linear-gradient(135deg, #fcd5e3 0%, #e2b6d5 100%);
  color: #3b2a56;
  font-family: 'Arial', sans-serif;
  font-weight: 900;
  font-size: 0.52rem;
  border-color: #e5b3c3;
}

.amex-badge {
  background: #016fd0;
  color: #fff;
  font-family: 'Arial', sans-serif;
  font-weight: 900;
  font-size: 0.52rem;
  border-color: #016fd0;
}

.cod-badge {
  border: 1px solid #4cbd5a;
  color: #4cbd5a;
  background: #fff;
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
  font-size: 0.58rem;
}

.footer-links-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px 20px;
  flex-wrap: wrap;
  margin-inline: 0;
  max-width: none;
}

.footer-link-item {
  font-family: 'Cairo', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #4a5568;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-link-item:hover {
  color: var(--green);
}

.footer-legal-row-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1.5px solid var(--border);
  padding-top: 16px;
  margin-top: 16px;
  width: 100%;
  box-sizing: border-box;
}

.footer-legal-text {
  font-family: 'Cairo', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: #718096;
  text-align: right;
  line-height: 1.5;
}

.back-to-top-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #3b4252;
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  font-size: 0.85rem;
}

.back-to-top-btn:hover {
  background: var(--green);
  transform: translateY(-2px);
}

@media (max-width: 767px) {
  .footer-legal-row-wrap {
    flex-direction: column-reverse;
    gap: 12px;
    align-items: center;
    text-align: center;
    border-top: 1px solid var(--border);
    padding-top: 12px;
    margin-top: 12px;
  }
  .footer-legal-text {
    text-align: center;
    padding: 0 10px;
  }
}

/* Responsive Desktop styles */
@media (min-width: 768px) {
  .app-footer-custom {
    padding: 40px 0 24px; /* remove bottom navigation padding on desktop */
  }

  .footer-top-row {
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: flex-start;
  }

  .footer-social-block {
    align-items: flex-end; /* social block is on the left now */
  }

  .footer-download-block {
    align-items: flex-start; /* download block is on the right now */
  }

  .app-download-row {
    gap: 12px;
  }

  .app-download-btn {
    width: 132px;
    padding: 6px 12px;
    gap: 8px;
  }

  .btn-logo {
    font-size: 1.1rem;
  }

  .btn-text .text-top {
    font-size: 0.42rem;
  }

  .btn-text .text-bot {
    font-size: 0.68rem;
  }

  .footer-bottom-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .footer-copyright {
    text-align: right;
  }

  .footer-links-row {
    justify-content: flex-end;
  }
}

/* Eid Banner Section styling */
.eid-banner-section {
  padding: 0 14px;
  margin-top: 14px;
  margin-bottom: 14px;
  width: 100%;
  box-sizing: border-box;
}
.eid-banner-container {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.eid-banner-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}
@media (min-width: 768px) {
  .eid-banner-section {
    padding: 0 28px;
    margin-top: 20px;
    margin-bottom: 20px;
  }
}
@media (min-width: 1024px) {
  .eid-banner-section {
    padding: 0 48px;
    margin-top: 24px;
    margin-bottom: 24px;
  }
  .eid-banner-container {
    max-width: 1000px; /* Resize and cap the width on desktop */
    margin: 0 auto;    /* Center the banner on desktop */
  }
}
