/* ============================================
   Creative Solution — التصميم الرئيسي
   هوية: بنفسجي ← سماوي، داكن + فاتح
   يدعم RTL/LTR تلقائياً
   ============================================ */

:root {
  --primary: #3560c4;
  --primary-2: #4baccd;
  --grad: linear-gradient(135deg, #67c6dd, #3a5fc8);
  --dark: #05060d;
  --dark-2: #10131f;
  --text: #1e1b2e;
  --muted: #6b7280;
  --bg: #f8f7fc;
  --card: #ffffff;
  --border: #e3e6ef;
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(35, 70, 170, 0.08);
  --shadow-lg: 0 14px 40px rgba(35, 70, 170, 0.16);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

.container { width: min(1180px, 92%); margin: auto; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 15px; }

[dir="rtl"] { letter-spacing: 0; }

/* ---------- الهيدر ---------- */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 6, 13, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 14px 0;
}

.logo { display: flex; align-items: center; gap: 9px; font-weight: 900; font-size: 19px; color: #fff; }
.logo-icon {
  width: 42px; height: 42px;
  object-fit: contain;
  border-radius: 9px;
  display: block;
}
span.logo-icon {
  width: 42px; height: 42px;
  background: var(--grad);
  border-radius: 11px;
  display: grid; place-items: center;
  color: #fff; font-size: 19px;
  box-shadow: var(--shadow);
}
.logo-text { color: #fff; }
.logo-text span { background: linear-gradient(135deg, #8fd4e8, #5f7fe0); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-links a {
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14.5px;
  color: #aeb6cd;
  transition: 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: #8fd4e8; background: rgba(103, 198, 221, 0.12); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.lang-switch { display: flex; background: #10131f; border: 1px solid rgba(255,255,255,0.12); border-radius: 10px; overflow: hidden; }
.lang-switch button {
  border: 0; background: none; padding: 7px 11px;
  font-size: 12.5px; font-weight: 700; color: var(--muted);
}
.lang-switch button.active { background: var(--grad); color: #fff; }

.icon-btn {
  position: relative;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 11px;
  border: 1px solid rgba(255,255,255,0.12);
  background: #10131f;
  font-size: 17px;
  color: #e8ebf5;
  transition: 0.2s;
}
.icon-btn:hover { border-color: #4baccd; transform: translateY(-1px); }
.icon-btn.logged-in { border-color: #4baccd; background: rgba(103, 198, 221, 0.12); }

.cart-count {
  position: absolute; top: -6px; inset-inline-end: -6px;
  min-width: 19px; height: 19px;
  background: var(--danger); color: #fff;
  border-radius: 10px; font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
}

.menu-toggle { display: none; }

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 26px;
  border-radius: 12px;
  border: 0;
  font-weight: 700; font-size: 15px;
  transition: 0.2s;
  text-align: center;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(58, 95, 200, 0.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(58, 95, 200, 0.45); }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: rgba(75, 130, 220, 0.10); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost { background: var(--bg); border: 1px solid var(--border); color: var(--text); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }

/* ---------- الهيرو ---------- */
.hero {
  background: radial-gradient(1000px 500px at 80% -10%, rgba(75, 172, 205, 0.25), transparent),
              radial-gradient(800px 400px at 10% 110%, rgba(57, 95, 192, 0.32), transparent),
              var(--dark);
  color: #fff;
  padding: 84px 0 96px;
  position: relative;
  overflow: hidden;
}
.hero-inner { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(30px, 5vw, 52px); line-height: 1.25; font-weight: 900; }
.hero h1 .grad { background: linear-gradient(135deg, #8fd4e8, #5f7fe0); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { margin: 18px 0 30px; color: #c7c3dd; font-size: 17px; max-width: 540px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* سلايدر الهيرو */
.hero-slider {
  position: relative;
  height: 380px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
.hs-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}
.hs-slide.active { opacity: 1; }
.hs-slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  animation: kenburns 6s ease-in-out infinite alternate;
}
.hs-slide::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(5, 6, 13, 0.75), transparent 55%);
}
@keyframes kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.12); }
}
.hs-caption {
  position: absolute;
  bottom: 18px; inset-inline: 18px;
  z-index: 2;
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  transition: opacity 0.6s ease;
}
.hs-dots {
  position: absolute;
  bottom: 14px; inset-inline-end: 16px;
  z-index: 2;
  display: flex; gap: 7px;
}
.hs-dots button {
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.35);
  transition: 0.3s;
  padding: 0;
}
.hs-dots button.active {
  background: #8fd4e8;
  width: 24px;
  border-radius: 6px;
}

.hero-art {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.hero-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 20px;
  text-align: center;
  backdrop-filter: blur(6px);
  animation: float 5s ease-in-out infinite;
}
.hero-chip:nth-child(2) { animation-delay: 0.7s; }
.hero-chip:nth-child(3) { animation-delay: 1.4s; }
.hero-chip:nth-child(4) { animation-delay: 2.1s; }
.hero-chip .ico { font-size: 34px; }
.hero-chip .lbl { margin-top: 8px; font-size: 13px; font-weight: 700; color: #d9d6ea; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* ---------- الأقسام ---------- */
.section { padding: 66px 0; }
.section-head { text-align: center; margin-bottom: 38px; }
.section-head h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 900; }
.section-head .bar { width: 64px; height: 5px; background: var(--grad); border-radius: 3px; margin: 12px auto 0; }
.section-head p { color: var(--muted); margin-top: 10px; }

/* بطاقات الفئات */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.cat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 18px;
  text-align: center;
  transition: 0.25s;
  box-shadow: var(--shadow);
}
.cat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: rgba(58, 95, 200, 0.4); }
.cat-card .ico {
  width: 64px; height: 64px; margin: 0 auto 14px;
  background: var(--grad); border-radius: 18px;
  display: grid; place-items: center; font-size: 29px;
  color: #fff;
}
.cat-card h3 { font-size: 16.5px; font-weight: 800; }
.cat-card p { color: var(--muted); font-size: 13px; margin-top: 6px; }

/* ---------- بطاقات المنتجات ---------- */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }

