/* ============================================================================
   AI-ENG RETAIL - site.css : هوية موقع نظام AI-ENG لمبيعات التجزئة والكاشير
   EN: Site styles - the AI-ENG family (black, gold, Reem Kufi / Cairo) with a "market blue" retail accent
   ----------------------------------------------------------------------------
   - المظهران: data-theme="dark" (الافتراضي) و"light" ، والألوان كلها متغيرات هنا فقط.
   - الذهبي = الهوية والأزرار ، الأزرق = لمسة التجزئة (العروض والشارات الخاصة بالمتجر) ، الأخضر = متاح/تم ، الأحمر = نافد/خطأ.
   - لا تدرّج لوني للزينة: كل خلفية لون واحد.
   ============================================================================ */
:root {
  --radius: 18px;
  --radius-sm: 11px;
  --wrap: 1220px;
  --f-display: "Reem Kufi", "Cairo", Tahoma, sans-serif;
  --f-body: "Cairo", "Segoe UI", Tahoma, sans-serif;
  --f-latin: "Marcellus", "Cairo", serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
:root,
:root[data-theme="dark"] {
  --bg: #0B0B0C;
  --bg-2: #111113;
  --surface: #17171A;
  --surface-2: #1E1E22;
  --line: #2C2820;
  --line-strong: #4A3F22;
  --text: #ECE7DA;
  --text-soft: #C9C3B4;
  --mute: #9D978A;
  --gold: #C9A227;
  --gold-text: #E6C75A;
  --gold-soft: rgba(201, 162, 39, .12);
  --on-gold: #0B0B0C;
  --market: #4FA8F0;
  --market-soft: rgba(79, 168, 240, .14);
  --green: #2BB673;
  --green-soft: rgba(43, 182, 115, .14);
  --red: #E0574B;
  --red-soft: rgba(224, 87, 75, .15);
  --paper: #FFFFFF;
  --paper-ink: #151515;
  --shadow: 0 22px 50px rgba(0, 0, 0, .5);
  --shadow-sm: 0 8px 22px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #FBFAF7;
  --bg-2: #F4F1EA;
  --surface: #FFFFFF;
  --surface-2: #F7F4EC;
  --line: #E6E1D5;
  --line-strong: #D6CBAE;
  --text: #1A1814;
  --text-soft: #3E3A32;
  --mute: #6F6A5F;
  --gold: #C9A227;
  --gold-text: #8A6B0F;
  --gold-soft: rgba(201, 162, 39, .12);
  --on-gold: #0B0B0C;
  --market: #1B64AE;
  --market-soft: rgba(27, 100, 174, .10);
  --green: #13804A;
  --green-soft: rgba(19, 128, 74, .10);
  --red: #B83A2F;
  --red-soft: rgba(184, 58, 47, .10);
  --paper: #FFFFFF;
  --paper-ink: #151515;
  --shadow: 0 20px 44px rgba(40, 30, 10, .12);
  --shadow-sm: 0 8px 20px rgba(40, 30, 10, .08);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--f-body); font-size: 16.5px; line-height: 1.85;
  overflow-x: hidden;
}
html[lang="en"] body { line-height: 1.7; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-text); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.latin { font-family: var(--f-latin); letter-spacing: .02em; }
.num { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 12px 22px; min-height: 48px;
  border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font-weight: 700; cursor: pointer; transition: transform .2s var(--ease), background .2s, border-color .2s, box-shadow .2s;
  text-decoration: none !important; white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); border-color: var(--gold); }
