/* Trend Car — luxury showroom (RTL/LTR, light/dark, no frameworks) */

:root {
    --bg: #060608;
    --bg-elevated: #0e0e12;
    --surface: #14141a;
    --text: #f4f4f6;
    --muted: #9a9aa8;
    --line: rgba(255, 255, 255, 0.08);
    --accent: #00a8ff;
    --accent-dim: rgba(0, 168, 255, 0.15);
    --gold: #c9a227;
    --chrome: linear-gradient(135deg, #e8e8ee 0%, #8a8a98 45%, #d8d8e0 100%);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
    --radius: 14px;
    --font-ar: "Tajawal", "Cairo", system-ui, sans-serif;
    --font-en: "Orbitron", "Cairo", system-ui, sans-serif;
    --transition: 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] {
    --bg: #f4f4f6;
    --bg-elevated: #ffffff;
    --surface: #ffffff;
    --text: #0a0a0c;
    --muted: #5c5c68;
    --line: rgba(0, 0, 0, 0.08);
    --accent-dim: rgba(0, 168, 255, 0.12);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-ar);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0));
    transition: background var(--transition), color var(--transition);
}

body.lang-en {
    font-family: "Cairo", system-ui, sans-serif;
}

body.lang-en .logo-text,
body.lang-en .hero-title,
body.lang-en .page-head h1,
body.lang-en .stat-value,
body.lang-en .admin-topbar-brand {
    font-family: var(--font-en);
    letter-spacing: 0.04em;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ——— Header ——— */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(6, 6, 8, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    transition: background var(--transition);
}

[data-theme="light"] .site-header {
    background: rgba(255, 255, 255, 0.9);
}

.header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.5rem 0.75rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.65rem 1rem;
    min-height: 56px;
}

/* الثيم + اللغة بجانب بعض؛ الشعار في المنتصف (ديسكتوب) */
.header-leading {
    grid-column: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
}

.header-lang.lang-pill {
    white-space: nowrap;
    padding: 0.3rem 0.65rem;
    font-size: 0.78rem;
}

.header-logo {
    grid-column: 2;
    justify-self: center;
    min-width: 0;
    text-align: center;
    align-items: center;
}

.header-logo.logo {
    align-items: center;
}

.header-trailing {
    grid-column: 3;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    justify-self: end;
}

@media (max-width: 900px) {
    .header-inner {
        grid-template-columns: auto minmax(0, 1fr);
        min-height: 52px;
        padding-top: 0.55rem;
        padding-bottom: 0.55rem;
    }

    /* موبايل: أدوات (ثيم + لغة) في جهة، اسم الموقع في الجهة المقابلة */
    .header-trailing {
        display: none;
    }

    .header-logo {
        grid-column: 2;
        justify-self: end;
        text-align: end;
    }

    .header-logo.logo {
        align-items: flex-end;
    }
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    color: inherit;
    text-decoration: none;
}

.logo:hover {
    text-decoration: none;
}

.logo img {
    max-height: 40px;
    width: auto;
}

.logo-text {
    font-family: var(--font-en);
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: var(--chrome);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-sub {
    font-size: 0.7rem;
    color: var(--muted);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.lang-pill {
    border: 1px solid var(--line);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.lang-pill:hover {
    text-decoration: none;
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-dim);
}

.lang-pill.small {
    padding: 0.25rem 0.55rem;
    font-size: 0.75rem;
}

.nav-desktop {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 1.25rem;
    padding: 0.35rem 1rem 0.75rem;
    border-top: 1px solid var(--line);
    max-width: 1200px;
    margin: 0 auto;
}

.nav-desktop a {
    color: var(--muted);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
}

.nav-desktop a:hover {
    color: var(--accent);
}

.desktop-only {
    display: none;
}

@media (min-width: 901px) {
    .desktop-only {
        display: inline-flex;
    }
}

@media (max-width: 900px) {
    .nav-desktop {
        display: none;
    }
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--surface);
    cursor: pointer;
    position: relative;
    transition: box-shadow var(--transition), border-color var(--transition);
}

.icon-btn:hover {
    border-color: var(--accent);
    box-shadow: 0 0 24px var(--accent-dim);
}

.theme-toggle::after {
    content: "";
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff 0%, #889 45%, #222 100%);
}

[data-theme="light"] .theme-toggle::after {
    background: radial-gradient(circle at 30% 30%, #ffe9a8 0%, #f4c430 40%, #c9a227 100%);
}

.cart-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--line);
    color: var(--text);
}

