/* ==========================================================
   Fetchli — نظام التصميم العصري (Modern Design System)
   تصميم حديث، نظيف، وموثوق لمقارنة أسعار التسوق والسفر
   يدعم الوضع الفاتح والوضع الداكن بدون ألوان AI نمطية
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

/* ═══════════════ متغيرات الألوان والتصميم ═══════════════ */
:root {
  /* الوضع الفاتح (Light Mode - الافتراضي) */
  --bg-page:        #f8fafc;
  --bg-surface:     #ffffff;
  --bg-card:        #ffffff;
  --bg-card-hover:  #f1f5f9;
  --bg-subtle:      #f1f5f9;
  --bg-input:       #ffffff;
  --bg-overlay:     rgba(15, 23, 42, 0.6);

  --text-main:      #0f172a;
  --text-secondary: #334155;
  --text-muted:     #64748b;
  --text-subtle:    #94a3b8;
  --text-inverse:   #ffffff;

  --primary:        #2563eb;
  --primary-hover:  #1d4ed8;
  --primary-light:  #eff6ff;
  --primary-subtle: #f0f7ff;
  --primary-border: #bfdbfe;

  --shop:           #1e40af;
  --shop-dark:      #1e3a8a;
  --travel:         #0284c7;
  --travel-dark:    #0369a1;

  --accent-green:   #059669;
  --accent-green-bg:#ecfdf5;
  --accent-green-border:#a7f3d0;
  --accent-amber:   #d97706;
  --accent-amber-bg:#fef3c7;
  --accent-rose:    #e11d48;
  --accent-rose-bg: #fff1f2;

  --border:         #e2e8f0;
  --border-subtle:  #f1f5f9;
  --border-hover:   #cbd5e1;
  --border-active:  #2563eb;

  --nav-bg:         rgba(255, 255, 255, 0.94);
  --nav-border:     #e2e8f0;

  --hero-gradient:  radial-gradient(100% 100% at 50% 0%, #eff6ff 0%, #f8fafc 100%);
  --hero-accent:    #2563eb;

  --shadow-xs:      0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm:      0 2px 5px rgba(15, 23, 42, 0.05);
  --shadow-md:      0 6px 16px -2px rgba(15, 23, 42, 0.08);
  --shadow-lg:      0 14px 30px -4px rgba(15, 23, 42, 0.12);
  --shadow-card:    0 1px 3px rgba(15, 23, 42, 0.05), 0 10px 25px -5px rgba(15, 23, 42, 0.04);

  --radius-sm:      8px;
  --radius-md:      12px;
  --radius-lg:      16px;
  --radius-xl:      22px;
  --radius-full:    9999px;

  color-scheme: light;
}

/* الوضع الداكن (Dark Mode) */
[data-theme="dark"] {
  --bg-page:        #090d16;
  --bg-surface:     #0f172a;
  --bg-card:        #131d31;
  --bg-card-hover:  #1c2842;
  --bg-subtle:      #172338;
  --bg-input:       #0d1424;
  --bg-overlay:     rgba(3, 7, 18, 0.85);

  --text-main:      #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted:     #94a3b8;
  --text-subtle:    #64748b;
  --text-inverse:   #090d16;

  --primary:        #3b82f6;
  --primary-hover:  #60a5fa;
  --primary-light:  #1e3a8a;
  --primary-subtle: #172554;
  --primary-border: #1e40af;

  --shop:           #3b82f6;
  --shop-dark:      #2563eb;
  --travel:         #38bdf8;
  --travel-dark:    #0284c7;

  --accent-green:   #10b981;
  --accent-green-bg:rgba(16, 185, 129, 0.15);
  --accent-green-border:rgba(16, 185, 129, 0.3);
  --accent-amber:   #f59e0b;
  --accent-amber-bg:rgba(245, 158, 11, 0.15);
  --accent-rose:    #fb7185;
  --accent-rose-bg: rgba(251, 113, 133, 0.15);

  --border:         #1e293b;
  --border-subtle:  #162033;
  --border-hover:   #334155;
  --border-active:  #3b82f6;

  --nav-bg:         rgba(9, 13, 22, 0.94);
  --nav-border:     #1e293b;

  --hero-gradient:  radial-gradient(100% 100% at 50% 0%, #111a2e 0%, #090d16 100%);
  --hero-accent:    #3b82f6;

  --shadow-xs:      0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm:      0 2px 5px rgba(0, 0, 0, 0.3);
  --shadow-md:      0 6px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg:      0 16px 36px rgba(0, 0, 0, 0.6);
  --shadow-card:    0 4px 20px rgba(0, 0, 0, 0.4);

  color-scheme: dark;
}

/* ═══════════════ القواعد العامة ═══════════════ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Cairo', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  overflow-x: hidden;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

[dir="ltr"] body {
  font-family: 'Plus Jakarta Sans', 'Cairo', system-ui, sans-serif;
}

::selection {
  background: var(--primary);
  color: #ffffff;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-page);
}

::-webkit-scrollbar-thumb {
  background: var(--border-hover);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ═══════════════ شريط التنقل (NAV) ═══════════════ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: 68px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--nav-border);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
  cursor: pointer;
  flex-shrink: 0;
  text-decoration: none;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #ffffff;
  font-weight: 900;
  font-size: 19px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.logo span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  flex: 1;
  justify-content: center;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 6px;
  position: relative;
  transition: color 0.2s ease;
  cursor: pointer;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
  opacity: 0;
  transform: scaleX(0.3);
  transition: all 0.2s ease;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-links a:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.loc-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* مبدل اللغات */
.lang-switcher {
  display: flex;
  gap: 2px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 3px;
}

.lang-btn {
  padding: 5px 10px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.lang-btn.active {
  background: var(--bg-surface);
  color: var(--primary);
  box-shadow: var(--shadow-xs);
}

/* زر تبديل الوضع (Light / Dark) */
.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

/* زر القائمة للشاشات الصغيرة (Hamburger Button) */
.hamburger-btn {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4.5px;
  padding: 0;
  transition: all 0.2s ease;
  color: var(--text-main);
  flex-shrink: 0;
}

.hamburger-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: all 0.25s ease;
}

.hamburger-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

/* ═══════════════ قسم الترحيب (HERO) ═══════════════ */
.hero {
  min-height: calc(100vh - 68px);
  padding-top: 68px;
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--hero-gradient);
  border-bottom: 1px solid var(--border);
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 44px 20px 24px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
  box-shadow: var(--shadow-xs);
  animation: fadeUp 0.4s ease both;
}

.hero-title {
  font-size: clamp(28px, 4.5vw, 50px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -1px;
  margin: 8px 0 16px;
  color: var(--text-main);
  animation: fadeUp 0.4s ease 0.08s both;
}

.accent, #heroAccent {
  color: var(--hero-accent);
}

.hero-sub {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 540px;
  line-height: 1.65;
  margin-bottom: 32px;
  animation: fadeUp 0.4s ease 0.15s both;
}

/* ═══════════════ اختيار النمط (MODE SELECTOR) ═══════════════ */
.mode-selector {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 16px;
  padding: 0 20px 30px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeUp 0.4s ease 0.2s both;
}

.mode-card {
  width: 175px;
  padding: 18px 16px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  background: var(--bg-surface);
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-xs);
}

