/* ==========================================================================
   متجر العطور — الواجهة الأمامية
   تصميم خفيف وأنيق مع 5 ثيمات (نفس نظام لوحة التحكم)
   ========================================================================== */

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

/* ===== الثيمات ===== */
:root, .theme-light {
  --bg: #ffffff; --bg-soft: #f5f7fb; --surface: #ffffff; --surface-2: #f8fafc;
  --border: #e2e8f0; --border-2: #cbd5e1;
  --text: #0f172a; --text-2: #475569; --text-muted: #94a3b8;
  --primary: #2563eb; --primary-h: #1d4ed8; --primary-50: #eff6ff;
  --accent: #0ea5e9; --gold: #2563eb;
  --success: #16a34a; --danger: #dc2626;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.04);
  --shadow: 0 4px 16px rgba(15,23,42,.06);
  --shadow-lg: 0 20px 48px rgba(15,23,42,.12);
  --header-bg: rgba(255,255,255,.95);
  --hero-grad: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 50%, #ffffff 100%);
}
.theme-royal {
  --bg: #fdfaf3; --bg-soft: #f9f3e3; --surface: #ffffff; --surface-2: #fbf6ec;
  --border: #ebe0c8; --border-2: #d9c89b;
  --text: #3a2a14; --text-2: #6b5436; --text-muted: #a18f6e;
  --primary: #b8893d; --primary-h: #9a7028; --primary-50: #fcf6e7;
  --accent: #c9a961; --gold: #c9a961;
  --success: #5d8a3a; --danger: #b03e3e;
  --shadow-sm: 0 1px 2px rgba(184,137,61,.06);
  --shadow: 0 4px 16px rgba(184,137,61,.10);
  --shadow-lg: 0 20px 48px rgba(184,137,61,.18);
  --header-bg: rgba(253,250,243,.95);
  --hero-grad: linear-gradient(135deg, #f9f3e3 0%, #faf2da 50%, #fdfaf3 100%);
}
.theme-ocean {
  --bg: #f0f9fa; --bg-soft: #e0f3f5; --surface: #ffffff; --surface-2: #e6f4f5;
  --border: #c5e3e6; --border-2: #94c9ce;
  --text: #0f2c2f; --text-2: #3e6166; --text-muted: #7ba0a5;
  --primary: #0d9488; --primary-h: #0b7e75; --primary-50: #e0f6f5;
  --accent: #06b6d4; --gold: #06b6d4;
  --success: #16a34a; --danger: #dc2626;
  --shadow-sm: 0 1px 2px rgba(13,148,136,.06);
  --shadow: 0 4px 16px rgba(13,148,136,.10);
  --shadow-lg: 0 20px 48px rgba(13,148,136,.18);
  --header-bg: rgba(240,249,250,.95);
  --hero-grad: linear-gradient(135deg, #e0f3f5 0%, #d5eef0 50%, #f0f9fa 100%);
}
.theme-rose {
  --bg: #fdf4f5; --bg-soft: #f9e3e8; --surface: #ffffff; --surface-2: #fbeaed;
  --border: #f1cdd3; --border-2: #e09da7;
  --text: #3a0d1c; --text-2: #6e3949; --text-muted: #a07983;
  --primary: #be1e4e; --primary-h: #9c1841; --primary-50: #fde7ec;
  --accent: #ec4899; --gold: #ec4899;
  --success: #16a34a; --danger: #dc2626;
  --shadow-sm: 0 1px 2px rgba(190,30,78,.06);
  --shadow: 0 4px 16px rgba(190,30,78,.10);
  --shadow-lg: 0 20px 48px rgba(190,30,78,.18);
  --header-bg: rgba(253,244,245,.95);
  --hero-grad: linear-gradient(135deg, #f9e3e8 0%, #fad5dd 50%, #fdf4f5 100%);
}
.theme-midnight {
  --bg: #0f0d12; --bg-soft: #1a1620; --surface: #1a1620; --surface-2: #221c2a;
  --border: #2e2638; --border-2: #443956;
  --text: #f5e9c8; --text-2: #c7b691; --text-muted: #8a7a5d;
  --primary: #d4a857; --primary-h: #b58a3a; --primary-50: #2a2114;
  --accent: #e6c882; --gold: #d4a857;
  --success: #4ade80; --danger: #f87171;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 4px 16px rgba(0,0,0,.5);
  --shadow-lg: 0 20px 48px rgba(0,0,0,.7);
  --header-bg: rgba(15,13,18,.95);
  --hero-grad: linear-gradient(135deg, #1a1620 0%, #221c2a 50%, #0f0d12 100%);
}

/* 💎 الزمردي — أخضر فاخر مع لمسات ذهبية */
.theme-emerald {
  --bg: #f0fdf4; --bg-soft: #ffffff; --surface: #ffffff; --surface-2: #ecfdf5;
  --border: #d1fae5; --border-2: #a7f3d0;
  --text: #064e3b; --text-2: #047857; --text-muted: #6b7280;
  --primary: #059669; --primary-h: #047857; --primary-50: #d1fae5;
  --accent: #d4a857; --gold: #d4a857;
  --success: #10b981; --danger: #dc2626;
  --shadow-sm: 0 1px 2px rgba(5,150,105,.08);
  --shadow: 0 4px 16px rgba(5,150,105,.12);
  --shadow-lg: 0 20px 48px rgba(5,150,105,.18);
  --header-bg: rgba(255,255,255,.95);
  --hero-grad: linear-gradient(135deg, #d1fae5 0%, #ecfdf5 50%, #f0fdf4 100%);
}

/* 🌅 الغروب — برتقالي دافئ وبنفسجي */
.theme-sunset {
  --bg: #fff7ed; --bg-soft: #ffffff; --surface: #ffffff; --surface-2: #ffedd5;
  --border: #fed7aa; --border-2: #fdba74;
  --text: #7c2d12; --text-2: #9a3412; --text-muted: #78716c;
  --primary: #ea580c; --primary-h: #c2410c; --primary-50: #ffedd5;
  --accent: #9333ea; --gold: #f59e0b;
  --success: #16a34a; --danger: #dc2626;
  --shadow-sm: 0 1px 2px rgba(234,88,12,.08);
  --shadow: 0 4px 16px rgba(234,88,12,.12);
  --shadow-lg: 0 20px 48px rgba(234,88,12,.18);
  --header-bg: rgba(255,255,255,.95);
  --hero-grad: linear-gradient(135deg, #fed7aa 0%, #ffedd5 50%, #fff7ed 100%);
}

/* 🤍 البلاتيني — رمادي راقي مع نحاسي */
.theme-platinum {
  --bg: #f8fafc; --bg-soft: #ffffff; --surface: #ffffff; --surface-2: #f1f5f9;
  --border: #e2e8f0; --border-2: #cbd5e1;
  --text: #1e293b; --text-2: #334155; --text-muted: #64748b;
  --primary: #475569; --primary-h: #334155; --primary-50: #f1f5f9;
  --accent: #b87333; --gold: #b87333;
  --success: #10b981; --danger: #ef4444;
  --shadow-sm: 0 1px 2px rgba(71,85,105,.06);
  --shadow: 0 4px 16px rgba(71,85,105,.1);
  --shadow-lg: 0 20px 48px rgba(71,85,105,.15);
  --header-bg: rgba(255,255,255,.95);
  --hero-grad: linear-gradient(135deg, #e2e8f0 0%, #f1f5f9 50%, #f8fafc 100%);
}

/* 🌌 الشفق — بنفسجي وأزرق نيون داكن */
.theme-aurora {
  --bg: #1e1b4b; --bg-soft: #312e81; --surface: #312e81; --surface-2: #3730a3;
  --border: #4338ca; --border-2: #6366f1;
  --text: #e0e7ff; --text-2: #c7d2fe; --text-muted: #818cf8;
  --primary: #a78bfa; --primary-h: #8b5cf6; --primary-50: #3730a3;
  --accent: #fbbf24; --gold: #fbbf24;
  --success: #34d399; --danger: #fb7185;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 4px 16px rgba(167,139,250,.3);
  --shadow-lg: 0 20px 48px rgba(167,139,250,.4);
  --header-bg: rgba(30,27,75,.95);
  --hero-grad: linear-gradient(135deg, #3730a3 0%, #312e81 50%, #1e1b4b 100%);
}

/* ❤️ الياقوتي — أحمر عميق وفاخر */
.theme-ruby {
  --bg: #fef2f2; --bg-soft: #ffffff; --surface: #ffffff; --surface-2: #fee2e2;
  --border: #fecaca; --border-2: #fca5a5;
  --text: #7f1d1d; --text-2: #991b1b; --text-muted: #6b7280;
  --primary: #dc2626; --primary-h: #b91c1c; --primary-50: #fee2e2;
  --accent: #d4a857; --gold: #d4a857;
  --success: #16a34a; --danger: #991b1b;
  --shadow-sm: 0 1px 2px rgba(220,38,38,.08);
  --shadow: 0 4px 16px rgba(220,38,38,.12);
  --shadow-lg: 0 20px 48px rgba(220,38,38,.18);
  --header-bg: rgba(255,255,255,.95);
  --hero-grad: linear-gradient(135deg, #fecaca 0%, #fee2e2 50%, #fef2f2 100%);
}

/* ===== الأساسيات ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; scroll-behavior: smooth; }
body {
  font-family: 'Cairo', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  direction: rtl;
}
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-h); }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ===== الشريط العلوي ===== */
.topbar { background: var(--surface-2); border-bottom: 1px solid var(--border); padding: 6px 0; font-size: 12px; color: var(--text-2); }
.topbar .container { display: flex; justify-content: space-between; align-items: center; }
.topbar a { color: var(--text-2); }

/* ===== الـ Header ===== */
.header {
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  padding: 16px 0;
}
.header .container {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px; font-weight: 700;
  color: var(--primary);
  display: flex; gap: 10px; align-items: center;
}
.logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.nav { display: flex; gap: 8px; }
.nav a {
  padding: 8px 14px; border-radius: 8px;
  color: var(--text); font-weight: 500; font-size: 14px;
  transition: all .2s;
}
.nav a:hover, .nav a.active { background: var(--primary-50); color: var(--primary); }
.header-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn {
  width: 40px; height: 40px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text);
  display: flex; align-items: center; justify-content: center;
  position: relative; cursor: pointer;
}
.icon-btn:hover { background: var(--primary-50); color: var(--primary); }
.icon-btn .badge-count {
  position: absolute; top: -4px; left: -4px;
  background: var(--primary); color: white;
  font-size: 10px; font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: 30px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
}

/* ===== الـ Hero ===== */
.hero {
  background: var(--hero-grad);
  padding: 80px 0;
  position: relative; overflow: hidden;
}
.hero::before, .hero::after {
  content: '✦';
  position: absolute;
  font-size: 200px; color: var(--primary); opacity: .04;
}
.hero::before { top: -40px; left: 5%; }
.hero::after { bottom: -60px; right: 8%; font-size: 280px; }
.hero-inner { position: relative; text-align: center; max-width: 720px; margin: 0 auto; }
.hero-eyebrow {
  display: inline-block; padding: 6px 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 30px; font-size: 13px; color: var(--text-2);
  margin-bottom: 20px;
}
.hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700; line-height: 1.1;
  color: var(--text); margin: 0 0 16px;
}
.hero h1 span { color: var(--primary); }
.hero p {
  font-size: 17px; color: var(--text-2);
  max-width: 560px; margin: 0 auto 32px;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ===== الأزرار ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; font-size: 14px; font-weight: 600;
  border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; font-family: inherit;
  transition: all .2s;
}
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-h); transform: translateY(-1px); box-shadow: var(--shadow); color: white; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-2); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-block { width: 100%; justify-content: center; }

/* ===== الأقسام ===== */
section { padding: 64px 0; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-eyebrow {
  font-size: 12px; color: var(--primary);
  text-transform: uppercase; letter-spacing: 2px;
  font-weight: 600; margin-bottom: 8px;
}
.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px; font-weight: 600;
  color: var(--text); margin: 0 0 8px;
}
.section-subtitle { color: var(--text-2); font-size: 15px; }

/* ===== التصنيفات ===== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.category-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px 16px;
  text-align: center; transition: all .25s;
  color: var(--text); position: relative; overflow: hidden;
}
.category-card::before {
  content: ''; position: absolute; top: 0; right: 0; width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0); transition: transform .25s; transform-origin: right;
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--primary); }
.category-card:hover::before { transform: scaleX(1); }
.category-card .icon { font-size: 40px; margin-bottom: 8px; }
.category-card .name { font-weight: 600; font-size: 15px; }
.category-card .count { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ===== المنتجات (200×200 ثابت + flexbox) ===== */
.products-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: flex-start;
  max-width: 1200px;
  margin: 0 auto;
}
@media (max-width: 480px) {
  .products-grid { justify-content: center; }
}
.product-card {
  width: 200px;
  flex: 0 0 200px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
  transition: all .25s; position: relative;
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.product-image-wrap {
  width: 200px;
  height: 200px;
  background: var(--surface-2);
  position: relative; overflow: hidden;
  flex-shrink: 0;
}
.product-image-wrap img { width: 200px; height: 200px; object-fit: cover; transition: transform .4s; }
.product-card:hover .product-image-wrap img { transform: scale(1.05); }
.product-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 44px; color: var(--text-muted);
}
.product-badge-wrap {
  position: absolute; top: 8px; left: 8px;
  display: flex; flex-direction: column; gap: 5px;
  z-index: 2;
}
.product-badge {
  padding: 3px 9px; border-radius: 16px;
  font-size: 10px; font-weight: 600;
  background: var(--primary); color: white;
}
.product-badge.sale {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: white;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(220,38,38,0.4);
  animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.product-info { padding: 12px; flex: 1; display: flex; flex-direction: column; }
.product-category { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 3px; }
.product-name {
  font-weight: 600; font-size: 13px; color: var(--text);
  margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 34px;
}
.product-price-row { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.product-price { font-size: 15px; font-weight: 700; color: var(--primary); }
.product-old-price { font-size: 11px; color: var(--text-muted); text-decoration: line-through; }
.product-actions { display: flex; gap: 6px; margin-top: auto; }
.product-actions .btn { flex: 1; justify-content: center; font-size: 12px; padding: 7px; }

@media (max-width: 480px) {
  .product-card, .product-image-wrap, .product-image-wrap img { width: 170px; height: auto; }
  .product-image-wrap, .product-image-wrap img { height: 170px; }
}

/* ===== صفحة المنتج ===== */
.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  direction: rtl; /* المعرض يمين، المعلومات يسار دائماً */
}
.product-detail > * { direction: rtl; }
.product-detail .product-gallery { grid-column: 1; }    /* أول عمود = يمين في RTL */
.product-detail > div:not(.product-gallery):not(.gallery-lightbox) { grid-column: 2; }  /* ثاني عمود = يسار */
@media (max-width: 900px) {
  .product-detail { grid-template-columns: 1fr; }
  .product-detail .product-gallery,
  .product-detail > div:not(.product-gallery):not(.gallery-lightbox) { grid-column: 1; }
}
.product-detail-image {
  aspect-ratio: 1; background: var(--surface-2);
  border-radius: 16px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.product-detail-image img { width: 100%; height: 100%; object-fit: cover; }
.product-detail-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px; font-weight: 600;
  color: var(--text); margin: 16px 0;
}
.product-detail-price {
  font-size: 32px; font-weight: 700;
  color: var(--primary); margin-bottom: 16px;
}
.product-detail-desc {
  color: var(--text-2); font-size: 15px;
  margin-bottom: 24px; line-height: 1.8;
}
.quantity-selector {
  display: inline-flex; align-items: center;
  border: 1px solid var(--border-2); border-radius: 10px;
  overflow: hidden; margin-bottom: 16px;
}
.quantity-selector button {
  width: 38px; height: 38px;
  background: var(--surface-2); border: 0;
  cursor: pointer; font-size: 16px; color: var(--text);
}
.quantity-selector input {
  width: 50px; height: 38px;
  text-align: center; border: 0;
  background: var(--surface); color: var(--text);
  font-size: 15px; font-weight: 600;
}

/* ===== السلة ===== */
.cart-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
@media (max-width: 900px) { .cart-layout { grid-template-columns: 1fr; } }
.cart-item {
  display: grid; grid-template-columns: 80px 1fr auto auto auto;
  gap: 16px; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px; margin-bottom: 12px;
}
.cart-item img, .cart-item .ph {
  width: 80px; height: 80px; object-fit: cover;
  border-radius: 8px; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
}
.cart-summary {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px;
  position: sticky; top: 100px; height: fit-content;
}
.cart-summary h3 {
  margin: 0 0 16px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
}
.cart-summary-row {
  display: flex; justify-content: space-between;
  padding: 10px 0; font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.cart-summary-row.total {
  font-size: 18px; font-weight: 700;
  color: var(--primary); border-bottom: 0;
  padding-top: 16px; margin-top: 8px;
  border-top: 2px solid var(--primary);
}

/* ===== النماذج ===== */
.form-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 28px;
  max-width: 480px; margin: 0 auto;
  box-shadow: var(--shadow-sm);
}
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; font-size: 13px;
  font-weight: 500; color: var(--text-2);
  margin-bottom: 6px;
}
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--border-2); border-radius: 10px;
  background: var(--surface); color: var(--text);
  font-size: 14px; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-50);
}
.form-textarea { min-height: 100px; resize: vertical; }
.form-divider {
  text-align: center; color: var(--text-muted);
  font-size: 12px; position: relative; margin: 20px 0;
}
.form-divider::before, .form-divider::after {
  content: ''; position: absolute; top: 50%;
  width: 40%; height: 1px; background: var(--border);
}
.form-divider::before { right: 0; }
.form-divider::after { left: 0; }
.social-btn {
  width: 100%; padding: 11px;
  border: 1px solid var(--border-2); border-radius: 10px;
  background: var(--surface); color: var(--text);
  font-size: 14px; font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 8px; cursor: pointer; font-family: inherit;
}
.social-btn:hover { background: var(--surface-2); }

/* ===== التنبيهات ===== */
.alert {
  padding: 12px 16px; border-radius: 10px;
  margin-bottom: 16px; font-size: 14px;
  border: 1px solid;
}
.alert-success { background: rgba(22,163,74,.08); color: var(--success); border-color: var(--success); }
.alert-danger  { background: rgba(220,38,38,.08); color: var(--danger); border-color: var(--danger); }
.alert-info    { background: var(--primary-50); color: var(--primary); border-color: var(--primary); }

/* ===== الحالة الفارغة ===== */
.empty-state {
  text-align: center; padding: 80px 20px;
  color: var(--text-muted);
}
.empty-state .icon { font-size: 80px; margin-bottom: 16px; opacity: .4; }
.empty-state h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px; color: var(--text); margin: 0 0 8px;
}
.empty-state p { color: var(--text-2); margin-bottom: 20px; }