.cart-icon {
    width: 20px;
    height: 18px;
    border: 2px solid currentColor;
    border-radius: 4px 4px 6px 6px;
    position: relative;
}

.cart-icon::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 3px;
    right: 3px;
    height: 4px;
    border: 2px solid currentColor;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
}

.cart-badge,
.bn-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    font-size: 0.65rem;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
    background: var(--accent);
    color: #fff;
    border-radius: 999px;
}

[dir="rtl"] .cart-badge,
[dir="rtl"] .bn-badge {
    right: auto;
    left: -4px;
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1rem 2rem;
}

/* ——— Hero ——— */
.hero {
    position: relative;
    margin: -1rem -1rem 2rem;
    max-width: none;
    width: calc(100% + 2rem);
    min-height: min(72vh, 620px);
    overflow: hidden;
    border-radius: 0 0 var(--radius) var(--radius);
}

.parallax-hero {
    transform: translateY(var(--parallax-y, 0));
    will-change: transform;
}

.hero-slider {
    position: relative;
    min-height: min(72vh, 620px);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.06);
    transition: opacity 1s ease, transform 8s ease-out;
    pointer-events: none;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    z-index: 1;
}

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.05);
}

.hero-fallback {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 20%, var(--accent-dim), transparent 50%), var(--bg-elevated);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.75) 100%);
    pointer-events: none;
}

.hero-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2rem 1.5rem 2.5rem;
    z-index: 2;
    text-align: center;
}

.hero-title {
    font-size: clamp(1.75rem, 5vw, 3rem);
    margin: 0 0 0.5rem;
    font-weight: 800;
    text-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

.hero-sub {
    margin: 0 0 1.25rem;
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.hero-dots {
    position: absolute;
    bottom: 1rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    z-index: 3;
}

.hero-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    padding: 0;
    transition: transform 0.3s, background 0.3s;
}

.hero-dot.is-active {
    background: var(--accent);
    transform: scale(1.25);
}

/* ——— Buttons ——— */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.65rem 1.35rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s, box-shadow var(--transition), background 0.2s;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #0077cc);
    color: #fff;
    box-shadow: 0 12px 40px rgba(0, 168, 255, 0.35);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--line);
}

.btn-whatsapp {
    background: #25d366;
    color: #fff;
}

.btn-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
}

.pulse-once {
    animation: pulseOnce 0.5s ease;
}

@keyframes pulseOnce {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 0 0 6px var(--accent-dim);
    }
    100% {
        transform: scale(1);
    }
}

/* ——— Sections & cards ——— */
.section {
    margin-bottom: 3rem;
}

.section-alt {
    padding: 2rem 0;
    border-block: 1px solid var(--line);
}

.section-offers {
    background: linear-gradient(120deg, var(--accent-dim), transparent 40%);
    margin-inline: -1rem;
    padding-inline: 1rem;
    padding-block: 2rem;
    border-radius: var(--radius);
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.section-head h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
}

.link-more {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
}

.car-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.car-card {
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    position: relative;
}

.car-card::before {
    content: "";
    position: absolute;
    inset: -40% -60% auto;
    height: 80%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.06), transparent);
    transform: translateX(-100%);
    transition: transform 1.2s ease;
    pointer-events: none;
    z-index: 2;
}

.car-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 168, 255, 0.35);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.45), 0 0 40px var(--accent-dim);
}

.car-card:hover::before {
    transform: translateX(100%);
}

.car-card-link {
    color: inherit;
    text-decoration: none;
    display: block;
}

.car-card-link:hover {
    text-decoration: none;
}

.car-card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0a0a0c;
}

.car-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.car-card:hover .car-card-media img {
    transform: scale(1.06);
}

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

