/* الصفحات الداخلية لـ sahib.sa (المنتجات، المساعدة، الجديد، الاسترداد، 404).
   كل الألوان والمقاسات من رموز الحزمة المشتركة (sahib-tokens.css)، بدون أي لون مكتوب مباشرة.
   الشريط العلوي والتذييل من الحزمة (<sahib-bar> و<sahib-footer>)، وهنا بس شريط الأقسام وروابط الموقع. */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: var(--sahib-space-4); }
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: var(--sahib-brand-fg); text-underline-offset: 4px; }
img { max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol { margin: 0; }

.wrap { width: 100%; max-width: var(--sahib-content-max); margin-inline: auto; padding-inline: var(--sahib-gutter); }
.narrow { max-width: 760px; }

/* ---------- شريط أقسام الموقع (تحت <sahib-bar>) ---------- */
.subnav { background: var(--sahib-surface); border-block-end: 1px solid var(--sahib-line); }
.subnav .wrap { min-height: var(--sahib-control-lg); display: flex; align-items: center; justify-content: space-between; gap: var(--sahib-space-2); }
.subnav .links { display: flex; gap: var(--sahib-space-1); overflow-x: auto; scrollbar-width: none; }
.subnav .links a { color: var(--sahib-ink-2); text-decoration: none; font-size: var(--sahib-text-14); font-weight: var(--sahib-weight-medium); padding: var(--sahib-space-2) var(--sahib-space-3); border-radius: var(--sahib-radius-md); white-space: nowrap; min-height: var(--sahib-control-md); display: inline-flex; align-items: center; }
.subnav .links a:hover, .subnav .links a[aria-current="page"] { color: var(--sahib-ink); background: var(--sahib-surface-2); }
.theme-toggle { width: var(--sahib-control-md); height: var(--sahib-control-md); border: 1px solid var(--sahib-line); border-radius: var(--sahib-radius-pill); background: transparent; color: var(--sahib-ink); cursor: pointer; display: grid; place-items: center; flex: none; }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: block; }
[data-theme="dark"] .theme-toggle .moon { display: none; }

/* ---------- العناوين والأقسام ---------- */
.hero { padding-block: var(--sahib-space-16) var(--sahib-space-12); }
.crumbs { font-size: var(--sahib-text-14); color: var(--sahib-ink-2); margin-bottom: var(--sahib-space-6); display: flex; flex-wrap: wrap; gap: var(--sahib-space-2); }
.crumbs a { color: var(--sahib-ink-2); }
.product-head { display: flex; align-items: center; gap: var(--sahib-space-4); margin-bottom: var(--sahib-space-6); }
.product-mark { width: 56px; height: 56px; border-radius: var(--sahib-radius-mark); background: var(--sahib-accent); color: var(--sahib-on-accent); display: grid; place-items: center; font-size: var(--sahib-text-30); font-weight: var(--sahib-weight-bold); flex: none; }
.product-head .names b { display: block; font-size: var(--sahib-text-24); font-weight: var(--sahib-weight-semibold); line-height: 1.3; }
.product-head .names small { display: block; font-size: var(--sahib-text-14); color: var(--sahib-ink-2); }
h1 { font-size: var(--sahib-text-36); margin-bottom: var(--sahib-space-4); }
.lede { font-size: var(--sahib-text-18); color: var(--sahib-ink-2); max-width: 40em; }
.actions { display: flex; flex-wrap: wrap; gap: var(--sahib-space-3); margin-top: var(--sahib-space-8); }
section.block { padding-block: var(--sahib-space-12); border-block-start: 1px solid var(--sahib-line); }
section.block h2 { font-size: var(--sahib-text-24); margin-bottom: var(--sahib-space-6); }
@media (min-width: 900px) { h1 { font-size: var(--sahib-text-48); } }