.btn-gold { background: var(--gold); color: var(--on-gold); border-color: transparent; box-shadow: 0 10px 26px rgba(201, 162, 39, .26); }
.btn-gold:hover { background: #D6B035; box-shadow: 0 14px 30px rgba(201, 162, 39, .36); }
.btn-wa { background: #1FAF5A; color: #fff; border-color: transparent; }
.btn-ghost { background: transparent; }
.btn-market { background: transparent; color: var(--market); border-color: var(--market); }
.btn-market:hover { background: var(--market-soft); border-color: var(--market); }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: .92em; }
.btn i { font-size: 1.15em; }

/* ---------- الرأس ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  background: color-mix(in srgb, var(--bg) 84%, transparent); border-bottom: 1px solid transparent; transition: border-color .3s;
}
.site-head.scrolled { border-bottom-color: var(--line); }
.head-row { display: flex; align-items: center; gap: 18px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none !important; flex: none; }
.brand img { height: 34px; width: auto; }
.brand .tag { font-family: var(--f-display); font-size: .95em; color: var(--gold-text); border-inline-start: 1px solid var(--line-strong); padding-inline-start: 12px; line-height: 1.2; }
.logo-light { display: none; }
:root[data-theme="light"] .logo-dark { display: none; }
:root[data-theme="light"] .logo-light { display: block; }
.nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav a { color: var(--text-soft); padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: .95em; text-decoration: none; white-space: nowrap; }
.nav a:hover, .nav a.active { color: var(--gold-text); background: var(--gold-soft); }
.head-tools { display: flex; gap: 8px; align-items: center; }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; display: inline-grid; place-items: center; font-weight: 800; }
.icon-btn:hover { border-color: var(--gold); color: var(--gold-text); }
.menu-btn { display: none; }

/* ---------- البطل ---------- */
.hero { position: relative; padding: 64px 0 40px; overflow: hidden; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.02fr 1.18fr; gap: 46px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--market-soft); color: var(--market); font-weight: 700; font-size: .9em; }
.hero h1 { font-family: var(--f-display); font-size: clamp(2.1rem, 4.6vw, 3.5rem); line-height: 1.22; margin: 16px 0 8px; font-weight: 700; }
.hero h1 .gold { color: var(--gold-text); }
.hero .slogan { font-family: var(--f-display); font-size: clamp(1.15rem, 2vw, 1.45rem); color: var(--gold-text); margin: 0 0 14px; }
.hero p.lead { color: var(--text-soft); font-size: 1.08em; max-width: 36em; margin: 0 0 24px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-soft); font-size: .88em; font-weight: 600; }
.chip i { color: var(--green); }

