/* ==========================================================================
   رواسي أحد للبرمجيات — نظام التصميم
   كحلي + ذهبي (مطابق لألوان الشعار) · عربي 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; }

html { color-scheme: dark; overflow-x: hidden; overflow-x: clip; }

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; top: 0; inset-inline-start: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; overflow: hidden; clip-path: inset(50%); pointer-events: none; }
form { position: relative; }
.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: 56px; width: auto; }
@media (max-width: 640px) { .logo-img { height: 44px; } }

/* ------------------------------------------------------------------ الشريط العلوي */
.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, .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: minmax(0, 1fr); } }
.field { min-width: 0; }
.field select, .field input, .field textarea { max-width: 100%; }
.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; } }


/* ==========================================================================
   تجربة الجوال: شكل تطبيق مع شريط تنقل سفلي
   ========================================================================== */
.app-tabbar, .app-sheet { display: none; }

@media (max-width: 1020px) {
  :root { --tabbar-h: 66px; }

  .desktop-only { display: none !important; }
  body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); }

  /* الهيدر: مضغوط مثل شريط التطبيق */
  .site-header { top: env(safe-area-inset-top, 0px); }
  .site-header .container { min-height: 62px; gap: .75rem; }
  .logo-img { height: 42px; }
  .icon-link { width: 40px; height: 40px; border-radius: 11px; }

  /* شريط التنقل السفلي */
  .app-tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; inset: auto 0 0 0; z-index: 70;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
    padding: 6px max(6px, env(safe-area-inset-left, 0px)) env(safe-area-inset-bottom, 0px) max(6px, env(safe-area-inset-right, 0px));
    background: rgba(4, 22, 48, .94);
    backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
    border-top: 1px solid var(--line-soft);
    box-shadow: 0 -10px 30px -12px rgba(0, 0, 0, .6);
  }
  .app-tabbar .tab {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    background: none; border: 0; padding: 0; cursor: pointer;
    color: var(--muted); font-size: .7rem; font-weight: 600; line-height: 1.2;
    -webkit-tap-highlight-color: transparent; transition: color .2s;
  }
  .app-tabbar .tab svg { width: 23px; height: 23px; transition: transform .2s; }
  .app-tabbar .tab:active svg { transform: scale(.88); }
  .app-tabbar .tab.active { color: var(--yellow); }
  .app-tabbar .tab.active::before {
    content: ""; position: absolute; top: -6px; width: 28px; height: 3px; border-radius: 0 0 4px 4px; background: var(--gold-grad);
  }
  .tab-icon { position: relative; display: inline-grid; }
  .tab-badge {
    position: absolute; top: -5px; left: -9px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px;
    background: var(--gold-grad); color: var(--black); font-size: .66rem; font-weight: 800; display: grid; place-items: center;
    border: 2px solid var(--black);
  }

  /* قائمة «المزيد» تنزلق من الأسفل */
  .app-sheet { display: block; position: fixed; inset: 0; z-index: 90; }
  .app-sheet[hidden] { display: none; }
  .sheet-backdrop { position: absolute; inset: 0; background: rgba(1, 8, 20, .62); animation: fadeIn .25s ease; }
  .sheet-panel {
    position: absolute; inset: auto 0 0 0; max-height: 86vh; overflow-y: auto;
    background: var(--ink); border-top: 1px solid var(--line); border-radius: 22px 22px 0 0;
    padding: .6rem max(18px, env(safe-area-inset-right, 0px)) calc(1.2rem + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px));
    animation: sheetUp .3s cubic-bezier(.2, .8, .2, 1);
  }
  .sheet-handle { width: 42px; height: 5px; border-radius: 99px; background: var(--line); margin: 0 auto 1rem; }
  .sheet-user { display: flex; align-items: center; gap: .8rem; padding: .9rem; border-radius: var(--radius); background: var(--ink-2); border: 1px solid var(--line-soft); }
  .sheet-user > div { flex: 1; min-width: 0; }
  .sheet-user strong { display: block; font-size: .98rem; }
  .sheet-user small { display: block; color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sheet-user .avatar svg { width: 20px; height: 20px; }
  .sheet-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin: 1rem 0; }
  .sheet-grid a { display: flex; flex-direction: column; align-items: center; gap: .45rem; padding: .7rem .2rem; border-radius: 14px; font-size: .78rem; font-weight: 600; color: var(--text); text-align: center; }
  .sheet-grid a:active { background: var(--ink-2); }
  .sheet-grid .ic { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; background: var(--yellow-soft); color: var(--yellow); border: 1px solid rgba(201, 151, 63, .25); }
  .sheet-grid .ic svg { width: 23px; height: 23px; }
  .sheet-contact { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
  .sheet-contact .btn { width: 100%; }
  .sheet-contact .btn:only-child { grid-column: 1 / -1; }
  .sheet-logout { text-align: center; margin-top: 1rem; }
  body.sheet-open { overflow: hidden; }

  /* زر واتساب العائم فوق الشريط السفلي */
  .wa-float { bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom, 0px)); left: 14px; width: 50px; height: 50px; }
  .wa-float svg { width: 25px; height: 25px; }

  .flash-wrap { top: 74px; left: 12px; right: 12px; max-width: none; }

  /* التذييل: نُبقي التعريف والتواصل فقط (الروابط موجودة في الشريط السفلي) */
  .site-footer { padding-top: 48px; }
  .footer-grid > div:nth-child(2), .footer-grid > div:nth-child(3) { display: none; }
  .footer-bottom { margin-top: 32px; }
}

