/* ==========================================================================
   رواسي أحد للبرمجيات — نظام التصميم
   كحلي + ذهبي (مطابق لألوان الشعار) · عربي RTL
   ========================================================================== */

:root {
  /* كحلي (الخلفيات) — من الأغمق إلى الأفتح */
  --black: #021229;        /* خلفية الصفحة */
  --ink: #061a36;          /* خلفية الأقسام البديلة والتذييل */
  --ink-2: #0a2142;        /* البطاقات */
  --ink-3: #122c52;        /* عناصر داخل البطاقات */
  --line: #23406a;         /* الحدود */
  --line-soft: #18325a;    /* حدود خفيفة */

  /* ذهبي (اللون المميز) — أبقينا أسماء المتغيرات القديمة حتى لا تتأثر القوالب */
  --yellow: #c9973f;       /* الذهبي الأساسي */
  --yellow-2: #e4b65d;     /* ذهبي فاتح (عند المرور) */
  --yellow-deep: #a8762a;  /* ذهبي غامق */
  --yellow-soft: rgba(201, 151, 63, .13);
  --gold-grad: linear-gradient(135deg, #ecc56f 0%, #c9973f 50%, #a5722a 100%);

  /* النصوص */
  --text: #f4efe2;         /* أبيض عاجي دافئ */
  --muted: #9fadc6;        /* رمادي مائل للأزرق */
  --muted-2: #6f7f9f;

  --success: #3ecf8e;
  --danger: #ff6b6b;
  --info: #6cb6ff;

  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 22px;
  --shadow: 0 20px 50px -20px rgba(2, 8, 20, .75);
  --container: 1200px;

  --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --font-display: "Alexandria", "IBM Plex Sans Arabic", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--black);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.3; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }
::selection { background: var(--yellow); color: var(--black); }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.text-yellow { color: var(--yellow); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2.5rem; }
.mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; } .items-center { align-items: center; } .gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; }
.between { justify-content: space-between; } .wrap { flex-wrap: wrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }
.ltr { direction: ltr; unicode-bidi: embed; display: inline-block; }