/* ===== الـ Footer ===== */
.footer {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: 64px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px; color: var(--primary);
  margin-bottom: 12px;
}
.footer-text {
  color: var(--text-2); font-size: 14px;
  line-height: 1.7;
}
.footer h4 {
  font-size: 14px; color: var(--text);
  margin: 0 0 12px; font-weight: 600;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { margin-bottom: 8px; }
.footer ul a {
  color: var(--text-2); font-size: 14px;
}
.footer ul a:hover { color: var(--primary); }
.footer-bottom {
  text-align: center;
  padding-top: 24px;
  margin-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted); font-size: 13px;
}

/* ===== التجاوب ===== */
@media (max-width: 768px) {
  .nav { display: none; }
  .container { padding: 0 16px; }
  section { padding: 40px 0; }
}

/* ═══════════════════════════════════════════════════════════
   🏷️ Brand Showcase — تصميم فاخر للماركة على صفحة المنتج
   ═══════════════════════════════════════════════════════════ */
.brand-showcase {
  position: relative;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-light, var(--primary)));
  color: white;
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(184, 137, 61, 0.25);
}

/* تأثير اللمعان المتحرك */
.brand-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.18) 50%, transparent 70%);
  animation: brandShimmer 3.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes brandShimmer {
  0%   { transform: translateX(-100%); }
  50%  { transform: translateX(100%); }
  100% { transform: translateX(100%); }
}

