/* ============================================================
   نظام التصميم الاحترافي لمؤسسة الحبابي v2.0
   Al-Hababi Premium Design System
   ============================================================ */

/* ===== 1. المتغيرات العامة ===== */
:root {
  --bg-deep: #060d09;
  --bg-surface: #0d1a10;
  --bg-card: rgba(15, 28, 19, 0.85);
  --bg-card-hover: rgba(22, 42, 28, 0.95);
  --bg-glass: rgba(255,255,255,0.04);
  --bg-glass-hover: rgba(255,255,255,0.07);

  --primary: #10B981;
  --primary-light: #34D399;
  --primary-dark: #059669;
  --primary-glow: rgba(16,185,129,0.25);
  --primary-border: rgba(16,185,129,0.3);

  --accent-gold: #F59E0B;
  --accent-gold-light: #FBBF24;
  --accent-gold-glow: rgba(245,158,11,0.2);

  --accent-pink: #EC4899;
  --accent-pink-glow: rgba(236,72,153,0.2);

  --accent-blue: #6366F1;

  --text-primary: #F0FDF4;
  --text-secondary: #86EFAC;
  --text-muted: #4B7A5A;
  --text-dim: #374151;

  --border: rgba(255,255,255,0.07);
  --border-primary: rgba(16,185,129,0.2);

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.4);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.5);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 30px rgba(16,185,129,0.15);
  --shadow-card: 0 4px 20px rgba(0,0,0,0.4), 0 1px 4px rgba(0,0,0,0.3);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 999px;

  --font-ar: 'Cairo', 'Tajawal', system-ui, sans-serif;
  --font-en: 'Outfit', system-ui, sans-serif;

  --transition-fast: 0.15s ease;
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
  --transition-slow: 0.5s cubic-bezier(0.4,0,0.2,1);

  --navbar-h: 72px;
  --bottom-nav-h: 70px;
}

/* ===== 2. الأساس ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-ar);
  background: var(--bg-deep);
  color: var(--text-primary);
  overflow-x: hidden;
  min-height: 100vh;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(16,185,129,0.06) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(245,158,11,0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: var(--font-ar); border: none; background: none; }
input, select, textarea { font-family: var(--font-ar); }
img { max-width: 100%; display: block; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: var(--primary-dark); border-radius: 4px; }

/* ===== 3. شاشة التحميل ===== */
.page-loader {
  position: fixed; inset: 0;
  background: var(--bg-deep);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.page-loader.hidden { opacity: 0; visibility: hidden; }

.loader-inner {
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.loader-logo {
  width: 90px; height: 90px;
  background: rgba(16,185,129,0.1);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--primary-border);
  animation: loader-pulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 40px var(--primary-glow);
}
.loader-logo img { width: 56px; height: 56px; }
@keyframes loader-pulse {
  0%,100% { transform: scale(1); box-shadow: 0 0 40px var(--primary-glow); }
  50% { transform: scale(1.05); box-shadow: 0 0 60px rgba(16,185,129,0.4); }
}
.loader-text { font-size: 1.5rem; font-weight: 800; color: #fff; }
.loader-sub { font-size: 0.85rem; color: var(--text-secondary); }
.loader-bar {
  width: 200px; height: 4px;
  background: var(--bg-glass);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 8px;
}
.loader-fill {
  height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent-gold));
  border-radius: 2px;
  animation: loader-fill 1.8s ease-in-out forwards;
}
@keyframes loader-fill {
  0% { width: 0%; }
  100% { width: 100%; }
}

/* ===== 4. حاوية التطبيق ===== */
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* ===== 5. الـ NAVBAR ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 13, 9, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.navbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--navbar-h);
  display: flex;
  align-items: center;
  gap: 24px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}
.navbar-brand:hover { opacity: 0.85; }

.brand-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, rgba(16,185,129,0.2), rgba(245,158,11,0.1));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--primary-border);
}
.brand-logo-img { width: 28px; height: 28px; filter: drop-shadow(0 0 6px var(--primary)); }