.mode-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.mode-card.active-shop {
  border-color: var(--shop);
  background: var(--bg-surface);
  box-shadow: 0 0 0 1px var(--shop), var(--shadow-md);
}

.mode-card.active-travel {
  border-color: var(--travel);
  background: var(--bg-surface);
  box-shadow: 0 0 0 1px var(--travel), var(--shadow-md);
}

.mode-icon {
  font-size: 32px;
  margin-bottom: 8px;
  display: block;
}

.mode-label {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 3px;
}

.mode-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

.mode-check {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

[dir="ltr"] .mode-check {
  left: auto;
  right: 10px;
}

.active-shop .mode-check,
.active-travel .mode-check {
  opacity: 1;
}

.active-shop .mode-check {
  background: var(--shop);
  color: #ffffff;
}

.active-travel .mode-check {
  background: var(--travel);
  color: #ffffff;
}

/* ═══════════════ قسم البحث والمحادثة الذكية (CHAT / SEARCH) ═══════════════ */
.chat-section {
  position: relative;
  z-index: 2;
  padding: 0 16px 36px;
}

.chat-container {
  width: 90%;
  margin: 0 auto;
}

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

.chat-mode-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-green);
}

.chat-mode-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 700;
}

.chat-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.chat-area {
  min-height: 320px;
  max-height: 520px;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--bg-surface);
}