/* ------------------------------------------------------------------ أزرار */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .8rem 1.5rem; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 600; font-size: .98rem; cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--gold-grad); color: var(--black); box-shadow: 0 8px 24px -10px rgba(201, 151, 63, .65); }
.btn-primary:hover { background: var(--yellow-2); box-shadow: 0 12px 30px -10px rgba(201, 151, 63, .8); }
.btn-dark { background: var(--black); color: var(--yellow); }
.btn-dark:hover { background: #000c1e; color: var(--yellow-2); }
.btn-outline { border-color: var(--line); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--yellow); color: var(--yellow); }
.btn-ghost { background: var(--ink-3); color: var(--text); }
.btn-ghost:hover { background: var(--line); }
.btn-danger { background: transparent; border-color: rgba(255, 92, 92, .4); color: var(--danger); }
.btn-danger:hover { background: rgba(255, 92, 92, .1); }
.btn-sm { padding: .45rem 1rem; font-size: .85rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-icon { padding: .55rem; border-radius: 10px; }

/* عناصر الشبكات لا تتجاوز عرض العمود (يمنع تمدد الصفحة على الجوال) */
.hero-grid > *, .detail-grid > *, .shop-layout > *, .cart-layout > *, .account-layout > *, .why-grid > *, .grid > * { min-width: 0; }

/* ------------------------------------------------------------------ الشعار */
.logo { display: inline-flex; align-items: center; gap: .7rem; }
.logo-mark { width: 44px; height: 44px; flex: none; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text strong { font-family: var(--font-display); font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; }
.logo-text small { font-size: .7rem; color: var(--yellow); letter-spacing: .14em; font-weight: 600; }
.logo-img { height: 46px; width: auto; }

/* ------------------------------------------------------------------ الشريط العلوي */
.topbar { background: var(--gold-grad); color: var(--black); font-size: .82rem; font-weight: 600; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; min-height: 36px; gap: 1rem; }
.topbar a { display: inline-flex; align-items: center; gap: .35rem; }
.topbar svg { width: 15px; height: 15px; }
.topbar-links { display: flex; gap: 1.4rem; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(2, 18, 41, .86);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .container { display: flex; align-items: center; gap: 2rem; min-height: 78px; }
.main-nav { display: flex; gap: .3rem; margin-inline-start: auto; }
.main-nav a {
  position: relative; padding: .5rem .9rem; border-radius: 999px; color: var(--muted);
  font-weight: 500; transition: color .2s, background .2s;
}
.main-nav a:hover { color: var(--text); }
.main-nav a.active { color: var(--yellow); }
.main-nav a.active::after {
  content: ""; position: absolute; bottom: 2px; right: 50%; transform: translateX(50%);
  width: 6px; height: 6px; border-radius: 50%; background: var(--yellow);
}
.header-actions { display: flex; align-items: center; gap: .6rem; }
.icon-link {
  position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border-radius: 12px; border: 1px solid var(--line); color: var(--text); background: transparent; cursor: pointer;
  transition: border-color .2s, color .2s;
}
.icon-link:hover { border-color: var(--yellow); color: var(--yellow); }
.icon-link svg { width: 20px; height: 20px; }
.cart-count {
  position: absolute; top: -7px; left: -7px; min-width: 21px; height: 21px; padding: 0 5px;
  border-radius: 999px; background: var(--yellow); color: var(--black);
  font-size: .72rem; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--black);
}
.nav-toggle { display: none; }

@media (max-width: 1020px) {
  .main-nav {
    position: fixed; inset: 114px 0 auto 0; flex-direction: column; gap: 0;
    background: var(--ink); border-bottom: 1px solid var(--line); padding: .5rem 20px 1.2rem;
    transform: translateY(-12px); opacity: 0; visibility: hidden; transition: .25s ease;
  }
  .main-nav.open { transform: none; opacity: 1; visibility: visible; }
  .main-nav a { padding: .85rem .4rem; border-radius: 0; border-bottom: 1px solid var(--line-soft); }
  .main-nav a.active::after { display: none; }
  .nav-toggle { display: inline-grid; }
  .header-cta { display: none; }
  .header-actions { margin-inline-start: auto; }
}
@media (max-width: 640px) {
  .topbar-links .hide-sm { display: none; }
  .site-header .container { gap: .8rem; }
  .logo-text small { display: none; }
}

/* ------------------------------------------------------------------ تنبيهات */
.flash-wrap { position: fixed; top: 128px; left: 20px; z-index: 80; display: grid; gap: .6rem; max-width: min(420px, calc(100% - 40px)); }
.alert {
  display: flex; gap: .7rem; align-items: flex-start; padding: .9rem 1.1rem; border-radius: var(--radius-sm);
  border: 1px solid; font-size: .95rem; background: var(--ink-2);
}
.alert svg { width: 20px; height: 20px; flex: none; margin-top: 3px; }
.alert-success { border-color: rgba(62, 207, 142, .35); color: #b9f3d8; }
.alert-success svg { color: var(--success); }
.alert-error { border-color: rgba(255, 92, 92, .35); color: #ffc9c9; }
.alert-error svg { color: var(--danger); }
.alert-info { border-color: rgba(201, 151, 63, .35); color: #ffe8a3; background: var(--yellow-soft); }
.flash-wrap .alert { box-shadow: var(--shadow); animation: slideIn .35s ease; }
.alert ul { margin: 0; padding-inline-start: 1.1rem; }
@keyframes slideIn { from { opacity: 0; transform: translateX(-16px); } }

/* ------------------------------------------------------------------ البطل (Hero) */
.hero { position: relative; overflow: hidden; padding: 90px 0 0; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(800px 420px at 85% 10%, rgba(201, 151, 63, .16), transparent 60%),
    radial-gradient(600px 400px at 0% 80%, rgba(201, 151, 63, .07), transparent 60%);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem; padding: .4rem 1rem .4rem .6rem;
  border-radius: 999px; background: var(--ink-2); border: 1px solid var(--line);
  font-size: .85rem; color: var(--muted); margin-bottom: 1.4rem;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 4px var(--yellow-soft); }
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 4.1rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin-bottom: 1.2rem; }
.hero h1 .hl { color: var(--yellow); position: relative; white-space: nowrap; }
.hero h1 .hl::after {
  content: ""; position: absolute; inset-inline: 0; bottom: .08em; height: .14em;
  background: var(--yellow); opacity: .25; border-radius: 4px;
}
.hero-lead { font-size: 1.15rem; color: var(--muted); max-width: 580px; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 1.5rem; margin-top: 2.2rem; color: var(--muted); font-size: .9rem; flex-wrap: wrap; }
.hero-trust span { display: inline-flex; align-items: center; gap: .4rem; }
.hero-trust svg { width: 18px; height: 18px; color: var(--yellow); }

.code-card {
  position: relative; background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden; transform: rotate(-1.5deg);
}
.code-card-head { display: flex; gap: .45rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); align-items: center; }
.code-card-head i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); display: block; }
.code-card-head i:first-child { background: var(--yellow); }
.code-card-head span { margin-inline-start: auto; font-size: .78rem; color: var(--muted-2); direction: ltr; font-family: ui-monospace, Menlo, monospace; }
.code-card pre {
  margin: 0; padding: 1.3rem 1.4rem 1.6rem; direction: ltr; text-align: left; font-size: .86rem; line-height: 1.9;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; color: #d9dcea; overflow-x: auto;
}
.code-card .k { color: var(--yellow); } .code-card .s { color: #a8d8b9; } .code-card .c { color: var(--muted-2); } .code-card .f { color: #8ecbff; }
.float-badge {
  position: absolute; display: flex; align-items: center; gap: .6rem; background: var(--yellow); color: var(--black);
  padding: .7rem 1rem; border-radius: 14px; font-weight: 700; font-size: .9rem; box-shadow: var(--shadow);
}
.float-badge svg { width: 22px; height: 22px; }
.float-badge.b1 { bottom: -18px; right: -14px; transform: rotate(2deg); }
.hero-visual { position: relative; padding: 1rem 1rem 2rem; }

.mountains { display: block; width: 100%; height: auto; margin-top: 60px; color: var(--ink-2); }
.mountains .m1 { fill: #071c3a; } .mountains .m2 { fill: #0b2446; } .mountains .m3 { fill: var(--ink); }
.mountains .ridge { fill: none; stroke: var(--yellow); stroke-width: 2; opacity: .55; }

@media (max-width: 900px) {
  .hero { padding-top: 56px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { max-width: 520px; }
}

/* ------------------------------------------------------------------ الأقسام */
.section { padding: 96px 0; position: relative; }
.section-alt { background: var(--ink); }
.section-tight { padding: 64px 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; margin-bottom: 3rem; flex-wrap: wrap; }
.section-head.centered { flex-direction: column; align-items: center; text-align: center; }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-bottom: .4rem; letter-spacing: -.01em; }
.section-head p { color: var(--muted); max-width: 620px; margin: 0; }
.kicker {
  display: inline-flex; align-items: center; gap: .5rem; color: var(--yellow); font-weight: 600;
  font-size: .88rem; margin-bottom: .8rem; letter-spacing: .02em;
}
.kicker::before { content: ""; width: 22px; height: 2px; background: var(--yellow); border-radius: 2px; }

.grid { display: grid; gap: 1.4rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1020px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .section { padding: 68px 0; } }

/* ------------------------------------------------------------------ بطاقة الخدمة */
.service-card {
  position: relative; display: flex; flex-direction: column; padding: 2rem 1.8rem 1.7rem;
  background: var(--ink-2); border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  transition: transform .25s ease, border-color .25s ease, background .25s ease; overflow: hidden;
}
.service-card::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--yellow);
  transform: scaleX(0); transform-origin: right; transition: transform .35s ease;
}
.service-card:hover { transform: translateY(-4px); border-color: var(--line); background: var(--ink-3); }
.service-card:hover::after { transform: scaleX(1); }
.service-icon {
  width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 1.4rem;
  background: var(--yellow-soft); color: var(--yellow); border: 1px solid rgba(201, 151, 63, .25);
}
.service-icon svg { width: 28px; height: 28px; }
.service-card h3 { font-size: 1.25rem; margin-bottom: .6rem; }
.service-card p { color: var(--muted); font-size: .95rem; flex: 1; }
.service-card .more { display: inline-flex; align-items: center; gap: .4rem; color: var(--yellow); font-weight: 600; font-size: .92rem; margin-top: .4rem; }
.service-card .more svg { width: 17px; height: 17px; transition: transform .2s; }
.service-card:hover .more svg { transform: translateX(-4px); }
.service-num { position: absolute; top: 1.4rem; left: 1.6rem; font-family: var(--font-display); font-size: 2.6rem; font-weight: 800; color: var(--line-soft); line-height: 1; }
.price-from { font-size: .85rem; color: var(--muted-2); margin-top: .8rem; }
.price-from b { color: var(--text); font-size: 1rem; }

/* ------------------------------------------------------------------ أرقام */
.stats-band { background: var(--gold-grad); color: var(--black); padding: 0; position: relative; overflow: hidden; }
.stats-band .container { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 2.6rem 1.5rem; text-align: center; border-inline-start: 1px solid rgba(0, 0, 0, .14); }
.stat:first-child { border-inline-start: 0; }
.stat strong { display: block; font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; line-height: 1.1; direction: ltr; unicode-bidi: isolate; }
.stat span { font-weight: 600; font-size: .95rem; opacity: .8; }
@media (max-width: 760px) { .stats-band .container { grid-template-columns: repeat(2, 1fr); } .stat:nth-child(3) { border-inline-start: 0; } .stat { border-top: 1px solid rgba(0,0,0,.12); } }

/* ------------------------------------------------------------------ بطاقة المنتج */
.product-card {
  display: flex; flex-direction: column; background: var(--ink-2); border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg); overflow: hidden; transition: transform .25s, border-color .25s;
}
.product-card:hover { transform: translateY(-4px); border-color: rgba(201, 151, 63, .4); }
.product-thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ink-3); display: block; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.product-card:hover .product-thumb img { transform: scale(1.04); }
.thumb-placeholder {
  position: absolute; inset: 0; display: grid; place-items: center;
  background:
    linear-gradient(135deg, rgba(201, 151, 63, .16), transparent 55%),
    repeating-linear-gradient(-45deg, transparent 0 14px, rgba(255, 255, 255, .025) 14px 15px),
    var(--ink-3);
}
.thumb-placeholder svg { width: 54px; height: 54px; color: var(--yellow); opacity: .9; }
.thumb-placeholder .ph-title { position: absolute; bottom: 14px; right: 16px; left: 16px; font-family: var(--font-display); font-weight: 700; font-size: .95rem; color: var(--muted); }
.product-badges { position: absolute; top: 12px; right: 12px; display: flex; gap: .4rem; z-index: 2; }
.badge {
  display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .7rem; border-radius: 999px;
  font-size: .75rem; font-weight: 700; background: var(--ink-3); color: var(--muted); border: 1px solid var(--line);
}
.badge-yellow { background: var(--yellow); color: var(--black); border-color: var(--yellow); }
.badge-dark { background: rgba(2, 18, 41, .85); color: var(--text); border-color: transparent; }
.badge-success { background: rgba(62, 207, 142, .12); color: var(--success); border-color: rgba(62, 207, 142, .3); }
.badge-danger { background: rgba(255, 92, 92, .1); color: var(--danger); border-color: rgba(255, 92, 92, .3); }
.badge-info { background: rgba(92, 184, 255, .1); color: var(--info); border-color: rgba(92, 184, 255, .3); }
.badge-warning { background: var(--yellow-soft); color: var(--yellow); border-color: rgba(201, 151, 63, .3); }
.product-body { padding: 1.3rem 1.4rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.product-cat { font-size: .8rem; color: var(--yellow); font-weight: 600; margin-bottom: .3rem; }
.product-body h3 { font-size: 1.08rem; margin-bottom: .45rem; }
.product-body p { color: var(--muted); font-size: .9rem; flex: 1; margin-bottom: 1.1rem; }
.product-foot { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding-top: 1rem; border-top: 1px dashed var(--line); }
.price { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; color: var(--text); white-space: nowrap; line-height: 1.3; }
.price del { display: block; font-family: var(--font); font-weight: 400; font-size: .82rem; color: var(--muted-2); }
.price-row .price del, .price-row del { display: inline; }
.price-lg { font-size: 2.1rem; }

/* ------------------------------------------------------------------ المشاريع */
.project-card { position: relative; display: block; border-radius: var(--radius-lg); overflow: hidden; background: var(--ink-2); border: 1px solid var(--line-soft); }
.project-card .project-thumb { aspect-ratio: 4 / 3; position: relative; overflow: hidden; }
.project-card .project-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.project-card:hover .project-thumb img { transform: scale(1.05); }
.project-info { padding: 1.3rem 1.4rem 1.5rem; }
.project-info h3 { font-size: 1.15rem; margin-bottom: .3rem; }
.project-info p { color: var(--muted); font-size: .9rem; margin-bottom: .8rem; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag { font-size: .75rem; padding: .2rem .65rem; border-radius: 6px; background: var(--ink-3); color: var(--muted); direction: ltr; }

/* ------------------------------------------------------------------ لماذا نحن / الخطوات */
.why-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 4rem; align-items: center; }
.why-list { display: grid; gap: 1rem; }
.why-item { display: flex; gap: 1.1rem; padding: 1.3rem; border-radius: var(--radius); background: var(--ink-2); border: 1px solid var(--line-soft); }
.why-item .ic { flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--yellow); color: var(--black); display: grid; place-items: center; }
.why-item .ic svg { width: 22px; height: 22px; }
.why-item h4 { font-size: 1.05rem; margin-bottom: .2rem; }
.why-item p { color: var(--muted); font-size: .92rem; margin: 0; }
@media (max-width: 900px) { .why-grid { grid-template-columns: 1fr; gap: 2.5rem; } }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; counter-reset: step; }
.step { position: relative; padding-top: 1.2rem; }
.step::before {
  counter-increment: step; content: "0" counter(step); font-family: var(--font-display); font-weight: 800;
  font-size: 1rem; color: var(--black); background: var(--yellow); width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; margin-bottom: 1.1rem; position: relative; z-index: 1;
}
.step::after { content: ""; position: absolute; top: calc(1.2rem + 23px); right: 46px; left: -1.4rem; height: 1px; background: repeating-linear-gradient(to left, var(--line) 0 6px, transparent 6px 12px); }
.step:last-child::after { display: none; }
.step h4 { font-size: 1.08rem; margin-bottom: .35rem; }
.step p { color: var(--muted); font-size: .92rem; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } .step::after { display: none; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ آراء العملاء */
.testimonial { padding: 1.8rem; background: var(--ink-2); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); display: flex; flex-direction: column; }
.stars { display: flex; gap: 2px; color: var(--yellow); margin-bottom: 1rem; }
.stars svg { width: 17px; height: 17px; }
.testimonial blockquote { margin: 0 0 1.4rem; font-size: 1rem; color: #dcdcd0; flex: 1; }
.testimonial .who { display: flex; align-items: center; gap: .8rem; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--yellow); color: var(--black); display: grid; place-items: center; font-weight: 800; font-family: var(--font-display); }
.who strong { display: block; font-size: .95rem; }
.who span { font-size: .82rem; color: var(--muted); }

