:root {
  /* لوحة فرات ستور Vibrant Retail (فلات) */
  --bg: #faf8ff;
  --card: #ffffff;
  --text: #1e1b2e;
  --muted: #6b6585;
  --primary: #7c3aed;
  --primary-dark: #5b21b6;
  --accent: #0d9488;
  --accent-2: #ec4899;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --border: #e7e1f5;
  --primary-soft: #f3eefe;
  --shadow: 0 4px 18px rgba(91, 33, 182, .08);
  --shadow-lg: 0 14px 40px rgba(91, 33, 182, .14);
  --radius: 16px;
  --radius-lg: 22px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Cairo', 'Tajawal', 'Segoe UI', Tahoma, system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  direction: rtl;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* نقشة الخلفية كطبقة ثابتة (لا تُعاد رسمتها عند التمرير = أداء أفضل) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url('/images/pattern-shop.svg') 0 0 / 230px 230px;
  pointer-events: none;
}

button, input, textarea, select { font-family: inherit; }

a { color: var(--primary); text-decoration: none; }

/* ===== Header ===== */
.header {
  background: #ffffff;
  box-shadow: var(--shadow);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  font-size: 22px; font-weight: 800; color: var(--text);
  display: inline-flex; align-items: center; gap: 9px;
}
.brand .logo-icon { width: 34px; height: 34px; display: block; }
.brand .brand-logo { height: 42px; width: auto; display: block; }
.brand .brand-name { line-height: 1; color: var(--primary); font-weight: 800; }
.brand a, .brand a:hover { display: inline-flex; align-items: center; gap: 10px; }
@media (max-width: 760px) { .brand .brand-logo { height: 36px; } .brand .brand-name { font-size: 19px; } }
.nav { display: flex; gap: 18px; align-items: center; }
.nav a { color: var(--muted); font-weight: 600; }
.nav a:hover { color: var(--primary); }

.cart-btn {
  position: relative;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(124, 58, 237, .28);
  transition: transform .15s, box-shadow .15s;
}
.cart-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(124, 58, 237, .35); }
.cart-count {
  position: absolute;
  top: -8px;
  left: -8px;
  background: var(--danger);
  color: #fff;
  border-radius: 50%;
  min-width: 22px;
  height: 22px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.container { max-width: 1100px; margin: 0 auto; padding: 24px 20px; }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, #2563eb, #1e40af);
  color: #fff;
  border-radius: var(--radius);
  padding: 40px 30px;
  margin-bottom: 28px;
}
.hero h1 { margin: 0 0 10px; font-size: 30px; }
.hero p { margin: 0; opacity: .92; font-size: 16px; }
.cod-badge {
  display: inline-block;
  margin-top: 16px;
  background: rgba(255,255,255,.2);
  padding: 8px 16px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 14px;
}

/* ===== Products grid ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
}
.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: #d6c8f7;
}
.product-img {
  position: relative;
  height: 210px;
  background-color: #ffffff;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.product-body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.product-name { font-weight: 800; font-size: 16px; margin-bottom: 6px; }
.product-desc { color: var(--muted); font-size: 13px; flex: 1; margin-bottom: 12px; line-height: 1.6; }
.product-price { font-size: 20px; font-weight: 800; color: var(--primary); margin-bottom: 12px; }
.out-of-stock { color: var(--danger); font-weight: 700; font-size: 13px; }

/* أسعار الخصم */
.price-now { color: var(--primary); font-weight: 800; }
.price-old { color: var(--muted); text-decoration: line-through; font-size: .78em; font-weight: 600; margin: 0 4px; }
.disc-badge { background: var(--accent-2); color: #fff; border-radius: 8px; padding: 1px 8px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.disc-corner {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: var(--accent-2); color: #fff; border-radius: 30px; padding: 4px 11px;
  font-size: 12px; font-weight: 800; box-shadow: 0 2px 8px rgba(0,0,0,.18);
}