.chat-area::-webkit-scrollbar {
  width: 5px;
}

.chat-area::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-full);
}

.msg-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  animation: fadeUp 0.25s ease both;
}

.msg-row.user {
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}

.msg-avatar.ai {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary);
}

.msg-avatar.user {
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.msg-bubble {
  max-width: 78%;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  font-size: 13.5px;
  line-height: 1.6;
  white-space: pre-line;
}

.msg-bubble.ai {
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border);
  border-top-right-radius: 4px;
}

.msg-bubble.user {
  background: var(--primary);
  color: #ffffff;
  border-top-left-radius: 4px;
}

[dir="ltr"] .msg-bubble.ai {
  border-top-right-radius: var(--radius-lg);
  border-top-left-radius: 4px;
}

[dir="ltr"] .msg-bubble.user {
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: 4px;
}

.typing-bubble {
  display: flex;
  gap: 5px;
  padding: 12px 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  border-top-right-radius: 4px;
  width: fit-content;
}

.typing-bubble span {
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  animation: bounce 0.8s infinite;
}

.typing-bubble span:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-bubble span:nth-child(3) {
  animation-delay: 0.3s;
}

.typing-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-5px); }
}

.chat-chips {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  overflow-x: auto;
  scrollbar-width: none;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-page);
}

.chat-chips::-webkit-scrollbar {
  display: none;
}

.chip {
  padding: 7px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-subtle);
}

.chat-input-row {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
}

.chat-input-row input {
  flex: 1;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chat-input-row input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.chat-input-row input::placeholder {
  color: var(--text-subtle);
}

.img-btn {
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 14px;
  cursor: pointer;
  font-size: 16px;
  height: 46px;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
}

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

.currency-select,
.sort-select {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
  min-width: 90px;
}

.currency-select:focus,
.sort-select:focus {
  border-color: var(--primary);
}

.send-btn {
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0 20px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  height: 46px;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
}

.send-btn.shop-send {
  background: var(--shop);
}

.send-btn.shop-send:hover {
  background: var(--shop-dark);
}

.send-btn.travel-send {
  background: var(--travel);
}

.send-btn.travel-send:hover {
  background: var(--travel-dark);
}

/* ═══════════════ بطاقات المنتجات والنتائج (PRODUCTS) ═══════════════ */
.store-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 2px 8px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  font-size: 13.5px;
  font-weight: 700;
}

.store-sort-tag {
  margin-inline-start: auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.products-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 6px;
  width: 100%;
}

@media (min-width: 600px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

.product-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xs);
  position: relative;
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.product-img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  background: #ffffff;
  padding: 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.product-body {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-name {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 4px;
  color: var(--text-main);
  max-height: 2.4em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-store {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.rating {
  font-size: 10px;
  color: var(--accent-amber);
  font-weight: 700;
}

.product-price {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--accent-green);
  margin-bottom: 6px;
  margin-top: auto;
  line-height: 1.2;
}

.product-actions {
  display: flex;
  gap: 6px;
}

.btn-details,
.btn-buy {
  flex: 1;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 6px 8px;
  text-align: center;
  cursor: pointer;
  border: none;
  font-family: inherit;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
}

.btn-details {
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border);
}

.btn-details:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.btn-buy {
  color: #ffffff;
  background: var(--primary);
}

.btn-buy:hover {
  background: var(--primary-hover);
}

.btn-buy-aliexpress {
  background: #e62e04;
}

.btn-buy-aliexpress:hover {
  background: #c82400;
}

.btn-buy-amazon {
  background: #ff9900;
  color: #111827;
}

.btn-buy-amazon:hover {
  background: #e68a00;
}

/* ═══════════════ شريط الأرقام والإحصائيات (STATS) ═══════════════ */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 48px;
  padding: 32px 20px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}

.stat-item {
  text-align: center;
}