.brand-content {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  z-index: 2;
}
.brand-logo-wrap {
  width: 56px;
  height: 56px;
  background: rgba(255,255,255,0.92);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}
.brand-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.brand-text { flex: 1; }
.brand-label {
  font-size: 10px;
  letter-spacing: 3px;
  opacity: 0.85;
  margin-bottom: 2px;
  font-weight: 600;
}
.brand-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.brand-verified {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.18);
  padding: 6px 10px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 600;
  backdrop-filter: blur(8px);
}
.brand-verified svg { color: #fff; }

/* 🌟 سطر الماركة (Make) — أنيق وخفيف */
.make-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-soft);
  border: 1px dashed var(--border-2);
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.make-prefix { font-size: 11px; opacity: 0.8; }
.make-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  background: white;
  border-radius: 4px;
  padding: 2px;
}
.make-name {
  font-weight: 600;
  color: var(--text);
}

/* 🏷️ شارة البراند على بطاقات قائمة المنتجات */
.product-brand-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 10px;
  font-weight: 600;
  backdrop-filter: blur(6px);
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
}
.product-brand-badge img {
  width: 14px;
  height: 14px;
  object-fit: contain;
  background: white;
  border-radius: 3px;
  padding: 1px;
}

/* موبايل */
@media (max-width: 480px) {
  .brand-name { font-size: 16px; }
  .brand-logo-wrap { width: 48px; height: 48px; }
  .brand-verified { font-size: 10px; padding: 4px 8px; }
  .brand-verified span { display: none; }
}