/* شريط البحث والترتيب */
.shop-toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.shop-toolbar .search-box { position: relative; flex: 1; min-width: 200px; }
.shop-toolbar .search-box input {
  width: 100%; padding: 12px 42px 12px 14px; border: 1px solid var(--border); border-radius: 12px;
  font-family: inherit; font-size: 15px; background: #fff;
}
.shop-toolbar .search-box input:focus { outline: none; border-color: var(--primary); }
.shop-toolbar .search-box::before { content: '🔍'; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); opacity: .6; }
.shop-toolbar select {
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; font-family: inherit;
  font-size: 14px; font-weight: 700; background: #fff; cursor: pointer;
}

.btn {
  border: none;
  border-radius: 12px;
  padding: 11px 18px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(124,58,237,.25); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: #fff; box-shadow: 0 4px 12px rgba(22,163,74,.22); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-light { background: #fff; color: var(--primary-dark); }
.btn-ghost { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.7); }
.btn-ghost:hover { background: rgba(255,255,255,.15); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ===== Cart drawer ===== */
.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  display: none;
  z-index: 90;
}
.overlay.open { display: block; }
.drawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 380px;
  max-width: 90vw;
  background: var(--card);
  z-index: 100;
  transform: translateX(-100%);
  transition: transform .25s;
  display: flex;
  flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.drawer-head h3 { margin: 0; }
.close-btn { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--muted); }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.drawer-foot { padding: 18px 20px; border-top: 1px solid var(--border); }

.cart-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 700; font-size: 14px; }
.cart-item-price { color: var(--muted); font-size: 13px; }
.qty-controls { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.qty-controls button {
  width: 28px; height: 28px;
  border: 1px solid var(--border);
  background: #fff; border-radius: 8px;
  cursor: pointer; font-size: 16px;
}
.remove-link { color: var(--danger); font-size: 12px; cursor: pointer; background: none; border: none; }
.total-row { display: flex; justify-content: space-between; font-size: 18px; font-weight: 800; margin-bottom: 14px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ===== Forms / modal ===== */
.modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 110;
  padding: 20px;
}
.modal.open { display: flex; }
.modal-card {
  background: var(--card);
  border-radius: var(--radius);
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 26px;
}
.modal-card h3 { margin-top: 0; }

.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}
.field textarea { resize: vertical; min-height: 70px; }