[dir="rtl"] .badge {
    left: auto;
    right: 10px;
}

.badge-offer {
    background: linear-gradient(135deg, var(--gold), #8a6a0a);
    color: #111;
}

.badge-new {
    background: var(--accent);
    color: #fff;
}

.car-card-body {
    padding: 1rem 1.1rem 1.2rem;
}

.car-card-title {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.car-card-brand {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.car-card-price {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.price-old {
    font-size: 0.8rem;
    color: var(--muted);
    text-decoration: line-through;
}

.price-current {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent);
}

/* Why section */
.why-section {
    text-align: center;
}

.why-heading {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    text-align: start;
}

.why-card {
    padding: 1.25rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.why-card.is-visible,
[data-animate].is-visible {
    opacity: 1;
    transform: translateY(0);
}

.shine-card {
    position: relative;
    overflow: hidden;
}

.shine-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.04) 50%, transparent 60%);
    transform: translateX(-100%);
    animation: shine 6s ease-in-out infinite;
}

@keyframes shine {
    0%,
    40% {
        transform: translateX(-100%);
    }
    60%,
    100% {
        transform: translateX(100%);
    }
}

.why-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
}

.why-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

/* Page blocks */
.page-head {
    margin-bottom: 1.5rem;
}

.page-head h1 {
    margin: 0 0 0.35rem;
    font-size: 1.75rem;
}

.page-lead {
    margin: 0;
    color: var(--muted);
}

.cars-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 900px) {
    .cars-layout {
        grid-template-columns: 1fr;
    }
}

.filters-panel {
    position: sticky;
    top: 72px;
    padding: 1rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
}

.filters-form label {
    display: block;
    margin-top: 0.65rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
}

.filters-form input,
.filters-form select {
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    color: var(--text);
    font: inherit;
}

.filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-weight: 600;
}

.results-count {
    color: var(--muted);
    font-size: 0.9rem;
}

.empty-msg {
    color: var(--muted);
    padding: 2rem 0;
}

/* Car detail */
.car-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 900px) {
    .car-detail {
        grid-template-columns: 1fr;
    }
}

.gallery-main {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: #0a0a0c;
    aspect-ratio: 16 / 10;
}

.gallery-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.gallery-img.is-active {
    opacity: 1;
}

.gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.gallery-thumbs .thumb {
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: none;
    width: 72px;
    height: 48px;
}

.gallery-thumbs .thumb.is-active {
    border-color: var(--accent);
}

.gallery-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.car-info-block h1 {
    margin: 0.25rem 0 0.5rem;
    font-size: 1.5rem;
}

.car-cat {
    margin: 0;
    color: var(--accent);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.car-brand-line,
.car-mileage {
    color: var(--muted);
    margin: 0.25rem 0;
}

.car-price-block {
    margin: 1rem 0;
}

.price-big {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--accent);
}

.car-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
}

.car-desc.prose {
    margin-bottom: 1.5rem;
}

.inquiry-box {
    padding: 1.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.35rem 0.75rem;
    max-width: 520px;
}

.form-grid label {
    font-weight: 600;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.form-grid input,
.form-grid textarea {
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    color: var(--text);
    font: inherit;
}

.max-w-form {
    max-width: 480px;
}

.form-checkout {
    margin-top: 1rem;
}

/* Cart */
.cart-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--line);
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.cart-table th,
.cart-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--line);
    text-align: start;
}

.cart-cell {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.cart-cell img {
    border-radius: 6px;
}

.qty-input {
    width: 64px;
    padding: 0.35rem;
    border-radius: 6px;
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    color: var(--text);
}

.cart-summary {
    margin-top: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

/* Orders list */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-card {
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
}

.order-card header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--muted);
}

/* Alerts */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-weight: 600;
}

.alert-success {
    background: rgba(37, 211, 102, 0.15);
    border: 1px solid rgba(37, 211, 102, 0.4);
    color: #6ee7a8;
}

.alert-error {
    background: rgba(255, 80, 80, 0.12);
    border: 1px solid rgba(255, 100, 100, 0.35);
    color: #ff9a9a;
}