.brand-name { display: block; font-size: 1.1rem; font-weight: 800; color: #fff; line-height: 1.2; }
.brand-tagline { display: block; font-size: 0.65rem; color: var(--primary-light); }

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
  white-space: nowrap;
  position: relative;
  cursor: pointer;
}
.nav-link:hover { color: #fff; background: var(--bg-glass); }
.nav-link.active {
  color: var(--primary-light);
  background: rgba(16,185,129,0.1);
  border: 1px solid var(--primary-border);
}

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

.nav-search-toggle {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.nav-search-toggle svg { width: 18px; height: 18px; }
.nav-search-toggle:hover { color: #fff; background: var(--bg-glass-hover); }

.stats-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(16,185,129,0.08);
  border: 1px solid var(--primary-border);
  color: var(--primary-light);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: default;
}
.pulse-dot {
  width: 7px; height: 7px;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%,100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.7; }
}

.hamburger-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: var(--transition);
}
.hamburger-btn span {
  display: block; width: 20px; height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: var(--transition);
}
.hamburger-btn.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger-btn.open span:nth-child(2) { opacity: 0; }
.hamburger-btn.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* شريط البحث */
.navbar-search-bar {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  border-top: 0 solid transparent;
}
.navbar-search-bar.open {
  max-height: 80px;
  border-top: 1px solid var(--border);
}
.navbar-search-bar .search-wrapper {
  max-width: 600px;
  margin: 10px auto;
  padding: 0 24px;
}

/* القائمة المنسدلة */
.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 10px 20px 20px;
  gap: 4px;
  border-top: 1px solid var(--border);
}
.mobile-menu.open { display: flex; }
.mobile-nav-link {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}
.mobile-nav-link:hover, .mobile-nav-link.active {
  color: var(--primary-light);
  background: rgba(16,185,129,0.08);
}

/* ===== 6. شريط البحث العام ===== */
.search-wrapper {
  position: relative;
  width: 100%;
}
.search-input {
  width: 100%;
  height: 46px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0 48px 0 16px;
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: var(--transition);
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(16,185,129,0.05);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.1);
}
.search-icon {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}
.voice-search-btn {
  position: absolute;
  left: 8px; top: 50%;
  transform: translateY(-50%);
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(16,185,129,0.1);
  color: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.voice-search-btn:hover { background: var(--primary); color: #fff; }
.voice-search-btn.listening { background: #ef4444; color: #fff; animation: pulse-red 1s infinite; }
.voice-search-btn svg { width: 18px; height: 18px; }
@keyframes pulse-red {
  0%,100% { transform: translateY(-50%) scale(1); }
  50% { transform: translateY(-50%) scale(1.1); box-shadow: 0 0 12px rgba(239,68,68,0.5); }
}

/* ===== 7. المحتوى الرئيسي ===== */
.main-content {
  flex: 1;
  padding-bottom: var(--bottom-nav-h);
}

.page { display: none; animation: pageFadeIn 0.4s ease forwards; }
.page.active { display: block; }
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 8. Hero Section ===== */
.hero-section {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 60px 24px;
}

.hero-bg-overlay {
  position: absolute; inset: 0;
  background: 
    radial-gradient(ellipse 70% 60% at 70% 50%, rgba(16,185,129,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 10% 80%, rgba(245,158,11,0.08) 0%, transparent 50%),
    linear-gradient(180deg, transparent, rgba(6,13,9,0.8));
  pointer-events: none;
}

.hero-particles {
  position: absolute; inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-particle {
  position: absolute;
  width: 4px; height: 4px;
  background: var(--primary);
  border-radius: 50%;
  opacity: 0.4;
  animation: float-particle linear infinite;
}
@keyframes float-particle {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 0.4; }
  90% { opacity: 0.4; }
  100% { transform: translateY(-100px) scale(1); opacity: 0; }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  flex: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16,185,129,0.1);
  border: 1px solid var(--primary-border);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: 20px;
  animation: fadeSlideUp 0.6s ease both;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 16px;
  animation: fadeSlideUp 0.7s 0.1s ease both;
}
.hero-title-accent {
  background: linear-gradient(135deg, var(--primary-light), var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
  max-width: 500px;
  animation: fadeSlideUp 0.7s 0.2s ease both;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
  animation: fadeSlideUp 0.7s 0.3s ease both;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  animation: fadeSlideUp 0.7s 0.4s ease both;
}
.hero-stat { text-align: center; }
.stat-num {
  display: block;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--primary-light);
  line-height: 1;
}
.stat-label { font-size: 0.72rem; color: var(--text-muted); }
.hero-stat-divider {
  width: 1px; height: 40px;
  background: var(--border);
}

.hero-visual {
  position: absolute;
  left: 60px;
  top: 50%;
  transform: translateY(-50%);
  width: 280px; height: 280px;
  display: none;
}

/* ===== 9. الأزرار ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 700;
  transition: var(--transition);
  box-shadow: 0 4px 15px var(--primary-glow);
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16,185,129,0.35);
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  background: transparent;
  color: var(--primary-light);
  border: 1.5px solid var(--primary-border);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 700;
  transition: var(--transition);
  cursor: pointer;
}
.btn-outline:hover {
  background: rgba(16,185,129,0.08);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.see-all-btn {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  transition: var(--transition);
  background: var(--bg-glass);
}
.see-all-btn:hover { color: var(--primary-light); border-color: var(--primary-border); }

/* ===== 10. أقسام المتجر ===== */
.sections-grid-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px;
}

.section-title-main {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  text-align: center;
  margin-bottom: 32px;
}
.section-title-main::after {
  content: '';
  display: block;
  width: 60px; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent-gold));
  border-radius: 2px;
  margin: 10px auto 0;
}

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