.alert { padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; font-size: 14px; font-weight: 600; }
.alert-error { background: #fee2e2; color: var(--danger); }
.alert-success { background: #dcfce7; color: var(--success); }
.alert-info { background: #dbeafe; color: var(--primary-dark); }

/* ===== Tracking ===== */
.track-box {
  max-width: 560px; margin: 0 auto;
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 30px;
}
.timeline { list-style: none; padding: 0; margin: 20px 0 0; }
.timeline li { position: relative; padding: 0 28px 22px 0; border-right: 2px solid var(--border); }
.timeline li:last-child { border-right-color: transparent; }
.timeline li::before {
  content: ''; position: absolute; right: -9px; top: 2px;
  width: 16px; height: 16px; border-radius: 50%; background: var(--border);
}
.timeline li.done::before { background: var(--success); }
.timeline .t-label { font-weight: 700; }
.timeline .t-date { color: var(--muted); font-size: 13px; }

.status-pill {
  display: inline-block; padding: 6px 14px; border-radius: 30px;
  font-weight: 700; font-size: 14px; background: #dbeafe; color: var(--primary-dark);
}

/* ===== Admin ===== */
.admin-tabs { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.admin-tabs button {
  background: var(--card); border: 1px solid var(--border);
  padding: 10px 18px; border-radius: 10px; cursor: pointer; font-weight: 700; font-family: inherit;
}
.admin-tabs button.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-bottom: 22px; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 11px 10px; text-align: right; border-bottom: 1px solid var(--border); font-size: 14px; }
.table th { color: var(--muted); font-weight: 700; }
.thumb { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; background: #eef1f6; }

.row-actions { display: flex; gap: 6px; }
.mini-btn { padding: 6px 12px; font-size: 13px; border-radius: 8px; }

.badge { padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.badge-pending { background: #fef3c7; color: var(--warning); }
.badge-confirmed { background: #dbeafe; color: var(--primary-dark); }
.badge-shipped { background: #e0e7ff; color: #4338ca; }
.badge-out_for_delivery { background: #fae8ff; color: #a21caf; }
.badge-delivered { background: #dcfce7; color: var(--success); }
.badge-cancelled { background: #fee2e2; color: var(--danger); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .grid-2 { grid-template-columns: 1fr; } }

/* ===== لوحة المعلومات (Dashboard) ===== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; border-top: 3px solid var(--primary);
}
.stat-card .stat-icon { font-size: 22px; }
.stat-card .stat-value { font-size: 26px; font-weight: 800; margin-top: 6px; line-height: 1.2; }
.stat-card .stat-label { color: var(--muted); font-size: 14px; margin-top: 2px; }
.stat-card.s-green { border-top-color: var(--success); }
.stat-card.s-amber { border-top-color: var(--warning); }
.stat-card.s-pink { border-top-color: var(--accent-2); }

.bar-chart { width: 100%; height: auto; display: block; }
.bar-chart .bar { fill: var(--primary); rx: 3; transition: fill .15s; }
.bar-chart .bar.green { fill: var(--success); }
.bar-chart .lbl { fill: var(--muted); font-size: 9px; }
.bar-chart .val { fill: var(--text); font-size: 9px; font-weight: 700; }
.chart-empty { color: var(--muted); text-align: center; padding: 30px 0; }

.top-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.top-row .top-name { flex: 0 0 130px; font-weight: 700; font-size: 14px; }
.top-bar { flex: 1; height: 16px; background: var(--primary-soft); border-radius: 8px; overflow: hidden; }
.top-bar > span { display: block; height: 100%; background: var(--primary); border-radius: 8px; }
.top-qty { font-weight: 800; font-size: 13px; min-width: 50px; text-align: left; }

.login-wrap { min-height: 70vh; display: flex; align-items: center; justify-content: center; }
.login-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; width: 100%; max-width: 380px; }

.muted { color: var(--muted); }
.text-center { text-align: center; }
.mt { margin-top: 14px; }
.hidden { display: none !important; }
.copy-box {
  background: #eef1f6; padding: 12px; border-radius: 10px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  font-weight: 700; margin: 10px 0;
}

/* ===== Slider ===== */
.slider {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 38px;
  box-shadow: var(--shadow-lg);
  height: 430px;
}
.slides-track { height: 100%; position: relative; }
.slide {
  position: absolute; inset: 0;
  color: #fff;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity .6s ease; pointer-events: none;
}
.slide.active { opacity: 1; pointer-events: auto; }
.slide-overlay { position: absolute; inset: 0; background: rgba(20,10,40,.32); z-index: 1; }
.slide-deco {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: url('/images/hero-deco.svg') center/cover no-repeat;
}
.slide-inner {
  position: relative; z-index: 2;
  height: 100%; max-width: 1040px; margin: 0 auto;
  padding: 30px 56px;
  display: flex; align-items: center; gap: 30px;
}
.slide-inner.slide-center { justify-content: center; text-align: center; }

/* شريحة منتج */
.slide-product .slide-text { flex: 1; }
.slide-media {
  flex: 0 0 42%;
  display: flex; align-items: center; justify-content: center;
}
.slide-media img {
  width: 100%; max-width: 360px; height: 300px;
  object-fit: cover; border-radius: 20px;
  background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.slide-eyebrow {
  display: inline-block; background: rgba(255,255,255,.22);
  padding: 6px 14px; border-radius: 30px; font-size: 13px; font-weight: 700;
  margin-bottom: 14px;
}
.slide-text h2 { font-size: 36px; line-height: 1.2; margin: 0 0 12px; }
.slide-text p { font-size: 16px; margin: 0 0 16px; opacity: .92; line-height: 1.7; max-width: 520px; }
.slide-text.center p { margin-right: auto; margin-left: auto; }
.slide-price {
  font-size: 30px; font-weight: 800; margin-bottom: 20px;
  display: inline-flex; align-items: center; gap: 8px;
}
.slide-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.slide-center .slide-actions { justify-content: center; }
.slide-text .btn { font-size: 15px; padding: 12px 26px; }

.slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 5; background: rgba(255,255,255,.9); color: var(--primary-dark);
  border: none; width: 44px; height: 44px; border-radius: 50%;
  font-size: 24px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.15); transition: background .15s, transform .15s;
}
.slider-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.08); }
.slider-arrow.prev { right: 16px; }
.slider-arrow.next { left: 16px; }
.slider-dots {
  position: absolute; bottom: 16px; left: 0; right: 0; z-index: 5;
  display: flex; gap: 8px; justify-content: center;
}
.slider-dots button {
  width: 11px; height: 11px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.5); cursor: pointer; padding: 0; transition: all .2s;
}
.slider-dots button.active { background: #fff; width: 28px; border-radius: 6px; }

/* ===== Features ===== */
.section-title {
  font-size: 24px; font-weight: 800; margin: 6px 0 20px;
  display: flex; align-items: center; gap: 10px;
}
.section-title::before {
  content: ''; width: 6px; height: 26px; border-radius: 6px;
  background: var(--primary); display: inline-block;
}
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px; margin-bottom: 40px;
}
.feature-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 28px 20px; text-align: center;
  transition: transform .2s, box-shadow .2s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature-icon {
  font-size: 34px; line-height: 1; margin: 0 auto 14px;
  width: 70px; height: 70px; border-radius: 50%;
  background: var(--primary-soft); display: flex; align-items: center; justify-content: center;
}
.feature-card h4 { margin: 0 0 6px; font-size: 17px; }
.feature-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

/* ===== WhatsApp float + contact ===== */
.wa-float {
  position: fixed; bottom: 22px; left: 22px; z-index: 80;
  background: #25D366; color: #fff; width: 58px; height: 58px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 30px; box-shadow: 0 4px 14px rgba(0,0,0,.25); text-decoration: none;
}
.wa-float:hover { transform: scale(1.06); }

.contact-box {
  max-width: 560px; margin: 0 auto; text-align: center;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 36px 30px;
}
.btn-whatsapp {
  background: #25D366; color: #fff; display: inline-flex; align-items: center;
  gap: 10px; font-size: 17px; padding: 14px 30px;
}
.btn-whatsapp:hover { background: #1da851; }
.wa-ic { background: #fff; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.contact-info { margin-top: 22px; color: var(--muted); }
.contact-info a { font-weight: 700; }

/* repeater rows (admin features) */
.feature-row { border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 12px; }

/* منتقي الأيقونات */
.icon-picker { display: flex; flex-wrap: wrap; gap: 7px; }
.icon-opt {
  width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 10px;
  background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0;
}
.icon-opt:hover { border-color: var(--primary); }
.icon-opt.active { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 2px var(--primary-soft); }
.cat-chip svg, .filter-tab svg { flex: 0 0 auto; }

/* معاينة صور المنتج في اللوحة */
.img-previews { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.img-preview { position: relative; width: 82px; height: 82px; }
.img-preview img { width: 82px; height: 82px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
.img-preview button {
  position: absolute; top: -7px; left: -7px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--danger); color: #fff; border: none; cursor: pointer; font-size: 13px; line-height: 1; padding: 0;
}
.variant-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.color-chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--border); border-radius: 30px; padding: 5px 8px 5px 10px; font-size: 13px; font-weight: 700; }
.color-chip .dot { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); }
.color-chip button { background: none; border: none; color: var(--danger); cursor: pointer; font-weight: 800; padding: 0; }

/* ===== محرّر الخيارات في لوحة التحكم (لون/مقاس/موديل بصورة وسعر) ===== */
.variant-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.variant-list:empty { display: none; }
.variant-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px;
}
.variant-row .vr-hex { width: 42px; height: 40px; padding: 2px; border-radius: 8px; flex: 0 0 auto; cursor: pointer; }
.variant-row .vr-name { flex: 1 1 150px; min-width: 120px; }
.variant-row .vr-price { flex: 0 1 170px; min-width: 120px; }
.variant-row .vr-img { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.variant-row .vr-img img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); background: #fff; }
.variant-row .vr-noimg { font-size: 12px; color: var(--muted); width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; text-align: center; border: 1px dashed var(--border); border-radius: 8px; line-height: 1.1; }
.variant-row .vr-up { padding: 7px 10px; font-size: 12px; white-space: nowrap; }
.variant-row .vr-del {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; margin-right: auto;
  background: #fff; color: var(--danger); border: 1px solid var(--border); cursor: pointer; font-size: 16px; font-weight: 800; line-height: 1; padding: 0;
}
.variant-row .vr-del:hover { background: var(--danger); color: #fff; }

/* ===== Footer ===== */
.site-footer {
  position: relative; margin-top: 50px;
  background: var(--primary-dark); color: #fff;
  padding: 70px 20px 26px;
}
.site-footer::before {
  content: ''; position: absolute; top: -1px; left: 0; right: 0; height: 90px;
  transform: translateY(-99%);
  background: url('/images/footer-wave.svg') bottom/cover no-repeat;
  pointer-events: none;
}
.footer-inner { max-width: 1100px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; margin-bottom: 12px; }
.footer-brand img { width: 40px; height: 40px; }
.footer-col h4 { margin: 0 0 12px; font-size: 16px; }
.footer-col a, .footer-col p { display: block; color: rgba(255,255,255,.82); margin-bottom: 8px; font-size: 14px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { max-width: 1100px; margin: 26px auto 0; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.18); text-align: center; color: rgba(255,255,255,.7); font-size: 13px; }

/* ===== Responsive ===== */
@media (max-width: 760px) {
  .slide-inner { flex-direction: column-reverse; justify-content: center; text-align: center; gap: 10px; padding: 22px 38px 44px; }
  .slide-product .slide-text { flex: none; }
  .slide-media { flex: none; }
  .slide-media img { height: 150px; max-width: 280px; box-shadow: none; }
  .slide-actions { justify-content: center; }
  .slide-product .slide-actions .btn-ghost { display: none; }
  .slide-eyebrow { margin-bottom: 8px; }
  .slide-text h2 { font-size: 23px; margin-bottom: 8px; }
  .slide-text p { display: none; }
  .slide-price { font-size: 23px; margin-bottom: 12px; }
  .slider { height: 430px; }
  .slider-arrow { width: 38px; height: 38px; font-size: 20px; }
}
@media (max-width: 600px) {
  .feature-row { grid-template-columns: 1fr; }
}

/* الهيدر على الشاشات الصغيرة */
@media (max-width: 700px) {
  .header-inner { flex-wrap: wrap; gap: 10px; padding: 12px 14px; }
  .brand { font-size: 18px; width: 100%; justify-content: center; text-align: center; }
  .nav { width: 100%; justify-content: center; gap: 14px; flex-wrap: wrap; }
  .nav a { font-size: 14px; }
  .cart-btn { padding: 8px 14px; font-size: 14px; }
}

/* ========================================================
   صفحات التتبّع والتواصل — رسومات وحركات
   ======================================================== */
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes pulseRing { 0% { box-shadow: 0 0 0 0 rgba(124,58,237,.45); } 70% { box-shadow: 0 0 0 16px rgba(124,58,237,0); } 100% { box-shadow: 0 0 0 0 rgba(124,58,237,0); } }
@keyframes dotPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.35); } }

.float-anim { animation: floatY 4s ease-in-out infinite; }
.fade-up { animation: fadeUp .6s ease both; }
.fade-up.d1 { animation-delay: .08s; }
.fade-up.d2 { animation-delay: .16s; }
.fade-up.d3 { animation-delay: .24s; }

/* بطل الصفحة (تتبّع / تواصل) */
.page-hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 28px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 36px; margin-bottom: 30px;
}
.page-hero::before {
  content: ''; position: absolute; inset: 0; z-index: 0; opacity: .5;
  background: url('/images/pattern-shop.svg') center/200px;
}
.page-hero > * { position: relative; z-index: 1; }
.page-hero .ph-text { flex: 1; }
.page-hero .ph-eyebrow {
  display: inline-block; background: var(--primary-soft); color: var(--primary-dark);
  padding: 6px 14px; border-radius: 30px; font-weight: 700; font-size: 13px; margin-bottom: 12px;
}
.page-hero h1 { font-size: 30px; margin: 0 0 10px; }
.page-hero p { color: var(--muted); font-size: 16px; line-height: 1.8; margin: 0 0 18px; }
.page-hero .ph-art { flex: 0 0 40%; display: flex; justify-content: center; }
.page-hero .ph-art img { width: 100%; max-width: 320px; }

/* مربّع بحث التتبّع */
.track-search { display: flex; gap: 10px; }
.track-search input {
  flex: 1; padding: 14px 16px; border: 2px solid var(--border); border-radius: 14px;
  font-size: 16px; font-family: inherit; font-weight: 700; text-align: center; letter-spacing: 1px;
  background: #fff; transition: border-color .15s;
}
.track-search input:focus { outline: none; border-color: var(--primary); }
.track-search .btn { padding: 14px 26px; font-size: 16px; }

/* حالة فارغة */
.empty-state {
  text-align: center; background: var(--card); border: 1px dashed var(--border);
  border-radius: var(--radius-lg); padding: 40px 24px; margin-top: 22px;
}
.empty-state img { width: 200px; max-width: 60%; margin-bottom: 14px; }
.empty-state h3 { margin: 0 0 6px; }
.empty-state p { color: var(--muted); margin: 0; }

/* خطوات «كيف يعمل» */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px; }
.step-card {
  position: relative; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 20px 22px; text-align: center;
}
.step-num {
  width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 50%;
  background: var(--primary); color: #fff; font-weight: 800; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.step-card h4 { margin: 0 0 6px; font-size: 16px; }
.step-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

/* بطاقات طرق التواصل */
.contact-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin: 24px 0; }
.method-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 26px 22px; text-align: center;
  transition: transform .2s, box-shadow .2s; text-decoration: none; color: inherit; display: block;
}
.method-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.method-icon {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center; font-size: 30px;
}
.method-icon.wa { background: rgba(37,211,102,.14); }
.method-icon.phone { background: var(--primary-soft); }
.method-icon.clock { background: rgba(13,148,136,.13); }
.method-card h4 { margin: 0 0 4px; font-size: 17px; }
.method-card p { margin: 0; color: var(--muted); font-size: 14px; }
.method-card .m-value { font-weight: 800; color: var(--primary-dark); margin-top: 6px; direction: ltr; }

/* أسئلة شائعة */
.faq { max-width: 760px; margin: 0 auto; }
.faq-item {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  margin-bottom: 12px; padding: 4px 18px; box-shadow: var(--shadow);
}
.faq-item summary {
  cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--primary); font-size: 22px; font-weight: 800; }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { margin: 0 0 16px; color: var(--muted); line-height: 1.7; }