/* ------------------------------------------------------------------ CTA */
.cta-box {
  position: relative; overflow: hidden; border-radius: 28px; background: var(--gold-grad); color: var(--black);
  padding: 3.6rem 3rem; display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center;
}
.cta-box h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-bottom: .4rem; }
.cta-box p { margin: 0; font-weight: 500; opacity: .8; max-width: 560px; }
.cta-box .cta-peaks { position: absolute; left: -20px; bottom: -6px; width: 420px; opacity: .12; pointer-events: none; }
.cta-actions { display: flex; gap: .7rem; flex-wrap: wrap; position: relative; }
.cta-box .btn-outline { border-color: rgba(0, 0, 0, .3); color: var(--black); }
.cta-box .btn-outline:hover { border-color: var(--black); }
@media (max-width: 800px) { .cta-box { grid-template-columns: 1fr; padding: 2.6rem 1.6rem; } }

/* ------------------------------------------------------------------ رأس الصفحات الداخلية */
.page-hero { position: relative; padding: 70px 0 56px; border-bottom: 1px solid var(--line-soft); overflow: hidden; }
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(700px 300px at 90% 0%, rgba(201, 151, 63, .12), transparent 60%);
}
.page-hero h1 { font-size: clamp(2rem, 4.4vw, 3rem); margin-bottom: .6rem; font-weight: 800; }
.page-hero p { color: var(--muted); max-width: 640px; font-size: 1.08rem; margin: 0; }
.breadcrumb { display: flex; gap: .5rem; align-items: center; font-size: .85rem; color: var(--muted-2); margin-bottom: 1rem; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--yellow); }
.breadcrumb svg { width: 14px; height: 14px; }