.category-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  cursor: pointer;
  overflow: hidden;
  transition: var(--transition);
  text-align: center;
}
.category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.herbs-card { border-color: rgba(16,185,129,0.2); }
.herbs-card:hover { border-color: var(--primary); box-shadow: 0 16px 48px rgba(16,185,129,0.2); }
.oils-card { border-color: rgba(245,158,11,0.2); }
.oils-card:hover { border-color: var(--accent-gold); box-shadow: 0 16px 48px rgba(245,158,11,0.2); }
.beauty-card { border-color: rgba(236,72,153,0.2); }
.beauty-card:hover { border-color: var(--accent-pink); box-shadow: 0 16px 48px rgba(236,72,153,0.2); }

.cat-card-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255,255,255,0.02), transparent);
  pointer-events: none;
}

.cat-card-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
  animation: icon-float 3s ease-in-out infinite;
}
@keyframes icon-float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.cat-card-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}
.cat-card-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.cat-card-count {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.herbs-card .cat-card-count { background: rgba(16,185,129,0.1); color: var(--primary-light); }
.oils-card .cat-card-count { background: rgba(245,158,11,0.1); color: var(--accent-gold-light); }
.beauty-card .cat-card-count { background: rgba(236,72,153,0.1); color: #F9A8D4; }

.cat-card-btn {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  transition: var(--transition);
}
.herbs-card .cat-card-btn { background: rgba(16,185,129,0.1); color: var(--primary-light); border: 1px solid var(--primary-border); }
.herbs-card .cat-card-btn:hover { background: var(--primary); color: #fff; }
.oils-card .cat-card-btn { background: rgba(245,158,11,0.1); color: var(--accent-gold-light); border: 1px solid rgba(245,158,11,0.3); }
.oils-card .cat-card-btn:hover { background: var(--accent-gold); color: #fff; }
.beauty-card .cat-card-btn { background: rgba(236,72,153,0.1); color: #F9A8D4; border: 1px solid rgba(236,72,153,0.3); }
.beauty-card .cat-card-btn:hover { background: var(--accent-pink); color: #fff; }

.cat-card-visuals {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}
.cv-item {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(var(--c), 0.1);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  transition: var(--transition);
}

/* ===== 11. المنتجات المميزة ===== */
.featured-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.section-header .section-title-main { margin-bottom: 0; text-align: right; }
.section-header .section-title-main::after { display: none; }

/* ===== 12. شبكة المنتجات وبطاقات المنتجات ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  padding: 0 24px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}
.product-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-border);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

/* صورة المنتج (محاكاة 3D بـ CSS) */
.product-card-visual {
  position: relative;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-card-visual::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(255,255,255,0.06), transparent 60%);
  pointer-events: none;
}

.product-3d-icon {
  font-size: 4.5rem;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.5));
  animation: product-float 4s ease-in-out infinite;
  position: relative;
  z-index: 2;
  transition: var(--transition);
}
.product-card:hover .product-3d-icon { transform: scale(1.1) rotate(5deg); }

/* تأثير 3D بالظل المتراكب */
.product-3d-shadow {
  position: absolute;
  bottom: 16px;
  left: 50%; transform: translateX(-50%);
  width: 60%; height: 16px;
  background: rgba(0,0,0,0.4);
  border-radius: 50%;
  filter: blur(8px);
  animation: shadow-float 4s ease-in-out infinite;
}

@keyframes product-float {
  0%,100% { transform: translateY(0) rotateY(0deg); }
  25% { transform: translateY(-6px) rotateY(-5deg); }
  75% { transform: translateY(-3px) rotateY(5deg); }
}
@keyframes shadow-float {
  0%,100% { transform: translateX(-50%) scaleX(1); opacity: 0.4; }
  50% { transform: translateX(-50%) scaleX(0.75); opacity: 0.2; }
}

.product-card-badge {
  position: absolute;
  top: 12px; right: 12px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 700;
  z-index: 3;
}
.badge-herbs { background: rgba(16,185,129,0.2); color: var(--primary-light); border: 1px solid var(--primary-border); }
.badge-oils { background: rgba(245,158,11,0.2); color: var(--accent-gold-light); border: 1px solid rgba(245,158,11,0.3); }
.badge-beauty { background: rgba(236,72,153,0.2); color: #F9A8D4; border: 1px solid rgba(236,72,153,0.3); }

.product-card-rating {
  position: absolute;
  top: 12px; left: 12px;
  display: flex; align-items: center; gap: 3px;
  font-size: 0.7rem;
  color: var(--accent-gold-light);
  font-weight: 700;
  z-index: 3;
  background: rgba(0,0,0,0.4);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(4px);
}

.product-card-body {
  padding: 14px;
}
.product-card-name {
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-card-sci {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 12px;
}
.product-tag {
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 0.6rem;
  background: var(--bg-glass);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.product-card-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent-gold-light);
}
.product-card-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(16,185,129,0.1);
  border: 1px solid var(--primary-border);
  color: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
}
.product-card-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Skeleton Loading */
.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.skeleton-visual { height: 160px; background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.07) 50%, rgba(255,255,255,0.03) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
.skeleton-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.skeleton-line { height: 12px; background: rgba(255,255,255,0.05); border-radius: 6px; animation: shimmer 1.5s infinite; }
.skeleton-line.w60 { width: 60%; }
.skeleton-line.w80 { width: 80%; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ===== 13. رأس الصفحة (Page Header) ===== */
.page-header-section {
  position: relative;
  padding: 60px 24px;
  text-align: center;
  overflow: hidden;
}
.page-header-bg {
  position: absolute; inset: 0;
  opacity: 0.06;
  background-size: cover;
}
.herbs-header-bg { background: radial-gradient(ellipse at center, var(--primary) 0%, transparent 70%); opacity: 0.15; }
.oils-header-bg { background: radial-gradient(ellipse at center, var(--accent-gold) 0%, transparent 70%); opacity: 0.1; }
.beauty-header-bg { background: radial-gradient(ellipse at center, var(--accent-pink) 0%, transparent 70%); opacity: 0.1; }
.treatments-header-bg { background: radial-gradient(ellipse at center, var(--accent-blue) 0%, transparent 70%); opacity: 0.1; }

.page-header-content { position: relative; z-index: 2; }
.page-header-icon { font-size: 3rem; margin-bottom: 12px; }
.page-header-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 900;
  color: #fff;
  margin-bottom: 8px;
}
.page-header-desc { font-size: 0.95rem; color: var(--text-secondary); max-width: 500px; margin: 0 auto; }

/* ===== 14. شريط الفلترة ===== */
.filter-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.filter-search { flex: 1; min-width: 200px; max-width: 320px; }

.filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}

.chip {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
}
.chip:hover { color: #fff; border-color: rgba(255,255,255,0.15); }
.chip.active {
  color: var(--primary-light);
  background: rgba(16,185,129,0.1);
  border-color: var(--primary-border);
}

.filter-sort { }
.filter-select-sm {
  height: 38px;
  padding: 0 10px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
}

/* ===== 15. الشات ===== */
.chat-page-layout {
  display: flex;
  height: calc(100vh - var(--navbar-h) - var(--bottom-nav-h));
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 24px;
  gap: 16px;
}

.chat-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.chat-bot-avatar {
  position: relative;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(16,185,129,0.1);
  border: 2px solid var(--primary-border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.chat-bot-avatar img { width: 32px; height: 32px; }
.online-indicator {
  position: absolute;
  bottom: 2px; left: 2px;
  width: 10px; height: 10px;
  background: #22C55E;
  border-radius: 50%;
  border: 2px solid var(--bg-surface);
}

.chat-bot-name { font-size: 0.9rem; font-weight: 700; color: #fff; }
.chat-bot-status { font-size: 0.7rem; color: #22C55E; }

.chat-sidebar-tips { display: flex; flex-direction: column; gap: 6px; }
.tip-title { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; margin-bottom: 4px; }
.quick-tip {
  padding: 8px 12px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: right;
  transition: var(--transition);
  cursor: pointer;
}
.quick-tip:hover { background: rgba(16,185,129,0.08); color: var(--primary-light); border-color: var(--primary-border); }

.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.msg-bubble {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.6;
  animation: msgBounce 0.35s cubic-bezier(0.18,0.89,0.32,1.28) forwards;
}
@keyframes msgBounce {
  from { opacity: 0; transform: scale(0.9) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.msg-bot {
  background: var(--bg-glass-hover);
  border: 1px solid var(--border);
  align-self: flex-start;
  border-bottom-right-radius: 4px;
  color: var(--text-primary);
}
.msg-user {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  align-self: flex-end;
  border-bottom-left-radius: 4px;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.chat-product-card {
  margin-top: 10px;
  background: rgba(6,13,9,0.8);
  border: 1px solid var(--primary-border);
  border-radius: 12px;
  padding: 10px;
  display: flex; align-items: center; gap: 10px;
  cursor: pointer;
  transition: var(--transition);
}
.chat-product-card:hover { border-color: var(--primary); background: rgba(16,185,129,0.05); }
.chat-product-emoji { font-size: 2rem; }
.chat-product-name { font-size: 0.82rem; font-weight: 700; color: #fff; }
.chat-product-type { font-size: 0.65rem; color: var(--text-secondary); }
.chat-product-btn {
  margin-right: auto;
  background: var(--primary);
  border: none;
  color: #fff;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-ar);
  transition: var(--transition);
}
.chat-product-btn:hover { background: var(--primary-light); }

.chat-input-area {
  background: rgba(6,13,9,0.8);
  border-top: 1px solid var(--border);
  padding: 12px;
}
.chat-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-input {
  flex: 1;
  height: 46px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0 18px;
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: var(--transition);
}
.chat-input:focus { outline: none; border-color: var(--primary); }
.chat-input::placeholder { color: var(--text-muted); }

.chat-voice-btn {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(16,185,129,0.1);
  border: 1px solid var(--primary-border);
  color: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.chat-voice-btn:hover { background: var(--primary); color: #fff; }
.chat-voice-btn.listening { background: #ef4444; color: #fff; animation: pulse-red 1s infinite; }
.chat-voice-btn svg { width: 20px; height: 20px; }

.chat-send-btn {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  box-shadow: 0 4px 12px var(--primary-glow);
}
.chat-send-btn:hover { background: var(--primary-light); transform: scale(1.05); }
.chat-send-btn svg { width: 20px; height: 20px; fill: currentColor; transform: scaleX(-1); }

/* مؤشر الصوت */
.voice-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
}
.voice-waves { display: flex; gap: 3px; align-items: center; height: 20px; }
.voice-waves span {
  display: block; width: 3px; background: #ef4444; border-radius: 2px;
  animation: voice-wave 0.8s ease-in-out infinite;
}
.voice-waves span:nth-child(2) { animation-delay: 0.1s; }
.voice-waves span:nth-child(3) { animation-delay: 0.2s; }
.voice-waves span:nth-child(4) { animation-delay: 0.3s; }
.voice-waves span:nth-child(5) { animation-delay: 0.4s; }
@keyframes voice-wave {
  0%,100% { height: 4px; }
  50% { height: 20px; }
}
.voice-label { font-size: 0.8rem; color: #ef4444; font-weight: 600; flex: 1; }
.voice-stop-btn {
  padding: 4px 10px;
  background: #ef4444;
  color: #fff;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ===== 16. الروشتة العلاجية ===== */
.builder-grid {
  display: flex;
  gap: 24px;
  padding: 24px;
  max-width: 1000px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.filter-panel {
  flex: 1;
  min-width: 280px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
}
.filter-panel-title {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.filter-group { margin-bottom: 14px; }
.filter-label { display: block; font-size: 0.78rem; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; }
.filter-select {
  width: 100%; height: 44px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.85rem;
  padding: 0 12px;
  cursor: pointer;
  transition: var(--transition);
}
.filter-select:focus { outline: none; border-color: var(--primary); }

.builder-submit-btn {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  border-radius: var(--radius-full);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  font-family: var(--font-ar);
  cursor: pointer;
  margin-top: 6px;
  box-shadow: 0 4px 15px var(--primary-glow);
  transition: var(--transition);
}
.builder-submit-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(16,185,129,0.35); }

.prescription-card {
  flex: 1.5;
  min-width: 300px;
  background: radial-gradient(circle at top right, rgba(16,185,129,0.06), transparent 50%), var(--bg-card);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-xl);
  padding: 24px;
  animation: pageFadeIn 0.4s ease;
}

.presc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
  margin-bottom: 18px;
  gap: 12px;
}
.presc-logo { display: flex; align-items: center; gap: 10px; }
.presc-id { font-size: 0.65rem; color: var(--text-muted); background: var(--bg-glass); padding: 4px 10px; border-radius: 6px; font-family: var(--font-en); }
.presc-section { margin-bottom: 14px; }
.presc-label { font-size: 0.75rem; color: var(--accent-gold-light); font-weight: 700; margin-bottom: 4px; }
.presc-value { font-size: 0.85rem; color: var(--text-primary); line-height: 1.6; }
.warning-box { background: rgba(239,68,68,0.06); border: 1px solid rgba(239,68,68,0.2); padding: 10px; border-radius: var(--radius-md); color: #FCA5A5; font-size: 0.8rem; }

/* ===== 17. الكاميرا ===== */
.scanner-container {
  position: relative;
  height: calc(100vh - var(--navbar-h) - var(--bottom-nav-h));
  overflow: hidden;
  background: #000;
}
.camera-preview { width: 100%; height: 100%; object-fit: cover; }
.scanner-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.scan-box {
  width: 220px; height: 220px;
  border: 2px solid var(--primary);
  border-radius: 20px;
  box-shadow: 0 0 0 1000px rgba(0,0,0,0.6);
  position: relative;
  overflow: hidden;
}
.scan-laser {
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  box-shadow: 0 0 8px var(--primary);
  animation: laser 2s ease-in-out infinite;
}
@keyframes laser { 0%,100% { top: 2%; } 50% { top: 97%; } }

.analysis-overlay {
  position: absolute; inset: 0;
  background: rgba(6,13,9,0.9);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  z-index: 10;
}
.analysis-spinner {
  width: 48px; height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.analysis-text { font-size: 0.9rem; font-weight: 700; color: var(--primary-light); }
.scanner-btn {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; border: none; border-radius: var(--radius-full);
  padding: 12px 28px; font-size: 0.9rem; font-weight: 700; font-family: var(--font-ar);
  box-shadow: 0 8px 25px var(--primary-glow);
  transition: var(--transition);
  cursor: pointer; white-space: nowrap;
}
.scanner-btn:hover { transform: translateX(-50%) translateY(-2px); }

/* ===== 18. الشريط السفلي ===== */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-h);
  background: rgba(6,13,9,0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-around; align-items: center;
  z-index: 99;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 0.65rem; font-weight: 600;
  height: 100%; width: 20%;
  transition: var(--transition); cursor: pointer;
  gap: 4px; border-top: 2px solid transparent;
}
.nav-item svg { width: 22px; height: 22px; transition: var(--transition); }
.nav-item.active { color: var(--primary-light); border-top-color: var(--primary); }
.nav-item.active svg { filter: drop-shadow(0 0 5px var(--primary)); }
.nav-item.scan-item {
  top: -14px; position: relative;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  width: 54px; height: 54px; border-radius: 50%;
  color: #fff; border: 4px solid var(--bg-deep);
  box-shadow: 0 6px 20px var(--primary-glow);
}
.nav-item.scan-item svg { width: 22px; height: 22px; }

/* ===== 19. مودال تفاصيل المنتج ===== */
.modal { display: none; position: fixed; inset: 0; z-index: 200; }
.modal.active { display: flex; }
.modal-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
}
.modal-container {
  position: relative;
  z-index: 1;
  background: var(--bg-surface);
  margin: auto;
  width: min(95vw, 900px);
  max-height: 92vh;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: row;
  animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes modalSlideIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close-btn {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  z-index: 10; cursor: pointer;
  transition: var(--transition);
}
.modal-close-btn:hover { background: #ef4444; color: #fff; }
.modal-close-btn svg { width: 18px; height: 18px; }

.product-detail-hero {
  flex: 1;
  min-height: 400px;
  position: relative;
  background: radial-gradient(circle, rgba(16,185,129,0.05), var(--bg-deep));
  display: flex; flex-direction: column;
}

.view-switcher {
  display: flex; gap: 6px;
  padding: 16px;
  position: absolute; top: 0; left: 0; right: 0;
  z-index: 5;
}
.view-switch-btn {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--font-ar);
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-secondary);
  transition: var(--transition);
  cursor: pointer;
  backdrop-filter: blur(4px);
}
.view-switch-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.view-panel { width: 100%; height: 100%; min-height: 300px; }
#threejs-container {
  width: 100%; height: 100%; min-height: 300px;
  background: radial-gradient(circle, rgba(16,185,129,0.04), transparent 70%);
  position: relative;
}
.three-instructions {
  position: absolute; bottom: 10px; left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem; color: var(--text-muted);
  background: rgba(0,0,0,0.5); padding: 4px 12px; border-radius: 12px;
  pointer-events: none; white-space: nowrap; backdrop-filter: blur(4px);
}

/* معرض الصور */
.product-gallery { display: flex; flex-direction: column; height: 100%; }
.gallery-main {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.gallery-placeholder {
  width: 120px; height: 120px;
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.5));
  animation: product-float 4s ease-in-out infinite;
}
.gallery-thumbs {
  display: flex; gap: 8px; padding: 12px;
  border-top: 1px solid var(--border);
  overflow-x: auto;
}
.gallery-thumb {
  width: 56px; height: 56px;
  border-radius: 10px;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  background: var(--bg-glass);
}
.gallery-thumb:hover, .gallery-thumb.active { border-color: var(--primary); background: rgba(16,185,129,0.08); }

/* معلومات المنتج */
.product-detail-info {
  width: 320px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.product-detail-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 60px 20px 20px;
}

.product-detail-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(16,185,129,0.1);
  color: var(--primary-light);
  border: 1px solid var(--primary-border);
  margin-bottom: 10px;
}
.product-detail-name {
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 4px;
}
.product-detail-sci {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 12px;
}
.product-rating-row {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px; flex-wrap: wrap;
}
.stars { font-size: 0.85rem; }
.rating-count { font-size: 0.72rem; color: var(--text-secondary); }
.product-origin { font-size: 0.72rem; color: var(--text-muted); margin-right: auto; }
.product-price {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--accent-gold-light);
  margin-bottom: 16px;
}

/* التبويبات */
.detail-tabs {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
  overflow-x: auto;
}
.detail-tab {
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--font-ar);
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  cursor: pointer; white-space: nowrap;
}
.detail-tab.active { color: var(--primary-light); border-bottom-color: var(--primary); }
.detail-tab-content { display: none; }
.detail-tab-content.active { display: block; }

.benefits-list { display: flex; flex-direction: column; gap: 7px; }
.benefit-item {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 0.83rem; color: var(--text-primary);
}
.benefit-item::before { content: '✅'; flex-shrink: 0; }

.usage-box { background: var(--bg-glass); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px; }
.usage-label { font-size: 0.72rem; font-weight: 700; color: var(--accent-gold-light); margin-bottom: 6px; }

.warning-banner {
  background: rgba(239,68,68,0.06);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--radius-md);
  padding: 14px;
  color: #FCA5A5;
  font-size: 0.83rem;
  line-height: 1.6;
}

/* تقييمات */
.review-item {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 10px;
}
.review-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.review-name { font-size: 0.82rem; font-weight: 700; color: #fff; }
.review-stars { font-size: 0.75rem; color: var(--accent-gold); }
.review-date { font-size: 0.65rem; color: var(--text-muted); margin-right: auto; }
.review-text { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.5; }

/* أزرار المنتج */
.product-actions {
  display: flex; gap: 8px;
  margin: 16px 0;
  flex-wrap: wrap;
}
.product-actions .btn-primary, .product-actions .btn-outline { flex: 1; min-width: 120px; font-size: 0.82rem; padding: 10px 14px; }
.btn-whatsapp { background: linear-gradient(135deg, #25D366, #128C7E) !important; }

/* QR والمشاركة */
.qr-share-section {
  display: flex; gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.qr-card {
  flex: 1;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
#qrcode-container {
  width: 80px; height: 80px;
  background: #fff;
  border-radius: 6px;
  padding: 4px;
  display: flex; align-items: center; justify-content: center;
}
#qrcode-container canvas { max-width: 100%; max-height: 100%; }
.qr-card-text { font-size: 0.6rem; color: var(--text-muted); text-align: center; }

.share-card { flex: 1; background: var(--bg-glass); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.share-card-title { font-size: 0.72rem; font-weight: 700; color: var(--text-secondary); }
.share-buttons-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 6px; }
.share-btn {
  height: 36px; border-radius: 8px; border: none; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: var(--transition);
}
.share-btn:hover { transform: translateY(-2px); filter: brightness(1.1); }
.share-btn svg { width: 17px; height: 17px; fill: currentColor; }
.share-btn.whatsapp { background: #25D366; }
.share-btn.telegram { background: #0088CC; }
.share-btn.facebook { background: #1877F2; }
.share-btn.twitter { background: #1DA1F2; }

/* ===== 20. Footer ===== */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  margin-bottom: var(--bottom-nav-h);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand-name { font-size: 1rem; font-weight: 800; color: #fff; }
.footer-brand-tagline { font-size: 0.72rem; color: var(--text-secondary); }
.footer-links { display: flex; gap: 16px; flex: 1; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: 0.82rem; color: var(--text-muted); cursor: pointer; transition: var(--transition); }
.footer-links a:hover { color: var(--primary-light); }
.footer-copy { font-size: 0.72rem; color: var(--text-muted); margin-right: auto; }

/* ===== 21. Responsive ===== */
@media (max-width: 1023px) {
  .hero-visual { display: none; }
  .categories-showcase { grid-template-columns: repeat(2,1fr); }
  .modal-container { flex-direction: column; width: min(96vw, 600px); }
  .product-detail-hero { min-height: 280px; }
  .product-detail-info { width: 100%; border-right: none; border-top: 1px solid var(--border); }
  .product-detail-scroll { max-height: 50vh; }
  .chat-page-layout { flex-direction: column; height: auto; min-height: calc(100vh - var(--navbar-h) - var(--bottom-nav-h)); }
  .chat-sidebar { width: 100%; }
  .chat-main { min-height: 400px; }
}

@media (max-width: 767px) {
  :root { --navbar-h: 64px; }
  .navbar-menu { display: none; }
  .hamburger-btn { display: flex; }
  .stats-badge { display: none; }
  .categories-showcase { grid-template-columns: 1fr; gap: 14px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 0 12px 32px; }
  .builder-grid { flex-direction: column; padding: 16px; }
  .filter-toolbar { flex-direction: column; gap: 10px; padding: 12px 16px; }
  .filter-search { min-width: 100%; max-width: 100%; }
  .hero-section { padding: 40px 16px; min-height: 60vh; }
  .hero-actions { gap: 10px; }
  .btn-primary, .btn-outline { padding: 10px 18px; font-size: 0.85rem; }
  .sections-grid-container { padding: 32px 16px; }
  .featured-section { padding: 0 16px 40px; }
  .section-header { flex-direction: column; gap: 10px; align-items: flex-start; }
  .modal-container { max-height: 98vh; border-radius: 20px 20px 0 0; margin: auto auto 0 auto; width: 100%; }
  .chat-sidebar-tips { flex-direction: row; flex-wrap: wrap; }
  .quick-tip { flex: 1; min-width: 120px; }
  .footer-links { display: none; }
}

@media (min-width: 1024px) {
  .bottom-nav { display: none; }
  .main-content { padding-bottom: 0; }
  .site-footer { margin-bottom: 0; }
  .hero-visual { display: flex; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

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