/* ═══════════════════════════════════════════
   sari3 — site-wide marketplace chrome
   (iqcars density, sari3 brand)
   ═══════════════════════════════════════════ */

:root {
    --m-radius: 10px;
    --m-radius-sm: 8px;
    --m-border: #EEEEEE;
    --m-bg: #F4F4F4;
    --m-ink: #1A2130;
    --m-muted: #616161;
}

/* Global surfaces */
body {
    background: var(--m-bg);
}

.section {
    margin-bottom: 1.75rem;
}

.section-head {
    margin-bottom: 0.85rem;
}

.section-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--m-ink);
}

.section-title span {
    color: var(--primary);
}

.section-link {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
}

/* Buttons — flatter marketplace */
.btn {
    border-radius: var(--m-radius-sm);
}

.btn-primary {
    background: var(--primary);
    box-shadow: none;
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: none;
}

.btn-outline {
    border-radius: var(--m-radius-sm);
    border: 1px solid var(--m-border);
}

/* Header — sticky white bar */
.site-header {
    background: #fff !important;
    border-bottom: 1px solid var(--m-border) !important;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
    backdrop-filter: none !important;
}

.lang-switcher {
    border-radius: 999px !important;
    background: #f3f4f6 !important;
    flex: 0 0 auto !important;
    width: max-content !important;
}

.lang-btn.active {
    border-radius: 999px !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08) !important;
}