@keyframes sheetUp { from { transform: translateY(100%); } }
@keyframes fadeIn { from { opacity: 0; } }

/* ------------------------------------------------------------------ تحسينات الشاشات الصغيرة */
@media (max-width: 640px) {
  body { font-size: 15px; }
  .container { padding-inline: 16px; }
  .section { padding: 52px 0; }
  .section-tight { padding: 36px 0; }

  /* البطل */
  .hero { padding-top: 36px; }
  .hero h1 { font-size: 2.15rem; margin-bottom: .8rem; }
  .hero-lead { font-size: 1rem; margin-bottom: 1.4rem; }
  .eyebrow { font-size: .78rem; margin-bottom: 1rem; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
  .hero-actions .btn { padding: .8rem .6rem; font-size: .92rem; }
  .hero-trust { gap: .5rem; margin-top: 1.4rem; }
  .hero-trust span { background: var(--ink-2); border: 1px solid var(--line-soft); padding: .35rem .7rem; border-radius: 999px; font-size: .78rem; }
  .hero-visual { display: none; }
  .mountains { margin-top: 28px; }

  .stat { padding: 1.4rem 1rem; }
  .stat span { font-size: .82rem; }

  /* عناوين الأقسام: العنوان والزر في سطر واحد */
  .section-head { margin-bottom: 1.4rem; gap: .8rem; flex-wrap: nowrap; align-items: flex-end; }
  .section-head > div { min-width: 0; }
  .section-head h2 { font-size: 1.4rem; }
  .section-head p { font-size: .9rem; }
  .section-head .btn { padding: .45rem .9rem; font-size: .8rem; flex: none; }
  .section-head .btn svg { width: 15px; height: 15px; }
  .section-head.centered { align-items: center; }
  .kicker { font-size: .8rem; margin-bottom: .4rem; }

  /* قوائم تُسحب أفقيًا مثل التطبيقات */
  .m-scroll {
    display: flex; overflow-x: auto; gap: 12px; scroll-snap-type: x mandatory;
    margin-inline: -16px; padding: 4px 16px 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .m-scroll::-webkit-scrollbar { display: none; }
  .m-scroll > * { flex: 0 0 80%; scroll-snap-align: start; }
  .m-scroll > .product-card { flex-basis: 72%; }

  .service-card { padding: 1.4rem 1.3rem 1.3rem; }
  .service-icon { width: 50px; height: 50px; margin-bottom: 1rem; }
  .service-card h3 { font-size: 1.1rem; }
  .service-num { font-size: 2rem; top: 1rem; left: 1.1rem; }

  /* شبكة المنتجات في المتجر: عمودان مضغوطان */
  .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .products-grid .product-card { border-radius: 16px; }
  .products-grid .product-body { padding: .8rem .8rem .85rem; }
  .products-grid .product-body p, .products-grid .product-cat { display: none; }
  .products-grid .product-body h3 { font-size: .9rem; line-height: 1.55; margin-bottom: .6rem; overflow-wrap: anywhere; }
  .products-grid .product-foot { padding-top: .6rem; gap: .4rem; margin-top: auto; }
  .products-grid .price { font-size: 1rem; }
  .products-grid .price del { font-size: .72rem; }
  .products-grid .product-foot .btn { font-size: 0; padding: .55rem; border-radius: 12px; }
  .products-grid .product-foot .btn svg { width: 18px; height: 18px; }
  .products-grid .badge { font-size: .65rem; padding: .15rem .5rem; }
  .products-grid .thumb-placeholder svg { width: 36px; height: 36px; }
  .products-grid .thumb-placeholder .ph-title { display: none; }

  /* المتجر: الفلاتر تصبح شرائح أفقية */
  .shop-layout { gap: 1rem; }
  .filter-box { position: static; padding: .8rem; display: grid; gap: .6rem; }
  .filter-box h4 { display: none; }
  .filter-links { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; margin-inline: -.8rem; padding-inline: .8rem; }
  .filter-links::-webkit-scrollbar { display: none; }
  .filter-links a { flex: none; white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; padding: .4rem .9rem; font-size: .85rem; gap: .4rem; }
  .toolbar { gap: .5rem; margin-bottom: 1rem; }
  .search-box { max-width: none; min-width: 0; flex: 1 1 100%; }
  .toolbar .select-sm { flex: 1 1 100%; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; margin-bottom: 1.2rem; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }

  /* رأس الصفحات الداخلية */
  .page-hero { padding: 28px 0 24px; }
  .page-hero h1 { font-size: 1.65rem; margin-bottom: .3rem; }
  .page-hero p { font-size: .95rem; }
  .breadcrumb { margin-bottom: .5rem; font-size: .78rem; }

  /* التفاصيل والبطاقات والنماذج */
  .card { padding: 1.2rem; border-radius: 18px; }
  .detail-grid { gap: 1.4rem; }
  .detail-image { margin-bottom: 1.2rem; border-radius: 16px; }
  .sticky-box { position: static; }
  .price-lg { font-size: 1.7rem; }
  .field input, .field select, .field textarea { font-size: 16px; } /* يمنع تكبير الشاشة تلقائيًا في الآيفون */
  .btn-lg { padding: .9rem 1.4rem; font-size: 1rem; }

  /* السلة */
  .cart-item { gap: .8rem; padding: 1rem 0; }
  .cart-item h4 { font-size: .95rem; }
  .summary-row.total b { font-size: 1.25rem; }

  /* الحساب: القائمة الجانبية تصبح تبويبات أفقية */
  .account-layout { gap: 1rem; }
  .account-layout > aside .side-nav { display: flex; overflow-x: auto; gap: .4rem; scrollbar-width: none; }
  .account-layout > aside .side-nav a, .account-layout > aside .side-nav button { flex: none; width: auto; white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; padding: .45rem .9rem; font-size: .85rem; }
  .account-layout > aside .side-nav form { flex: none; }
  .mini-stat { padding: 1rem; }
  .mini-stat strong { font-size: 1.25rem; }
  .grid-3 > .mini-stat { min-width: 0; }

  .table th, .table td { padding: .7rem .75rem; font-size: .85rem; }

  .cta-box { padding: 2rem 1.3rem; border-radius: 22px; gap: 1.2rem; }
  .cta-box h2 { font-size: 1.45rem; }
  .cta-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
  .cta-actions .btn { padding: .8rem .5rem; font-size: .9rem; }
  .cta-actions .btn:only-child { grid-column: 1 / -1; }

  .steps { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .step::before { width: 38px; height: 38px; font-size: .85rem; margin-bottom: .6rem; }
  .step h4 { font-size: .95rem; }
  .step p { font-size: .85rem; }
  .why-item { padding: 1rem; gap: .8rem; }
  .why-item .ic { width: 40px; height: 40px; }

  .auth-wrap { min-height: auto; padding: 32px 16px; }
  .empty { padding: 2.5rem 1rem; }
  .success-hero { padding: 1.5rem 0 1rem; }
  .success-icon { width: 68px; height: 68px; }
}

/* عند فتح الموقع كتطبيق مثبّت على الشاشة الرئيسية */
@media (display-mode: standalone) {
  .topbar { display: none; }
  .site-header { padding-top: env(safe-area-inset-top, 0px); top: 0; }
}


/* ==========================================================================
   حقول النماذج: شكل موحّد على كل الأجهزة (خصوصًا الآيفون)
   ========================================================================== */
.field select {
  -webkit-appearance: none; appearance: none;
  padding-left: 2.6rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9973f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left .9rem center; background-size: 16px;
  text-overflow: ellipsis;
}
.field select option { background: var(--ink-2); color: var(--text); }
.field input, .field select, .field textarea { min-height: 50px; }
.field textarea { min-height: 140px; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); opacity: 1; }

/* منع المتصفح من تلوين الحقول بالأبيض عند الملء التلقائي */
.field input:-webkit-autofill, .field input:-webkit-autofill:hover, .field input:-webkit-autofill:focus,
.field textarea:-webkit-autofill, .field select:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--black) inset;
  box-shadow: 0 0 0 1000px var(--black) inset;
  transition: background-color 9999s ease-out 0s;
}