/* ===================================================================
   🖼 معرض صور المنتج (slider 400×400 - مربع واحد)
   =================================================================== */
.product-gallery {
  display: flex;
  justify-content: flex-start;
}
.gallery-slider-wrap {
  position: relative;
  max-width: 100%;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: var(--shadow);
}
.gallery-slider {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.gallery-slider::-webkit-scrollbar { display: none; height: 0; }
.gallery-slide {
  flex: 0 0 100%;
  width: 100%; height: 100%;
  scroll-snap-align: start;
  cursor: zoom-in;
}
.gallery-slide img {
  width: 100%; height: 100%; object-fit: cover;
  pointer-events: none;
}

/* موبايل: ملء العرض */
@media (max-width: 480px) {
  .gallery-slider-wrap { width: 100%; }
}

/* أزرار التنقّل */
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.95); border: none;
  cursor: pointer; font-size: 22px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  z-index: 3;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
  transition: all .2s;
  color: var(--text);
}
.gallery-nav:hover { background: var(--primary); color: white; transform: translateY(-50%) scale(1.1); }
.gallery-nav-prev { right: 12px; }   /* RTL: السابق على اليمين */
.gallery-nav-next { left: 12px; }    /* RTL: التالي على اليسار */

/* عدّاد + نقاط */
.gallery-counter {
  position: absolute; top: 12px; left: 12px;
  background: rgba(0,0,0,0.7); color: white;
  padding: 5px 14px; border-radius: 14px;
  font-size: 12px; font-weight: 600;
  z-index: 2;
  font-family: monospace;
}
.gallery-dots {
  position: absolute; bottom: 14px;
  left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px;
  z-index: 2;
}
.gallery-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: all .25s;
}
.gallery-dot:hover { background: rgba(255,255,255,0.9); }
.gallery-dot.active {
  background: white;
  width: 26px;
  border-radius: 4px;
}