/* ------------------------------------------------------------------ النماذج */
.card { background: var(--ink-2); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 2rem; }
.card-sm { padding: 1.4rem; }
.card-title { font-size: 1.15rem; margin-bottom: 1.2rem; display: flex; align-items: center; gap: .6rem; }
.card-title svg { width: 20px; height: 20px; color: var(--yellow); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1.2rem; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: .45rem; color: #dcdcd6; }
.field label .req { color: var(--yellow); }
.input, .field input[type=text], .field input[type=email], .field input[type=password], .field input[type=tel],
.field input[type=number], .field input[type=url], .field input[type=date], .field input[type=datetime-local], .field select, .field textarea {
  width: 100%; padding: .78rem 1rem; border-radius: var(--radius-sm); background: var(--black);
  border: 1px solid var(--line); color: var(--text); transition: border-color .2s, box-shadow .2s; outline: none;
}
.field textarea { min-height: 130px; resize: vertical; line-height: 1.7; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--yellow); box-shadow: 0 0 0 3px var(--yellow-soft); }
.field input[type=file] { width: 100%; padding: .65rem; border: 1px dashed var(--line); border-radius: var(--radius-sm); background: var(--black); color: var(--muted); }
.field .hint { font-size: .8rem; color: var(--muted-2); margin-top: .35rem; }
.field .error { font-size: .82rem; color: var(--danger); margin-top: .35rem; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: rgba(255, 92, 92, .6); }
.check { display: inline-flex; align-items: center; gap: .55rem; cursor: pointer; font-size: .93rem; }
.check input { width: 18px; height: 18px; accent-color: var(--yellow); }