/* ------------------------------------------------------------------ صفحة طلب عرض السعر */
.steps-list { grid-template-columns: 1fr; gap: 1.1rem; }
.steps-list .step { padding-top: 0; display: grid; grid-template-columns: 42px 1fr; column-gap: .9rem; align-items: start; }
.steps-list .step::before { width: 42px; height: 42px; margin: 0; grid-row: span 2; font-size: .9rem; }
.steps-list .step::after { display: none; }
.steps-list .step h4 { margin: .45rem 0 .15rem; font-size: 1rem; }
.steps-list .step p { margin: 0; font-size: .88rem; }

@media (max-width: 960px) {
  .quote-aside { order: -1; }
}

@media (max-width: 640px) {
  .quote-layout { gap: 1rem; }
  .quote-aside .card { padding: 1rem; }
  .quote-aside .card-title { font-size: 1rem; margin-bottom: .9rem; }
  .steps-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
  .steps-list .step { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35rem; }
  .steps-list .step::before { width: 34px; height: 34px; font-size: .78rem; }
  .steps-list .step h4 { margin: 0; font-size: .82rem; line-height: 1.4; }
  .steps-list .step p { display: none; }

  .form-grid { gap: .9rem; }
  .form-submit { width: 100%; }
}


/* ==========================================================================
   فيديو الواجهة الرئيسية
   ========================================================================== */