/* ---------- الأزرار ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--sahib-space-2); min-height: var(--sahib-control-lg); padding-inline: 18px; border-radius: var(--sahib-radius-md); font: inherit; font-size: 0.9375rem; font-weight: var(--sahib-weight-semibold); text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: filter var(--sahib-duration-fast) var(--sahib-ease), background var(--sahib-duration-fast) var(--sahib-ease); }
.btn-primary { background: var(--sahib-accent); color: var(--sahib-on-accent); }
.btn-primary:hover { filter: brightness(.92); }
.btn-secondary { background: var(--sahib-surface); color: var(--sahib-ink); border-color: var(--sahib-line-strong); }
.btn-secondary:hover { background: var(--sahib-surface-2); }

/* ---------- البطاقات والقوائم ---------- */
.grid { display: grid; gap: var(--sahib-space-4); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { background: var(--sahib-surface); border: 1px solid var(--sahib-line); border-radius: var(--sahib-radius-lg); padding: var(--sahib-space-6); box-shadow: var(--sahib-shadow-1); }
.card h3 { font-size: var(--sahib-text-18); margin-bottom: var(--sahib-space-2); }
.card p { color: var(--sahib-ink-2); }
a.card { display: block; text-decoration: none; color: inherit; transition: border-color var(--sahib-duration-fast) var(--sahib-ease); }
a.card:hover { border-color: var(--sahib-accent-fg); }
a.card .go { display: inline-block; margin-top: var(--sahib-space-3); color: var(--sahib-accent-fg); font-weight: var(--sahib-weight-semibold); font-size: var(--sahib-text-14); }
.ticks { display: grid; gap: var(--sahib-space-3); padding: 0; list-style: none; }
.ticks li { position: relative; padding-inline-start: var(--sahib-space-6); }
.ticks li::before { content: ""; position: absolute; inset-inline-start: 4px; top: .7em; width: 8px; height: 8px; border-radius: 2px; background: var(--sahib-accent); }
.note { background: var(--sahib-info-bg); color: var(--sahib-info); border-radius: var(--sahib-radius-md); padding: var(--sahib-space-4); font-size: var(--sahib-text-14); }
[data-theme="dark"] .note { background: var(--sahib-surface-2); color: var(--sahib-ink); }
.badge { display: inline-flex; align-items: center; padding: 2px var(--sahib-space-3); border-radius: var(--sahib-radius-pill); background: var(--sahib-surface-2); color: var(--sahib-ink-2); font-size: var(--sahib-text-12); font-weight: var(--sahib-weight-medium); }

/* ---------- المقالات والنصوص الطويلة ---------- */
.prose { max-width: 720px; }
.prose h2 { font-size: var(--sahib-text-24); margin-block: var(--sahib-space-8) var(--sahib-space-3); }
.prose h3 { font-size: var(--sahib-text-18); margin-block: var(--sahib-space-6) var(--sahib-space-2); }
.prose p, .prose ul, .prose ol { margin-bottom: var(--sahib-space-4); }
.prose ul, .prose ol { padding-inline-start: var(--sahib-space-6); }
.prose li + li { margin-top: var(--sahib-space-2); }
.prose .meta { color: var(--sahib-ink-2); font-size: var(--sahib-text-14); }
details.faq { border-block-end: 1px solid var(--sahib-line); padding-block: var(--sahib-space-4); }
details.faq summary { cursor: pointer; font-weight: var(--sahib-weight-semibold); min-height: var(--sahib-control-lg); display: flex; align-items: center; }
details.faq p { color: var(--sahib-ink-2); margin-top: var(--sahib-space-2); }

/* ---------- سجل التحديثات ---------- */
.log { list-style: none; padding: 0; display: grid; gap: var(--sahib-space-6); }
.log time { display: block; font-size: var(--sahib-text-14); color: var(--sahib-ink-2); margin-bottom: var(--sahib-space-2); }
.log h3 { font-size: var(--sahib-text-18); margin-bottom: var(--sahib-space-2); }
.log ul { padding-inline-start: var(--sahib-space-6); color: var(--sahib-ink-2); }

/* ---------- روابط الموقع فوق <sahib-footer> ---------- */
.site-links { border-block-start: 1px solid var(--sahib-line); }
.site-links .wrap { display: flex; flex-wrap: wrap; gap: var(--sahib-space-2) var(--sahib-space-6); padding-block: var(--sahib-space-4); font-size: var(--sahib-text-14); }
.site-links a { color: var(--sahib-ink-2); text-decoration: none; }
.site-links a:hover { color: var(--sahib-ink); text-decoration: underline; }

/* ---------- مسافات مساعدة (بدل style="" داخل الصفحات) ---------- */
.spaced { margin-top: var(--sahib-space-6); }
.spaced-lg { margin-top: var(--sahib-space-8); }
.spaced-xl { margin-top: var(--sahib-space-12); }
.step-h { margin-top: var(--sahib-space-3); }

/* جداول الوثائق القانونية (الشروط والخصوصية): تمرير أفقي على الجوال */
.prose table{display:block;overflow-x:auto;width:100%;border-collapse:collapse;margin:16px 0;font-size:.92em}
.prose th,.prose td{border:1px solid rgba(127,127,127,.3);padding:8px 10px;text-align:start;vertical-align:top}
.prose thead th{background:rgba(127,127,127,.08)}