.device { position: relative; }
.screen {
  position: relative; border-radius: 18px; padding: 10px; background: #18181B; border: 1px solid #3a3a40;
  box-shadow: var(--shadow), 0 0 0 1px rgba(201, 162, 39, .08); transform: perspective(1600px) rotateY(-7deg) rotateX(2deg);
  transition: transform .8s var(--ease);
}
html[dir="ltr"] .screen { transform: perspective(1600px) rotateY(7deg) rotateX(2deg); }
.device:hover .screen { transform: perspective(1600px) rotateY(0) rotateX(0); }
.screen img { border-radius: 10px; width: 100%; aspect-ratio: 1098 / 700; object-fit: cover; object-position: top; }
.float-card {
  position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--line-strong); box-shadow: var(--shadow-sm); font-size: .88em; font-weight: 700; animation: bob 6s ease-in-out infinite;
}
.float-card i { font-size: 1.35em; }
.float-card small { display: block; color: var(--mute); font-weight: 600; font-size: .86em; }
.fc-1 { top: -18px; inset-inline-start: -10px; } .fc-1 i { color: var(--green); }
.fc-2 { bottom: 24%; inset-inline-end: -22px; animation-delay: -2s; } .fc-2 i { color: var(--market); }
.fc-3 { bottom: -20px; inset-inline-start: 12%; animation-delay: -4s; } .fc-3 i { color: var(--gold-text); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* ---------- شريط الأرقام ---------- */
.stats { border-block: 1px solid var(--line); background: var(--bg-2); }
.stats-row { display: grid; grid-template-columns: repeat(5, 1fr); }
.stat { padding: 22px 14px; text-align: center; border-inline-start: 1px solid var(--line); }
.stat:first-child { border-inline-start: 0; }
.stat b { display: block; font-family: var(--f-display); font-size: 2.1rem; color: var(--gold-text); line-height: 1.2; }
.stat span { color: var(--mute); font-size: .92em; font-weight: 600; }

/* ---------- الأقسام ---------- */
.section { padding: 90px 0; position: relative; }
.section.alt { background: var(--bg-2); }
.section-head { max-width: 780px; margin: 0 auto 44px; text-align: center; }
.kicker { color: var(--market); font-weight: 800; letter-spacing: .04em; font-size: .92em; }
.section-head h2, .h2 { font-family: var(--f-display); font-size: clamp(1.75rem, 3.2vw, 2.55rem); line-height: 1.3; margin: 8px 0 12px; font-weight: 700; }
.section-head p { color: var(--text-soft); margin: 0; font-size: 1.04em; }
.soft { color: var(--text-soft); margin: 0; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
html.no-js .reveal { opacity: 1; transform: none; }

/* ---------- العرض الحي لشاشة الكاشير (js/pos-demo.js) ----------
   داكن في المظهرين مثل جهاز الكاشير ، بألوان ثابتة لا تتبع مظهر الصفحة. */
.demo { display: grid; grid-template-columns: minmax(0, 1fr) 390px; border-radius: 22px; overflow: hidden; border: 1px solid #34302a; background: #121214; color: #ECE7DA; box-shadow: var(--shadow); }
.demo-main { padding: 16px; min-width: 0; }
.demo-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.demo-bar .lbl { color: #9D978A; font-size: .82em; font-weight: 700; }
.seg { display: inline-flex; border: 1px solid #3b3832; border-radius: 12px; overflow: hidden; }
.seg button { border: 0; background: transparent; color: #C9C3B4; padding: 6px 12px; font-weight: 700; font-size: .86em; cursor: pointer; min-height: 38px; }
.seg button.on { background: #C9A227; color: #0B0B0C; }
.demo-bar .who { margin-inline-start: auto; color: #9D978A; font-size: .8em; line-height: 1.4; text-align: end; }
.demo-bar .who b { color: #ECE7DA; display: block; font-size: 1.05em; }
.scan { display: flex; gap: 8px; margin-bottom: 8px; }
.scan label { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; border: 2px solid #C9A227; border-radius: 12px; background: #0E0E10; padding: 0 12px; }
.scan label i { color: #E6C75A; font-size: 1.2em; }
.scan input { flex: 1; min-width: 0; border: 0; background: transparent; color: #ECE7DA; font: inherit; font-size: 1.05em; padding: 10px 0; outline: none; }
.try { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; font-size: .8em; color: #9D978A; }
.try button { border: 1px dashed #5a4b22; background: transparent; color: #D9B44A; border-radius: 8px; padding: 2px 8px; cursor: pointer; font-family: Consolas, monospace; direction: ltr; }
.try button:hover { background: rgba(201, 162, 39, .1); }
.tbtn { border: 1px solid #5a4b22; background: transparent; color: #E6C75A; border-radius: 12px; padding: 7px 14px; font-weight: 700; cursor: pointer; min-height: 40px; }
.tbtn:hover { background: rgba(201, 162, 39, .1); }
.tbtn.on { background: #C9A227; color: #0B0B0C; border-color: transparent; }
.cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; min-height: 260px; align-content: start; }
.tile { position: relative; border: 1px solid #3b3832; border-radius: 12px; background: #1B1B1F; overflow: hidden; cursor: pointer; text-align: center; padding: 0 6px 8px; transition: transform .15s, border-color .15s; color: #ECE7DA; }
.tile:hover { transform: translateY(-3px); border-color: #C9A227; }
.tile .bar { height: 4px; margin: 0 -6px; }
.tile .ic { font-size: 1.9em; color: #E6C75A; display: block; margin: 12px 0 2px; }
.tile .n { font-weight: 700; font-size: .86em; line-height: 1.35; min-height: 2.7em; display: flex; align-items: center; justify-content: center; }
.tile .p { color: #D9B44A; font-size: .84em; direction: ltr; }
.tile .bc { display: block; color: #6f6a5f; font-size: .66em; font-family: Consolas, monospace; direction: ltr; }
.tile .badge { position: absolute; top: 8px; inset-inline-end: 6px; color: #fff; font-size: .68em; font-weight: 800; padding: 0 7px; border-radius: 10px; line-height: 1.7; }
.badge.out { background: #E0574B; }
.badge.offer { background: #2F7FC1; }
.badge.kg { background: #3b3832; color: #E6C75A; }
.badge.nod { background: #4a4235; color: #ECE7DA; }
.demo-side { background: #18181B; border-inline-start: 1px solid #2C2820; display: flex; flex-direction: column; padding: 14px; gap: 10px; min-width: 0; }
.order-title { display: flex; justify-content: space-between; align-items: center; font-weight: 800; gap: 8px; }
.order-title small { color: #9D978A; font-weight: 600; font-size: .78em; }
.cust { display: flex; gap: 6px; }
.cust input, .coupon input { flex: 1; min-width: 0; border: 1px solid #3b3832; background: #141416; color: #ECE7DA; border-radius: 10px; padding: 7px 10px; font: inherit; font-size: .9em; direction: ltr; }
.coupon input { text-transform: uppercase; }
.coupon { display: flex; gap: 6px; }
.cust-card { border: 1px solid #2C2820; border-radius: 10px; padding: 6px 10px; font-size: .84em; display: flex; justify-content: space-between; align-items: center; gap: 8px; background: #141416; }
.cust-card b { color: #ECE7DA; }
.cust-card span { color: #9D978A; }
.cust-card button { border: 0; background: transparent; color: #E0574B; cursor: pointer; font-size: 1.1em; }
.lines { flex: 1; min-height: 190px; max-height: 320px; overflow-y: auto; border: 1px solid #2C2820; border-radius: 12px; padding: 6px; background: #141416; }
.lines .empty { color: #9D978A; text-align: center; padding: 50px 10px; font-size: .92em; }
.ln { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: center; padding: 6px; border-radius: 9px; }
.ln + .ln { border-top: 1px dashed #2C2820; }
.ln.bad { background: rgba(224, 87, 75, .12); }
.ln .nm { font-weight: 700; font-size: .88em; line-height: 1.35; }
.ln .sub { color: #9D978A; font-size: .76em; font-weight: 600; display: block; }
.ln .disc { color: #6FB8F3; font-size: .76em; font-weight: 700; display: block; }
.ln .dbtn { border: 0; background: transparent; color: #D9B44A; cursor: pointer; font-size: .74em; font-weight: 700; padding: 0; text-decoration: underline; }
.qty { display: inline-flex; align-items: center; gap: 4px; }
.qty button { width: 26px; height: 26px; border-radius: 8px; border: 1px solid #3b3832; background: #1E1E22; color: #ECE7DA; cursor: pointer; font-weight: 800; line-height: 1; }
.qty b { min-width: 22px; text-align: center; font-size: .86em; direction: ltr; }
.ln .amt { direction: ltr; font-weight: 800; font-size: .88em; min-width: 54px; text-align: end; }
.totals { font-size: .88em; color: #C9C3B4; }
.totals div { display: flex; justify-content: space-between; gap: 8px; }
.totals .dl { color: #6FB8F3; }
.totals .grand { font-size: 1.45em; font-weight: 800; color: #E6C75A; margin-top: 2px; }
.totals span.v, .totals .grand span:last-child { direction: ltr; }
.side-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.side-actions .tbtn { font-size: .88em; padding: 6px 8px; }
.pay { grid-column: 1 / -1; min-height: 54px; border: 0; border-radius: 14px; background: #1A9A5C; color: #fff; font-weight: 800; font-size: 1.12em; cursor: pointer; }
.pay:hover:not(:disabled) { background: #17874F; }
.pay:disabled { opacity: .5; cursor: not-allowed; }
.demo-note { text-align: center; color: var(--mute); font-size: .88em; margin-top: 14px; }
.kbd { display: inline-block; border: 1px solid #4a4235; border-bottom-width: 2px; border-radius: 6px; padding: 0 5px; font-size: .78em; font-family: Consolas, monospace; color: #C9C3B4; direction: ltr; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(30px); opacity: 0; z-index: 90; background: #1E1E22; color: #ECE7DA; border: 1px solid #4A3F22; padding: 10px 18px; border-radius: 14px; box-shadow: var(--shadow); transition: .3s var(--ease); max-width: calc(100vw - 32px); font-weight: 600; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { border-color: #E0574B; }
.toast.ok { border-color: #2BB673; }

/* النوافذ داخل العرض */
.modal { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, .62); }
.modal.open { display: flex; }
.modal-box { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #18181B; color: #ECE7DA; border: 1px solid #4A3F22; border-radius: 18px; padding: 18px; box-shadow: var(--shadow); }
.modal-box h3 { margin: 0 0 10px; font-family: var(--f-display); color: #E6C75A; font-size: 1.3em; }
.modal-box p.hint { color: #9D978A; font-size: .86em; margin: 0 0 8px; }
.opt-group { margin: 10px 0; }
.opt-group > b { display: block; margin-bottom: 6px; color: #C9C3B4; font-size: .92em; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opts label { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #3b3832; border-radius: 12px; padding: 8px 12px; cursor: pointer; font-weight: 600; font-size: .92em; }
.opts input { accent-color: #C9A227; }
.opts label:has(input:checked) { border-color: #C9A227; background: rgba(201, 162, 39, .1); }
.opts .d { color: #D9B44A; direction: ltr; font-size: .9em; }
.field { display: grid; gap: 4px; margin: 8px 0; font-weight: 700; font-size: .9em; color: #C9C3B4; }
.field input { border: 1px solid #3b3832; background: #0E0E10; color: #ECE7DA; border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 1.05em; direction: ltr; }
.field input:focus { outline: none; border-color: #C9A227; }
.pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.pay-sum { display: grid; gap: 2px; margin: 8px 0; padding: 10px 12px; border: 1px solid #2C2820; border-radius: 12px; background: #141416; font-size: .92em; }
.pay-sum div { display: flex; justify-content: space-between; }
.pay-sum .v { direction: ltr; font-weight: 800; }
.pay-sum .chg { color: #2BB673; }
.pay-sum .err { color: #E0574B; font-weight: 700; }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.modal-actions .btn { flex: 1; }
.held { display: grid; gap: 8px; }
.held div { display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 1px solid #2C2820; border-radius: 10px; padding: 8px 10px; font-size: .9em; }
.receipt { background: var(--paper); color: var(--paper-ink); border-radius: 6px; padding: 16px 16px 10px; font-size: .84em; line-height: 1.55; font-family: "Cairo", Tahoma, sans-serif; max-width: 330px; margin: 0 auto; }
.receipt h4 { text-align: center; margin: 0; font-size: 1.15em; }
.receipt .c { text-align: center; }
.receipt hr { border: 0; border-top: 1px dashed #999; margin: 8px 0; }
.receipt .row { display: flex; justify-content: space-between; gap: 8px; }
.receipt .row span:last-child { direction: ltr; white-space: nowrap; }
.receipt .muted { color: #666; font-size: .9em; }
.receipt .dsc { color: #1B64AE; }
.receipt .big { font-weight: 800; font-size: 1.25em; }
.receipt .qr { display: grid; place-items: center; margin: 10px 0 4px; }
.receipt .qr svg, .receipt .qr img { width: 150px; height: 150px; }
.receipt .demo-mark { text-align: center; color: #9a6f00; font-weight: 700; font-size: .85em; }

/* ---------- المزايا مجمّعة ---------- */
.fgroups { display: grid; gap: 34px; }
.fgroup-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.fgroup-head .gi { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-text); font-size: 1.25em; flex: none; }
.fgroup-head h3 { margin: 0; font-family: var(--f-display); font-size: 1.35em; font-weight: 700; }
.fgroup-head .cnt { margin-inline-start: auto; color: var(--mute); font-size: .86em; font-weight: 700; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; }
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.card .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.45em; background: var(--gold-soft); color: var(--gold-text); margin-bottom: 12px; }
.card.mk .ico { background: var(--market-soft); color: var(--market); }
.card.green .ico { background: var(--green-soft); color: var(--green); }
.card h3 { margin: 0 0 6px; font-size: 1.08em; font-weight: 800; }
.card p { margin: 0; color: var(--text-soft); font-size: .93em; line-height: 1.75; }

/* ---------- الدورة ---------- */
.cycle { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; position: relative; counter-reset: st; }
.cycle::before { content: ""; position: absolute; top: 34px; inset-inline: 9%; height: 2px; background: var(--line-strong); }
.step { position: relative; text-align: center; padding: 0 10px; counter-increment: st; }
.step .dot { position: relative; z-index: 1; width: 68px; height: 68px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line-strong); font-size: 1.6em; color: var(--gold-text); transition: .3s; }
.step:hover .dot { border-color: var(--market); color: var(--market); transform: scale(1.06); }
.step .dot::after { content: counter(st); position: absolute; top: -6px; inset-inline-end: -4px; width: 24px; height: 24px; border-radius: 50%; background: var(--gold); color: var(--on-gold); font-size: .5em; font-weight: 800; display: grid; place-items: center; font-family: var(--f-body); }
.step h3 { font-size: 1em; margin: 0 0 4px; font-weight: 800; }
.step p { margin: 0; color: var(--mute); font-size: .86em; line-height: 1.65; }
.proof { margin-top: 40px; border: 1px solid var(--line); border-inline-start: 4px solid var(--green); border-radius: var(--radius); background: var(--surface); padding: 20px 22px; }
.proof h3 { margin: 0 0 4px; font-size: 1.05em; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.proof h3 i { color: var(--green); }
.proof > p { margin: 0 0 12px; color: var(--mute); font-size: .88em; }
.proof-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.proof-grid div { padding: 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.proof-grid b { display: block; font-size: 1.05em; color: var(--gold-text); direction: ltr; text-align: start; unicode-bidi: plaintext; }
.proof-grid span { color: var(--text-soft); font-size: .86em; line-height: 1.6; display: block; }

/* ---------- أقسام مقسومة (الفوترة ، المخزون ، العروض) ---------- */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.split.rev > :first-child { order: 2; }
.ticks { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-soft); }
.ticks li i { color: var(--green); font-size: 1.15em; margin-top: 3px; }
.ticks li b { color: var(--text); }
.pics { display: grid; gap: 14px; }
.pics figure { margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #111; cursor: zoom-in; }
.pics figcaption { padding: 8px 12px; font-size: .86em; font-weight: 700; background: var(--surface); }
.pics.two { grid-template-columns: 1fr 1fr; align-items: start; }
.note-line { display: flex; gap: 8px; align-items: flex-start; margin-top: 16px; padding: 10px 14px; border-radius: 12px; background: var(--gold-soft); color: var(--text-soft); font-size: .9em; }
.note-line i { color: var(--gold-text); margin-top: 3px; }
.steps4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 18px; }
.steps4 div { padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: .84em; font-weight: 700; line-height: 1.5; }
.steps4 b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: var(--on-gold); margin-bottom: 6px; font-size: .9em; }
.lifecycle { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; font-weight: 700; font-size: .9em; }
.lifecycle span { padding: 4px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.lifecycle .s-draft { color: var(--mute); }
.lifecycle .s-ok { color: var(--green); border-color: var(--green); }
.lifecycle .s-stop { color: var(--red); border-color: var(--red); }
.lifecycle i { color: var(--mute); }
html[dir="ltr"] .lifecycle i { transform: scaleX(-1); display: inline-block; }

/* ---------- الأدوار ---------- */
.roles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.role { padding: 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.role i { color: var(--gold-text); font-size: 1.6em; }
.role b { display: block; margin: 6px 0 4px; font-size: 1.05em; }
.role ul { margin: 0; padding-inline-start: 18px; color: var(--text-soft); font-size: .88em; line-height: 1.7; }

/* ---------- المعرض ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 22px; }
.tab { border: 1px solid var(--line); background: var(--surface); color: var(--text-soft); border-radius: 999px; padding: 8px 16px; font-weight: 700; cursor: pointer; }
.tab.on { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.shot { margin: 0; border-radius: 14px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); cursor: zoom-in; transition: transform .25s var(--ease), box-shadow .25s; }
.shot:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; background: #111; }
.shot img.fit { object-fit: contain; object-position: center; background: #0B0B0C; }
.shot figcaption { padding: 10px 14px 12px; font-weight: 700; font-size: .92em; }
.shot figcaption span { display: block; color: var(--mute); font-weight: 600; font-size: .9em; }
.shot[hidden] { display: none; }
.lightbox { position: fixed; inset: 0; z-index: 85; background: rgba(0, 0, 0, .86); display: none; align-items: center; justify-content: center; padding: 18px; flex-direction: column; gap: 10px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: min(1400px, 100%); max-height: calc(100vh - 110px); width: auto; border-radius: 10px; box-shadow: var(--shadow); }
.lightbox p { color: #ECE7DA; margin: 0; font-weight: 700; text-align: center; }
.lb-close, .lb-nav { position: absolute; width: 46px; height: 46px; border-radius: 50%; border: 1px solid #4A3F22; background: #18181B; color: #E6C75A; cursor: pointer; font-size: 1.3em; display: grid; place-items: center; }
.lb-close { top: 16px; inset-inline-end: 16px; }
.lb-prev { inset-inline-start: 16px; top: 50%; }
.lb-next { inset-inline-end: 16px; top: 50%; }
html[dir="ltr"] .lb-nav i { display: inline-block; transform: scaleX(-1); }

/* ---------- لماذا / خارطة ---------- */
.why { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.road-title { text-align: center; font-family: var(--f-display); font-size: 1.4em; margin: 46px 0 16px; font-weight: 700; }
.road { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.road .card .state { display: inline-flex; gap: 6px; align-items: center; font-size: .8em; font-weight: 800; padding: 2px 10px; border-radius: 10px; margin-bottom: 8px; }
.state.done { background: var(--green-soft); color: var(--green); }
.state.wip { background: var(--gold-soft); color: var(--gold-text); }
.std-note { max-width: 860px; margin: 20px auto 0; text-align: center; color: var(--mute); font-size: .88em; }
.std-note i { color: var(--gold-text); }

/* ---------- من العائلة: AI-ENG MART للسوبر ماركت (قيد التطوير) ---------- */
.store-band { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; padding: 24px 26px; border-radius: 22px; border: 1px solid var(--market); background: var(--market-soft); }
.store-band .si { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-size: 2em; background: var(--surface); color: var(--market); border: 1px solid var(--line); }
.store-band h2 { margin: 0 0 4px; font-family: var(--f-display); font-size: clamp(1.3rem, 2.4vw, 1.7rem); font-weight: 700; }
.store-band h2 .state { display: inline-flex; gap: 6px; align-items: center; font-family: var(--f-body); font-size: .5em; font-weight: 800; padding: 3px 10px; border-radius: 10px; vertical-align: middle; }
.store-band p { margin: 0; color: var(--text-soft); font-size: .95em; }

/* ---------- الطلب والتواصل ---------- */
.quote { display: grid; grid-template-columns: .9fr 1.1fr; gap: 30px; align-items: start; }
.quote-card { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 22px; padding: 26px; box-shadow: var(--shadow-sm); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form .full { grid-column: 1 / -1; }
.form label { display: grid; gap: 6px; font-weight: 700; font-size: .92em; color: var(--text-soft); min-width: 0; }
.form input, .form select, .form textarea { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 12px; padding: 11px 13px; min-height: 48px; width: 100%; min-width: 0; }
.form textarea { min-height: 90px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.form .bad { border-color: var(--red); }
.contact-list { display: grid; gap: 12px; margin-top: 20px; }
.contact-list a, .contact-list div { display: flex; align-items: center; gap: 12px; color: var(--text); font-weight: 700; text-decoration: none; }
.contact-list i { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--gold-soft); color: var(--gold-text); font-size: 1.15em; flex: none; }

/* ---------- الأسئلة ---------- */
.faq { max-width: 860px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px 18px; }
.faq summary { cursor: pointer; list-style: none; padding: 14px 0; font-weight: 800; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold-text); font-size: 1.4em; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 16px; color: var(--text-soft); }

/* ---------- التذييل ---------- */
.cta-band { padding: 70px 0; text-align: center; background: var(--bg-2); border-top: 1px solid var(--line); }
.cta-band h2 { font-family: var(--f-display); font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 0 0 10px; }
.cta-band p { color: var(--text-soft); margin: 0 auto 22px; max-width: 640px; }
.site-foot { padding: 40px 0 24px; border-top: 1px solid var(--line); color: var(--mute); font-size: .92em; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 26px; }
.foot-grid h4 { color: var(--text); margin: 0 0 10px; }
.foot-grid a { color: var(--text-soft); display: block; margin: 4px 0; }
.foot-logo { width: 160px; height: auto; margin-bottom: 10px; }
.foot-bottom { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
.wa-float { position: fixed; bottom: 20px; inset-inline-start: 20px; z-index: 60; width: 58px; height: 58px; border-radius: 50%; background: #1FAF5A; color: #fff; display: grid; place-items: center; font-size: 1.8em; box-shadow: 0 12px 26px rgba(31, 175, 90, .4); text-decoration: none !important; }

/* ---------- الشاشات الصغيرة ---------- */
@media (max-width: 1240px) { .nav a { padding: 8px 9px; font-size: .92em; } }
@media (max-width: 1180px) {
  .nav { display: none; position: absolute; top: 72px; inset-inline: 0; flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px 16px 16px; gap: 2px; }
  .nav.open { display: flex; }
  .menu-btn { display: inline-grid; }
  .head-tools { margin-inline-start: auto; }
}
@media (max-width: 1100px) {
  .roles { grid-template-columns: repeat(2, 1fr); }
  .demo { grid-template-columns: minmax(0, 1fr) 340px; }
  .road { grid-template-columns: repeat(2, 1fr); }
  .proof-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .head-row .cta-head { display: none; }
  .hero-grid, .split, .quote { grid-template-columns: 1fr; }
  .split.rev > :first-child { order: 0; }
  .hero { padding-top: 36px; }
  .device { margin: 10px 8px 26px; }
  .stats-row { grid-template-columns: repeat(3, 1fr); }
  .stat:nth-child(4) { border-inline-start: 0; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .cycle { grid-template-columns: repeat(2, 1fr); gap: 22px 10px; }
  .cycle::before { display: none; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .demo { grid-template-columns: 1fr; }
  .demo-side { border-inline-start: 0; border-top: 1px solid #2C2820; }
  .tiles { max-height: 440px; overflow-y: auto; min-height: 0; padding-inline-end: 2px; }
  .why { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .store-band { grid-template-columns: auto 1fr; }
  .store-band .btn { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .wrap { padding: 0 16px; }
  .brand .tag { display: none; }
  .brand img { height: 30px; }
  .head-row { gap: 10px; }
  .section { padding: 64px 0; }
  .features, .roles, .why, .road, .gallery, .form, .pics.two, .proof-grid { grid-template-columns: 1fr; }
  .steps4 { grid-template-columns: 1fr 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .stat { border-inline-start: 0; border-top: 1px solid var(--line); }
  .stat:last-child { grid-column: 1 / -1; }
  .float-card { display: none; }
  .screen, html[dir="ltr"] .screen { transform: none; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .demo-main, .demo-side { padding: 12px; }
  .demo-bar .who { margin-inline-start: 0; text-align: start; flex-basis: 100%; }
  .pay-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .store-band { grid-template-columns: 1fr; padding: 20px; }
  .lb-nav { display: none; }
  .hero-cta .btn { flex: 1 1 100%; white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