/* تتبّع: شريط تقدّم أفقي */
.track-result { animation: fadeUp .5s ease both; }
.progress-track { display: flex; justify-content: space-between; position: relative; margin: 26px 0 10px; }
.progress-track::before {
  content: ''; position: absolute; top: 17px; right: 6%; left: 6%; height: 4px;
  background: var(--border); border-radius: 4px; z-index: 0;
}
.progress-track .p-fill {
  content: ''; position: absolute; top: 17px; right: 6%; height: 4px;
  background: var(--success); border-radius: 4px; z-index: 1; transition: width .6s ease;
}
.p-step { position: relative; z-index: 2; text-align: center; flex: 1; }
.p-step .p-dot {
  width: 38px; height: 38px; margin: 0 auto 8px; border-radius: 50%;
  background: #fff; border: 3px solid var(--border); color: var(--muted);
  display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 800;
}
.p-step.done .p-dot { background: var(--success); border-color: var(--success); color: #fff; }
.p-step.current .p-dot { background: var(--primary); border-color: var(--primary); color: #fff; animation: dotPulse 1.4s ease-in-out infinite; }
.p-step .p-label { font-size: 12px; font-weight: 700; color: var(--muted); }
.p-step.done .p-label, .p-step.current .p-label { color: var(--text); }

@media (max-width: 720px) {
  .page-hero { flex-direction: column-reverse; text-align: center; padding: 28px 22px; }
  .page-hero .ph-art { flex: none; }
  .page-hero .ph-art img { max-width: 220px; }
  .track-search { flex-direction: column; }
  .p-step .p-label { font-size: 10px; }
  .p-step .p-dot { width: 32px; height: 32px; font-size: 13px; }
}

/* ===== صفحة تفاصيل المنتج ===== */
.breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }

.product-detail {
  display: flex; gap: 34px; align-items: stretch;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 28px; margin-bottom: 36px;
}
/* ===== معرض صور المنتج: كاروسيل داخل نفس مكان الصورة الكبيرة ===== */
.pd-media { flex: 0 0 44%; }

/* الإطار الذي يحمل الصورة الكبيرة + الأسهم + العدّاد + النقاط */
.pd-stage {
  position: relative;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  touch-action: pan-y;
}
.pd-stage #mainImg {
  display: block;
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  background: #fff;
  transition: opacity .28s ease;
  user-select: none;
  -webkit-user-drag: none;
}
.pd-stage.is-fading #mainImg { opacity: 0; }