[data-theme="light"] .alert-success {
    color: #0d7a3c;
}

[data-theme="light"] .alert-error {
    color: #b00020;
}

/* Footer */
.site-footer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem 6rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.9rem;
}

.footer-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.footer-contact a {
    color: var(--text);
}

.footer-copy {
    margin: 0;
    font-size: 0.8rem;
}

/* Bottom navigation (mobile) */
.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    padding: 0.35rem 0.25rem calc(0.35rem + env(safe-area-inset-bottom, 0));
    background: rgba(10, 10, 14, 0.92);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .bottom-nav {
    background: rgba(255, 255, 255, 0.95);
}

@media (min-width: 901px) {
    .bottom-nav {
        display: none;
    }

    body {
        padding-bottom: 0;
    }

    .site-footer {
        padding-bottom: 2rem;
    }
}

.bn-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--muted);
    text-decoration: none;
    position: relative;
    padding: 0.25rem;
    border-radius: 10px;
    transition: color 0.2s, background 0.2s;
}

.bn-item:hover {
    text-decoration: none;
    color: var(--accent);
}

.bn-item.active {
    color: var(--accent);
    background: var(--accent-dim);
}

.bn-icon {
    width: 22px;
    height: 22px;
    border: 2px solid currentColor;
    border-radius: 4px;
    position: relative;
}

.bn-home::before,
.bn-home::after {
    content: "";
    position: absolute;
    background: currentColor;
}

.bn-home::before {
    width: 10px;
    height: 10px;
    left: 4px;
    bottom: 3px;
    clip-path: polygon(50% 0, 100% 40%, 100% 100%, 0 100%, 0 40%);
}

.bn-car::before {
    content: "";
    position: absolute;
    inset: 4px 2px 5px;
    border-radius: 4px 4px 2px 2px;
    border: 2px solid currentColor;
    border-top-width: 3px;
}

.bn-cart {
    border-radius: 4px 4px 6px 6px;
}

.bn-cart::before {
    content: "";
    position: absolute;
    top: -5px;
    left: 3px;
    right: 3px;
    height: 3px;
    border: 2px solid currentColor;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
}

.bn-orders {
    border: none;
    border-bottom: 3px solid currentColor;
    border-radius: 2px;
}

.bn-orders::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    height: 6px;
    border: 2px solid currentColor;
    border-radius: 2px;
}

.bn-user {
    border-radius: 50%;
    border-width: 2px;
}

.bn-user::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: currentColor;
    border-radius: 50%;
}

.bn-user::after {
    content: "";
    position: absolute;
    bottom: 2px;
    left: 2px;
    right: 2px;
    height: 6px;
    border: 2px solid currentColor;
    border-radius: 6px 6px 0 0;
    border-bottom: none;
}

/* ——— Admin ——— */
.admin-login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 30% 20%, var(--accent-dim), transparent 50%), var(--bg);
    padding: 1rem;
}

.admin-login-card {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.admin-login-brand {
    font-family: var(--font-en);
    text-align: center;
    margin: 0;
    letter-spacing: 0.15em;
}

.admin-login-sub {
    text-align: center;
    color: var(--muted);
    margin: 0.25rem 0 1.25rem;
}

.admin-login-back {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.admin-app {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0));
    min-height: 100vh;
    background: var(--bg);
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1rem;
    background: rgba(8, 8, 12, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

[data-theme="light"] .admin-topbar {
    background: rgba(255, 255, 255, 0.92);
}

.admin-topbar-brand {
    font-family: var(--font-en);
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--text);
    text-decoration: none;
}

.admin-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-main {
    max-width: 960px;
    margin: 0 auto;
    padding: 1rem 1rem 1.5rem;
}

.admin-section h1 {
    margin-top: 0;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0 2rem;
}

.stat-card {
    padding: 1.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.35rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    font-family: var(--font-en);
}

.admin-list {
    padding-left: 1.25rem;
}

[dir="rtl"] .admin-list {
    padding-left: 0;
    padding-right: 1.25rem;
}

.admin-help-box {
    margin: 1rem 0 1.5rem;
    padding: 1rem 1.15rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--accent-dim);
    font-size: 0.92rem;
    line-height: 1.55;
}