.stat-num {
  font-size: 30px;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -1px;
}

.stat-num span {
  color: var(--primary);
}

.stat-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ═══════════════ شركاء الأسعار (TRUSTED) ═══════════════ */
.trusted {
  padding: 28px 20px;
  text-align: center;
  background: var(--bg-page);
}

.trusted-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
  font-weight: 800;
}

.trusted-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.trusted-logo {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 8px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  transition: all 0.2s ease;
  cursor: default;
  box-shadow: var(--shadow-xs);
}

.trusted-logo:hover {
  color: var(--primary);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

/* ═══════════════ التخطيط الرئيسي (MAIN LAYOUT) ═══════════════ */
.main-layout {
  max-width: 1160px;
  margin: 0 auto;
  padding: 50px 20px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
}

.section-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
}

.section-title::before {
  content: '';
  width: 4px;
  height: 20px;
  border-radius: 4px;
  display: inline-block;
  flex-shrink: 0;
  background: var(--primary);
}

/* بطاقات العروض (Deals) */
.deals-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 44px;
}

.deal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
  box-shadow: var(--shadow-xs);
}

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

.deal-icon {
  font-size: 30px;
}

.deal-body {
  padding: 16px;
}

.deal-title {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 6px;
  line-height: 1.4;
  color: var(--text-main);
}

.deal-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--accent-green);
  display: flex;
  align-items: center;
  gap: 8px;
}

.deal-save {
  background: var(--accent-amber-bg);
  color: var(--accent-amber);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

/* بطاقات المقالات (Articles) */
.articles-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.article-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  gap: 16px;
  align-items: center;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-xs);
}

.article-card:hover {
  border-color: var(--primary);
  transform: translateX(-4px);
  box-shadow: var(--shadow-sm);
}

[dir="ltr"] .article-card:hover {
  transform: translateX(4px);
}

.article-thumb,
.article-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  background: var(--bg-subtle);
  object-fit: cover;
  border: 1px solid var(--border);
}

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

.article-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 4px;
  color: var(--text-main);
}

.article-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.article-excerpt {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.article-arrow {
  margin-inline-start: auto;
  color: var(--primary);
  font-size: 18px;
  font-weight: 800;
}

/* ═══════════════ الشريط الجانبي (SIDEBAR) ═══════════════ */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-widget {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-xs);
}

.widget-title {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--text-main);
}

.quick-search-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-search-form input,
.quick-search-form select {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  width: 100%;
  transition: border-color 0.2s ease;
}

.quick-search-form input:focus {
  border-color: var(--primary);
}

.qsearch-btn {
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 11px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  background: var(--primary);
  transition: background 0.2s ease;
}

.qsearch-btn:hover {
  background: var(--primary-hover);
}

.dest-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dest-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-page);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s ease;
}

.dest-item:hover {
  background: var(--primary-subtle);
  border-color: var(--primary);
}

.dest-icon {
  font-size: 18px;
  width: 26px;
  text-align: center;
  flex-shrink: 0;
}

.dest-info {
  flex: 1;
  min-width: 0;
}

.dest-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.dest-price {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-green);
}

/* بانر العروض الترويجي */
.promo-banner {
  border-radius: var(--radius-lg);
  padding: 22px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

.promo-title {
  font-size: 17px;
  font-weight: 900;
  margin-bottom: 6px;
}

.promo-sub {
  font-size: 13px;
  opacity: 0.9;
  margin-bottom: 16px;
}

.promo-btn {
  background: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 22px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  color: var(--primary);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.promo-btn:hover {
  transform: scale(1.04);
  box-shadow: var(--shadow-sm);
}

.tip-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ═══════════════ كيف يعمل الموقع (HOW IT WORKS) ═══════════════ */
.how-wrap {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}

.how-section {
  max-width: 1160px;
  margin: 0 auto;
  padding: 56px 20px;
  text-align: center;
}

.how-title {
  font-size: 26px;
  font-weight: 900;
  margin-bottom: 8px;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.how-sub {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 36px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.step-card {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 22px;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-xs);
}

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

.step-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  background: var(--primary);
}

.step-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.step-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-main);
}

