/* =========================================================
   style.css — شكل الموقع (مشترك بين كل الصفحات)  · V0.3
   أهم جزء: الألوان في :root تحت. غيّرها والموقع كله يتغير.
   ========================================================= */

:root {
  --main:        #6d28d9;   /* اللون الأساسي (بنفسجي) */
  --main-dark:   #5b21b6;   /* نفس اللون أغمق */
  --main-soft:   #ede9fe;   /* نفس اللون فاتح جدًا */
  --accent:      #f59e0b;   /* لون مساعد (برتقالي ذهبي) للشارات والتمييز */
  --ink:         #120b24;   /* الخلفية الغامقة (الترحيب والفوتر) */
  --whatsapp:    #25d366;

  --bg:          #f7f6fb;
  --surface:     #ffffff;
  --text:        #1c1530;
  --muted:       #6b6880;
  --border:      #e8e5f0;
  --danger:      #dc2626;
  --success:     #16a34a;

  --radius:      18px;
  --radius-sm:   12px;
  --shadow:      0 6px 24px rgba(30, 16, 70, .07);
  --shadow-lg:   0 18px 50px rgba(30, 16, 70, .16);
  --header-h:    72px;
  --ease:        cubic-bezier(.2, .8, .2, 1);
  --font:        "Cairo", Tahoma, system-ui, sans-serif;
}

/* ===================== أساسيات ===================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font); background: var(--bg); color: var(--text);
  line-height: 1.7; -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
[hidden] { display: none !important; }
.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.req { color: var(--danger); }
.muted { color: var(--muted); }
::selection { background: var(--main); color: #fff; }

/* ===================== حركة الظهور وانت بتنزل ===================== */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(10px); } to { opacity: 1; transform: none; } }
.pop { animation: pop .45s var(--ease) both; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); } 50% { transform: translateY(-14px) rotate(var(--r, 0deg)); } }
@keyframes marquee { to { transform: translateX(50%); } }
@keyframes bump { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ===================== الأزرار ===================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 26px; border-radius: 999px; font-weight: 700;
  transition: background .25s, transform .15s, box-shadow .25s, color .25s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--main); color: #fff; box-shadow: 0 8px 20px rgba(109, 40, 217, .28); }