/* Lightbox (zoom modal) */
.gallery-lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.95);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.gallery-lightbox.open { display: flex; }
.gallery-lightbox img {
  max-width: 92vw; max-height: 92vh;
  object-fit: contain; border-radius: 8px;
}
.gallery-lightbox .lb-close {
  position: absolute; top: 20px; right: 20px;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.95); border: none;
  font-size: 22px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.gallery-lightbox .lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 50px; height: 50px; border-radius: 50%;
  background: rgba(255,255,255,0.2); border: none; color: white;
  font-size: 24px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.gallery-lightbox .lb-nav:hover { background: rgba(255,255,255,0.35); }
.gallery-lightbox .lb-prev { right: 20px; }
.gallery-lightbox .lb-next { left: 20px; }
.gallery-lightbox .lb-counter {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  color: white; background: rgba(0,0,0,0.5);
  padding: 6px 18px; border-radius: 20px; font-weight: 600;
}

/* فلتر العروض */
.discount-filter-btn {
  padding: 6px 16px; border-radius: 30px;
  border: 1px solid #dc2626; color: #dc2626;
  font-size: 13px; font-weight: 600;
  background: white; cursor: pointer;
  transition: all .2s;
  display: inline-flex; align-items: center; gap: 6px;
}
.discount-filter-btn:hover { background: #fef2f2; }
.discount-filter-btn.active {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: white; border-color: transparent;
  box-shadow: 0 2px 8px rgba(220,38,38,0.3);
}