.step-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ═══════════════ تذييل الصفحة (FOOTER) ═══════════════ */
footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 50px 20px 28px;
}

.footer-grid {
  max-width: 1160px;
  margin: 0 auto 36px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-top: 12px;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text-main);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a,
.footer-links li {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  max-width: 1160px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

/* ═══════════════ الصفحات الثابتة (PAGES) ═══════════════ */
.page-section {
  display: none;
  max-width: 820px;
  margin: 90px auto 60px;
  padding: 30px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.page-section.active {
  display: block;
}

.page-section h1 {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
  color: var(--text-main);
}

.page-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.page-section h2 {
  font-size: 18px;
  font-weight: 800;
  margin: 28px 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
}

.page-section h2::before {
  content: '';
  width: 4px;
  height: 18px;
  border-radius: 4px;
  background: var(--primary);
}

.page-section p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.95;
  margin-bottom: 14px;
  white-space: pre-line;
}

/* ═══════════════ محتوى الصفحات والمقالات المنسق (RICH CONTENT / CKEDITOR) ═══════════════ */
.rich-content {
  font-size: 15.5px;
  line-height: 1.9;
  color: var(--text-secondary);
}

.rich-content h1,
.rich-content h2,
.rich-content h3,
.rich-content h4 {
  color: var(--text-main);
  font-weight: 800;
  margin-top: 1.6em;
  margin-bottom: 0.6em;
  line-height: 1.35;
}

.rich-content h1 { font-size: 26px; }
.rich-content h2 { font-size: 22px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.rich-content h3 { font-size: 18px; }
.rich-content h4 { font-size: 16px; }

.rich-content p {
  margin-bottom: 1.2em;
}

.rich-content strong,
.rich-content b {
  color: var(--text-main);
  font-weight: 800;
}

.rich-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.rich-content a:hover {
  color: var(--primary-hover);
}

.rich-content ul,
.rich-content ol {
  margin-bottom: 1.4em;
  padding-inline-start: 24px;
}

.rich-content li {
  margin-bottom: 8px;
}

.rich-content blockquote {
  margin: 1.5em 0;
  padding: 16px 20px;
  background: var(--primary-subtle);
  border-inline-start: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  font-style: italic;
  color: var(--text-main);
}

.rich-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.8em 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}

.rich-content th,
.rich-content td {
  padding: 12px 16px;
  border: 1px solid var(--border);
  text-align: inherit;
}

.rich-content th {
  background: var(--bg-subtle);
  font-weight: 800;
  color: var(--text-main);
}

.rich-content tr:nth-child(even) td {
  background: var(--bg-page);
}

.rich-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 1.2em 0;
  border: 1px solid var(--border);
}

.rich-content code {
  background: var(--bg-subtle);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--primary);
  border: 1px solid var(--border);
}

/* بطاقات وتخطيط المقالات والصفحات المستقلة */
.standalone-container {
  max-width: 920px;
  margin: 90px auto 60px;
  padding: 0 20px;
  min-height: calc(100vh - 350px);
}

.page-header-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.page-badge-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-subtle);
  color: var(--primary);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
}

.page-main-title {
  font-size: clamp(26px, 5vw, 36px);
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--text-main);
  margin-bottom: 8px;
}

.page-meta-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12.5px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.page-body-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  box-shadow: var(--shadow-sm);
}

/* تصنيفات وشبكة المدونة المستقلة */
.blog-filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.blog-filter-btn {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.blog-filter-btn.active,
.blog-filter-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.blog-grid-standalone {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.blog-card-standalone {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

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

.blog-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.blog-card-placeholder {
  height: 140px;
  background: var(--primary-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

.blog-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-cat {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 6px;
}

.blog-card-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.45;
  margin-bottom: 8px;
}

.blog-card-excerpt {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-subtle);
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
  margin-top: auto;
}

@media (max-width: 640px) {
  .standalone-container {
    margin-top: 76px;
    padding: 0 14px;
  }
  .page-header-card,
  .page-body-card {
    padding: 24px 18px;
    border-radius: var(--radius-lg);
  }
}

/* ═══════════════ نافذة المعاينة السريعة (MINI STORE MODAL) ═══════════════ */
#ministore {
  background: var(--bg-overlay) !important;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

#ministore > div {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-lg);
  color: var(--text-main);
}

#ministore .ms-btn {
  display: block;
  text-align: center;
  background: var(--primary);
  color: #ffffff;
  padding: 13px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 800;
  transition: background 0.2s ease;
}

#ministore .ms-btn:hover {
  background: var(--primary-hover);
}