.header-end {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

.nav-desktop {
    justify-content: center;
}

.nav-desktop a {
    border-radius: 8px;
    font-size: 0.86rem;
    font-weight: 600;
    color: #4a4a4a;
    padding: 0.45rem 0.55rem;
    flex: 0 0 auto;
}

.nav-desktop a:hover,
.nav-desktop a.active {
    background: rgba(227, 30, 36, 0.08);
    color: var(--primary);
}

.nav-sell {
    color: var(--primary) !important;
}

.search-wrap input {
    border-radius: 8px !important;
    background: #f4f4f4 !important;
    border: 1px solid transparent !important;
}

.search-wrap input:focus {
    background: #fff !important;
    border-color: var(--primary) !important;
}

/* ── Footer marketplace — clean light ── */
.site-footer {
    position: relative;
    margin-top: 3.5rem;
    padding: 0;
    background: #fff;
    color: #2a2a2a;
    border-top: 1px solid #ececec;
    overflow: visible;
    isolation: auto;
}

.site-footer::before {
    content: '';
    display: block;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, var(--primary, #E31E24), #ff6b6b 45%, transparent 100%);
    opacity: 1;
    position: static;
    pointer-events: none;
}

.site-footer::after {
    display: none;
}

.footer-accent { display: none; }

.footer-top,
.footer-bottom {
    position: relative;
    z-index: 1;
}

.footer-top {
    padding: 2.75rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.45fr repeat(3, minmax(0, 1fr));
    gap: 2rem 1.5rem;
    margin-bottom: 0;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: 'Syne', 'Noto Kufi Arabic', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: #121212;
    margin-bottom: 0.7rem;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.footer-logo img {
    height: 36px;
    width: auto;
    filter: none;
}

.footer-logo:hover { color: var(--primary, #E31E24); }

.footer-brand p {
    font-size: 0.9rem;
    color: #6b6b6b;
    max-width: 300px;
    line-height: 1.65;
    margin: 0 0 1.1rem;
}

.footer-app {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0;
}

.footer-app a,
.footer-store {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.95rem;
    background: #111;
    border: 1px solid #111;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.footer-store.is-soft {
    background: #fff;
    border-color: #e4e4e4;
    color: #222;
}

.footer-app a:hover,
.footer-store:hover {
    background: var(--primary, #E31E24);
    border-color: var(--primary, #E31E24);
    color: #fff;
    transform: translateY(-1px);
}

.footer-col h4 {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: none;
    margin: 0 0 0.95rem;
    color: #111;
    padding-bottom: 0.5rem;
}

.footer-col h4 .ico {
    color: var(--primary, #E31E24);
    opacity: 0.9;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    bottom: 0;
    width: 22px;
    height: 2px;
    background: var(--primary, #E31E24);
    border-radius: 2px;
}

.footer-col a {
    display: block;
    width: fit-content;
    font-size: 0.88rem;
    color: #555;
    padding: 0.28rem 0;
    text-decoration: none;
    opacity: 1;
    transition: color 0.15s ease;
}

.footer-col a:hover {
    color: var(--primary, #E31E24);
    transform: none;
    opacity: 1;
}

html[dir="ltr"] .footer-col a:hover {
    transform: none;
}

.footer-sell-cta { display: none !important; }

.footer-bottom {
    padding: 1rem 0;
    border-top: 1px solid #efefef;
    font-size: 0.82rem;
    color: #8a8a8a;
    text-align: start;
    background: #fafafa;
    opacity: 1;
}

.footer-bottom .container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    justify-content: space-between;
    align-items: center;
}

.lang-switcher-footer {
    margin-top: 0.85rem;
    background: #f4f4f4 !important;
    border: 1px solid #e8e8e8 !important;
}

.lang-switcher-footer .lang-btn {
    color: #666 !important;
}

.lang-switcher-footer .lang-btn:hover {
    color: #111 !important;
    background: rgba(0, 0, 0, 0.04);
}

.lang-switcher-footer .lang-btn.active {
    background: var(--primary, #E31E24) !important;
    color: #fff !important;
    box-shadow: none !important;
}

/* Mobile bottom tab — marketplace */
.mobile-nav {
    background: #fff;
    border-top: 1px solid var(--m-border);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
}

.mobile-nav a,
.mobile-nav button.mobile-nav-item {
    font-size: 0.68rem;
    font-weight: 700;
    color: #8a8a8a;
}

.mobile-nav a.active,
.mobile-nav button.mobile-nav-item.active {
    color: var(--primary);
}

/* ── Static / content pages ── */
.page-hero,
.page-hero-rich {
    background: #1A2130 !important;
    color: #fff;
    padding: 1.75rem 0 1.85rem !important;
    margin: 0 !important;
    border-radius: 0 !important;
    min-height: 0 !important;
}

.page-hero::before,
.page-hero-rich::before {
    display: none !important;
}

.page-brand {
    font-family: 'Syne', 'Noto Kufi Arabic', sans-serif;
    font-size: 0.85rem;
    font-weight: 800;
    color: #ffb4b6;
    margin-bottom: 0.35rem;
}

.page-hero h1,
.page-hero-rich h1 {
    font-size: clamp(1.35rem, 3vw, 1.85rem) !important;
    font-weight: 800;
    margin-bottom: 0.4rem;
}

.page-lead {
    font-size: 0.95rem !important;
    opacity: 0.85;
    max-width: 52ch;
}

.page-back {
    color: rgba(255, 255, 255, 0.75) !important;
    font-size: 0.82rem;
    margin-bottom: 0.85rem !important;
}

.page-content {
    padding: 1.5rem 0 2.5rem;
}

.content-card,
.stat-box,
.values-list li {
    background: #fff !important;
    border: 1px solid var(--m-border) !important;
    border-radius: var(--m-radius) !important;
    box-shadow: none !important;
}

.content-card {
    padding: 1.25rem 1.35rem !important;
    margin-bottom: 0.85rem !important;
}

.content-card h2 {
    font-size: 1.05rem !important;
    font-weight: 800;
    margin-bottom: 0.55rem;
    color: var(--m-ink);
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.stat-box {
    padding: 1rem !important;
    text-align: center;
}

.stat-box strong {
    display: block;
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-box span {
    font-size: 0.8rem;
    color: var(--m-muted);
}

/* Guide — flatten to marketplace tiles */
.g-page {
    background: transparent;
    padding-bottom: 5.5rem;
}

.g-page-head {
    padding: 1rem 0 0.75rem;
}

.g-page-title {
    font-size: 1.35rem !important;
    font-weight: 800;
}

.g-section-bar h2 {
    font-size: 1.05rem !important;
    font-weight: 800;
}

.g-compare-link,
.g-model-card,
.g-brand-ring,
.g-video-card {
    border-radius: var(--m-radius) !important;
    box-shadow: none !important;
    border: 1px solid var(--m-border) !important;
}

.g-compare-link {
    background: #fff !important;
}

.g-brand-ring {
    background: #fff;
}

.g-brand-ring-visual {
    border-radius: 10px !important;
}

/* Car detail — marketplace */
.gallery-main,
.company-card,
.specs-grid,
.spec-rows,
.features-wrap,
.contact-box,
.detail-panel {
    border-radius: var(--m-radius) !important;
}

.gallery-main {
    border: 1px solid var(--m-border);
}

.company-card {
    box-shadow: none !important;
    border: 1px solid var(--m-border) !important;
}

.contact-bar {
    background: #fff !important;
    border-top: 1px solid var(--m-border) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06) !important;
}

/* Modals / filters */
.modal-panel {
    border-radius: var(--m-radius) !important;
}

.field-input,
.filter-select {
    border-radius: var(--m-radius-sm) !important;
    border-color: var(--m-border) !important;
}

/* EV / VIN / promo soft align */
.ev-hero {
    position: relative;
    min-height: 220px !important;
    margin: 0.75rem clamp(0.75rem, 3vw, 1.5rem) 1rem !important;
    border-radius: 10px !important;
    overflow: hidden;
}

.ev-layout {
    margin-inline: clamp(0.75rem, 3vw, 1.5rem);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #eee;
    background: #fff;
}

.ev-chip {
    border-radius: 8px !important;
    border: 1px solid #eee !important;
}

.ev-chip.active {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}

.ev-station-card,
.ev-app-nudge {
    border-radius: 10px !important;
    border: 1px solid #eee !important;
}

.vin-hero {
    margin: 0.75rem clamp(0.75rem, 3vw, 1.5rem) 1rem !important;
    border-radius: 10px !important;
    min-height: 200px !important;
    overflow: hidden;
}

.vin-card,
.vin-state,
.vin-result {
    border-radius: 10px !important;
    box-shadow: none !important;
    border: 1px solid #eee !important;
}

.app-promo-panel {
    border-radius: var(--m-radius) !important;
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .footer-brand {
        grid-column: 1 / -1;
    }
    .stats-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .footer-top {
        padding: 2rem 0 1.5rem;
    }
    .footer-bottom .container {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 0.35rem;
    }
    .footer-col a:hover,
    html[dir="ltr"] .footer-col a:hover {
        transform: none;
    }
}