.choice-list { display: grid; gap: .7rem; }
.choice {
  display: flex; gap: .9rem; align-items: flex-start; padding: 1rem 1.1rem; border: 1px solid var(--line);
  border-radius: var(--radius); cursor: pointer; transition: border-color .2s, background .2s;
}
.choice:hover { border-color: var(--muted-2); }
.choice input { margin-top: 5px; accent-color: var(--yellow); width: 18px; height: 18px; }
.choice:has(input:checked) { border-color: var(--yellow); background: var(--yellow-soft); }
.choice strong { display: block; }
.choice small { color: var(--muted); }

/* ------------------------------------------------------------------ تفاصيل الخدمة/المنتج */
.detail-grid { display: grid; grid-template-columns: 1.4fr .9fr; gap: 2.5rem; align-items: start; }
@media (max-width: 960px) { .detail-grid { grid-template-columns: 1fr; } }
.prose { color: #d8d8d2; font-size: 1.03rem; }
.prose p { white-space: pre-line; }
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.feature-list li { display: flex; gap: .7rem; align-items: flex-start; }
.feature-list svg { width: 20px; height: 20px; color: var(--black); background: var(--yellow); border-radius: 50%; padding: 3px; flex: none; margin-top: 4px; }
.sticky-box { position: sticky; top: 100px; }
.buy-box .price-row { display: flex; align-items: baseline; gap: .8rem; margin: .4rem 0 1.2rem; flex-wrap: wrap; }
.meta-list { list-style: none; padding: 0; margin: 1.3rem 0 0; display: grid; gap: .7rem; font-size: .92rem; }
.meta-list li { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .7rem; border-bottom: 1px solid var(--line-soft); }
.meta-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.meta-list span { color: var(--muted); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button { width: 38px; height: 40px; background: transparent; border: 0; cursor: pointer; color: var(--text); font-size: 1.1rem; }
.qty button:hover { color: var(--yellow); }
.qty input { width: 46px; height: 40px; text-align: center; background: transparent; border: 0; color: var(--text); -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.detail-image { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line-soft); aspect-ratio: 16 / 9; position: relative; background: var(--ink-3); margin-bottom: 2rem; }
.detail-image img { width: 100%; height: 100%; object-fit: cover; }

/* ------------------------------------------------------------------ المتجر */
.shop-layout { display: grid; grid-template-columns: 260px 1fr; gap: 2rem; align-items: start; }
@media (max-width: 960px) { .shop-layout { grid-template-columns: 1fr; } }
.filter-box { position: sticky; top: 100px; }
.filter-box h4 { font-size: .95rem; margin: 1.4rem 0 .7rem; color: var(--muted); }
.filter-box h4:first-child { margin-top: 0; }
.filter-links { display: grid; gap: .25rem; }
.filter-links a { display: flex; justify-content: space-between; padding: .5rem .8rem; border-radius: 8px; color: #cfcfca; font-size: .93rem; }
.filter-links a:hover { background: var(--ink-3); }
.filter-links a.active { background: var(--yellow); color: var(--black); font-weight: 700; }
.filter-links a small { opacity: .65; }
.toolbar { display: flex; gap: .8rem; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; flex-wrap: wrap; }
.search-box { position: relative; flex: 1; min-width: 220px; max-width: 420px; }
.search-box input { width: 100%; padding: .7rem 2.8rem .7rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--ink-2); color: var(--text); outline: none; }
.search-box input:focus { border-color: var(--yellow); }
.search-box svg { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.select-sm { padding: .62rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--ink-2); color: var(--text); outline: none; }
.chips { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 2rem; }
.chip { padding: .45rem 1.1rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: .9rem; transition: .2s; }
.chip:hover { color: var(--text); border-color: var(--muted-2); }
.chip.active { background: var(--yellow); border-color: var(--yellow); color: var(--black); font-weight: 700; }

.empty { text-align: center; padding: 4rem 1rem; border: 1px dashed var(--line); border-radius: var(--radius-lg); color: var(--muted); }
.empty svg { width: 52px; height: 52px; color: var(--yellow); margin: 0 auto 1rem; }
.empty h3 { color: var(--text); }

/* ------------------------------------------------------------------ السلة والدفع */
.cart-layout { display: grid; grid-template-columns: 1fr 380px; gap: 2rem; align-items: start; }
@media (max-width: 960px) { .cart-layout { grid-template-columns: 1fr; } }
.cart-item { display: grid; grid-template-columns: 96px 1fr auto; gap: 1.2rem; align-items: center; padding: 1.2rem 0; border-bottom: 1px solid var(--line-soft); }
.cart-item:first-child { padding-top: 0; }
.cart-thumb { width: 96px; height: 72px; border-radius: 10px; overflow: hidden; position: relative; background: var(--ink-3); }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-thumb .thumb-placeholder svg { width: 28px; height: 28px; }
.cart-item h4 { font-size: 1rem; margin-bottom: .2rem; }
.cart-item .actions { display: flex; align-items: center; gap: .8rem; margin-top: .5rem; flex-wrap: wrap; }
.link-danger { color: var(--muted); font-size: .85rem; background: none; border: 0; cursor: pointer; padding: 0; display: inline-flex; gap: .3rem; align-items: center; }
.link-danger:hover { color: var(--danger); }
.link-danger svg { width: 15px; height: 15px; }
@media (max-width: 560px) { .cart-item { grid-template-columns: 70px 1fr; } .cart-item > .price { grid-column: 2; } .cart-thumb { width: 70px; height: 56px; } }
.summary-row { display: flex; justify-content: space-between; padding: .55rem 0; color: var(--muted); }
.summary-row b { color: var(--text); font-weight: 600; }
.summary-row.total { border-top: 1px solid var(--line); margin-top: .5rem; padding-top: 1rem; color: var(--text); font-size: 1.1rem; }
.summary-row.total b { font-family: var(--font-display); font-size: 1.45rem; color: var(--yellow); }
.summary-row.discount b { color: var(--success); }
.coupon-form { display: flex; gap: .5rem; margin-top: 1rem; }
.coupon-form input { flex: 1; min-width: 0; padding: .65rem .9rem; border-radius: 10px; border: 1px solid var(--line); background: var(--black); color: var(--text); outline: none; text-transform: uppercase; }
.coupon-form input:focus { border-color: var(--yellow); }

.success-hero { text-align: center; padding: 3rem 0 2rem; }
.success-icon { width: 84px; height: 84px; border-radius: 50%; background: var(--yellow); color: var(--black); display: grid; place-items: center; margin: 0 auto 1.4rem; box-shadow: 0 0 0 12px var(--yellow-soft); }
.success-icon svg { width: 40px; height: 40px; }
.bank-box { display: grid; gap: .8rem; }
.bank-line { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem 1rem; background: var(--black); border: 1px solid var(--line); border-radius: 10px; }
.bank-line span { color: var(--muted); font-size: .88rem; }
.bank-line b { direction: ltr; font-family: ui-monospace, Menlo, monospace; font-size: .95rem; }
.copy-btn { background: none; border: 0; color: var(--yellow); cursor: pointer; font-size: .8rem; }

/* ------------------------------------------------------------------ جداول */
.table-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th, .table td { padding: .9rem 1rem; text-align: right; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.table th { font-weight: 600; color: var(--muted); font-size: .82rem; background: var(--ink-2); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: rgba(255, 255, 255, .015); }

/* ------------------------------------------------------------------ الحساب والمصادقة */
.auth-wrap { min-height: calc(100vh - 114px); display: grid; place-items: center; padding: 60px 20px; position: relative; overflow: hidden; }
.auth-card { width: 100%; max-width: 460px; }
.auth-card h1 { font-size: 1.7rem; }
.account-layout { display: grid; grid-template-columns: 240px 1fr; gap: 2rem; align-items: start; }
@media (max-width: 860px) { .account-layout { grid-template-columns: 1fr; } }
.side-nav { display: grid; gap: .25rem; }
.side-nav a, .side-nav button { display: flex; align-items: center; gap: .7rem; padding: .7rem .9rem; border-radius: 10px; color: var(--muted); background: none; border: 0; cursor: pointer; width: 100%; text-align: right; font-size: .95rem; }
.side-nav a:hover, .side-nav button:hover { background: var(--ink-3); color: var(--text); }
.side-nav a.active { background: var(--yellow); color: var(--black); font-weight: 700; }
.side-nav svg { width: 19px; height: 19px; }
.mini-stat { padding: 1.3rem; background: var(--ink-2); border: 1px solid var(--line-soft); border-radius: var(--radius); }
.mini-stat span { font-size: .85rem; color: var(--muted); }
.mini-stat strong { display: block; font-family: var(--font-display); font-size: 1.6rem; margin-top: .2rem; }

/* ------------------------------------------------------------------ التذييل */
.site-footer { background: var(--ink); border-top: 1px solid var(--line-soft); padding: 72px 0 0; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 2.5rem; }
.footer-grid h5 { font-family: var(--font-display); font-size: 1rem; margin: 0 0 1.1rem; color: var(--text); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.footer-grid a { color: var(--muted); font-size: .93rem; transition: color .2s; }
.footer-grid a:hover { color: var(--yellow); }
.footer-about p { color: var(--muted); font-size: .93rem; margin: 1.1rem 0 1.4rem; max-width: 340px; }
.socials { display: flex; gap: .5rem; }
.socials a { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); }
.socials a:hover { border-color: var(--yellow); color: var(--yellow); }
.socials svg { width: 18px; height: 18px; }
.contact-lines li { display: flex; gap: .6rem; align-items: flex-start; color: var(--muted); font-size: .93rem; }
.contact-lines svg { width: 18px; height: 18px; color: var(--yellow); flex: none; margin-top: 5px; }
.footer-bottom { margin-top: 56px; padding: 1.4rem 0; border-top: 1px solid var(--line-soft); display: flex; justify-content: space-between; gap: 1rem; color: var(--muted-2); font-size: .85rem; flex-wrap: wrap; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

.wa-float {
  position: fixed; bottom: 22px; left: 22px; z-index: 60; width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 10px 30px -8px rgba(37, 211, 102, .6);
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.07); }
.wa-float svg { width: 28px; height: 28px; }

/* ------------------------------------------------------------------ ترقيم الصفحات */
.pagination { display: flex; gap: .4rem; justify-content: center; margin-top: 2.5rem; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 42px; height: 42px; padding: 0 .8rem; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--muted); font-size: .92rem; }
.pagination a:hover { border-color: var(--yellow); color: var(--yellow); }
.pagination .active { background: var(--yellow); border-color: var(--yellow); color: var(--black); font-weight: 700; }
.pagination .disabled { opacity: .4; }

/* ------------------------------------------------------------------ ظهور تدريجي */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

.contact-cards { display: grid; gap: 1rem; }
.contact-card { display: flex; gap: 1rem; align-items: center; padding: 1.2rem 1.3rem; border-radius: var(--radius); background: var(--ink-2); border: 1px solid var(--line-soft); }
.contact-card .ic { width: 48px; height: 48px; border-radius: 12px; background: var(--yellow-soft); color: var(--yellow); display: grid; place-items: center; flex: none; }
.contact-card .ic svg { width: 22px; height: 22px; }
.contact-card span { display: block; font-size: .82rem; color: var(--muted); }
.contact-card strong { font-size: 1rem; }

.values { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
.value-card { padding: 1.8rem; border-radius: var(--radius-lg); background: var(--ink-2); border: 1px solid var(--line-soft); }
.value-card.yellow { background: var(--yellow); color: var(--black); border-color: var(--yellow); }
.value-card.yellow p { color: rgba(0,0,0,.75); }
.value-card h3 { font-size: 1.2rem; }
.value-card p { color: var(--muted); margin: 0; }
@media (max-width: 640px) { .values { grid-template-columns: 1fr; } }