.admin-help-box p {
    margin: 0 0 0.65rem;
}

.admin-help-box a {
    font-weight: 700;
}

.admin-help-list {
    margin: 0.5rem 0 0.75rem;
    padding-inline-start: 1.25rem;
    color: var(--muted);
}

.admin-help-list li {
    margin-bottom: 0.35rem;
}

.admin-help-links {
    margin: 0;
    font-size: 0.88rem;
}

.admin-highlight-card {
    margin: 0 0 1.5rem;
    padding: 1.15rem 1.25rem;
    border-radius: var(--radius);
    border: 1px solid rgba(0, 168, 255, 0.35);
    background: linear-gradient(135deg, var(--accent-dim), transparent 65%);
}

.admin-highlight-card h2 {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
}

.admin-highlight-card p {
    margin: 0 0 0.65rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.admin-highlight-meta {
    margin: 0 0 1rem !important;
    color: var(--text) !important;
}

.field-hint,
.table-hint {
    margin: -0.25rem 0 0.65rem;
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.4;
}

.form-section-title {
    grid-column: 1 / -1;
    margin: 1rem 0 0.35rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--line);
    font-size: 0.95rem;
    font-weight: 700;
}

.form-actions-row {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
}

.admin-form-card {
    margin: 1.5rem 0;
    padding: 1.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
}

.admin-form {
    max-width: none;
}

.admin-form h2,
.admin-form h3 {
    grid-column: 1 / -1;
    margin: 0.75rem 0 0.25rem;
}

.admin-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--line);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.admin-table th,
.admin-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--line);
    text-align: start;
}

.admin-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.inline-form {
    display: inline;
}

.admin-thumb-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.admin-thumb {
    width: 100px;
    text-align: center;
}

.admin-thumb img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 0.35rem;
}

.admin-orders {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-order-card {
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
}

.inline-status-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
}

.inline-status-form select {
    padding: 0.35rem 0.5rem;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    color: var(--text);
    font: inherit;
}

.admin-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    justify-content: space-around;
    padding: 0.35rem 0.15rem calc(0.35rem + env(safe-area-inset-bottom, 0));
    background: rgba(8, 8, 12, 0.95);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
}

[data-theme="light"] .admin-bottom-nav {
    background: rgba(255, 255, 255, 0.96);
}

@media (min-width: 900px) {
    .admin-bottom-nav {
        justify-content: center;
        gap: 2rem;
        padding-inline: 2rem;
    }
}

.abn-item {
    flex: 1;
    max-width: 96px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--muted);
    text-decoration: none;
    padding: 0.35rem 0.15rem;
    border-radius: 12px;
    transition: background 0.2s, color 0.2s;
}

.abn-item:hover {
    text-decoration: none;
    color: var(--accent);
}

.abn-item.active {
    color: var(--accent);
    background: var(--accent-dim);
}

.abn-icon {
    width: 24px;
    height: 24px;
    border: 2px solid currentColor;
    border-radius: 6px;
    opacity: 0.9;
}

.abn-dash {
    border-radius: 4px;
    position: relative;
}

.abn-dash::before {
    content: "";
    position: absolute;
    inset: 4px;
    border-top: 2px solid currentColor;
}

.abn-car {
    border-radius: 4px;
}

.abn-orders {
    border: none;
    border-bottom: 3px solid currentColor;
}

.abn-users {
    border-radius: 50%;
}

.abn-settings {
    border-radius: 50%;
    position: relative;
}

.abn-settings::before {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    border: 2px dashed currentColor;
}

.admin-slide-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.admin-slide-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-slide-row img {
    width: 120px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
}

.admin-logo-preview {
    max-height: 48px;
    width: auto;
    margin-top: 0.35rem;
}

.cms-key {
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.mt-2 {
    margin-top: 1rem;
}

.hint {
    font-size: 0.85rem;
    color: var(--muted);
}

.auth-form {
    margin-top: 1rem;
}

.auth-switch {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--muted);
}