.hero-has-video {
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: clamp(560px, 86vh, 860px);
  padding-top: 72px;
}
.hero-has-video::before { display: none; }
.hero-has-video .hero-grid { grid-template-columns: minmax(0, 1fr); margin-block: auto; }
.hero-has-video .hero-content { max-width: 660px; }
.hero-has-video .mountains { margin-top: 48px; }

.hero-media { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: var(--black); }
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(to left, rgba(2, 18, 41, .92) 0%, rgba(2, 18, 41, .72) 40%, rgba(2, 18, 41, .30) 100%),
    linear-gradient(to top, var(--black) 0%, rgba(2, 18, 41, 0) 32%),
    linear-gradient(to bottom, rgba(2, 18, 41, .55) 0%, rgba(2, 18, 41, 0) 22%);
}
.hero-has-video h1, .hero-has-video .hero-lead { text-shadow: 0 2px 18px rgba(1, 8, 20, .55); }
.hero-has-video .hero-lead { color: #c9d2e3; }
.hero-has-video .btn-outline { background: rgba(2, 18, 41, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.hero-has-video .eyebrow { background: rgba(10, 33, 66, .7); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* التابلت */
@media (max-width: 1020px) {
  .hero-has-video { min-height: clamp(520px, 80vh, 760px); }
}

/* الجوال: الفيديو ظاهر في أعلى الشاشة والنص في الأسفل */
@media (max-width: 640px) {
  .hero-has-video {
    min-height: calc(100svh - 62px - var(--tabbar-h, 66px));
    padding-top: 0;
  }
  .hero-has-video .hero-grid { margin-block: auto 0; padding-top: 34vh; }
  .hero-has-video .hero-overlay {
    background:
      linear-gradient(to top, var(--black) 0%, rgba(2, 18, 41, .88) 38%, rgba(2, 18, 41, .35) 68%, rgba(2, 18, 41, .15) 100%);
  }
  .hero-has-video .mountains { margin-top: 24px; }
}

/* الشاشات العريضة جدًا */
@media (min-width: 1600px) {
  .hero-has-video { min-height: min(86vh, 980px); }
}



/* خلفية بديلة تظهر قبل تحميل الفيديو أو إن تعذّر تشغيله */
.video-fallback {
  position: absolute; inset: 0;
  background:
    radial-gradient(800px 420px at 85% 15%, rgba(201, 151, 63, .22), transparent 60%),
    radial-gradient(600px 400px at 10% 80%, rgba(201, 151, 63, .10), transparent 60%),
    linear-gradient(160deg, #04203f, var(--black) 70%);
}

/* مؤشر «اكتشف» أسفل الواجهة */
.scroll-hint {
  position: absolute; left: 50%; bottom: 92px; transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: .45rem;
  color: var(--muted); font-size: .78rem; font-weight: 600; letter-spacing: .04em;
  transition: color .2s;
}
.scroll-hint:hover { color: var(--yellow); }
.scroll-hint .mouse {
  position: relative; width: 24px; height: 38px; border-radius: 14px; border: 2px solid currentColor;
}
.scroll-hint .mouse::after {
  content: ""; position: absolute; top: 7px; left: 50%; width: 4px; height: 8px; margin-left: -2px;
  border-radius: 4px; background: var(--yellow); animation: scrollWheel 1.6s ease-in-out infinite;
}
@keyframes scrollWheel {
  0% { opacity: 0; transform: translateY(0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateY(12px); }
}
#after-hero { display: block; scroll-margin-top: 70px; }

@media (max-width: 1020px) { .scroll-hint { display: none; } }
@media (prefers-reduced-motion: reduce) { .scroll-hint .mouse::after { animation: none; opacity: 1; } }


/* القسم الذي تحت الفيديو: مسافات أقل حتى لا تظهر فراغات */
.video-section + .hero { padding-top: 56px; }
.video-section + .hero .mountains { margin-top: 32px; }
@media (max-width: 640px) {
  .video-section + .hero { padding-top: 28px; }
  .video-section + .hero .mountains { margin-top: 16px; }
}
@media (prefers-reduced-motion: reduce) { .video-sound::before { animation: none; } }

/* ================================================================== خلفية الموقع + التصميم الزجاجي */
:root {
  --glass: rgba(8, 30, 62, .46);
  --glass-strong: rgba(6, 24, 52, .68);
  --glass-line: rgba(228, 182, 93, .16);
  --glass-hi: rgba(255, 255, 255, .06);
  --glass-blur: blur(16px) saturate(150%);
}
body { background: var(--black); }

/* الصورة ثابتة خلف كل الصفحات (عنصر ثابت بدل background-attachment لأنه لا يعمل على آيفون) */
.site-cover {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: var(--black) var(--cover) center / cover no-repeat;
}
.site-cover::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(900px 500px at 85% 0%, rgba(201, 151, 63, .14), transparent 60%),
    linear-gradient(180deg, rgba(2, 18, 41, .38) 0%, rgba(2, 18, 41, .52) 55%, rgba(2, 18, 41, .68) 100%);
}

/* العناوين خارج البطاقات تبقى واضحة فوق أي صورة */
.section-head h2, .section-head p, .page-hero h1, .page-hero p, .hero h1, .hero .lead, .kicker, .breadcrumbs {
  text-shadow: 0 2px 14px rgba(2, 18, 41, .75);
}

/* الأقسام شفافة لتظهر الخلفية */
.section-alt { background: rgba(4, 20, 44, .32); }
.page-hero { border-bottom-color: var(--glass-line); }

/* الهيدر والفوتر والقوائم */
.site-header { background: rgba(2, 18, 41, .55); border-bottom-color: var(--glass-line); }
.site-footer {
  background: rgba(3, 16, 36, .62); border-top-color: var(--glass-line);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
}
.mountains .m1 { fill: rgba(7, 28, 58, .45); }
.mountains .m2 { fill: rgba(11, 36, 70, .55); }
.mountains .m3 { fill: rgba(6, 26, 54, .7); }

/* البطاقات الزجاجية */
.card, .service-card, .product-card, .project-card, .why-item, .testimonial, .mini-stat,
.contact-card, .value-card:not(.yellow), .code-card, .eyebrow, .alert, .detail-image {
  background: var(--glass);
  border-color: var(--glass-line);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 18px 40px -24px rgba(0, 0, 0, .6);
}
.alert-info { background: rgba(201, 151, 63, .14); }
.service-card:hover, .product-card:hover { background: rgba(14, 42, 82, .6); border-color: rgba(228, 182, 93, .32); }
.hero-trust span, .tag, .search-box input, .select-sm, .chip, .filter-links a:not(.active) {
  background: rgba(8, 30, 62, .5);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.table th { background: rgba(8, 30, 62, .55); }
.product-thumb, .cart-thumb { background: rgba(18, 44, 82, .5); }

/* الحقول */
.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, .field input[type=file], .coupon-form input, .bank-line {
  background-color: rgba(2, 14, 32, .55);
}
.field select option { background: var(--ink-2); }

@media (max-width: 1020px) {
  :root { --glass: rgba(8, 30, 62, .58); --glass-blur: blur(10px) saturate(140%); }
  .app-tabbar { background: rgba(4, 22, 48, .72); border-top-color: var(--glass-line); }
  .sheet-panel {
    background: rgba(6, 24, 52, .82); border-top-color: var(--glass-line);
    backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%);
  }
  .sheet-user { background: var(--glass); border-color: var(--glass-line); }
}

/* متصفحات بدون دعم للزجاج: خلفية أعتم لضمان وضوح النص */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass: rgba(8, 28, 58, .85); }
}

/* ------------------------------------------------------------------ صور الخدمات */
.service-cover {
  position: relative; margin: -2rem -1.8rem 1.2rem; aspect-ratio: 16 / 10; overflow: hidden;
  background: rgba(18, 44, 82, .5); border-bottom: 1px solid var(--glass-line, var(--line-soft));
}
.service-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.service-cover::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(2, 18, 41, .55));
}
.service-card:hover .service-cover img { transform: scale(1.05); }
.service-card.has-cover .service-num {
  z-index: 2; top: 1rem; left: 1rem; color: #fff; font-size: 1.5rem; padding: .25rem .6rem;
  background: rgba(2, 18, 41, .55); border-radius: 10px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.service-card.has-cover .service-icon { position: relative; z-index: 2; margin-top: -2.6rem; box-shadow: 0 8px 22px -8px rgba(0, 0, 0, .6); background: linear-gradient(var(--yellow-soft), var(--yellow-soft)), var(--ink-2); }
@media (max-width: 640px) {
  .service-cover { margin: -1.4rem -1.3rem 1rem; }
  .service-card.has-cover .service-num { font-size: 1.2rem; top: .8rem; left: .8rem; }
  .service-card.has-cover .service-icon { margin-top: -2.3rem; }
}