/* ═══════════════ الرسوم المتحركة ═══════════════ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ═══════════════ القائمة الجانبية للشاشات المحمولة (MOBILE DRAWER) ═══════════════ */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  width: min(340px, 86vw);
  background: var(--bg-surface);
  border-inline-start: 1px solid var(--border);
  z-index: 999;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

[dir="ltr"] .mobile-drawer {
  right: auto;
  left: 0;
  transform: translateX(-100%);
}

.mobile-drawer.active {
  transform: translateX(0);
}

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

.drawer-close-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.drawer-close-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.drawer-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.drawer-loc-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}

.drawer-loc-pill .drawer-curr {
  margin-inline-start: auto;
  font-size: 11px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  color: var(--primary);
}

.drawer-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drawer-nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  color: var(--text-main);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 700;
  transition: all 0.2s ease;
  cursor: pointer;
}

.drawer-nav li a:hover,
.drawer-nav li a:active {
  background: var(--primary-subtle);
  color: var(--primary);
}

.drawer-section-title {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.drawer-lang-switcher {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drawer-lang-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.drawer-lang-btn.active {
  background: var(--primary-subtle);
  border-color: var(--primary);
  color: var(--primary);
}

.drawer-theme-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  width: 100%;
}

.drawer-theme-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

/* ═══════════════ شريط التنقل السفلي للهواتف (MOBILE BOTTOM NAV) ═══════════════ */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  z-index: 900;
  align-items: center;
  justify-content: space-around;
  padding: 0 6px env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  flex: 1;
  max-width: 72px;
}

.bnav-icon {
  font-size: 18px;
  line-height: 1;
}

.bnav-label {
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
  color: var(--primary);
}

.bottom-nav-item.active .bnav-icon {
  transform: scale(1.1);
}

/* ═══════════════ التجاوب لكافة الشاشات (RESPONSIVE BREAKPOINTS) ═══════════════ */

/* 1. الشاشات الكبيرة والفائقة (Desktop / 4K >= 1440px) */
@media (min-width: 1440px) {
  .main-layout,
  .how-section,
  .footer-grid,
  .footer-bottom {
    max-width: 1280px;
  }
}

