/*
 * الموقع العام
 *
 * هوية سوداء سينمائية: خلفية داكنة، إضاءة وانعكاسات، وعناوين كروم.
 * CSS مكتوب يدويًا بلا خطوة بناء.
 *
 * الوضع الفاتح (`body.light`) لصفحات القراءة الطويلة وبوابة العميل: نفس
 * الرموز بقيم مقلوبة، فكل قاعدة أدناه تعمل في الوضعين بلا تكرار.
 */

:root {
    --bg: #05060a;
    --bg-2: #0a0c12;
    --bg-3: #0f1219;

    --ink: #f2f4f8;
    --soft: #a8afbd;
    --faint: #767e8e;
    --rule: rgba(255, 255, 255, .11);
    --firm: rgba(255, 255, 255, .22);

    --accent: #5aa9ff;
    --accent-2: #2f7fe0;
    --accent-dark: #0a1f3a;
    --accent-pale: rgba(90, 169, 255, .14);

    --good: #2fbe7e;
    --warn: #e0a83c;
    --bad: #ff6b60;
    --star: #ffc53d;

    --surface: rgba(255, 255, 255, .035);
    --surface-2: rgba(255, 255, 255, .07);
    --white: #ffffff;
    --card: rgba(255, 255, 255, .04);
    --card-hover: rgba(255, 255, 255, .07);

    --chrome: linear-gradient(180deg, #ffffff 0%, #d6dae2 38%, #8c94a4 58%, #f2f5fa 100%);

    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 2px 8px rgba(0, 0, 0, .45), 0 18px 40px rgba(0, 0, 0, .35);
    --shadow-lg: 0 4px 14px rgba(0, 0, 0, .5), 0 30px 70px rgba(0, 0, 0, .55);
    --glow: 0 0 25px rgba(90, 169, 255, .35);

    --wrap: 1180px;
    --gutter: 20px;
}

/* الوضع الفاتح — للمقالة المفتوحة وبوابة العميل */
body.light {
    --bg: #ffffff;
    --bg-2: #f6f7f9;
    --bg-3: #eef0f4;

    --ink: #14161b;
    --soft: #4a5160;
    --faint: #848c9b;
    --rule: #e3e6ec;
    --firm: #c6ccd7;

    --accent: #0d3b66;
    --accent-2: #17518c;
    --accent-dark: #092b4c;
    --accent-pale: #eef3f9;

    --good: #1a7f52;
    --warn: #a9760a;
    --bad: #b3261e;

    --surface: #f5f6f9;
    --surface-2: #eceff4;
    --card: #ffffff;
    --card-hover: #ffffff;

    --chrome: linear-gradient(180deg, #1c2330 0%, #2d3646 60%, #10151d 100%);

    --shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 10px 28px rgba(0, 0, 0, .07);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .08), 0 20px 48px rgba(0, 0, 0, .12);
    --glow: 0 6px 22px rgba(13, 59, 102, .22);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    background: var(--bg);
}

body {
    font-family: 'IBM Plex Sans Arabic', 'Segoe UI', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.75;
    color: var(--ink);
    background: var(--bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* الأرقام لاتينية ومتساوية العرض داخل نص عربي */
.n {
    font-variant-numeric: tabular-nums lining-nums;
    direction: ltr;
    unicode-bidi: isolate;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.3; letter-spacing: -.4px; font-weight: 700; color: var(--ink); }
h1 { font-size: clamp(30px, 4.4vw, 48px); }
h2 { font-size: clamp(24px, 3.1vw, 34px); }
h3 { font-size: clamp(18px, 2vw, 21px); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
    position: absolute; inset-inline-start: 0; top: 0; z-index: 100;
    background: var(--accent); color: #04070d; padding: 12px 20px; border-radius: 0 0 0 8px;
    transform: translateY(-110%); transition: transform .2s;
}
.skip:focus { transform: none; }

/* حقل شرك الروبوتات في النماذج: مخفي بلا إزاحة تُوسّع الصفحة */
.hp-field { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* شبكة أمان: عنصر زخرفي عريض لا يوسّع الصفحة فتتحرك يمينًا ويسارًا على الموبايل */
html, body { overflow-x: clip; }

/*
 * ظهور العناصر مع التمرير. الإخفاء مشروط بـ html.js التي يضعها السكربت
 * نفسه: لو تعطّل الجافاسكربت ظهر المحتوى كاملًا بلا حركة بدل أن يختفي.
 */
.js [data-reveal] {
    opacity: 0;
    transform: translateY(34px);
    transition: opacity .9s cubic-bezier(.16, 1, .3, 1), transform .9s cubic-bezier(.16, 1, .3, 1);
    will-change: opacity, transform;
}
.js [data-reveal].shown { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js [data-reveal] { opacity: 1 !important; transform: none !important; transition: none; }
    .car-wrapper, .hero-copy > *, .headlight, .beam, .scroll-cue span, .shiny-text {
        animation: none !important; opacity: 1 !important; filter: none !important;
    }
    .car-wrapper { transform: translateX(-50%) !important; }
}

/* ═══ الترويسة ═══ */

.topbar {
    background: #04060a; color: var(--soft);
    font-size: 13.5px; padding: 7px 0;
    border-bottom: 1px solid var(--rule);
}
body.light .topbar { background: var(--accent-dark); color: rgba(255,255,255,.9); }
.topbar .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; }
.topbar a { color: var(--ink); }
body.light .topbar a { color: #fff; }
.topbar .items { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.topbar .items span { display: inline-flex; align-items: center; gap: 6px; }

.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(5, 6, 10, .72);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--rule);
}
body.light .site-header { background: rgba(255, 255, 255, .92); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 72px; }

.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand img { height: 44px; width: auto; }
.brand .mark {
    width: 44px; height: 44px; border-radius: 12px;
    background: linear-gradient(140deg, var(--accent), var(--accent-2));
    color: #04070d; display: grid; place-items: center; font-size: 21px; font-weight: 700;
    box-shadow: var(--glow);
}
.brand .name {
    font-size: 18px; font-weight: 700; line-height: 1.25; color: var(--ink);
    letter-spacing: .2px;
}
.brand .tag { font-size: 11.5px; color: var(--faint); font-weight: 400; }

.nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav a {
    position: relative; padding: 9px 14px; font-size: 14.5px;
    font-weight: 600; color: var(--soft); letter-spacing: .3px;
    transition: color .25s ease, text-shadow .25s ease;
}
.nav a::after {
    content: ''; position: absolute; bottom: 2px; inset-inline-start: 50%;
    transform: translateX(50%); width: 0; height: 1px;
    background: var(--accent); box-shadow: 0 0 8px var(--accent);
    transition: width .3s ease;
}
.nav a:hover { color: var(--ink); text-decoration: none; text-shadow: 0 0 18px rgba(255,255,255,.35); }
.nav a:hover::after, .nav a.on::after { width: 62%; }
.nav a.on { color: var(--ink); }

.header-cta { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

.sound-toggle {
    background: none; border: 1px solid var(--rule); border-radius: 50%;
    width: 38px; height: 38px; display: grid; place-items: center;
    cursor: pointer; font: inherit; font-size: 15px; color: var(--soft);
    transition: all .3s cubic-bezier(.175, .885, .32, 1.275);
}
.sound-toggle:hover { color: var(--ink); border-color: var(--firm); transform: scale(1.1); }

.menu-toggle {
    display: none; background: none; border: 1px solid var(--rule);
    border-radius: var(--radius-sm); padding: 8px 12px; cursor: pointer;
    font: inherit; font-size: 20px; line-height: 1; color: var(--ink);
}

/* ═══ الأزرار ═══ */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font: inherit; font-size: 15px; font-weight: 600;
    padding: 12px 24px; border-radius: 999px; border: 1px solid transparent;
    cursor: pointer; white-space: nowrap;
    transition: transform .35s cubic-bezier(.175, .885, .32, 1.275), background .25s, border-color .25s, box-shadow .25s, color .25s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px) scale(1.03); }
.btn:active { transform: translateY(0) scale(.99); }

.btn-primary {
    background: linear-gradient(135deg, #ffffff, #d7dde6);
    color: #06090f; box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}
.btn-primary:hover { box-shadow: 0 0 26px rgba(255, 255, 255, .35), 0 10px 30px rgba(0,0,0,.5); }
body.light .btn-primary { background: var(--accent); color: #fff; }
body.light .btn-primary:hover { background: var(--accent-2); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--firm); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); box-shadow: var(--glow); }
body.light .btn-ghost { color: var(--accent); }

.btn-light { background: #fff; color: #06090f; }
.btn-light:hover { box-shadow: 0 0 26px rgba(255,255,255,.4); }

.btn-wa { background: #25d366; color: #05210f; }
.btn-wa:hover { box-shadow: 0 0 26px rgba(37, 211, 102, .5); }

.btn-lg { font-size: 16.5px; padding: 15px 34px; }
.btn-block { width: 100%; }

/* ═══ البطل السينمائي ═══ */

.hero {
    position: relative; overflow: hidden; color: var(--ink);
    background: radial-gradient(ellipse at 50% 0%, #131826 0%, var(--bg) 62%);
}
.hero::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    box-shadow: inset 0 -120px 160px -60px var(--bg), inset 0 90px 120px -70px rgba(0,0,0,.9);
}
.hero .wrap { position: relative; z-index: 2; padding-top: 56px; padding-bottom: 56px; }

/*
 * بطل الصفحة الرئيسية: السيارة على مسرح مضاء، والنص ينزل فوقها.
 *
 * الترتيب من الخلف للأمام: وهج المسرح، ضوء الأرضية، السيارة وظلها،
 * الفوانيس وأشعتها، ثم النص. مواضع الفوانيس بالنسبة المئوية من إطار
 * السيارة، فتبقى فوق مصابيحها على كل عرض شاشة.
 */
.hero-stage {
    position: relative; overflow: hidden; background: #04060a;
    min-height: min(94vh, 900px); display: flex; flex-direction: column; justify-content: flex-end;
    padding-bottom: 54px;
}
.stage-glow {
    position: absolute; top: -10%; left: 50%; transform: translateX(-50%);
    width: 120%; height: 80%; pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(70, 110, 170, .30) 0%, transparent 62%);
}
.floor-light {
    position: absolute; bottom: 8%; left: 50%; transform: translateX(-50%) rotateX(76deg);
    width: 150vw; height: 55vh; pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(120, 160, 220, .22) 0%, transparent 62%);
}

.car-wrapper {
    position: absolute; bottom: calc(6% - var(--sink, 0px)); left: 50%; transform: translateX(-50%);
    width: min(82vw, 1080px); pointer-events: none; z-index: 2;
    animation: car-arrive 1.6s cubic-bezier(.16, 1, .3, 1) both;
}
.hero-car {
    width: 100%; display: block;
    filter: brightness(1.04) contrast(1.12) drop-shadow(0 26px 30px rgba(0, 0, 0, .9));
    -webkit-box-reflect: below -14px linear-gradient(transparent 74%, rgba(255, 255, 255, .14));
}
.car-shadow {
    position: absolute; bottom: 4%; left: 50%; transform: translateX(-50%);
    width: 62%; height: 46px; border-radius: 50%; background: #000;
    box-shadow: 0 0 26px 20px #000, 0 10px 46px 30px rgba(0, 0, 0, .85);
    z-index: -1;
}

@keyframes car-arrive {
    from { opacity: 0; transform: translateX(-50%) translateY(60px) scale(.94); }
    to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* الفوانيس: نبض هادئ ثم ومضة مزدوجة كل بضع ثوانٍ */
.headlight {
    position: absolute; top: 47.5%; width: 12%; height: 5%;
    border-radius: 50%; background: rgba(255, 255, 255, .95);
    filter: blur(6px); mix-blend-mode: screen; z-index: 3;
    animation: headlight 7s ease-in-out infinite;
}
.headlight.left { left: 27%; transform: translate(-50%, -50%); }
.headlight.right { left: 74%; transform: translate(-50%, -50%); }

.beam {
    position: absolute; top: 47%; width: 26%; height: 26%;
    border-radius: 50%; filter: blur(26px); mix-blend-mode: screen; z-index: 3;
    animation: headlight 7s ease-in-out infinite;
}
.beam.left {
    left: 14%; transform: translate(-50%, -50%);
    background: radial-gradient(ellipse at 70% 50%, rgba(150, 195, 255, .5), transparent 70%);
}
.beam.right {
    left: 87%; transform: translate(-50%, -50%);
    background: radial-gradient(ellipse at 30% 50%, rgba(150, 195, 255, .5), transparent 70%);
}

@keyframes headlight {
    0%, 62% { opacity: .55; }
    68% { opacity: 1; }
    72% { opacity: .35; }
    78% { opacity: 1; }
    88%, 100% { opacity: .55; }
}

/* النص فوق السيارة، ينزل سطرًا بعد سطر */
.hero-copy {
    position: relative; z-index: 4; text-align: center;
    padding-top: 108px; padding-bottom: min(34vh, 320px);
}
.hero-copy > * { animation: drop-in 1s cubic-bezier(.16, 1, .3, 1) both; }
.hero-copy > *:nth-child(1) { animation-delay: .05s; }
.hero-copy > *:nth-child(2) { animation-delay: .2s; }
.hero-copy > *:nth-child(3) { animation-delay: .35s; }
.hero-copy > *:nth-child(4) { animation-delay: .5s; }

@keyframes drop-in {
    from { opacity: 0; transform: translateY(-38px); filter: blur(6px); }
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.hero-copy h1 {
    margin-top: 18px;
    font-size: clamp(30px, 5.4vw, 66px); line-height: 1.18; letter-spacing: -1.2px;
    text-shadow: 0 2px 30px rgba(0, 0, 0, .9), 0 0 90px rgba(0, 0, 0, .8);
}
.hero-copy .hero-sub {
    margin: 16px auto 0; max-width: 54ch; color: var(--soft);
    font-size: clamp(15px, 1.5vw, 18.5px); text-shadow: 0 2px 18px rgba(0, 0, 0, .9);
}
.hero-copy .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 28px; }

.welcome-badge {
    display: inline-block; padding: 9px 22px; border-radius: 999px;
    background: rgba(255, 255, 255, .06); border: 1px solid var(--rule);
    backdrop-filter: blur(6px);
}
.shiny-text {
    font-size: 12.5px; font-weight: 700; letter-spacing: 2px;
    background: linear-gradient(90deg, #7b8394 0%, #ffffff 50%, #7b8394 100%);
    background-size: 200% auto;
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    animation: shine 5s linear infinite;
}

@keyframes shine { to { background-position: 200% center; } }

/* متصفح لا يقص التدرج على النص يعرض الكلام بلون واضح بدل أن يختفي */
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
    .shiny-text, .hero-stats div b {
        background: none; color: var(--ink); -webkit-text-fill-color: currentColor;
    }
}

.scroll-cue {
    position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
    width: 30px; height: 50px; border: 1px solid var(--firm); border-radius: 999px;
    display: grid; place-items: start center; padding-top: 9px; z-index: 5;
}
.scroll-cue:hover { border-color: var(--accent); box-shadow: var(--glow); }
.scroll-cue span {
    width: 4px; height: 9px; border-radius: 99px; background: var(--ink);
    animation: cue 1.9s ease-in-out infinite;
}

@keyframes cue {
    0%, 100% { opacity: 0; transform: translateY(0); }
    30% { opacity: 1; }
    70% { opacity: 1; transform: translateY(16px); }
}

.intro { padding-top: 46px; }
/*
 * الأرقام: كل رقم فوق وصفه في خانة متمركزة بعرض متساوٍ، وفاصل رفيع
 * بينها. المحاذاة لحافة الخانة كانت تباعد الأرقام عشوائيًا حسب طولها.
 */
.hero-stats {
    position: relative; z-index: 4;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    margin-top: 30px; padding-top: 26px;
    border-top: 1px solid var(--rule);
}
.hero-stats div {
    text-align: center; padding: 6px 18px;
    border-inline-start: 1px solid var(--rule);
}
.hero-stats div:first-child { border-inline-start: 0; }
.hero-stats div b {
    display: block; font-size: clamp(24px, 2.7vw, 32px); font-weight: 700; line-height: 1.25;
    background: var(--chrome); -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    font-variant-numeric: tabular-nums lining-nums;
}
.hero-stats div span { display: block; font-size: 13px; color: var(--faint); margin-top: 2px; }

.hero-media img {
    border-radius: var(--radius); border: 1px solid var(--rule); box-shadow: var(--shadow-lg);
}
.hero-media video {
    width: 100%; border-radius: var(--radius); border: 1px solid var(--rule);
    box-shadow: var(--shadow-lg); display: block;
}

/* بطل الصفحات الداخلية */
.page-head { padding: 54px 0 10px; }
.page-head .eyebrow { margin-bottom: 10px; }

/* شريط الفيديو التعريفي */
.showcase { display: flex; align-items: center; gap: 48px; padding: 90px 0; }
.showcase .video-box {
    width: 54%; flex-shrink: 0; aspect-ratio: 16 / 9; overflow: hidden;
    border-radius: var(--radius); border: 1px solid var(--rule); background: #000;
    transition: transform .7s cubic-bezier(.25, .46, .45, .94), box-shadow .7s;
}
.showcase .video-box:hover { transform: scale(1.03); box-shadow: var(--shadow-lg); }
.showcase .video-box video { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: transform .9s cubic-bezier(.25,.46,.45,.94), opacity .5s; }
.showcase .video-box:hover video { transform: scale(1.08); opacity: 1; }
.showcase .text { flex: 1; }
.showcase .text h2 { margin-bottom: 14px; }
.showcase .text p { color: var(--soft); margin-bottom: 20px; }

/* ═══ البانرات ═══ */

.banner-strip { background: var(--bg-2); padding: 26px 0; border-block: 1px solid var(--rule); }
.banner-card {
    display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center;
    background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
    padding: 16px 20px; transition: border-color .25s, box-shadow .25s, transform .25s;
}
.banner-card:hover { border-color: var(--firm); box-shadow: var(--shadow); transform: translateY(-2px); }
.banner-card img { width: 104px; height: 72px; object-fit: cover; border-radius: var(--radius-sm); }
.banner-card h3 { font-size: 18px; }
.banner-card p { font-size: 14.5px; color: var(--soft); }

/* ═══ الأقسام ═══ */

.section { padding: 78px 0; position: relative; }
.section.tint { background: var(--bg-2); border-block: 1px solid var(--rule); }
body.light .section.tint { background: var(--surface); }

.section-head { text-align: center; max-width: 660px; margin: 0 auto 42px; }

.eyebrow {
    display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 2px;
    color: var(--accent); background: var(--accent-pale);
    border: 1px solid var(--rule);
    padding: 6px 15px; border-radius: 999px; margin-bottom: 14px;
}
.section-head h2 { letter-spacing: -.6px; }
.section-head p { color: var(--soft); font-size: 16.5px; margin-top: 10px; }
.section-head.start { text-align: start; margin-inline: 0; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.card {
    position: relative; background: var(--card); border: 1px solid var(--rule);
    border-radius: var(--radius); padding: 24px;
    transition: border-color .3s, box-shadow .3s, transform .3s, background .3s;
}
.card:hover { border-color: var(--firm); background: var(--card-hover); box-shadow: var(--shadow); }
a.card:hover { text-decoration: none; transform: translateY(-4px); }
body.light .card { box-shadow: none; }
body.light .card:hover { box-shadow: var(--shadow); }

.service-card .icon {
    width: 50px; height: 50px; border-radius: 14px;
    background: var(--accent-pale); border: 1px solid var(--rule);
    color: var(--accent); display: grid; place-items: center; font-size: 23px; margin-bottom: 15px;
    transition: box-shadow .3s, transform .3s;
}
.card:hover .icon { box-shadow: var(--glow); transform: translateY(-2px); }
.service-card h3 { margin-bottom: 7px; }
.service-card p { color: var(--soft); font-size: 14.8px; }
.service-card .price {
    margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rule);
    display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
}
.service-card .price b { font-size: 19px; color: var(--ink); }
.service-card .price small { color: var(--faint); font-size: 13px; }

.badge {
    display: inline-block; font-size: 12px; font-weight: 600;
    padding: 4px 11px; border-radius: 999px;
    background: var(--surface); color: var(--soft); border: 1px solid var(--rule);
}
.badge.accent { background: var(--accent-pale); color: var(--accent); }
.badge.good, .badge.success { background: rgba(47, 190, 126, .14); color: var(--good); }
.badge.warn, .badge.warning { background: rgba(224, 168, 60, .14); color: var(--warn); }
.badge.bad, .badge.danger { background: rgba(255, 107, 96, .14); color: var(--bad); }
/* أسماء ألوان الحالات كما تعرّفها الـ enums، فتُعرض الحالة نفسها في اللوحة وفي صفحة العميل */
.badge.primary, .badge.info { background: var(--accent-pale); color: var(--accent); }
.badge.gray { background: var(--surface-2); color: var(--faint); }
body.light .badge.good, body.light .badge.success { background: #edf8f2; }
body.light .badge.warn, body.light .badge.warning { background: #fdf8ec; }
body.light .badge.bad, body.light .badge.danger { background: #fdf0ef; }

/* ═══ آراء العملاء ═══ */

.stars { color: var(--star); font-size: 17px; letter-spacing: 1px; }
.stars .off { color: var(--firm); }

.quote-card { display: flex; flex-direction: column; gap: 14px; height: 100%; }
.quote-card blockquote { font-size: 15.5px; color: var(--soft); line-height: 1.85; flex: 1; }
.quote-card blockquote::before { content: '"'; color: var(--firm); font-size: 30px; line-height: 0; vertical-align: -10px; margin-inline-end: 4px; }
.quote-who { display: flex; align-items: center; gap: 11px; }
.quote-who img, .quote-who .initial {
    width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
    background: var(--accent-pale); color: var(--accent); border: 1px solid var(--rule);
    display: grid; place-items: center; font-weight: 700;
}
.quote-who b { display: block; font-size: 14.5px; }
.quote-who span { font-size: 12.5px; color: var(--faint); }

/*
 * الفيديو لا يُحمَّل إلا بالضغط: تضمين يوتيوب مباشرة يبطئ الصفحة ويحمّل
 * سكربتات طرف ثالث لكل زائر حتى لو لم يشاهد.
 */
.video-card {
    position: relative; border-radius: var(--radius); overflow: hidden; background: #000;
    border: 1px solid var(--rule); transition: transform .35s, box-shadow .35s;
}
.video-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.video-card .frame { position: relative; aspect-ratio: 16 / 9; }
.video-card .frame img { width: 100%; height: 100%; object-fit: cover; opacity: .78; transition: opacity .3s, transform .5s; }
.video-card:hover .frame img { opacity: 1; transform: scale(1.04); }
.video-card iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-card .play {
    position: absolute; inset: 0; display: grid; place-items: center;
    background: none; border: 0; cursor: pointer; padding: 0;
}
.video-card .play span {
    width: 64px; height: 64px; border-radius: 50%;
    background: rgba(255, 255, 255, .93); color: #06090f;
    display: grid; place-items: center; font-size: 22px;
    box-shadow: 0 8px 28px rgba(0,0,0,.5); transition: transform .25s, box-shadow .25s;
}
.video-card:hover .play span { transform: scale(1.12); box-shadow: 0 0 30px rgba(255,255,255,.5); }
.video-card .cap { padding: 15px 17px; background: var(--card); border-top: 1px solid var(--rule); }
.video-card .cap b { display: block; font-size: 15px; }
.video-card .cap span { font-size: 13px; color: var(--faint); }

/* ═══ المقالات ═══ */

.post-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.post-card .cover { aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.post-card .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.post-card:hover .cover img { transform: scale(1.06); }
.post-card .body { padding: 20px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.post-card h3 { font-size: 17.5px; }
.post-card p { font-size: 14.5px; color: var(--soft); flex: 1; }
.post-card .meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12.5px; color: var(--faint); }

.article { max-width: 760px; margin: 0 auto; }
.article .cover { border-radius: var(--radius); overflow: hidden; margin-bottom: 26px; }
.article .body { font-size: 17px; line-height: 1.95; }
.article .body p { margin-bottom: 18px; }
.article .body h2 { margin: 34px 0 14px; font-size: 25px; }
.article .body h3 { margin: 26px 0 11px; }
.article .body ul, .article .body ol { margin: 0 0 18px; padding-inline-start: 24px; }
.article .body li { margin-bottom: 7px; }
.article .body img { border-radius: var(--radius); margin: 22px 0; }
.article .body blockquote {
    border-inline-start: 3px solid var(--accent); background: var(--surface);
    padding: 14px 20px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 22px 0;
}

.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
    padding: 9px 18px; border-radius: 999px; border: 1px solid var(--rule);
    font-size: 14.5px; color: var(--soft); background: var(--surface); transition: all .25s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; box-shadow: var(--glow); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #05070c; }
body.light .chip.on { color: #fff; }

/* ═══ النماذج ═══ */

.form-card {
    background: var(--card); border: 1px solid var(--rule);
    border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow);
}

.field { margin-bottom: 18px; }
.field > label { display: block; font-size: 14.5px; font-weight: 600; margin-bottom: 7px; }
.field .help { font-size: 13px; color: var(--faint); margin-top: 5px; }

input[type=text], input[type=tel], input[type=email], input[type=number],
input[type=date], select, textarea {
    width: 100%; font: inherit; font-size: 15.5px; padding: 13px 15px;
    border: 1px solid var(--rule); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--ink);
    transition: border-color .2s, box-shadow .2s, background .2s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-pale), var(--glow);
    background: var(--bg-3);
}
body.light input:focus, body.light select:focus, body.light textarea:focus { background: #fff; box-shadow: 0 0 0 3px var(--accent-pale); }
textarea { resize: vertical; min-height: 110px; }
select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--faint) 50%), linear-gradient(135deg, var(--faint) 50%, transparent 50%);
    background-position: calc(15px) calc(50% - 2px), calc(20px) calc(50% - 2px);
    background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
/* قائمة الاختيار المنسدلة يرسمها المتصفح، فتحتاج لونًا صريحًا في الوضع الداكن */
select option { background: #0d1017; color: var(--ink); }
body.light select option { background: #fff; color: var(--ink); }

.row { display: grid; gap: 15px; }
.row-2 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.row-3 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

.alert { padding: 15px 19px; border-radius: var(--radius-sm); font-size: 14.8px; margin-bottom: 20px; border: 1px solid; }
.alert-bad { background: rgba(255, 107, 96, .10); border-color: rgba(255, 107, 96, .35); color: #ffb3ac; }
.alert-good { background: rgba(47, 190, 126, .10); border-color: rgba(47, 190, 126, .35); color: #8ce0b8; }
.alert-info { background: var(--accent-pale); border-color: rgba(90, 169, 255, .3); color: #bcd9ff; }
body.light .alert-bad { background: #fdf0ef; border-color: #efc0bc; color: #8c1d17; }
body.light .alert-good { background: #edf8f2; border-color: #a8d5be; color: #14603e; }
body.light .alert-info { background: var(--accent-pale); border-color: #c3d5e8; color: var(--accent-dark); }
.alert ul { margin: 0; padding-inline-start: 20px; }

/* اختيار الموعد */
.days { display: flex; gap: 9px; overflow-x: auto; padding-bottom: 6px; }
.day {
    flex: 0 0 auto; min-width: 88px; text-align: center; padding: 12px 10px;
    border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--surface);
    font-size: 13.5px; color: var(--ink); transition: all .25s;
}
.day:hover { border-color: var(--accent); text-decoration: none; box-shadow: var(--glow); }
.day.on { background: var(--accent); border-color: var(--accent); color: #05070c; }
body.light .day.on { color: #fff; }
.day.closed { opacity: .35; pointer-events: none; }
.day b { display: block; font-size: 15px; }
.day span { font-size: 11.5px; color: var(--faint); }
.day.on span { color: rgba(0,0,0,.65); }
body.light .day.on span { color: rgba(255,255,255,.8); }

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 9px; }
.slot { position: relative; }
.slot input { position: absolute; opacity: 0; width: 0; height: 0; }
.slot label {
    display: block; text-align: center; padding: 12px 6px; cursor: pointer;
    border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--surface);
    font-size: 15px; font-weight: 600; transition: all .2s;
}
.slot label:hover { border-color: var(--accent); box-shadow: var(--glow); }
.slot input:checked + label { background: var(--accent); border-color: var(--accent); color: #05070c; }
body.light .slot input:checked + label { color: #fff; }
.slot input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ═══ الأسئلة الشائعة ═══ */

.faq-item {
    border: 1px solid var(--rule); border-radius: var(--radius-sm);
    margin-bottom: 10px; background: var(--card); transition: border-color .25s;
}
.faq-item:hover { border-color: var(--firm); }
.faq-item summary {
    padding: 16px 19px; cursor: pointer; font-weight: 600; font-size: 16px;
    list-style: none; display: flex; justify-content: space-between; gap: 14px; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--accent); font-size: 21px; font-weight: 400; flex-shrink: 0; }
.faq-item[open] summary::after { content: '−'; }
.faq-item .answer { padding: 0 19px 18px; color: var(--soft); font-size: 15.3px; }

/* ═══ الجداول ═══ */

.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); }
table.data { width: 100%; border-collapse: collapse; font-size: 14.8px; }
table.data th {
    background: var(--surface); text-align: start; padding: 13px 15px;
    font-size: 13px; font-weight: 600; color: var(--soft); border-bottom: 1px solid var(--rule);
    white-space: nowrap;
}
table.data td { padding: 13px 15px; border-bottom: 1px solid var(--rule); }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: var(--surface); }

/* ═══ التذييل ═══ */

.site-footer {
    background: #04060a; color: var(--soft); padding: 60px 0 0; margin-top: 70px;
    border-top: 1px solid var(--rule);
}
body.light .site-footer { background: #14161b; color: rgba(255,255,255,.72); }
.site-footer h4 { color: #fff; font-size: 16px; margin-bottom: 15px; }
.site-footer a { color: var(--soft); font-size: 14.5px; }
body.light .site-footer a { color: rgba(255,255,255,.72); }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 34px; }
.footer-grid ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-about p { font-size: 14.5px; margin-top: 12px; max-width: 40ch; }
.socials { display: flex; gap: 9px; margin-top: 16px; }
.socials a {
    width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.06);
    border: 1px solid var(--rule);
    display: grid; place-items: center; font-size: 15px; transition: all .25s;
}
.socials a:hover { background: var(--accent); color: #05070c; text-decoration: none; box-shadow: var(--glow); transform: translateY(-2px); }
.footer-bottom {
    margin-top: 46px; padding: 20px 0; border-top: 1px solid rgba(255,255,255,.1);
    font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
}
.footer-legal { flex-basis: 100%; font-size: 12px; opacity: .65; }

/* زر واتساب عائم */
.wa-float {
    position: fixed; inset-inline-start: 20px; bottom: 20px; z-index: 60;
    width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #05210f;
    display: grid; place-items: center; font-size: 26px;
    box-shadow: 0 8px 26px rgba(37, 211, 102, .45); transition: transform .3s, box-shadow .3s;
}
.wa-float:hover { transform: scale(1.1); text-decoration: none; box-shadow: 0 0 34px rgba(37,211,102,.7); }

/* ═══ البوابة ═══ */

.portal-head {
    background: linear-gradient(135deg, #0a0d14, #16203a); color: #fff; padding: 38px 0;
    border-bottom: 1px solid var(--rule);
}
body.light .portal-head { background: linear-gradient(135deg, var(--accent-dark), var(--accent)); }
.portal-head h1 { color: #fff; font-size: 27px; }
.portal-head p { color: rgba(255,255,255,.85); font-size: 15px; margin-top: 4px; }
.portal-nav { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 20px; }
.portal-nav a {
    padding: 9px 18px; border-radius: 999px; background: rgba(255,255,255,.12);
    color: #fff; font-size: 14.5px; font-weight: 500; transition: all .25s;
}
.portal-nav a:hover, .portal-nav a.on { background: #fff; color: #10141c; text-decoration: none; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 15px; }
.stat { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 19px; }
.stat span { display: block; font-size: 13.5px; color: var(--faint); }
.stat b { display: block; font-size: 25px; font-weight: 700; margin-top: 3px; }
.stat.bad b { color: var(--bad); }
.stat.good b { color: var(--good); }

.empty { text-align: center; padding: 46px 20px; color: var(--faint); }
.empty b { display: block; color: var(--soft); font-size: 17px; margin-bottom: 5px; }

/* ═══ كتل المحتوى ═══ */

.section-alt { background: var(--bg-2); }
body.light .section-alt { background: var(--surface); }

.prose { color: var(--soft); font-size: 16.5px; line-height: 1.95; }
.prose p { margin-bottom: 16px; }
.prose p:last-child { margin-bottom: 0; }
.prose ul, .prose ol { margin: 0 0 16px; padding-inline-start: 24px; }
.prose li { margin-bottom: 6px; }

.feature { display: flex; flex-direction: column; gap: 9px; height: 100%; }
.feature .ico {
    width: 50px; height: 50px; border-radius: 14px; background: var(--accent-pale);
    border: 1px solid var(--rule);
    display: grid; place-items: center; font-size: 23px; margin-bottom: 5px;
}
.feature b { font-size: 17px; }
.feature p { color: var(--soft); font-size: 14.8px; }

.makes { display: flex; flex-wrap: wrap; gap: 11px; justify-content: center; }
.make {
    padding: 12px 26px; border: 1px solid var(--rule); border-radius: 999px;
    background: var(--surface); font-weight: 600; font-size: 15px; color: var(--soft);
    transition: all .25s;
}
.make:hover { border-color: var(--firm); color: var(--ink); }

.cta-band {
    position: relative; overflow: hidden; padding: 64px 0;
    background: radial-gradient(ellipse at 50% 120%, #1b2440 0%, var(--bg) 70%);
    border-block: 1px solid var(--rule);
}
body.light .cta-band { background: linear-gradient(135deg, var(--accent-dark), var(--accent)); color: #fff; }
.cta-band .wrap { position: relative; display: flex; flex-wrap: wrap; gap: 22px; align-items: center; justify-content: space-between; }
.cta-band h2 { font-size: 28px; }
.cta-band p { color: var(--soft); margin-top: 8px; }
body.light .cta-band h2 { color: #fff; }
body.light .cta-band p { color: rgba(255,255,255,.85); }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: 11px; }
body.light .cta-band .btn-ghost { color: #fff; border-color: rgba(255,255,255,.55); }
body.light .cta-band .btn-primary { background: #fff; color: var(--accent); }

/* ═══ الفروع ═══ */

.branch-card { display: flex; flex-direction: column; gap: 14px; height: 100%; }
.branch-card .lines { display: flex; flex-direction: column; gap: 7px; font-size: 14.8px; color: var(--soft); }
.branch-card .lines span { display: flex; gap: 9px; align-items: flex-start; }
.branch-card .lines i { font-style: normal; color: var(--faint); flex-shrink: 0; }

.hours { width: 100%; border-collapse: collapse; font-size: 14.3px; }
.hours td { padding: 8px 0; border-bottom: 1px solid var(--rule); }
.hours tr:last-child td { border-bottom: 0; }
.hours td:last-child { text-align: end; color: var(--soft); }
.hours tr.today td { font-weight: 700; color: var(--accent); }
.hours td .off { color: var(--faint); }

.map-frame { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--rule); }
.map-frame iframe { display: block; width: 100%; height: 340px; border: 0; filter: grayscale(.3) contrast(1.05); }
body.light .map-frame iframe { filter: none; }

/* ═══ سجل الزيارات ═══ */

.timeline { position: relative; padding-inline-start: 26px; }
.timeline::before {
    content: ''; position: absolute; inset-block: 6px; inset-inline-start: 5px;
    width: 2px; background: var(--rule);
}
.timeline-item { position: relative; padding-bottom: 24px; }
.timeline-item::before {
    content: ''; position: absolute; inset-inline-start: -25px; top: 7px;
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--bg); border: 2px solid var(--accent); box-shadow: var(--glow);
}
.timeline-item .when { font-size: 13px; color: var(--faint); }
.timeline-item .what { font-weight: 600; margin: 2px 0 6px; }
.timeline-item .detail { font-size: 14.5px; color: var(--soft); }

/* ═══ الباقات ═══ */

.package-card { display: flex; flex-direction: column; gap: 4px; }
.package-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.package-head h3 { margin-bottom: 6px; }
.package-items { margin: 12px 0 4px; padding-inline-start: 20px; color: var(--soft); font-size: 14.5px; flex: 1; }
.package-items li { margin-bottom: 3px; }
.package-card .price {
    margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--rule);
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.package-card .price b { font-size: 21px; color: var(--ink); margin-inline-start: 6px; }

/* ═══ قائمة الموبايل ═══ */

.mobile-nav {
    position: fixed; inset: 0; z-index: 99;
    background: rgba(5, 6, 10, .97); backdrop-filter: blur(16px);
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px;
    opacity: 0; pointer-events: none; transition: opacity .35s ease;
}
body.light .mobile-nav { background: rgba(255,255,255,.98); }
.mobile-nav.open { opacity: 1; pointer-events: auto; }
.mobile-nav a {
    font-size: 21px; font-weight: 600; color: var(--ink); padding: 10px 20px;
    letter-spacing: .5px;
}
.mobile-nav a:hover { text-decoration: none; color: var(--accent); }
.mobile-nav .close {
    position: absolute; top: 22px; inset-inline-end: 22px; background: none;
    border: 1px solid var(--rule); border-radius: 50%; width: 44px; height: 44px;
    color: var(--ink); font-size: 20px; cursor: pointer;
}

/* ═══ الاستجابة ═══ */

@media (max-width: 960px) {
    .showcase { flex-direction: column; padding: 60px 0; gap: 28px; }
    .showcase .video-box { width: 100%; }
    .showcase .text { text-align: center; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .hero-stage { min-height: auto; padding-bottom: 20px; }
}

@media (max-width: 760px) {
    .menu-toggle { display: block; }
    .nav { display: none; }
    .header-cta .btn-ghost { display: none; }
    /* الاسم يتقلص بدل أن يدفع الأزرار خارج الشاشة، والشعار النصي الطويل يختفي */
    .site-header .wrap { gap: 10px; min-height: 64px; }
    .brand { flex-shrink: 1; min-width: 0; }
    .brand > span:last-child { min-width: 0; }
    .brand .name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 16.5px; }
    .brand .tag { display: none; }
    .brand img, .brand .mark { height: 38px; }
    .brand .mark { width: 38px; font-size: 18px; }
    .header-cta { margin-inline-start: auto; gap: 6px; }
    .topbar .items { gap: 4px 14px; }
    .banner-card { grid-template-columns: 1fr; text-align: center; }
    .banner-card img { width: 100%; height: 160px; }
    .section { padding: 54px 0; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .form-card { padding: 22px; }
    .cta-band .wrap { flex-direction: column; text-align: center; }
    .timeline { padding-inline-start: 22px; }
    .hero-stats { grid-template-columns: 1fr 1fr; gap: 18px 0; }
    .hero-stats div:nth-child(odd) { border-inline-start: 0; }
    .hero-stage { min-height: 88vh; }
    .car-wrapper { width: 116vw; }
    .hero-copy { padding-top: 60px; padding-bottom: min(30vh, 250px); }
    .hero .wrap { padding-top: 34px; padding-bottom: 34px; }
}

@media (max-width: 420px) {
    .sound-toggle { display: none; }
    .header-cta .btn-primary { padding: 9px 14px; font-size: 13.5px; }
    .brand .name { font-size: 15.5px; }
}

@media print {
    .site-header, .topbar, .site-footer, .wa-float, .btn, .mobile-nav { display: none !important; }
    body { background: #fff; color: #000; }
}

/* خانة الموافقة على التسويق: اختيار صريح، لا خانة مؤشرة مسبقًا */
.consent label {
    display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
    font-weight: 500; font-size: 15px;
}
.consent input[type=checkbox] {
    width: 22px; height: 22px; margin-top: 2px; flex-shrink: 0;
    accent-color: var(--accent); cursor: pointer;
}
.consent .help { margin-top: 6px; }

/* توقيع الجهة المطوّرة: حاضر بلا أن يزاحم حقوق المركز */
.credit { color: var(--faint); font-size: 13px; }
.credit a { color: var(--soft); font-weight: 600; }
.credit a:hover { color: var(--accent); text-decoration: none; }
body.light .credit a:hover { color: var(--accent); }

/* ═══ متجر قطع الغيار ═══ */

.cart-link {
    position: relative; display: grid; place-items: center;
    width: 40px; height: 40px; border-radius: 50%;
    border: 1px solid var(--rule); color: var(--ink); font-size: 17px;
    transition: border-color .25s, box-shadow .25s;
}
.cart-link:hover { text-decoration: none; border-color: var(--accent); box-shadow: var(--glow); }
.cart-link .count {
    position: absolute; top: -5px; inset-inline-end: -5px;
    min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
    background: var(--accent); color: #05070c; font-size: 11.5px; font-weight: 700;
    display: grid; place-items: center; line-height: 1;
}
body.light .cart-link .count { color: #fff; }

/* شريط «اختر سيارتك» */
.fit-bar {
    display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px;
    background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
    padding: 18px 20px; margin-bottom: 26px;
}
.fit-bar .title { flex: 1 0 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.fit-bar .title b { font-size: 16px; }
.fit-bar .field { margin: 0; flex: 1 1 170px; }
.fit-bar .field > label { font-size: 13px; color: var(--faint); font-weight: 500; }
.fit-bar .btn { flex: 0 0 auto; }
.fit-bar.fit-vin { margin-top: -14px; padding-top: 14px; }
.fit-current {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    background: var(--accent-pale); border: 1px solid var(--rule); border-radius: var(--radius-sm);
    padding: 10px 16px; font-size: 14.5px;
}
.fit-current b { color: var(--accent); }
.fit-current a { font-size: 13px; color: var(--faint); }

.shop-layout { display: grid; grid-template-columns: 250px 1fr; gap: 26px; align-items: start; }
.shop-filters {
    position: sticky; top: 90px;
    background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px;
}
.shop-filters h4 { font-size: 13px; color: var(--faint); font-weight: 600; margin: 16px 0 8px; letter-spacing: .4px; }
.shop-filters h4:first-child { margin-top: 0; }
.shop-filters a {
    display: flex; justify-content: space-between; padding: 7px 10px; border-radius: 8px;
    color: var(--soft); font-size: 14.5px;
}
.shop-filters a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.shop-filters a.on { background: var(--accent-pale); color: var(--accent); font-weight: 600; }
.shop-toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 18px; }
.shop-toolbar form { display: flex; gap: 8px; flex: 1 1 260px; }
.shop-toolbar input, .shop-toolbar select { padding: 10px 13px; font-size: 14.5px; }
.shop-toolbar select { width: auto; padding-inline-end: 34px; }
.shop-toolbar .found { color: var(--faint); font-size: 14px; }

.product-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }
.product-card {
    display: flex; flex-direction: column; overflow: hidden; height: 100%;
    background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
    transition: border-color .3s, box-shadow .3s, transform .3s;
}
.product-card:hover { border-color: var(--firm); box-shadow: var(--shadow); transform: translateY(-3px); }
.product-card .thumb {
    position: relative; display: block; aspect-ratio: 1; background: #eef0f4; overflow: hidden;
}
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.product-card:hover .thumb img { transform: scale(1.05); }
.product-card .thumb .no-img { display: grid; place-items: center; height: 100%; font-size: 44px; color: #9aa3b2; }
.product-card .flags { position: absolute; top: 10px; inset-inline-start: 10px; display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.product-card .flags .badge { backdrop-filter: blur(6px); background: rgba(5, 6, 10, .72); border-color: transparent; }
.product-card .flags .badge.success { color: #6fe3ad; }
.product-card .flags .badge.warning { color: #ffc96b; }
.product-card .flags .badge.bad { color: #ff9d95; }
.product-card .body { padding: 14px 15px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card .meta { font-size: 12.5px; color: var(--faint); display: flex; gap: 8px; flex-wrap: wrap; }
.product-card h3 { font-size: 15.5px; line-height: 1.55; font-weight: 600; }
.product-card h3 a { color: var(--ink); }
.product-card h3 a:hover { color: var(--accent); text-decoration: none; }
.product-card .foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.product-card .foot form { margin: 0; }
.product-card .btn { padding: 9px 15px; font-size: 13.5px; }

.price-tag b { font-size: 19px; color: var(--ink); }
.price-tag s { color: var(--faint); font-size: 13.5px; margin-inline-start: 6px; }
.price-tag small { color: var(--faint); font-size: 12.5px; }

.stock { font-size: 13px; font-weight: 600; }
.stock.in { color: var(--good); }
.stock.order { color: var(--warn); }

/* صفحة المنتج */
.crumbs { font-size: 13.5px; color: var(--faint); margin-bottom: 18px; display: flex; gap: 7px; flex-wrap: wrap; }
.crumbs a { color: var(--soft); }
.product-view { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 34px; align-items: start; }
.gallery .main {
    aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: #eef0f4;
    border: 1px solid var(--rule);
}
.gallery .main img { width: 100%; height: 100%; object-fit: contain; }
.gallery .main .no-img { display: grid; place-items: center; height: 100%; font-size: 70px; color: #9aa3b2; }
.gallery .thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.gallery .thumbs button {
    flex: 0 0 76px; height: 76px; padding: 0; border-radius: var(--radius-sm); overflow: hidden;
    border: 2px solid transparent; background: #eef0f4; cursor: pointer; opacity: .7; transition: all .2s;
}
.gallery .thumbs button.on, .gallery .thumbs button:hover { border-color: var(--accent); opacity: 1; }
.gallery .thumbs img { width: 100%; height: 100%; object-fit: cover; }

.product-info h1 { font-size: 27px; line-height: 1.45; margin: 8px 0 6px; }
.product-info .sub { color: var(--faint); font-size: 14px; }
.product-info .price-tag { display: block; margin: 18px 0 6px; }
.product-info .price-tag b { font-size: 30px; }
.product-info .badges { display: flex; gap: 7px; flex-wrap: wrap; }
.specs { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 18px 0; }
.specs th, .specs td { padding: 10px 0; border-bottom: 1px solid var(--rule); text-align: start; vertical-align: top; }
.specs th { color: var(--faint); font-weight: 500; width: 38%; }
.buy-box { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; margin-top: 8px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--rule); border-radius: 999px; overflow: hidden; background: var(--surface); }
.qty button { background: none; border: 0; color: var(--ink); width: 40px; height: 46px; font-size: 18px; cursor: pointer; }
.qty button:hover { background: var(--surface-2); }
.qty input[type=number] {
    width: 50px; border: 0; background: transparent; text-align: center; padding: 0; border-radius: 0;
    -moz-appearance: textfield; appearance: textfield;
}
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.qty input:focus { box-shadow: none; background: transparent; }

.fit-check { border-radius: var(--radius-sm); padding: 13px 16px; font-size: 14.5px; margin: 16px 0; border: 1px solid; }
.fit-check.yes { background: rgba(47, 190, 126, .1); border-color: rgba(47, 190, 126, .35); color: #8ce0b8; }
.fit-check.no { background: rgba(224, 168, 60, .1); border-color: rgba(224, 168, 60, .35); color: #f2cd85; }
.fit-check.ask { background: var(--surface); border-color: var(--rule); color: var(--soft); }
body.light .fit-check.yes { background: #edf8f2; color: #14603e; }
body.light .fit-check.no { background: #fdf8ec; color: #7a5506; }

.compat { display: flex; flex-direction: column; gap: 14px; }
.compat .make-name { font-weight: 700; margin-bottom: 6px; }
.compat .series { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 14.5px; padding: 6px 0; border-bottom: 1px dashed var(--rule); }
.compat .series b { min-width: 92px; color: var(--soft); font-weight: 600; }
.compat .gen { font-size: 12.5px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--rule); background: var(--surface); }
.compat .gen.mine { border-color: var(--accent); color: var(--accent); background: var(--accent-pale); font-weight: 700; }

/* السلة وإتمام الطلب */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { font-size: 13px; color: var(--faint); font-weight: 500; text-align: start; padding: 0 8px 10px; border-bottom: 1px solid var(--rule); }
.cart-table td { padding: 14px 8px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.cart-item { display: flex; gap: 12px; align-items: center; }
.cart-item img, .cart-item .no-img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: #eef0f4; flex-shrink: 0; display: grid; place-items: center; color: #9aa3b2; }
.cart-item a { color: var(--ink); font-weight: 600; }
.cart-item small { display: block; color: var(--faint); font-size: 12.5px; }
.cart-table .qty button { height: 38px; width: 34px; }
.cart-table .remove { background: none; border: 0; color: var(--faint); cursor: pointer; font: inherit; font-size: 13px; }
.cart-table .remove:hover { color: var(--bad); }
.summary { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px; }
.summary .row-line { display: flex; justify-content: space-between; padding: 7px 0; font-size: 15px; color: var(--soft); }
.summary .row-line.total { border-top: 1px solid var(--rule); margin-top: 6px; padding-top: 12px; color: var(--ink); font-weight: 700; font-size: 18px; }
.cart-grid, .checkout-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice > div { position: relative; }
.choice label {
    display: flex; flex-direction: column; gap: 3px; cursor: pointer; padding: 14px 16px; height: 100%;
    border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--surface); transition: all .2s;
}
.choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.choice label b { font-size: 15px; }
.choice label small { color: var(--faint); font-size: 12.5px; }
.choice input:checked + label { border-color: var(--accent); background: var(--accent-pale); box-shadow: var(--glow); }
.choice input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice input:disabled + label { opacity: .4; cursor: not-allowed; }
.mini-lines { font-size: 14px; color: var(--soft); }
.mini-lines div { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; }

.order-steps { display: flex; gap: 6px; margin: 18px 0 6px; }
.order-steps span { flex: 1; height: 6px; border-radius: 999px; background: var(--surface-2); }
.order-steps span.on { background: var(--accent); box-shadow: var(--glow); }

@media (max-width: 960px) {
    .shop-layout, .product-view, .checkout-grid, .cart-grid { grid-template-columns: minmax(0, 1fr); }
    .shop-filters { position: static; }
}
@media (max-width: 760px) {
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .product-card .body { padding: 11px 11px 13px; }
    .product-card h3 { font-size: 14px; }
    .product-card .foot { flex-direction: column; align-items: stretch; }
    .product-card .foot .btn { width: 100%; }
    .price-tag b { font-size: 17px; }
    .shop-filters { padding: 14px; }
    .shop-filters .group { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
    .shop-filters .group a { flex: 0 0 auto; border: 1px solid var(--rule); border-radius: 999px; padding: 6px 13px; white-space: nowrap; }
    .cart-table thead { display: none; }
    .cart-table tr { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
    .cart-table td { border: 0; padding: 0; }
    .cart-table td:first-child { grid-column: 1 / -1; }
    .choice { grid-template-columns: 1fr; }
    .product-info h1 { font-size: 22px; }
}

/* القائمة صارت ثمانية روابط بإضافة المتجر: لا تلتف الكلمة على سطرين،
   وتضيق المسافات ثم تتحول لقائمة الموبايل قبل أن تزدحم */
.nav a { white-space: nowrap; }
@media (max-width: 1240px) {
    .nav a { padding: 9px 9px; font-size: 14px; }
    .header-cta .btn-ghost { display: none; }
}
@media (max-width: 1060px) {
    .menu-toggle { display: block; }
    .nav { display: none; }
    .header-cta { margin-inline-start: auto; }
}
/* عناصر الشبكة لا تتمدد بمحتواها الأفقي (شرائط الفلاتر القابلة للتمرير) */
.shop-layout > *, .product-view > *, .checkout-grid > *, .cart-grid > * { min-width: 0; }

/* العنوان الرئيسي لكل صفحة h1 لمحركات البحث، بنفس مظهر عناوين الأقسام */
.section-head h1 { font-size: clamp(24px, 3.1vw, 34px); letter-spacing: -.6px; }

/* روابط الأجيال في دليل السيارات وصفحة المنتج */
a.gen { color: var(--ink); transition: border-color .2s, color .2s, box-shadow .2s; }
a.gen:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); box-shadow: var(--glow); }

/* شارات صورة المنتج تبقى داكنة فوق الصورة في الصفحات الفاتحة أيضًا (المقالات) */
body.light .product-card .flags .badge { background: rgba(5, 6, 10, .72); }