.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: 0.25s;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.product-img { position: relative; aspect-ratio: 1; background: #f1eefb; overflow: hidden; }
.product-img img { width: 100%; height: 100%; object-fit: cover; transition: 0.35s; }
.product-card:hover .product-img img { transform: scale(1.06); }

.badge {
  position: absolute; top: 12px; inset-inline-start: 12px;
  padding: 4px 11px; border-radius: 8px;
  font-size: 12px; font-weight: 800; color: #fff;
}
.badge.discount { background: var(--danger); }
.badge.oos { background: #334155; inset-inline-start: auto; inset-inline-end: 12px; }

.product-info { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 7px; }
.product-cat { font-size: 11.5px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 0.6px; }
.product-info h3 { font-size: 15.5px; font-weight: 800; line-height: 1.45; }
.product-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.product-price strong { color: var(--primary); font-size: 16px; }
.product-price s { color: var(--muted); font-size: 12.5px; margin-inline-start: 7px; }
.dots { display: flex; gap: 5px; }
.dot { width: 15px; height: 15px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border); }

/* ---------- لماذا نحن ---------- */
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.why-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.why-card .ico { font-size: 30px; margin-bottom: 12px; }
.why-card h3 { font-size: 16.5px; margin-bottom: 7px; }
.why-card p { color: var(--muted); font-size: 13.5px; }

/* ---------- من نحن ---------- */
.about-wrap { background: var(--dark); color: #fff; }
.about-wrap .section-head .bar { margin-inline: auto; }
.about-wrap p { color: #c7c3dd; max-width: 760px; margin: auto; text-align: center; font-size: 16px; }
.about-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; max-width: 720px; margin: 36px auto 0; }
.about-stat { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius); padding: 18px; text-align: center; }
.about-stat strong { display: block; font-size: 26px; background: linear-gradient(135deg, #8fd4e8, #5f7fe0); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.about-stat span { font-size: 13px; color: #b6b2cc; }

/* ---------- تواصل معنا ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 34px; align-items: start; }
.contact-box, .form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
}
.contact-box h3 { font-size: 20px; margin-bottom: 10px; }
.contact-box p { color: var(--muted); font-size: 14.5px; }
.contact-lines { margin-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.contact-lines a { display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: 14.5px; color: var(--primary); }

/* ---------- النماذج ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 11px;
  background: var(--bg);
  transition: 0.2s;
  color: var(--text);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 0; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(58, 95, 200, 0.14);
}
.field textarea { resize: vertical; min-height: 110px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.form-error {
  display: none;
  background: rgba(239, 68, 68, 0.09);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: var(--danger);
  padding: 11px 14px;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 15px;
}
.form-error.show { display: block; }
.form-success {
  display: none;
  background: rgba(16, 185, 129, 0.09);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--success);
  padding: 11px 14px; border-radius: 11px;
  font-size: 13.5px; font-weight: 600; margin-bottom: 15px;
}
.form-success.show { display: block; }

/* ---------- صفحات الدخول ---------- */
.auth-wrap {
  min-height: calc(100vh - 200px);
  display: grid; place-items: center;
  padding: 46px 0;
}
.auth-card {
  width: min(430px, 94%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: var(--shadow-lg);
}
.auth-card h1 { font-size: 23px; margin-bottom: 5px; }
.auth-card .sub { color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.auth-alt { text-align: center; margin-top: 18px; font-size: 14px; color: var(--muted); }
.auth-alt a { color: var(--primary); font-weight: 700; }

.code-input {
  text-align: center; letter-spacing: 12px;
  font-size: 22px; font-weight: 800;
  direction: ltr;
}

.locked-banner {
  text-align: center;
  background: rgba(239, 68, 68, 0.07);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 20px;
}
.locked-banner .big { font-size: 34px; }
.locked-banner h3 { color: var(--danger); margin: 8px 0 6px; font-size: 16px; }
.locked-banner p { color: var(--muted); font-size: 13px; }

/* ---------- صفحة المنتجات ---------- */
.page-head { background: var(--dark); color: #fff; padding: 46px 0; }
.page-head h1 { font-size: clamp(24px, 4vw, 36px); }
.page-head p { color: #c7c3dd; margin-top: 6px; }

.filters-bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 26px; }
.filters-bar .field { margin: 0; }
.filters-bar input, .filters-bar select {
  padding: 11px 15px;
  border: 1.5px solid var(--border);
  border-radius: 11px;
  background: var(--card);
  min-width: 200px;
}
.cat-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.cat-pill {
  padding: 9px 17px; border-radius: 30px;
  border: 1.5px solid var(--border); background: var(--card);
  font-weight: 700; font-size: 13.5px; color: var(--muted);
  transition: 0.2s;
}
.cat-pill.active, .cat-pill:hover { background: var(--grad); color: #fff; border-color: transparent; }
.sub-pill { padding: 7px 14px; font-size: 12.5px; border-radius: 22px; }
.sub-pill.active { background: var(--dark); }

/* ---------- صفحة منتج ---------- */
.product-page { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; padding: 46px 0; }
.gallery-main {
  aspect-ratio: 1; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); background: #f1eefb;
  box-shadow: var(--shadow);
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery-thumbs img {
  width: 72px; height: 72px; object-fit: cover;
  border-radius: 11px; cursor: pointer;
  border: 2px solid var(--border); transition: 0.2s;
}
.gallery-thumbs img.active, .gallery-thumbs img:hover { border-color: var(--primary); }

.pd-info h1 { font-size: clamp(22px, 3vw, 30px); line-height: 1.35; }
.pd-cat { color: var(--primary); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.8px; }
.pd-price { display: flex; align-items: center; gap: 13px; margin: 14px 0; }
.pd-price strong { font-size: 26px; color: var(--primary); }
.pd-price s { color: var(--muted); font-size: 16px; }
.pd-desc { color: var(--muted); font-size: 15px; white-space: pre-line; }

.color-pick { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0 18px; }
.color-opt {
  display: flex; align-items: center; gap: 7px;
  border: 1.5px solid var(--border); border-radius: 30px;
  padding: 7px 14px 7px 9px; background: var(--card);
  font-size: 13.5px; font-weight: 600;
  transition: 0.2s;
}
[dir="rtl"] .color-opt { padding: 7px 9px 7px 14px; }
.color-opt .sw { width: 19px; height: 19px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1.5px var(--border); }
.color-opt.active { border-color: var(--primary); background: rgba(124, 58, 237, 0.07); }

.qty-pick { display: inline-flex; align-items: center; gap: 0; border: 1.5px solid var(--border); border-radius: 11px; overflow: hidden; margin-bottom: 20px; }
.qty-pick button { width: 42px; height: 44px; border: 0; background: var(--bg); font-size: 19px; font-weight: 800; color: var(--primary); }
.qty-pick span { width: 56px; text-align: center; font-weight: 800; }
.pd-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- السلة ---------- */
.cart-wrap { display: grid; grid-template-columns: 1.5fr 1fr; gap: 28px; padding: 46px 0; align-items: start; }
.cart-list { display: flex; flex-direction: column; gap: 14px; }
.cart-item {
  display: flex; gap: 16px; align-items: center;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
  box-shadow: var(--shadow);
}
.cart-item img { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; background: #f1eefb; }
.cart-item .ci-info { flex: 1; }
.cart-item h3 { font-size: 15px; }
.cart-item .ci-color { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.cart-item .ci-color .sw { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--border); display: inline-block; }
.ci-price { font-weight: 800; color: var(--primary); white-space: nowrap; }
.ci-remove { background: none; border: 0; color: var(--danger); font-size: 17px; padding: 8px; }

.summary-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
  box-shadow: var(--shadow); position: sticky; top: 90px;
}
.summary-card h3 { margin-bottom: 16px; }
.sum-row { display: flex; justify-content: space-between; padding: 9px 0; font-size: 14.5px; color: var(--muted); }
.sum-row.total { border-top: 1.5px dashed var(--border); margin-top: 8px; padding-top: 15px; color: var(--text); font-weight: 900; font-size: 17px; }
.sum-row.total strong { color: var(--primary); }

.empty-state { text-align: center; padding: 70px 20px; }
.empty-state .ico { font-size: 56px; }
.empty-state h2 { margin: 14px 0 6px; }
.empty-state p { color: var(--muted); }

/* ---------- الصفحة الشخصية ---------- */
.account-wrap { display: grid; grid-template-columns: 300px 1fr; gap: 26px; padding: 40px 0; align-items: start; }
.account-nav { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); position: sticky; top: 90px; }
.account-nav .user-chip { text-align: center; padding-bottom: 16px; border-bottom: 1.5px dashed var(--border); margin-bottom: 14px; }
.user-chip .avatar {
  width: 66px; height: 66px; margin: 0 auto 10px;
  background: var(--grad); border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; font-size: 26px; font-weight: 900;
}
.user-chip strong { display: block; font-size: 15.5px; }
.user-chip span { color: var(--muted); font-size: 12.5px; word-break: break-all; }
.account-nav a {
  display: block; padding: 11px 14px;
  border-radius: 10px; font-weight: 700; font-size: 14px;
  color: var(--muted); transition: 0.2s;
}
.account-nav a.active, .account-nav a:hover { background: rgba(75, 130, 220, 0.10); color: var(--primary); }

.account-main { display: flex; flex-direction: column; gap: 22px; }
.account-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.account-card h3 { margin-bottom: 18px; font-size: 17px; }

.device-row {
  display: flex; align-items: center; gap: 13px;
  padding: 13px 0; border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.device-row:last-child { border-bottom: 0; }
.device-row .d-ico { width: 42px; height: 42px; border-radius: 12px; background: var(--bg); display: grid; place-items: center; font-size: 19px; border: 1px solid var(--border); }
.device-row .d-info { flex: 1; min-width: 150px; }
.device-row .d-info strong { font-size: 14px; display: block; }
.device-row .d-info span { font-size: 12.5px; color: var(--muted); }
.device-row .tag {
  font-size: 11px; font-weight: 800; color: var(--success);
  background: rgba(16, 185, 129, 0.1); border-radius: 7px; padding: 3px 9px;
}

.order-card { border: 1px solid var(--border); border-radius: 13px; padding: 16px; margin-bottom: 13px; }
.order-card .o-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 9px; }
.order-card .o-head strong { font-size: 14.5px; direction: ltr; }
.o-status { font-size: 12px; font-weight: 800; padding: 4px 11px; border-radius: 8px; }
.o-status.s0 { background: rgba(245, 158, 11, 0.13); color: var(--warning); }
.o-status.s1 { background: rgba(75, 172, 205, 0.15); color: var(--primary-2); }
.o-status.s2 { background: rgba(58, 95, 200, 0.14); color: var(--primary); }
.o-status.s3 { background: rgba(16, 185, 129, 0.13); color: var(--success); }
.o-status.s4 { background: rgba(239, 68, 68, 0.13); color: var(--danger); }
.o-items { font-size: 13.5px; color: var(--muted); }
.o-total { font-weight: 800; color: var(--primary); }

/* ---------- الأدمن ---------- */
.admin-login-wrap { min-height: 100vh; display: grid; place-items: center; background: var(--dark); }
.admin-login-wrap .auth-card { width: min(400px, 94%); }

.admin-topbar { background: var(--dark); color: #fff; padding: 14px 0; }
.admin-topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.admin-topbar .logo-text { color: #fff; }
.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0; }
.admin-tabs button {
  padding: 10px 20px; border-radius: 11px; border: 1.5px solid var(--border);
  background: var(--card); font-weight: 700; font-size: 14px; color: var(--muted);
}
.admin-tabs button.active { background: var(--grad); color: #fff; border-color: transparent; }

.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; text-align: center; box-shadow: var(--shadow); }
.stat-box strong { font-size: 24px; color: var(--primary); display: block; }
.stat-box span { font-size: 12.5px; color: var(--muted); font-weight: 600; }

.admin-table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
.admin-table th, .admin-table td { padding: 12px 14px; text-align: start; border-bottom: 1px solid var(--border); }
.admin-table th { background: var(--bg); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }
.admin-table tr:last-child td { border-bottom: 0; }

.admin-product-row { display: flex; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--border); border-radius: 13px; padding: 12px 16px; margin-bottom: 11px; flex-wrap: wrap; }
.admin-product-row img { width: 58px; height: 58px; border-radius: 10px; object-fit: cover; background: #f1eefb; }
.admin-product-row .ap-info { flex: 1; min-width: 180px; }
.admin-product-row .ap-info strong { font-size: 14.5px; display: block; }
.admin-product-row .ap-info span { font-size: 12.5px; color: var(--muted); }
.ap-actions { display: flex; gap: 7px; flex-wrap: wrap; }

.img-previews { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 9px; }
.img-previews .pv { position: relative; width: 74px; height: 74px; border-radius: 10px; overflow: hidden; border: 1.5px solid var(--border); }
.img-previews .pv img { width: 100%; height: 100%; object-fit: cover; }
.img-previews .pv button {
  position: absolute; top: 2px; inset-inline-end: 2px;
  width: 19px; height: 19px; border-radius: 50%; border: 0;
  background: var(--danger); color: #fff; font-size: 11px; line-height: 1;
}
.color-row { display: flex; gap: 9px; align-items: center; margin-bottom: 9px; }
.color-row input[type="text"] { flex: 1; }
.color-row input[type="color"] { width: 46px; height: 42px; border: 1.5px solid var(--border); border-radius: 10px; padding: 3px; background: var(--card); }
.switch-row { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; font-size: 14px; font-weight: 600; }
.switch-row input { width: 18px; height: 18px; accent-color: var(--primary); }

/* ---------- الفوتر ---------- */
#site-footer { background: var(--dark); color: #c7c3dd; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 30px; padding: 46px 0 34px; }
#site-footer .logo-text { color: #fff; }
#site-footer h4 { color: #fff; margin-bottom: 13px; font-size: 15px; }
#site-footer a { display: block; padding: 4.5px 0; font-size: 13.5px; transition: 0.2s; }
#site-footer a:hover { color: #4baccd; }
.footer-tagline { font-size: 13.5px; margin: 10px 0; }
.footer-pay { font-size: 13px; color: #4baccd; font-weight: 700; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 17px 0; text-align: center; font-size: 12.5px; color: #8d89a3; }

/* ---------- توست ---------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--dark); color: #fff;
  padding: 13px 24px; border-radius: 12px;
  font-weight: 700; font-size: 14px;
  box-shadow: var(--shadow-lg);
  opacity: 0; transition: 0.3s; z-index: 500;
  max-width: 92%;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--danger); }

/* ---------- استجابة الشاشات ---------- */
@media (max-width: 900px) {
  .hero-inner, .product-page, .cart-wrap, .contact-grid { grid-template-columns: 1fr; }
  .account-wrap { grid-template-columns: 1fr; }
  .account-nav { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 56px 0 66px; }
  .hero-slider { height: 300px; }

  .menu-toggle { display: grid; }
  .nav-links {
    display: none;
    position: absolute; top: 100%; inset-inline: 0;
    background: #0a0c16; border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-direction: column; padding: 12px 5%;
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open { display: flex; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .header-inner { gap: 10px; }
  .logo-text { display: none; }
  .lang-switch button { padding: 7px 8px; font-size: 11.5px; }
}

/* ---------- القائمة المنسدلة للأقسام الفرعية ---------- */
.sub-dropdown { position: relative; display: inline-block; }
.pill-dd { position: relative; display: inline-block; }
.pill-dd::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 100%;
  height: 12px;
}
.pill-dd .cat-pill .pill-arrow {
  font-size: 10px;
  opacity: 0.75;
  display: inline-block;
  transition: transform 0.25s;
  margin-inline-start: 4px;
}
.pill-dd.open .cat-pill .pill-arrow,
.pill-dd:hover .cat-pill .pill-arrow { transform: rotate(180deg); }
.pill-dd .sd-menu { inset-inline-start: 0; }
.sd-toggle {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 18px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--card);
  font-weight: 700; font-size: 14px;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: 0.2s;
}
.sd-toggle:hover { border-color: var(--primary); }
.sd-arrow { font-size: 12px; color: var(--muted); transition: transform 0.25s; }
.sub-dropdown.open .sd-arrow { transform: rotate(180deg); }
.sd-dot {
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 0 3px rgba(58, 95, 200, 0.15);
}
.sd-menu {
  position: absolute; top: calc(100% + 8px); inset-inline-start: 0;
  min-width: 230px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 7px;
  z-index: 50;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: 0.25s ease;
}
/* فتح بتمرير الماوس + بالضغط (للمس) */
.pill-dd:hover .sd-menu,
.pill-dd.open .sd-menu, .sub-dropdown.open .sd-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.sd-item {
  display: flex; align-items: center; gap: 11px;
  width: 100%;
  padding: 10px 13px;
  border: 0; border-radius: 10px;
  background: none;
  font-size: 14px; font-weight: 700;
  color: var(--text);
  text-align: start;
  transition: 0.15s;
  cursor: pointer;
}
.sd-item:hover { background: var(--bg); transform: translateX(-2px); }
[dir="ltr"] .sd-item:hover { transform: translateX(2px); }
.sd-item .sd-dot { flex: none; }
.sd-item.active {
  background: color-mix(in srgb, var(--sub-c, #3a5fc8) 12%, white);
  color: var(--sub-c, #3a5fc8);
}
.sd-item .sd-check { margin-inline-start: auto; font-weight: 900; opacity: 0; }
.sd-item.active .sd-check { opacity: 1; }
.sd-all { color: var(--muted); }