/* 2. الشاشات المتوسطة والأجهزة اللوحية (Tablet / iPad <= 1024px) */
@media (max-width: 1024px) {
  .main-layout {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 36px 20px;
  }
  .sidebar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

/* 3. شاشات التابلت العمودي والهواتف الكبيرة (<= 768px) */
@media (max-width: 768px) {
  body {
    padding-bottom: 74px; /* مساحة لحماية المحتوى من شريط التنقل السفلي */
  }
  nav {
    padding: 0 16px;
    height: 62px;
  }
  .nav-links {
    display: none;
  }
  .hamburger-btn {
    display: flex;
  }
  .mobile-bottom-nav {
    display: flex;
  }
  .hero {
    min-height: auto;
    padding-top: 62px;
    padding-bottom: 20px;
  }
  .hero-content {
    padding: 32px 16px 18px;
  }
  .hero-title {
    font-size: clamp(24px, 6vw, 38px);
  }
  .hero-sub {
    font-size: 14.5px;
    margin-bottom: 24px;
  }
  .mode-selector {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: 440px;
    gap: 12px;
    padding: 0 16px 20px;
    margin: 0 auto;
  }
  .mode-card {
    width: 100%;
    min-width: 0;
    padding: 16px 10px;
  }
  .mode-icon {
    font-size: 28px;
    margin-bottom: 6px;
  }
  .mode-label {
    font-size: 15px;
  }
  .mode-desc {
    font-size: 11px;
  }
  .stats-bar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 16px;
    padding: 24px 16px;
  }
  .stat-num {
    font-size: 26px;
  }
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .step-card {
    padding: 22px 18px;
  }
  .sidebar {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

/* 4. شاشات الهواتف الذكية القياسية (<= 480px) */
@media (max-width: 480px) {
  nav {
    padding: 0 12px;
  }
  .logo {
    font-size: 19px;
    gap: 8px;
  }
  .logo-mark {
    width: 32px;
    height: 32px;
    font-size: 16px;
    border-radius: 8px;
  }
  .nav-right .lang-switcher {
    display: none; /* توفير المساحة، متوفر في القائمة الجانبية بالكامل */
  }
  .loc-pill {
    padding: 5px 8px;
    font-size: 11px;
  }
  #locName {
    display: none; /* إظهار العلم فقط على الشاشات الضيقة */
  }
  .hero-content {
    padding: 24px 12px 14px;
  }
  .hero-badge {
    font-size: 12px;
    padding: 6px 14px;
    margin-bottom: 14px;
  }
  .hero-title {
    font-size: 24px;
    letter-spacing: -0.5px;
  }
  .hero-sub {
    font-size: 13.5px;
    line-height: 1.55;
    margin-bottom: 20px;
  }
  .mode-selector {
    gap: 10px;
    padding: 0 12px 18px;
  }
  .mode-card {
    padding: 12px 8px;
    border-radius: var(--radius-md);
  }
  .mode-icon {
    font-size: 24px;
  }
  .mode-label {
    font-size: 14px;
  }
  .mode-desc {
    font-size: 10px;
  }
  .chat-section {
    padding: 0 10px 24px;
  }
  .chat-area {
    min-height: 220px;
    max-height: 380px;
    padding: 16px 12px;
    gap: 10px;
  }
  .msg-bubble {
    max-width: 88%;
    padding: 10px 14px;
    font-size: 13px;
  }
  .chat-input-row {
    padding: 10px 12px;
    gap: 8px;
  }
  .chat-input-row input {
    font-size: 14px;
    padding: 10px 12px;
  }
  .img-btn,
  .send-btn {
    height: 42px;
  }
  .send-btn {
    padding: 0 16px;
  }
  .products-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .deals-grid {
    grid-template-columns: 1fr;
  }
  .deal-body {
    padding: 14px;
  }
  .article-card {
    padding: 12px;
    gap: 12px;
  }
  .article-thumb,
  .article-icon {
    width: 52px;
    height: 52px;
    font-size: 22px;
  }
  .article-title {
    font-size: 13.5px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 24px;
  }
  .footer-desc {
    margin: 10px auto 0;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
  }
  .page-section {
    margin: 75px auto 40px;
    padding: 22px 16px;
    border-radius: var(--radius-lg);
  }
  .page-section h1 {
    font-size: 24px;
  }
}

/* 5. شاشات الهواتف فائقة الصغر (<= 360px - Fold outer, compact screens) */
@media (max-width: 360px) {
  .loc-pill {
    display: none;
  }
  .mode-selector {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .mode-card {
    padding: 10px 6px;
  }
  .mode-desc {
    display: none;
  }
  .stats-bar {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ═══════════════ علامات المنتجات المميزة ═══════════════ */
.product-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  z-index: 2;
  backdrop-filter: blur(6px);
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.badge-best-price {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 1px 4px rgba(16, 185, 129, 0.35);
}

.badge-best-rating {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  box-shadow: 0 1px 4px rgba(245, 158, 11, 0.35);
}

.card-best-price {
  border: 1.5px solid #10b981 !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.12);
}

/* ═══════════════ لوجو بديل عند عدم وجود صورة ═══════════════ */
.product-logo-fallback {
  width: 100%;
  height: 100%;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background: linear-gradient(135deg, #1e293b, #334155);
  border-radius: 8px 8px 0 0;
}

/* ═══════════════ تحسينات البطاقات ═══════════════ */
.product-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* ═══════════════ بطاقة أفضل سعر (Best Deal) ═══════════════ */
.img-preview {
  max-width: 180px;
  max-height: 180px;
  border-radius: 12px;
  border: 2px solid var(--border);
  object-fit: cover;
  margin-top: 4px;
  box-shadow: var(--shadow-sm);
}

.best-deal-card {
  background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
  border: 1.5px solid #10b981;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  position: relative;
  box-shadow: 0 2px 12px rgba(16, 185, 129, 0.1);
}

.best-deal-badge {
  position: absolute;
  top: -1px;
  right: 12px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
  letter-spacing: 0.02em;
}

.best-deal-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.best-deal-product {
  display: flex;
  align-items: center;
  gap: 10px;
}

.best-deal-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 8px;
  background: white;
  border: 1px solid #e2e8f0;
  padding: 4px;
  flex-shrink: 0;
}

.best-deal-info {
  flex: 1;
  min-width: 0;
}

.best-deal-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  max-height: 2.4em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 2px;
}

.best-deal-store {
  font-size: 10px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 4px;
}

.best-deal-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.best-deal-price .price-label {
  font-size: 10px;
  color: #059669;
  font-weight: 600;
}

.best-deal-price .price-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: #059669;
}

.best-deal-price .price-sar {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
}

.best-deal-compare {
  background: white;
  border-radius: 8px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
}

.best-deal-compare .compare-label {
  font-size: 10px;
  font-weight: 700;
  color: #059669;
  display: block;
  margin-bottom: 4px;
}

.compare-others {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.compare-item {
  font-size: 9px;
  color: #64748b;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.btn-buy-best {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 10px 16px;
  text-align: center;
  cursor: pointer;
  border: none;
  font-family: inherit;
  text-decoration: none;
  display: block;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.btn-buy-best:hover {
  background: linear-gradient(135deg, #059669, #10b981);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.product-img-wrap {
  position: relative;
  overflow: hidden;
}

.product-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

/* ═══════════════ بطاقات الطيران ═══════════════ */
.store-card-flights {
  border: 1px solid #1e3a5f;
}

.flight-card-header {
  padding: 12px 16px;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flight-airline {
  font-weight: 700;
  font-size: 14px;
}

.flight-class {
  font-size: 11px;
  opacity: 0.9;
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: 10px;
}

.flight-route {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.flight-point {
  text-align: center;
}

.flight-time {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
}

.flight-code {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}

.flight-duration {
  flex: 1;
  text-align: center;
  padding: 0 16px;
}

.flight-duration-text {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 8px;
}

.flight-line {
  height: 2px;
  background: linear-gradient(90deg, #cbd5e1, #94a3b8, #cbd5e1);
  position: relative;
}

.flight-line::before {
  content: '✈️';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
}

.flight-stops {
  font-size: 11px;
  color: #059669;
  margin-top: 8px;
  font-weight: 600;
}

.btn-buy-flights {
  background: linear-gradient(135deg, #1a73e8, #1557b0);
  color: white;
}

.btn-buy-flights:hover {
  background: linear-gradient(135deg, #1557b0, #1a73e8);
}

/* ═══════════════ بطاقات تأجير السيارات ═══════════════ */
.store-card-cars {
  border: 1px solid #ff6b35;
}

.store-card-cars .flight-card-header {
  background: #ff6b35;
}

.store-card-cars .product-meta {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.store-card-cars .product-meta span {
  background: #f8fafc;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.btn-buy-cars {
  background: linear-gradient(135deg, #ff6b35, #e55a2b);
  color: white;
}

.btn-buy-cars:hover {
  background: linear-gradient(135deg, #e55a2b, #ff6b35);
}

/* ═══════════════ بطاقات الإقامة الطويلة ═══════════════ */
.store-card-longstay {
  border: 1px solid #8b5cf6;
}

.store-card-longstay .flight-card-header {
  background: #8b5cf6;
}

.store-card-longstay .product-meta {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.store-card-longstay .product-meta span {
  background: #f8fafc;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.btn-buy-longstay {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
}

.btn-buy-longstay:hover {
  background: linear-gradient(135deg, #7c3aed, #8b5cf6);
}

/* ═══════════════ بطاقات خدمات النقل ═══════════════ */
.store-card-transfer {
  border: 1px solid #0ea5e9;
}

.store-card-transfer .flight-card-header {
  background: #0ea5e9;
}

.store-card-transfer .product-meta {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.store-card-transfer .product-meta span {
  background: #f8fafc;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.btn-buy-transfer {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: white;
}

.btn-buy-transfer:hover {
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
}