/* أزرار التنقّل العائمة فوق الصورة — مواضع صريحة كي لا يعكسها RTL */
.pd-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  color: var(--primary);
  cursor: pointer;
  box-shadow: var(--shadow);
  z-index: 3;
  -webkit-tap-highlight-color: transparent;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.pd-nav:hover { background: var(--primary); color: #fff; }
.pd-nav:active { transform: translateY(-50%) scale(.92); }
.pd-nav-prev { left: 12px; }
.pd-nav-next { right: 12px; }

/* عدّاد الصور (n/total) — direction:ltr كي يُقرأ "1/8" صحيحاً تحت RTL */
.pd-counter {
  position: absolute;
  bottom: 12px; right: 12px;
  background: rgba(17,17,17,.62);
  color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 4px 10px;
  border-radius: 30px;
  z-index: 3;
  letter-spacing: .5px;
  direction: ltr;
}
.pd-counter b { font-weight: 800; }

/* النقاط المؤشّرة (بديل شريط الصور المصغّرة) */
.pd-dots {
  position: absolute;
  bottom: 12px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 7px;
  z-index: 2;
  pointer-events: none;
}
.pd-dot {
  width: 8px; height: 8px; padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.85);
  background: rgba(255,255,255,.55);
  box-shadow: 0 0 0 1px rgba(0,0,0,.12);
  cursor: pointer;
  pointer-events: auto;
  transition: background .15s ease, width .2s ease;
}
.pd-dot.active { background: var(--primary); border-color: #fff; width: 20px; border-radius: 30px; }

@media (max-width: 760px) {
  .pd-nav { width: 38px; height: 38px; }
  .pd-nav-prev { left: 8px; }
  .pd-nav-next { right: 8px; }
}

.pd-info { flex: 1; display: flex; flex-direction: column; }
.variant-group { margin-bottom: 16px; }
.variant-group label { display: block; font-weight: 700; margin-bottom: 8px; font-size: 14px; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  border: 2px solid var(--border); border-radius: 30px; padding: 5px 12px 5px 6px;
  font-weight: 700; font-size: 13px; background: #fff;
}
.swatch .dot { width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); }
.swatch.active { border-color: var(--primary); background: var(--primary-soft); }
.size-options { display: flex; gap: 8px; flex-wrap: wrap; }
.size-btn, .model-btn {
  min-width: 46px; padding: 9px 12px; border: 2px solid var(--border); border-radius: 10px;
  background: #fff; font-weight: 700; cursor: pointer; font-family: inherit;
}
.size-btn.active, .model-btn.active { border-color: var(--primary); background: var(--primary); color: #fff; }
.variant-hint { color: var(--danger); font-size: 13px; font-weight: 700; margin-top: 6px; }

.cart-item-variant { color: var(--muted); font-size: 12px; margin: 2px 0; }
.pd-eyebrow {
  display: inline-block; align-self: flex-start; background: var(--primary-soft); color: var(--primary-dark);
  padding: 5px 12px; border-radius: 30px; font-size: 12px; font-weight: 700; margin-bottom: 12px;
}
.pd-info h1 { font-size: 28px; margin: 0 0 10px; }
.pd-price { font-size: 30px; font-weight: 800; color: var(--primary); margin-bottom: 10px; }
.pd-stock { font-size: 14px; font-weight: 700; margin-bottom: 16px; }
.pd-stock.in { color: var(--success); }
.pd-stock.out { color: var(--danger); }
.pd-desc { color: var(--text); line-height: 1.9; margin-bottom: 20px; opacity: .85; }
.pd-cod { background: var(--primary-soft); color: var(--primary-dark); border-radius: 12px; padding: 12px 14px; font-weight: 700; font-size: 14px; margin-bottom: 20px; }

.qty-selector { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.qty-selector .qty-box { display: flex; align-items: center; border: 2px solid var(--border); border-radius: 12px; overflow: hidden; }
.qty-selector .qty-box button { width: 42px; height: 42px; border: none; background: #fff; font-size: 20px; cursor: pointer; color: var(--primary); font-weight: 800; }
.qty-selector .qty-box button:hover { background: var(--primary-soft); }
.qty-selector .qty-box span { width: 48px; text-align: center; font-weight: 800; font-size: 16px; }

.pd-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: auto; }
.pd-actions .btn { padding: 13px 24px; font-size: 15px; }

/* توست */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(120%);
  background: var(--text); color: #fff; padding: 14px 22px; border-radius: 14px;
  font-weight: 700; box-shadow: var(--shadow-lg); z-index: 200; display: flex; align-items: center; gap: 12px;
  transition: transform .3s ease; max-width: 92vw;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast a { color: #c4b5fd; font-weight: 800; }

@media (max-width: 760px) {
  .product-detail { flex-direction: column; padding: 18px; gap: 20px; }
  .pd-media { flex: none; }
}

/* ===== رأس قسم مع زر «عرض الكل» ===== */
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sec-head .section-title { margin-bottom: 0; }
.see-all { font-weight: 800; color: var(--primary); white-space: nowrap; }
.see-all:hover { color: var(--primary-dark); }

/* ===== شرائح الأقسام ===== */
.cat-chips { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 38px; }
.cat-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--border); border-radius: 30px;
  padding: 10px 18px; font-weight: 700; color: var(--text); box-shadow: var(--shadow);
  transition: transform .15s, border-color .15s, background .15s;
}
.cat-chip span { font-size: 18px; }
.cat-chip:hover { transform: translateY(-2px); border-color: var(--primary); color: var(--primary-dark); }

/* ===== ترقيم الصفحات ===== */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; margin: 30px 0 10px; }
.pagination button {
  min-width: 40px; height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--card); color: var(--text); font-weight: 700; font-family: inherit; cursor: pointer; font-size: 14px;
}
.pagination button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pagination button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination button:disabled { opacity: .45; cursor: not-allowed; }
.pagination .pg-dots { color: var(--muted); padding: 0 4px; }

/* ===== تبويبات تصفية الأقسام (صفحة المنتجات) ===== */
.filter-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.filter-tab {
  background: var(--card); border: 1px solid var(--border); border-radius: 30px;
  padding: 9px 18px; font-weight: 700; font-family: inherit; cursor: pointer; color: var(--text);
  display: inline-flex; align-items: center; gap: 6px; font-size: 14px;
}
.filter-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== آراء الزبائن ===== */
.reviews-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px; margin: 6px 0 40px;
}
.review-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 24px 22px; display: flex; flex-direction: column;
}
.review-stars { color: #f59e0b; font-size: 18px; letter-spacing: 2px; margin-bottom: 10px; }
.review-text { color: var(--text); line-height: 1.8; margin: 0 0 16px; flex: 1; opacity: .9; }
.review-author { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.review-avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px;
}