.btn-primary:hover { background: var(--main-dark); box-shadow: 0 10px 26px rgba(109, 40, 217, .38); transform: translateY(-2px); }
.btn-ghost { border: 1.5px solid rgba(255, 255, 255, .3); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.btn-outline { border: 1.5px solid var(--border); background: var(--surface); }
.btn-outline:hover { border-color: var(--main); color: var(--main); }
.btn-block { width: 100%; }
.btn-whatsapp { background: var(--whatsapp); color: #fff; font-size: 1.05rem; padding: 14px; box-shadow: 0 8px 20px rgba(37, 211, 102, .3); }
.btn-whatsapp:hover { filter: brightness(.95); transform: translateY(-2px); }
.btn-whatsapp svg, .btn svg { width: 20px; height: 20px; fill: currentColor; flex: none; }

/* ===================== صور مؤقتة ===================== */
.ph { display: grid; place-items: center; font-size: 3.5rem; font-weight: 800; color: #fff; background: var(--ph, #cbd5e1); }
.ph-green  { --ph: linear-gradient(135deg, #4ade80, #15803d); }
.ph-red    { --ph: linear-gradient(135deg, #fb7185, #b91c1c); }
.ph-gold   { --ph: linear-gradient(135deg, #fcd34d, #c2410c); }
.ph-dark   { --ph: linear-gradient(135deg, #6b7280, #111827); }
.ph-light  { --ph: linear-gradient(135deg, #ffffff, #d6d3e0); color: #3b3550; }
.ph-blue   { --ph: linear-gradient(135deg, #93c5fd, #1d4ed8); }
.ph-violet { --ph: linear-gradient(135deg, #c4b5fd, #6d28d9); }
.ph-pink   { --ph: linear-gradient(135deg, #f9a8d4, #be185d); }

/* ===================== الشريط العلوي ===================== */
.topbar { background: var(--ink); color: #d8d2ee; font-size: .82rem; text-align: center; padding: 7px 12px; }
.topbar b { color: var(--accent); font-weight: 700; }

/* ===================== الهيدر ===================== */
.header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .85); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: box-shadow .3s, border-color .3s;
}
.header.scrolled { box-shadow: 0 6px 24px rgba(30, 16, 70, .08); border-color: var(--border); }
.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; }
.logo-mark {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px;
  background: linear-gradient(135deg, var(--main), #a855f7); color: #fff; font-size: .95rem;
  box-shadow: 0 6px 16px rgba(109, 40, 217, .35); transform: rotate(-6deg); transition: transform .3s var(--ease);
}
.logo:hover .logo-mark { transform: rotate(0deg) scale(1.05); }

.nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav a { position: relative; padding: 8px 14px; border-radius: 999px; font-weight: 600; color: var(--muted); transition: color .2s, background .2s; }
.nav a:hover { color: var(--text); background: var(--bg); }
.nav a.active { color: var(--main); }
.nav a.active::after { content: ""; position: absolute; bottom: 2px; right: 50%; width: 18px; height: 3px; border-radius: 3px; background: var(--main); transform: translateX(50%); }

.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn, .cart-btn {
  position: relative; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%; transition: background .2s, transform .2s;
}
.icon-btn:hover { background: var(--bg); }
.icon-btn svg, .cart-btn svg { width: 22px; height: 22px; fill: currentColor; }
.cart-btn { background: var(--main-soft); color: var(--main); }
.cart-btn:hover { transform: scale(1.06); }
.cart-btn.active { background: var(--main); color: #fff; }
.cart-count {
  position: absolute; top: -3px; left: -3px; min-width: 21px; height: 21px; padding: 0 5px;
  border-radius: 999px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 800;
  display: grid; place-items: center; border: 2px solid #fff;
}
.cart-count.bump { animation: bump .5s var(--ease); }
.menu-btn { display: none; }

/* ===================== الترحيب ===================== */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(900px 500px at 85% -10%, rgba(168, 85, 247, .45), transparent 60%),
              radial-gradient(700px 400px at 0% 110%, rgba(245, 158, 11, .25), transparent 60%), var(--ink);
  padding: 72px 0 84px;
}
.hero::before {   /* شبكة خفيفة في الخلفية */
  content: ""; position: absolute; inset: 0; opacity: .12;
  background-image: linear-gradient(rgba(255,255,255,.4) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.4) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); font-size: .85rem; color: #e9e3ff;
}
.eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(245, 158, 11, .25); }
.hero h1 { font-size: clamp(2rem, 5.2vw, 3.6rem); line-height: 1.25; font-weight: 800; margin: 18px 0 14px; }
.hero h1 .hl { background: linear-gradient(90deg, #c4b5fd, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: #c9c2df; font-size: 1.1rem; max-width: 520px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 30px; font-size: .9rem; color: #d8d2ee; }
.hero-points span::before { content: "✓"; color: var(--accent); font-weight: 800; margin-left: 6px; }

.hero-art { position: relative; height: 420px; }
.hero-art .tile {
  position: absolute; border-radius: 26px; box-shadow: 0 30px 60px rgba(0, 0, 0, .35);
  animation: float 6s ease-in-out infinite; border: 1px solid rgba(255, 255, 255, .15);
}
.hero-art .t1 { width: 56%; aspect-ratio: 1; top: 4%; right: 6%; font-size: 6rem; --r: -4deg; }
.hero-art .t2 { width: 40%; aspect-ratio: 1; bottom: 2%; right: 30%; font-size: 4rem; --r: 5deg; animation-delay: -2s; }
.hero-art .t3 { width: 34%; aspect-ratio: 1; top: 22%; left: 2%; font-size: 3.4rem; --r: 8deg; animation-delay: -4s; }
.hero-art .chip {
  position: absolute; bottom: 16%; left: 4%; z-index: 2; display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 16px; background: #fff; color: var(--text); font-weight: 700; font-size: .9rem;
  box-shadow: var(--shadow-lg); animation: float 5s ease-in-out infinite; animation-delay: -1s;
}
.hero-art .chip small { display: block; color: var(--muted); font-weight: 600; font-size: .75rem; }

/* ===================== شريط متحرك ===================== */
.marquee { overflow: hidden; background: var(--main); color: #fff; padding: 12px 0; font-weight: 700; }
.marquee-track { display: flex; width: max-content; gap: 36px; animation: marquee 28s linear infinite; }
.marquee-track span { white-space: nowrap; }
.marquee-track span::after { content: "✦"; margin-right: 36px; color: var(--accent); }

/* ===================== أقسام عامة ===================== */
.section { padding: 72px 0; }
.section-alt { background: var(--surface); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head.center { flex-direction: column; align-items: center; text-align: center; }
.kicker { color: var(--main); font-weight: 700; font-size: .9rem; }
.section-title { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; line-height: 1.35; }
.section-sub { color: var(--muted); max-width: 560px; }
.link-more { color: var(--main); font-weight: 700; display: inline-flex; gap: 6px; align-items: center; }
.link-more:hover { gap: 10px; }
.link-more { transition: gap .2s; }

/* ===================== كروت التصنيفات ===================== */
.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cat {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 190px; padding: 20px; border-radius: var(--radius); color: #fff;
  transition: transform .35s var(--ease), box-shadow .35s;
}
.cat:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.cat .cat-icon { position: absolute; top: 14px; left: 16px; font-size: 3.6rem; transition: transform .4s var(--ease); }
.cat:hover .cat-icon { transform: scale(1.15) rotate(-8deg); }
.cat h3 { font-size: 1.2rem; font-weight: 800; }
.cat span { font-size: .85rem; opacity: .9; }
.cat::after { content: "←"; position: absolute; bottom: 18px; left: 18px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.2); transition: background .25s, transform .25s; }
.cat:hover::after { background: #fff; color: var(--text); transform: translateX(-4px); }

/* ===================== تابات التصنيفات ===================== */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 9px 18px; border-radius: 999px; font-weight: 700; font-size: .95rem;
  background: var(--surface); border: 1.5px solid var(--border); color: var(--muted);
  transition: all .25s var(--ease);
}
.tab:hover { border-color: var(--main); color: var(--main); }
.tab.active { background: var(--main); border-color: var(--main); color: #fff; box-shadow: 0 6px 16px rgba(109, 40, 217, .3); }
.tab .n { font-size: .75rem; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; background: var(--bg); color: var(--muted); }
.tab.active .n { background: rgba(255, 255, 255, .2); color: #fff; }

/* ===================== كروت المنتجات ===================== */
.products-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.card {
  display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border);
  transition: transform .35s var(--ease), box-shadow .35s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card-media { position: relative; overflow: hidden; }
.card-img { aspect-ratio: 1 / 1; width: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card-img { transform: scale(1.07); }
.badge {
  position: absolute; top: 12px; right: 12px; padding: 3px 12px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: .75rem; font-weight: 800;
}
.badge.new { background: var(--main); }
.card-cta {
  position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 10px; border-radius: 999px; text-align: center;
  background: rgba(255, 255, 255, .95); color: var(--main); font-weight: 800; font-size: .9rem;
  transform: translateY(140%); transition: transform .35s var(--ease); box-shadow: var(--shadow);
}
.card:hover .card-cta { transform: none; }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.card-cat { font-size: .78rem; color: var(--main); font-weight: 700; }
.card-title { font-size: 1.1rem; font-weight: 800; line-height: 1.4; }
.card-swatches { display: flex; gap: 6px; }
.card-swatches i { width: 16px; height: 16px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; }
.card-hint { font-size: .8rem; color: var(--muted); }
.price { font-weight: 800; color: var(--text); font-size: 1.2rem; }
.price small { font-size: .7em; font-weight: 600; color: var(--muted); }
.price.big { font-size: 2rem; line-height: 1.2; color: var(--main); }
.price.big small { color: var(--main); }

/* ===================== المميزات ===================== */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature { padding: 26px 22px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--border); transition: transform .3s var(--ease), background .3s; }
.feature:hover { transform: translateY(-4px); background: var(--main-soft); }
.feature .f-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 1.6rem; background: var(--surface); box-shadow: var(--shadow); margin-bottom: 14px; }
.feature h3 { font-size: 1.05rem; font-weight: 800; }
.feature p { color: var(--muted); font-size: .9rem; }

/* ===================== خطوات الطلب ===================== */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: s; position: relative; }
.step { position: relative; text-align: center; padding: 28px 22px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.step-num {
  display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 18px; margin-bottom: 12px;
  background: linear-gradient(135deg, var(--main), #a855f7); color: #fff; font-weight: 800; font-size: 1.4rem;
  box-shadow: 0 8px 18px rgba(109, 40, 217, .3);
}
.step h3 { font-size: 1.1rem; font-weight: 800; }
.step p { color: var(--muted); font-size: .92rem; }

/* ===================== بانر الطلب المخصوص ===================== */
.cta-banner {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: center;
  padding: 44px; border-radius: 28px; color: #fff;
  background: radial-gradient(600px 300px at 0% 0%, rgba(245, 158, 11, .35), transparent 60%), linear-gradient(135deg, var(--main-dark), #9333ea);
}
.cta-banner h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; line-height: 1.35; }
.cta-banner p { color: #ece6ff; margin: 8px 0 20px; }
.cta-banner .btn-light { background: #fff; color: var(--main-dark); }
.cta-banner .btn-light:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.cta-art { font-size: 7rem; text-align: center; animation: float 6s ease-in-out infinite; }

/* ===================== الفوتر ===================== */
.footer { background: var(--ink); color: #a9a2c2; padding: 56px 0 24px; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 32px; }
.footer .logo { color: #fff; margin-bottom: 12px; }
.footer h4 { color: #fff; font-size: 1rem; margin-bottom: 12px; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: .92rem; }
.footer ul a:hover { color: #fff; }
.footer p { font-size: .92rem; }
.social { display: flex; gap: 10px; margin-top: 14px; }
.social a { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .07); color: #fff; font-weight: 800; font-size: .85rem; transition: background .25s, transform .25s; }
.social a:hover { background: var(--main); transform: translateY(-3px); }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .08); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: .85rem; }

/* ===================== زرار الرجوع لفوق + التوست ===================== */
.to-top {
  position: fixed; bottom: 22px; left: 22px; z-index: 45; width: 46px; height: 46px; border-radius: 50%;
  background: var(--surface); color: var(--main); box-shadow: var(--shadow-lg); font-size: 1.2rem; font-weight: 800;
  opacity: 0; transform: translateY(20px); pointer-events: none; transition: all .3s var(--ease);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.toast {
  position: fixed; top: calc(var(--header-h) + 16px); left: 50%; z-index: 100;
  display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 999px;
  background: var(--text); color: #fff; font-weight: 700; box-shadow: var(--shadow-lg);
  transform: translate(-50%, -20px); opacity: 0; pointer-events: none; transition: all .35s var(--ease);
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast::before { content: "✓"; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--success); font-size: .8rem; }

/* =========================================================
   الصفحات الداخلية
   ========================================================= */
.page-hero {
  position: relative; overflow: hidden; color: #fff; padding: 40px 0 48px;
  background: radial-gradient(600px 300px at 90% -20%, rgba(168, 85, 247, .5), transparent 60%), var(--ink);
}
.page-hero h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 800; }
.page-hero p { color: #c9c2df; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .88rem; color: var(--muted); margin-bottom: 14px; }
.page-hero .breadcrumb { color: #a9a2c2; }
.breadcrumb a:hover { color: var(--main); }
.page-hero .breadcrumb a:hover { color: #fff; }
.breadcrumb .current { color: var(--text); font-weight: 700; }
.page-hero .breadcrumb .current { color: #fff; }
.page { padding: 24px 0 72px; }
.panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); padding: 24px; }
.panel-title { font-size: 1.15rem; font-weight: 800; margin-bottom: 12px; }
.back-link { display: inline-block; margin-top: 8px; color: var(--muted); font-weight: 700; font-size: .92rem; }
.back-link:hover { color: var(--main); }

/* ===================== صفحة المنتجات (الكتالوج) ===================== */
.toolbar {
  position: sticky; top: var(--header-h); z-index: 30; margin: -28px 0 26px;
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  padding: 12px; border-radius: var(--radius); background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px);
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.toolbar .tabs { flex: 1; min-width: 0; }
.search { position: relative; flex: 0 1 240px; }
.search input { padding-right: 40px; }
.search::before { content: "🔍"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: .9rem; opacity: .6; }
.sort { flex: 0 0 auto; width: auto; }
.results-info { color: var(--muted); font-size: .9rem; margin-bottom: 14px; }
.grid-empty { text-align: center; padding: 60px 0; color: var(--muted); }
.grid-empty div { font-size: 3rem; }

/* ===================== صفحة المنتج ===================== */
.product-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 44px; align-items: start; }
.gallery { position: sticky; top: calc(var(--header-h) + 20px); }
.gallery-main {
  position: relative; aspect-ratio: 1 / 1; width: 100%; object-fit: cover;
  border-radius: 24px; font-size: 9rem; box-shadow: var(--shadow-lg);
}
.gallery-main.swap { animation: pop .45s var(--ease); }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 14px; overflow-x: auto; padding: 4px; }
.thumb {
  flex: 0 0 78px; height: 78px; border-radius: 14px; font-size: 1.8rem; opacity: .55;
  outline: 3px solid transparent; outline-offset: 2px; transition: opacity .2s, outline-color .2s, transform .2s;
}
.thumb:hover { opacity: .9; transform: translateY(-2px); }
.thumb.active { opacity: 1; outline-color: var(--main); }

.details { display: flex; flex-direction: column; gap: 20px; }
.details-cat { display: inline-flex; width: fit-content; padding: 3px 12px; border-radius: 999px; background: var(--main-soft); color: var(--main); font-weight: 700; font-size: .82rem; }
.details-title { font-size: 2.1rem; font-weight: 800; line-height: 1.3; margin-top: -8px; }
.details .price.big { margin-top: -10px; }
.details-desc { color: var(--muted); }
.mini-features { display: flex; flex-wrap: wrap; gap: 8px; }
.mini-features span { font-size: .82rem; padding: 5px 12px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); }

.option { padding: 16px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--border); transition: border-color .25s; }
.option:focus-within { border-color: var(--main); }
.option-label { font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.option-label strong { color: var(--main); }
.option-hint { font-size: .8rem; color: var(--muted); margin-top: 6px; display: flex; justify-content: space-between; }

.swatches { display: flex; flex-wrap: wrap; gap: 14px; }
.swatch {
  position: relative; width: 42px; height: 42px; border-radius: 50%; background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); outline: 3px solid transparent; outline-offset: 3px;
  transition: outline-color .2s, transform .2s var(--ease);
}
.swatch:hover { transform: scale(1.12); }
.swatch.active { outline-color: var(--main); }
.swatch.active::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 800; text-shadow: 0 1px 3px rgba(0,0,0,.5); }

.shapes { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 10px; }
.shape {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px;
  border-radius: var(--radius-sm); font-size: .82rem; font-weight: 600;
  border: 2px solid var(--border); background: var(--surface); transition: border-color .2s, transform .2s var(--ease);
}
.shape .ph, .shape img { width: 100%; aspect-ratio: 1 / 1; border-radius: 8px; font-size: 1.6rem; object-fit: cover; }
.shape:hover { transform: translateY(-3px); }
.shape.active { border-color: var(--main); background: var(--main-soft); }

.input {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--surface);
  font: inherit; color: inherit; transition: border-color .2s, box-shadow .2s;
}
.input:focus { outline: none; border-color: var(--main); box-shadow: 0 0 0 4px var(--main-soft); }
textarea.input { resize: vertical; }

.addon {
  display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 12px 14px;
  border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: var(--surface); transition: border-color .2s, background .2s;
}
.addon:has(input:checked) { border-color: var(--main); background: var(--main-soft); }
.addon + .addon { margin-top: 8px; }
.addon input { width: 18px; height: 18px; accent-color: var(--main); }
.addon-price { margin-inline-start: auto; color: var(--main); font-weight: 800; font-size: .9rem; }

.buy-box { display: flex; align-items: center; gap: 12px; }
.buy-btn { flex: 1; padding: 15px; font-size: 1.05rem; }
.qty { display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: 999px; overflow: hidden; background: var(--surface); }
.qty button { width: 44px; height: 48px; font-size: 1.2rem; font-weight: 800; transition: background .2s, color .2s; }
.qty button:hover { background: var(--main-soft); color: var(--main); }
.qty span { min-width: 30px; text-align: center; font-weight: 800; }
.qty-small button { width: 32px; height: 32px; font-size: 1rem; }
.qty-small span { min-width: 24px; font-size: .9rem; }

/* تابات تفاصيل المنتج */
.ptabs-wrap { margin-top: 48px; }
.ptabs { display: flex; gap: 6px; border-bottom: 1.5px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.ptab { position: relative; padding: 12px 18px; font-weight: 700; color: var(--muted); white-space: nowrap; transition: color .2s; }
.ptab::after { content: ""; position: absolute; bottom: -1.5px; right: 0; left: 0; height: 3px; border-radius: 3px; background: var(--main); transform: scaleX(0); transition: transform .3s var(--ease); }
.ptab:hover { color: var(--text); }
.ptab.active { color: var(--main); }
.ptab.active::after { transform: scaleX(1); }
.ppanel { animation: pop .4s var(--ease); }
.ppanel ul { padding-right: 20px; display: flex; flex-direction: column; gap: 6px; }
.spec { display: grid; grid-template-columns: 160px 1fr; border-bottom: 1px solid var(--border); padding: 10px 0; }
.spec b { color: var(--muted); font-weight: 600; }

/* ===================== صفحة السلة ===================== */
.stepper { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.stepper .st { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--muted); font-size: .92rem; }
.stepper .st i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-style: normal; background: var(--surface); border: 1.5px solid var(--border); font-size: .85rem; }
.stepper .st.done i, .stepper .st.on i { background: var(--main); border-color: var(--main); color: #fff; }
.stepper .st.on { color: var(--text); }
.stepper .line { flex: 0 1 60px; height: 2px; background: var(--border); }
.stepper .line.done { background: var(--main); }

.page-title { font-size: 1.8rem; font-weight: 800; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.count-pill { font-size: .9rem; padding: 2px 12px; border-radius: 999px; background: var(--main-soft); color: var(--main); }
.cart-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
.checkout-panel { position: sticky; top: calc(var(--header-h) + 20px); display: flex; flex-direction: column; gap: 18px; }

.cart-items { display: flex; flex-direction: column; }
.cart-item { display: flex; gap: 16px; padding: 18px 0; position: relative; border-bottom: 1px solid var(--border); transition: opacity .3s, transform .3s var(--ease); }
.cart-item:first-child { padding-top: 0; }
.cart-item.removing { opacity: 0; transform: translateX(-30px); }
.cart-item-img { flex: 0 0 100px; height: 100px; border-radius: 14px; font-size: 2.4rem; object-fit: cover; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-info h3 { font-size: 1.05rem; font-weight: 800; padding-left: 34px; }
.cart-item-info h3 a:hover { color: var(--main); }
.cart-item-details { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.cart-item-details li { font-size: .78rem; padding: 2px 10px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.cart-item-row { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.cart-item-row .price { font-size: 1.05rem; }
.remove-btn { position: absolute; top: 14px; left: 0; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); transition: background .2s, color .2s; }
.cart-item:first-child .remove-btn { top: -4px; }
.remove-btn:hover { background: #fee2e2; color: var(--danger); }

.empty-cart { text-align: center; padding: 48px 0; }
.empty-icon { font-size: 4rem; animation: float 4s ease-in-out infinite; }
.empty-cart p { color: var(--muted); margin-bottom: 16px; }

.totals { display: flex; flex-direction: column; gap: 8px; font-size: .95rem; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { font-weight: 800; font-size: 1.2rem; padding-top: 10px; border-top: 1px dashed var(--border); color: var(--main); }

.customer-form { display: flex; flex-direction: column; gap: 12px; padding-top: 8px; border-top: 1px solid var(--border); }
.customer-form .panel-title { margin: 10px 0 0; }
.customer-form label { display: block; font-size: .9rem; font-weight: 700; }
.customer-form label .input { display: block; margin-top: 4px; font-weight: 400; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checkout-total { display: none; }
.checkout-note { text-align: center; font-size: .82rem; color: var(--muted); margin-top: -8px; }

/* ===================== صفحة الطلب المخصوص ===================== */
.custom-layout { display: grid; grid-template-columns: 1fr 1.1fr; gap: 28px; align-items: start; }
.idea-list { display: flex; flex-direction: column; gap: 14px; }
.idea { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--radius-sm); background: var(--bg); }
.idea .f-icon { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; background: var(--surface); box-shadow: var(--shadow); }
.idea h3 { font-size: 1rem; font-weight: 800; }
.idea p { font-size: .88rem; color: var(--muted); }
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 18px; transition: border-color .2s; }
.faq details[open] { border-color: var(--main); }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; color: var(--main); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin-top: 8px; font-size: .92rem; }

/* ===================== شريط السلة على الموبايل ===================== */
.mobile-bar { display: none; }

/* =========================================================
   الموبايل والتابلت
   ========================================================= */
@media (max-width: 980px) {
  .cats { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .hero-grid, .product-layout, .cart-layout, .custom-layout, .cta-banner { grid-template-columns: 1fr; }
  .hero-art { height: 300px; max-width: 420px; width: 100%; margin-inline: auto; }
  .gallery, .checkout-panel { position: static; }
  .cta-art { display: none; }
  .steps { grid-template-columns: 1fr; }

  /* القايمة بتتحول لزرار ☰ */
  .menu-btn { display: grid; }
  .nav {
    position: fixed; top: var(--header-h); right: 0; left: 0; z-index: 55;
    flex-direction: column; gap: 4px; padding: 16px; margin: 0;
    background: var(--surface); box-shadow: var(--shadow-lg); border-bottom: 1px solid var(--border);
    transform: translateY(-12px); opacity: 0; visibility: hidden; transition: all .3s var(--ease);
  }
  .nav a { padding: 12px 16px; font-size: 1.05rem; }
  .nav a.active { background: var(--main-soft); }
  .nav a.active::after { display: none; }
  .nav-open .nav { transform: none; opacity: 1; visibility: visible; }
  .header-actions { margin-inline-start: auto; }
}

@media (max-width: 720px) {
  :root { --header-h: 64px; }
  .topbar { font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .section { padding: 52px 0; }
  .hero { padding: 48px 0 56px; }
  .hero-art { height: 250px; }
  .hero-art .t1 { font-size: 4.5rem; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-body { padding: 12px; }
  .card-title { font-size: .98rem; }
  .card-cta { display: none; }
  .cats { gap: 12px; }
  .cat { min-height: 150px; padding: 16px; }
  .cat .cat-icon { font-size: 2.8rem; }
  .cat::after { display: none; }
  .features { grid-template-columns: 1fr 1fr; gap: 12px; }
  .feature { padding: 18px 16px; }
  .cta-banner { padding: 28px 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }

  .toolbar { margin-top: -22px; }
  .search, .sort { flex: 1 1 140px; }
  .toolbar .tabs { flex-basis: 100%; order: -1; }

  .mobile-bar {
    display: flex; justify-content: space-between; align-items: center;
    position: fixed; bottom: 12px; left: 12px; right: 12px; z-index: 40;
    padding: 14px 18px; border-radius: var(--radius); background: var(--main); color: #fff; font-weight: 700; box-shadow: var(--shadow-lg);
  }
  .has-mobile-bar .footer { padding-bottom: 100px; }
  .has-mobile-bar .to-top { bottom: 84px; }

  .page-title { font-size: 1.5rem; }
  .panel { padding: 16px; }
  .details-title { font-size: 1.6rem; }
  .gallery-main { font-size: 6rem; }
  .thumb { flex-basis: 64px; height: 64px; }
  .spec { grid-template-columns: 110px 1fr; }
  .form-row { grid-template-columns: 1fr; }

  .page-product .buy-box, .page-cart .checkout-box {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -8px 28px rgba(30, 16, 70, .1);
  }
  .page-cart .checkout-box { display: flex; align-items: center; gap: 12px; }
  .page-product .footer, .page-cart .footer { padding-bottom: 110px; }
  .page-product .to-top, .page-cart .to-top { bottom: 96px; }
  .page-cart .checkout-total { display: flex; flex-direction: column; line-height: 1.3; font-size: .8rem; color: var(--muted); }
  .page-cart .checkout-total strong { font-size: 1.15rem; color: var(--main); white-space: nowrap; }
  .page-cart .checkout-box .btn { flex: 1; font-size: .95rem; padding: 12px; }
  .checkout-note { margin-top: 0; }
  .cart-item-img { flex-basis: 78px; height: 78px; font-size: 2rem; }
}

@media (max-width: 360px) {
  .products-grid, .cats, .features { grid-template-columns: 1fr; }
}

/* =========================================================
   إضافات V0.4 (الصور الحقيقية + السلة الشغالة + الواتساب)
   ========================================================= */

/* الصور */
img.logo-mark { object-fit: cover; padding: 0; }
img.gallery-main { display: block; background: var(--surface); }
.thumb { overflow: hidden; padding: 0; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
img.cart-item-img { display: block; }
img.card-img { display: block; background: var(--bg); }

/* اسم الاختيار جنب العنوان */
.option-label .pick { color: var(--muted); font-weight: 600; }
.option-label .pick.chosen { color: var(--main); font-weight: 800; }
.shape small { color: var(--main); font-weight: 700; }

/* أزرار الاختيار (مقاس مثلًا) */
.choice-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-btn {
  padding: 8px 18px; border-radius: 999px; font-weight: 700;
  border: 2px solid var(--border); background: var(--surface); transition: all .2s;
}
.choice-btn small { color: var(--main); }
.choice-btn:hover { border-color: #cbd5e1; }
.choice-btn.active { border-color: var(--main); background: var(--main-soft); color: var(--main); }

/* الأخطاء في الفورم */
.has-error .input { border-color: var(--danger); box-shadow: 0 0 0 4px #fee2e2; }
.err { display: block; color: var(--danger); font-size: .8rem; font-weight: 700; margin-top: 4px; }
.err:empty { display: none; }
.option.error { border-color: var(--danger); animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(6px); } 50% { transform: translateX(-6px); } 75% { transform: translateX(3px); } }

/* التوست فيه لينك */
.toast.show { pointer-events: auto; }
.toast a { color: var(--accent); text-decoration: underline; margin-right: 6px; }

/* السلة */
.cart-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.cart-actions .back-link { margin: 0; }
.clear-cart { color: var(--muted); font-size: .88rem; font-weight: 700; padding: 6px 10px; border-radius: 999px; transition: color .2s, background .2s; }
.clear-cart:hover { color: var(--danger); background: #fee2e2; }
.notfound { text-align: center; padding: 56px 24px; }
.notfound p { margin: 6px 0 18px; }

/* الطلب المخصوص */
.customer-form.plain { border: 0; padding: 0; }
@media (min-width: 861px) { .custom-panel { position: sticky; top: calc(var(--header-h) + 20px); } }

/* معاينة رسالة الواتساب (لما الرقم لسه مؤقت) */
.wa-preview {
  margin: auto; width: min(520px, 100% - 32px); max-height: 85vh; overflow: auto;
  border: 0; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-lg);
  font-family: var(--font); color: var(--text);
}
.wa-preview::backdrop { background: rgba(18, 11, 36, .6); backdrop-filter: blur(3px); }
.wa-preview h2 { font-size: 1.2rem; margin-bottom: 6px; }
.wa-preview .warn { font-size: .9rem; color: var(--muted); margin-bottom: 12px; }
.wa-preview pre {
  white-space: pre-wrap; font-family: var(--font); font-size: .92rem; line-height: 1.8;
  background: #e7fbe9; border-radius: var(--radius-sm); padding: 16px; direction: rtl; text-align: right;
}
.wa-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.wa-actions .btn-whatsapp { font-size: .95rem; padding: 12px 20px; }

/* =========================================================
   V0.5 — اللوجو (صورة)
   ========================================================= */
img.logo-mark {
  width: 46px; height: 46px; border-radius: 14px; background: #fff;
  transform: none; box-shadow: 0 0 0 1px var(--border), var(--shadow);
}
.logo:hover img.logo-mark { transform: scale(1.06); }
.logo span { font-weight: 800; letter-spacing: 1px; }
.footer img.logo-mark { width: 54px; height: 54px; box-shadow: none; }
/* =========================================================
   V0.6 — اللمسات الأخيرة
   ========================================================= */

/* شكل التركيز لما حد يستخدم الكيبورد */
:focus-visible { outline: 3px solid var(--main); outline-offset: 2px; border-radius: 6px; }
.input:focus-visible { outline: none; }

/* زرار واتساب عايم */
.wa-float {
  position: fixed; bottom: 22px; right: 22px; z-index: 45;
  display: flex; align-items: center; gap: 8px; padding: 12px 18px 12px 14px; border-radius: 999px;
  background: var(--whatsapp); color: #fff; font-weight: 800; box-shadow: 0 10px 28px rgba(37, 211, 102, .4);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.wa-float svg { width: 24px; height: 24px; fill: currentColor; }
.wa-float:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 14px 34px rgba(37, 211, 102, .5); }
.wa-float::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid var(--whatsapp);
  animation: wa-ring 2.4s ease-out infinite; pointer-events: none;
}
@keyframes wa-ring { 0% { opacity: .7; transform: scale(1); } 100% { opacity: 0; transform: scale(1.35); } }

/* زرار المشاركة في صفحة المنتج */
.details-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.share-btn {
  padding: 5px 14px; border-radius: 999px; font-size: .85rem; font-weight: 700; color: var(--muted);
  border: 1.5px solid var(--border); background: var(--surface); transition: all .2s;
}
.share-btn:hover { color: var(--main); border-color: var(--main); }

/* بعد ما الواتساب يفتح */
.sent-box {
  padding: 16px; border-radius: var(--radius-sm); background: #ecfdf3; border: 1.5px solid #86efac;
  animation: pop .45s var(--ease);
}
.sent-box p { font-size: .9rem; color: #166534; margin: 4px 0 12px; }
.sent-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.sent-actions .btn { padding: 10px 18px; font-size: .92rem; }

/* شاشة الشكر + صفحة 404 */
.thanks { text-align: center; padding: 56px 24px; }
.thanks-icon { font-size: 4rem; animation: float 4s ease-in-out infinite; }
.thanks h1, .notfound h1 { font-size: 1.7rem; font-weight: 800; margin: 6px 0; }
.thanks p { margin-bottom: 6px; }
.thanks .sent-actions, .notfound .sent-actions { justify-content: center; margin-top: 18px; }

/* رسالة غلط في products.js (بتظهر بس وانت بتجرب على جهازك) */
.data-error {
  position: relative; z-index: 200; background: #fef2f2; color: #991b1b; border-bottom: 3px solid var(--danger);
  padding: 14px 20px; font-size: .92rem;
}
.data-error ul { margin: 6px 20px 6px 0; }
.data-error small { color: #7f1d1d; }

@media (max-width: 720px) {
  .wa-float { bottom: 16px; right: 16px; padding: 12px; }
  .wa-float span { display: none; }
  .mobile-bar:not([hidden]) ~ .wa-float { bottom: 84px; }
  .page-product .wa-float { bottom: 96px; }
}
.sent-box span[dir], .thanks b[dir] { white-space: nowrap; font-weight: 800; }

/* =========================================================
   V0.8 — الصور الحقيقية
   ========================================================= */
.hero-art img.tile { object-fit: cover; background: #fff; }
.price small.from { font-size: .62em; font-weight: 700; color: var(--muted); margin-left: 2px; }
/* صور المنتجات الحقيقية خلفيتها فاتحة */
img.card-img, img.gallery-main, .thumb img, img.cart-item-img, .shape img { background: #fff; }
.shapes { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
.shape { font-size: .8rem; text-align: center; line-height: 1.4; }
/* الصور الصغيرة الكتير متوسعش الصفحة (بتتسحب جنب بعض بدل كده) */
.product-layout > *, .cart-layout > *, .custom-layout > * { min-width: 0; }

/* =========================================================
   V0.11 — خلفية الموقع: اللوجو
   اللوجو متكرر بشفافية خفيفة ورا كل الصفحات.
   تقدر تغيّر:
     --logo-opacity  = وضوح اللوجو (0.06 خفيف، 0.12 أوضح)
     --logo-size     = حجم اللوجو الواحد
   ========================================================= */
:root { --logo-opacity: 0.07; --logo-size: 150px; }
html { background: var(--bg); }
body { background: transparent; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("images/logo.jpg"), url("images/logo.jpg");
  background-size: var(--logo-size), var(--logo-size);
  background-position: 0 0, calc(var(--logo-size) * 0.75) calc(var(--logo-size) * 0.75);
  background-repeat: repeat;
  opacity: var(--logo-opacity);
  mix-blend-mode: multiply;            /* بيشيل الأبيض اللي حوالين اللوجو */
}
@media (max-width: 720px) { :root { --logo-size: 110px; } }
/* =========================================================
   V0.12 — خلفية الموقع ملونة بدل الأبيض
   غيّر --bg لأي لون تحبه، واللوجو هيفضل باين فوقه.
   ========================================================= */
:root { --bg: #ebe5fb; }          /* بنفسجي فاتح */
.header { background: rgba(245, 241, 255, .9); }
/* =========================================================
   V0.13 — خلفية غامقة (بنفسجي غامق)
   --page-bg = لون خلفية الصفحة. الكروت والصناديق فضلت بيضا.
   الكلام اللي على الخلفية مباشرة بقى فاتح عشان يتقري.
   ========================================================= */
:root {
  --page-bg:    #1e1538;   /* بنفسجي غامق */
  --on-dark:    #f4f1ff;   /* الكلام على الخلفية الغامقة */
  --on-dark-2:  #b9b0d6;   /* الكلام الثانوي على الغامق */
  --accent-light: #c4b5fd; /* بنفسجي فاتح للتمييز على الغامق */
}
html { background: var(--page-bg); }
body { color: var(--on-dark); }

/* اللوجو في الخلفية: أبيض بشفافية خفيفة بدل الأسود */
body::before { filter: invert(1); mix-blend-mode: screen; opacity: 0.08; }

/* كل حاجة بيضا جواها كلام غامق زي الأول */
.card, .panel, .input, .qty, .shape, .addon, .toolbar, .faq details, .idea,
.mini-features span, .wa-preview, .modal-box, .tab:not(.active) { color: var(--text); }
.addon { background: var(--surface); }

/* الهيدر غامق شفاف */
.header { background: rgba(30, 21, 56, .88); border-bottom-color: rgba(255, 255, 255, .08); }
.header.scrolled { border-color: rgba(255, 255, 255, .1); box-shadow: 0 6px 24px rgba(0, 0, 0, .3); }
.nav a { color: var(--on-dark-2); }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.nav a.active { color: var(--accent-light); }
.nav a.active::after { background: var(--accent-light); }
.icon-btn { color: var(--on-dark); }
.icon-btn:hover { background: rgba(255, 255, 255, .08); }
@media (max-width: 860px) {
  .nav { background: #261c47; border-bottom-color: rgba(255, 255, 255, .08); }
  .nav a.active { background: rgba(196, 181, 253, .15); }
}

/* الكلام اللي على الخلفية مباشرة */
.breadcrumb, .results-info, .grid-empty, .details-desc, .option-hint, .stepper .st { color: var(--on-dark-2); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb .current, .stepper .st.on { color: var(--on-dark); }
.stepper .line { background: rgba(255, 255, 255, .15); }
.option-label strong, .details .price.big, .details .price.big small, .section-head .kicker, .kicker, .link-more { color: var(--accent-light); }
.ptab { color: var(--on-dark-2); }
.ptab:hover { color: #fff; }
.ptab.active { color: var(--accent-light); }
.ptab::after { background: var(--accent-light); }
.ptabs { border-bottom-color: rgba(255, 255, 255, .12); }
.buy-box { border-top-color: rgba(255, 255, 255, .12); }
.share-btn { background: transparent; color: var(--on-dark-2); border-color: rgba(255, 255, 255, .2); }
.share-btn:hover { color: #fff; border-color: #fff; }
.back-link { color: var(--on-dark-2); }
.panel .back-link, .panel .cart-actions .back-link { color: var(--muted); }
.mobile-bar { box-shadow: 0 12px 40px rgba(0, 0, 0, .4); }

/* صفحة المنتج على الموبايل: شريط الإضافة للسلة غامق */
@media (max-width: 720px) {
  .page-product .buy-box { background: #261c47; border-top-color: rgba(255, 255, 255, .1); }
}

/* ===================== الرئيسية (home.css) ===================== */
main.home2 { color: var(--on-dark); }
.home2 .h-card, .home2 .h-cat, .home2 .h-feature, .home2 .h-step, .home2 .h-faq details { color: var(--h-text); }
main.home2 .bg-lilac, main.home2 .bg-pink { color: var(--h-text); }
.home2 .h-section:not(.bg-lilac):not(.bg-pink) .h-kicker,
.home2 .h-section:not(.bg-lilac):not(.bg-pink) .h-link { color: var(--accent-light); }
.home2 .h-tab:not(.active) { color: var(--h-muted); }
/* صناديق الاختيارات في صفحة المنتج فاتحة، فالكلام جواها غامق */
.option, .choice-btn, .swatch, .cart-item, .totals, .customer-form { color: var(--text); }
.option .option-hint { color: var(--muted); }
.option .option-label strong { color: var(--main-dark); }
/* =========================================================
   V0.14 — صفحة آراء العملاء
   ========================================================= */
.reviews-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; color: var(--on-dark); }
.reviews-summary p { color: var(--on-dark-2); }
.reviews-summary .avg { display: flex; align-items: center; gap: 12px; }
.reviews-summary .avg b { font-size: 2.2rem; line-height: 1; font-weight: 800; }
.reviews-summary .btn svg, .reviews-empty .btn svg { width: 20px; height: 20px; fill: currentColor; }

.reviews-grid { columns: 3 280px; column-gap: 20px; }
.review {
  break-inside: avoid; margin-bottom: 20px; display: flex; flex-direction: column; gap: 12px;
  padding: 20px; border-radius: var(--radius); background: var(--surface); color: var(--text);
  box-shadow: var(--shadow); transition: transform .3s var(--ease);
}
.review:hover { transform: translateY(-4px); }
.review-shot { display: block; padding: 0; border-radius: 12px; overflow: hidden; background: var(--bg); cursor: zoom-in; }
.review-shot img { display: block; width: 100%; height: auto; transition: transform .4s var(--ease); }
.review-shot:hover img { transform: scale(1.03); }
.stars { color: #f59e0b; font-size: 1.15rem; letter-spacing: 2px; line-height: 1; }
.stars span { color: #e5e7eb; }
.review-text { font-size: 1rem; line-height: 1.8; }
.review-text::before { content: "“"; color: var(--main); font-size: 1.6rem; font-weight: 800; margin-left: 4px; vertical-align: -6px; }
.review-meta { display: flex; align-items: center; gap: 10px; }
.review-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--main-soft); color: var(--main-dark); font-weight: 800; }
.review-meta b { display: block; font-weight: 700; }
.review-meta small { color: var(--muted); }
.review-product { font-size: .88rem; font-weight: 700; color: var(--main); width: fit-content; padding: 4px 12px; border-radius: 999px; background: var(--main-soft); }
.review-product:hover { background: var(--main); color: #fff; }

.reviews-empty { text-align: center; padding: 48px 24px; color: var(--text); }
.reviews-empty .empty-icon { font-size: 3.5rem; }
.reviews-empty h2 { font-size: 1.5rem; font-weight: 800; margin: 8px 0; }
.reviews-empty p { color: var(--muted); max-width: 440px; margin: 0 auto 20px; }

.shot-viewer { margin: auto; max-width: min(560px, 100% - 32px); max-height: 90vh; padding: 0; border: 0; border-radius: var(--radius); background: transparent; overflow: visible; }
.shot-viewer::backdrop { background: rgba(10, 6, 24, .8); }
.shot-viewer img { display: block; max-width: 100%; max-height: 90vh; border-radius: var(--radius); }
.shot-viewer .close-btn { position: absolute; top: -14px; left: -14px; width: 38px; height: 38px; border-radius: 50%; background: #fff; color: var(--text); font-weight: 800; box-shadow: var(--shadow-lg); }
/* V0.15 — رأي عبارة عن صورة بس */
.review.review-image-only { padding: 8px; }
.review.review-image-only .review-shot { border-radius: 12px; }

/* =========================================================
   V0.23 — أيقونات السوشيال الحقيقية في الفوتر
   كل أيقونة بتاخد لون المنصة بتاعتها لما الماوس يعدي عليها
   ========================================================= */
.social a { width: 44px; height: 44px; }
.social a svg { width: 22px; height: 22px; fill: currentColor; }
.social a.soc-fb:hover { background: #1877f2; }
.social a.soc-ig:hover { background: #e1306c; }
.social a.soc-tt:hover { background: #010101; box-shadow: -2px -2px 0 #25f4ee, 2px 2px 0 #fe2c55; }
.social a.soc-wa:hover { background: #25d366; }
/* ===== V0.25: أيقونات "تواصل معانا" ===== */
.footer .contact-list li { display: flex; align-items: center; gap: 10px; }
.footer .contact-list .ci {
  width: 30px; height: 30px; padding: 6px; flex: none;
  border-radius: 9px; background: rgba(255, 255, 255, .07);
  color: var(--accent-light, #c4b5fd);
}

/* =====================================================
   V0.53: صفحة طباعة ملف (print.html)
   ===================================================== */
.print-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 24px; padding: 0; }
.print-steps li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.print-steps li > span { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--main); color: #fff; font-weight: 800; }
.print-steps li:nth-child(2) > span { background: #ec4899; }
.print-steps li:nth-child(3) > span { background: #10b981; }
.print-steps b { display: block; font-size: .95rem; }
.print-steps small { display: block; color: var(--muted); font-size: .8rem; }

.print-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.print-layout > * { min-width: 0; }
@media (min-width: 861px) { .print-form-panel { position: sticky; top: calc(var(--header-h) + 20px); } }

.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  min-height: 260px; padding: 24px; border-radius: var(--radius-sm); cursor: pointer;
  border: 2px dashed #c4b5fd; background: #f7f4ff; color: var(--text);
  transition: border-color .2s, background .2s, transform .2s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--main); background: #efe9ff; }
.dropzone.drag { transform: scale(1.01); }
.dropzone.has-error { border-color: #e11d48; background: #fff1f2; }
.dropzone .dz-icon { font-size: 2.6rem; line-height: 1; margin-bottom: 4px; }
.dropzone b { font-size: 1.05rem; }
.dropzone small { color: var(--muted); }
.dropzone[hidden] { display: none; }

.print-preview[hidden] { display: none; }
.preview-stage {
  position: relative; border-radius: var(--radius-sm); overflow: hidden;
  background: radial-gradient(80% 80% at 50% 35%, #3a2a6e 0%, #1b1036 70%);
}
.preview-stage canvas { display: block; width: 100%; aspect-ratio: 4 / 3; cursor: grab; touch-action: none; }
.preview-stage canvas:active { cursor: grabbing; }
.preview-msg { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; color: #e9e4ff; font-weight: 700; background: rgba(27, 16, 54, .6); }
.preview-msg[hidden] { display: none; }
.preview-hint { position: absolute; bottom: 10px; right: 12px; padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, .35); color: #fff; font-size: .75rem; pointer-events: none; }
.file-info { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 12px; color: var(--text); }
.file-name { display: flex; align-items: center; gap: 6px; flex: 1 1 200px; min-width: 0; }
.file-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; }
.file-name small { color: var(--muted); white-space: nowrap; }
.file-stats { display: flex; gap: 16px; margin: 0; }
.file-stats[hidden] { display: none; }
.file-stats dt { font-size: .75rem; color: var(--muted); }
.file-stats dd { margin: 0; font-weight: 800; }
.btn-sm { padding: 6px 14px; font-size: .85rem; }
.field-err { margin: 8px 0 0; color: #e11d48; font-size: .85rem; font-weight: 700; }
.field-err[hidden] { display: none; }
.print-privacy { margin: 12px 0 0; color: var(--muted); font-size: .82rem; }
.print-form-panel .customer-form .panel-title { margin-top: 8px; }
.print-faq a { color: var(--main); font-weight: 700; }

@media (max-width: 860px) {
  .print-layout { grid-template-columns: 1fr; }
  .print-steps { grid-template-columns: 1fr; }
  .dropzone { min-height: 190px; }
}

/* ===== V0.54: ملف الـ 3D بقى جوه فورم الطلب المخصوص (صفحة طباعة ملف اتشالت) ===== */
.model-field { display: flex; flex-direction: column; gap: 6px; }
.model-label { font-size: .9rem; font-weight: 700; color: var(--text); }
.model-label small { color: var(--muted); font-weight: 400; }
.dropzone-sm { min-height: 130px; padding: 16px; }
.dropzone-sm .dz-icon { font-size: 2rem; }
.model-field .print-privacy { margin: 0; }
.file-actions { display: flex; gap: 8px; }
.form-row.model-only[hidden] { display: none; }
/* الفورم بقى أطول، فمبقاش ثابت وانت نازل */
@media (min-width: 861px) { .custom-panel { position: static; } }

/* =====================================================
   V0.55: صفحة الطلب المخصوص بألوان الموقع الغامقة
   (زي "ليه DOP" في الرئيسية) + أيقونات جديدة
   ===================================================== */
body[data-page="custom"] .section-title { color: #fff; }

/* "بنعمل إيه مخصوص؟" */
body[data-page="custom"] .idea {
  align-items: center; padding: 16px 18px; color: #fff;
  background: #231845; border: 1px solid #3a2c66; border-radius: 16px;
  box-shadow: 0 16px 34px -24px rgba(0, 0, 0, .8);
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
body[data-page="custom"] .idea:hover { border-color: var(--ic); transform: translateY(-2px); box-shadow: 0 18px 36px -22px var(--ic); }
body[data-page="custom"] .idea .f-icon {
  width: 48px; height: 48px; border-radius: 14px; font-size: 24px; color: #fff;
  background: var(--ic); box-shadow: 0 8px 20px -8px var(--ic);
}
body[data-page="custom"] .idea .f-icon .ph { line-height: 1; }
body[data-page="custom"] .idea h3 { color: #fff; }
body[data-page="custom"] .idea p { color: #c9c1e8; }
/* "فكرة تانية في دماغك؟" مميزة شوية */
body[data-page="custom"] .idea-open { background: linear-gradient(135deg, #2e1c55, #3a1d4a); border-style: dashed; border-color: #f97316; }

/* الأسئلة */
body[data-page="custom"] .faq details { background: #231845; border-color: #3a2c66; color: #fff; }
body[data-page="custom"] .faq details[open] { background: #2a1d50; border-color: #a78bfa; }
body[data-page="custom"] .faq summary::after { color: #c4b5fd; }
body[data-page="custom"] .faq details p { color: #c9c1e8; }

/* الملحوظة تحت زرار الواتساب */
.attach-note {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
  border-radius: 12px; background: #f3effe; border: 1px dashed #c4b5fd; color: var(--text);
}
.attach-note .ph { flex: none; font-size: 22px; color: var(--main); margin-top: 2px; }
.attach-note p { margin: 0; font-size: .86rem; line-height: 1.6; color: #4a4466; }
.attach-note b { color: var(--text); }
/* أيقونات Phosphor في الصفحة دي: بنلغي شكل .ph القديم (المربع الملون الكبير) */
body[data-page="custom"] .idea .f-icon .ph,
.attach-note .ph { display: inline-block; background: none; font-weight: normal; line-height: 1; }
body[data-page="custom"] .idea .f-icon .ph { font-size: 24px; color: #fff; }
.attach-note .ph { font-size: 22px; color: var(--main); }
