/* ============================================================
   CONCESIONARIO CSS — Premium Automotive Design
   Chile Roleplay Community
   ============================================================ */

/* ─── Variables ─── */
:root {
    --dealer-bg: #060b16;
    --dealer-surface: rgba(11, 19, 36, 0.72);
    --dealer-card: #0d1627;
    --dealer-card-hover: #12203d;
    --dealer-border: rgba(148, 163, 184, 0.12);
    --dealer-border-hover: rgba(56, 189, 248, 0.45);
    --dealer-text: #f8fafc;
    --dealer-muted: #94a3b8;
    --dealer-primary: #38bdf8;
    --dealer-primary-soft: rgba(56, 189, 248, 0.12);
    --dealer-accent: #f59e0b;
    --dealer-success: #10b981;
    --dealer-danger: #ef4444;
    --dealer-glow: 0 0 30px rgba(56, 189, 248, 0.15);
    --dealer-radius: 16px;
    --dealer-radius-lg: 22px;
    --dealer-transition: cubic-bezier(0.22, 0.68, 0, 1);
}


/* ─── Page Base ─── */
body.dealer-page {
    margin: 0;
    min-height: 100vh;
    color: var(--dealer-text);
    background: var(--dealer-bg);
    font-family: var(--font-ui, 'Inter', sans-serif);
    overflow-x: hidden;
    overflow-y: auto;
}

body.dealer-page,
body.dealer-page * {
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body.dealer-page *::selection {
    background: transparent;
    color: inherit;
}


/* ─── Background System ─── */
.dealer-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.dealer-bg-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 5% 10%, rgba(56, 189, 248, 0.10), transparent 50%),
        radial-gradient(ellipse 60% 50% at 90% 15%, rgba(251, 146, 60, 0.08), transparent 40%),
        radial-gradient(ellipse 70% 60% at 65% 80%, rgba(16, 185, 129, 0.06), transparent 45%),
        var(--dealer-bg);
}

.dealer-bg-noise {
    position: absolute;
    inset: 0;
    opacity: 0.06;
    background-image:
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.18) 0 1px, transparent 1px 100%);
    background-size: 28px 28px;
    mix-blend-mode: soft-light;
}


/* ─── Topbar ─── */
.dealer-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background: linear-gradient(180deg, rgba(6, 11, 22, 0.95) 0%, rgba(6, 11, 22, 0.80) 100%);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.dealer-topbar-inner {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 1.5rem;
}

.dealer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--dealer-text);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.04em;
    font-size: 0.85rem;
    flex-shrink: 0;
    padding: 0.3rem 0;
}

.dealer-brand img {
    width: auto;
    height: 34px;
    object-fit: contain;
}

.dealer-brand span {
    font-family: var(--font-brand, 'Inter', sans-serif);
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 800;
}


/* ─── Navigation ─── */
.dealer-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem;
    border-radius: 999px;
    border: 1px solid var(--dealer-border);
    background: rgba(11, 19, 36, 0.65);
}

.dealer-nav-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.48rem 0.85rem;
    border-radius: 999px;
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.82rem;
    font-family: var(--font-ui, 'Inter', sans-serif);
    transition: all 0.2s ease;
}

.dealer-nav-item:hover {
    color: var(--dealer-text);
    background: rgba(56, 189, 248, 0.10);
}

.dealer-nav-item.is-active {
    color: var(--dealer-text);
    background: rgba(56, 189, 248, 0.20);
}

.dealer-nav-item i {
    font-size: 1.05rem;
}

.dealer-nav-item span {
    white-space: nowrap;
}


/* ─── Top Actions / Balance ─── */
.dealer-top-actions {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.dealer-balance-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.42rem 0.85rem;
    border-radius: 999px;
    background: rgba(11, 19, 36, 0.72);
    border: 1px solid var(--dealer-border);
    transition: border-color 0.25s ease;
}

.dealer-balance-pill:hover {
    border-color: var(--dealer-border-hover);
}

.dealer-balance-pill i {
    color: var(--dealer-primary);
    font-size: 1rem;
}

.dealer-balance-pill span {
    display: block;
    font-size: 0.65rem;
    color: var(--dealer-muted);
    letter-spacing: 0.07em;
    text-transform: uppercase;
    font-family: var(--font-brand, 'Inter', sans-serif);
}

.dealer-balance-pill strong {
    color: var(--dealer-text);
    font-family: var(--font-hud, 'Inter', sans-serif);
    font-size: 1rem;
}


/* ─── Main Layout ─── */
.dealer-main {
    width: min(1280px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1.25rem 0 2.5rem;
}


/* ─── Hero Section ─── */
.dealer-hero {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.dealer-hero-copy {
    border-radius: var(--dealer-radius-lg);
    border: 1px solid var(--dealer-border);
    background: linear-gradient(145deg, rgba(13, 22, 39, 0.88), rgba(8, 13, 25, 0.92));
    padding: 1.5rem 1.5rem 1.3rem;
    position: relative;
    overflow: hidden;
    animation: revealUp 0.55s var(--dealer-transition) both;
}

.dealer-hero-copy::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 80% at 0% 0%, rgba(56, 189, 248, 0.08), transparent 65%);
    pointer-events: none;
}

.dealer-hero-copy::after {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.05), transparent 70%);
    pointer-events: none;
    animation: heroGlow 8s ease-in-out infinite alternate;
}

.dealer-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.28);
    background: rgba(56, 189, 248, 0.08);
    color: var(--dealer-primary);
    font-family: var(--font-brand, 'Inter', sans-serif);
    font-size: 0.64rem;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    font-weight: 700;
    position: relative;
}

.dealer-hero-copy h1 {
    margin: 0.85rem 0 0.55rem;
    font-family: var(--font-brand, 'Inter', sans-serif);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: clamp(1.25rem, 2.4vw, 2.1rem);
    line-height: 1.12;
    background: linear-gradient(135deg, #f8fafc 0%, #bfdbfe 50%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.dealer-hero-copy p {
    margin: 0;
    color: #cbd5e1;
    max-width: 58ch;
    line-height: 1.55;
    font-size: 0.9rem;
    position: relative;
}

.dealer-hero-tags {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    position: relative;
}

.dealer-hero-tags span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: #93c5fd;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 999px;
    padding: 0.26rem 0.62rem;
    background: rgba(11, 19, 36, 0.50);
    font-weight: 500;
}

.dealer-hero-tags span i {
    font-size: 0.7rem;
    color: var(--dealer-primary);
}

.dealer-hero-panel {
    padding: 0;
    display: grid;
    gap: 0.7rem;
    align-content: center;
    animation: revealUp 0.55s var(--dealer-transition) 0.1s both;
    min-width: 200px;
}

.dealer-info-card {
    border-radius: 14px;
    border: 1px solid var(--dealer-border);
    background: linear-gradient(155deg, rgba(13, 22, 39, 0.90), rgba(8, 14, 27, 0.90));
    padding: 0.85rem 1rem;
    transition: border-color 0.3s ease;
}

.dealer-info-card:hover {
    border-color: rgba(56, 189, 248, 0.25);
}

.dealer-info-card span {
    display: block;
    color: var(--dealer-muted);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-family: var(--font-brand, 'Inter', sans-serif);
}

.dealer-info-card strong {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.3rem;
    color: var(--dealer-text);
    font-family: var(--font-hud, 'Inter', sans-serif);
    font-size: 1.3rem;
}

.dealer-info-card i {
    color: var(--dealer-success);
    font-size: 0.65rem;
    animation: pulseGlow 2s ease-in-out infinite;
}


/* ─── Catalog Shell ─── */
.catalog-shell {
    border-radius: var(--dealer-radius-lg);
    border: 1px solid var(--dealer-border);
    background: linear-gradient(180deg, rgba(11, 19, 36, 0.65) 0%, rgba(6, 11, 22, 0.72) 100%);
    padding: 1.25rem;
    box-shadow: 0 20px 50px rgba(2, 6, 23, 0.35);
    animation: revealUp 0.55s var(--dealer-transition) 0.2s both;
}

.catalog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.catalog-head-left h2 {
    margin: 0;
    font-family: var(--font-brand, 'Inter', sans-serif);
    font-size: 1.05rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.catalog-head-left p {
    margin: 0.3rem 0 0;
    color: var(--dealer-muted);
    font-size: 0.84rem;
}


/* ─── Search & Sort Toolbar ─── */
.catalog-toolbar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.85rem;
}

.search-box {
    flex: 1;
    position: relative;
    max-width: 380px;
}

.search-box i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dealer-muted);
    font-size: 0.85rem;
    pointer-events: none;
    transition: color 0.2s ease;
}

.search-box input {
    width: 100%;
    height: 40px;
    padding: 0 0.85rem 0 2.2rem;
    border-radius: 12px;
    border: 1px solid var(--dealer-border);
    background: rgba(8, 13, 25, 0.72);
    color: var(--dealer-text);
    font-size: 0.82rem;
    font-family: var(--font-ui, 'Inter', sans-serif);
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.search-box input::placeholder {
    color: rgba(148, 163, 184, 0.55);
}

.search-box input:focus {
    border-color: var(--dealer-primary);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.10);
}

.search-box input:focus + i {
    color: var(--dealer-primary);
}

.sort-group {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.22rem;
    border-radius: 10px;
    border: 1px solid var(--dealer-border);
    background: rgba(8, 13, 25, 0.55);
}

.sort-chip {
    height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0 0.7rem;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--dealer-muted);
    cursor: pointer;
    font-size: 0.7rem;
    font-family: var(--font-brand, 'Inter', sans-serif);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sort-chip:hover {
    color: #e2e8f0;
}

.sort-chip.active {
    background: rgba(56, 189, 248, 0.15);
    color: var(--dealer-primary);
}

.sort-chip i {
    font-size: 0.75rem;
}


/* ─── Filters ─── */
.catalog-filters {
    margin-bottom: 1rem;
    padding: 0.7rem;
    border-radius: 14px;
    border: 1px solid var(--dealer-border);
    background: linear-gradient(160deg, rgba(11, 19, 36, 0.60), rgba(6, 12, 23, 0.60));
}

.category-scroll,
.brand-scroll {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, 0.35) transparent;
    padding-bottom: 0.15rem;
}

.category-scroll::-webkit-scrollbar,
.brand-scroll::-webkit-scrollbar {
    height: 4px;
}

.category-scroll::-webkit-scrollbar-thumb,
.brand-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.30);
}

.brand-scroll {
    margin-top: 0.55rem;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(148, 163, 184, 0.10);
}

.cat-chip {
    flex-shrink: 0;
    height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    padding: 0 0.75rem;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    background: rgba(8, 13, 25, 0.55);
    color: #cbd5e1;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.22s var(--dealer-transition);
}

.cat-chip i {
    color: #7dd3fc;
    font-size: 0.72rem;
}

.cat-chip span {
    font-size: 0.68rem;
    font-family: var(--font-brand, 'Inter', sans-serif);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.cat-chip:hover {
    transform: translateY(-1px);
    border-color: rgba(56, 189, 248, 0.40);
    background: rgba(56, 189, 248, 0.06);
}

.cat-chip.active {
    color: #0c2d48;
    border-color: transparent;
    background: linear-gradient(135deg, #7dd3fc, #38bdf8);
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.25);
}

.cat-chip.active i {
    color: #082032;
}

.brand-chip {
    flex-shrink: 0;
    width: 62px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(248, 250, 252, 0.94);
    transition: all 0.22s var(--dealer-transition);
}

.brand-chip img {
    max-width: 38px;
    max-height: 22px;
    object-fit: contain;
}

.brand-chip i {
    color: #1e293b;
    font-size: 0.8rem;
}

.brand-chip span {
    color: #1e293b;
    font-size: 0.62rem;
    font-family: var(--font-brand, 'Inter', sans-serif);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}

.brand-chip:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.55);
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.30);
}

.brand-chip.active {
    border-color: var(--dealer-primary);
    box-shadow:
        0 0 0 2px rgba(56, 189, 248, 0.25),
        0 6px 18px rgba(2, 6, 23, 0.30);
}


/* ─── Vehicle Grid ─── */
.showroom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.loading-state {
    grid-column: 1 / -1;
    min-height: 240px;
    display: grid;
    place-items: center;
    text-align: center;
    color: var(--dealer-muted);
}

.loader-ring {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 3px solid rgba(148, 163, 184, 0.12);
    border-top-color: var(--dealer-primary);
    margin: 0 auto 0.75rem;
    animation: spin 0.75s linear infinite;
}

/* ─── Empty State ─── */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
}

.empty-state i {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: 1rem;
    color: var(--dealer-muted);
}

.empty-state h3 {
    font-size: 1.3rem;
    color: var(--dealer-text);
    margin-bottom: 0.4rem;
}

.empty-state p {
    color: var(--dealer-muted);
    font-size: 0.9rem;
}


/* ─── Vehicle Cards ─── */
.car-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--dealer-radius);
    border: 1px solid var(--dealer-border);
    background: linear-gradient(165deg, rgba(13, 22, 39, 0.95), rgba(7, 13, 25, 0.95));
    cursor: pointer;
    transform: translateY(10px);
    opacity: 0;
    animation: cardIn 0.5s var(--dealer-transition) forwards;
    animation-delay: var(--delay, 0ms);
    transition:
        transform 0.35s var(--dealer-transition),
        border-color 0.35s ease,
        box-shadow 0.35s ease;
}

.car-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        135deg,
        transparent 0%,
        transparent 40%,
        rgba(56, 189, 248, 0) 40%,
        rgba(56, 189, 248, 0) 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 3;
}

.car-card:hover::before {
    background: linear-gradient(
        135deg,
        rgba(56, 189, 248, 0.45) 0%,
        rgba(56, 189, 248, 0.08) 40%,
        rgba(16, 185, 129, 0.20) 100%
    );
    opacity: 1;
}

.car-card:hover {
    transform: translateY(-6px);
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow:
        0 20px 40px rgba(2, 6, 23, 0.40),
        0 0 30px rgba(56, 189, 248, 0.06);
}

.card-image-box {
    position: relative;
    height: 200px;
    background: radial-gradient(ellipse 120% 100% at 50% 20%, #162544 0%, #0a1223 80%);
    border-bottom: 1px solid rgba(148, 163, 184, 0.10);
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    transition: transform 0.55s var(--dealer-transition);
}

.car-card:hover .card-image {
    transform: scale(1.08);
}

.card-image-box::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 70%;
    background: linear-gradient(180deg, transparent 0%, rgba(7, 13, 25, 0.85) 100%);
    pointer-events: none;
}

.card-brand-watermark {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    width: 36px;
    height: 36px;
    object-fit: contain;
    padding: 0.3rem;
    border-radius: 10px;
    background: rgba(248, 250, 252, 0.95);
    box-shadow: 0 4px 12px rgba(2, 6, 23, 0.30);
    z-index: 2;
    transition: transform 0.3s ease;
}

.car-card:hover .card-brand-watermark {
    transform: scale(1.05);
}

.card-category-pill {
    position: absolute;
    left: 0.7rem;
    bottom: 0.7rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.24rem 0.55rem;
    border-radius: 8px;
    background: rgba(6, 11, 22, 0.82);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(148, 163, 184, 0.15);
    color: #e2e8f0;
    font-size: 0.64rem;
    font-family: var(--font-brand, 'Inter', sans-serif);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

/* Card hover overlay */
.card-hover-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(6, 11, 22, 0.55);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.car-card:hover .card-hover-overlay {
    opacity: 1;
}

.card-hover-overlay span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.2rem;
    border-radius: 10px;
    background: rgba(56, 189, 248, 0.20);
    border: 1px solid rgba(56, 189, 248, 0.40);
    color: #e0f2fe;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transform: translateY(8px);
    transition: transform 0.3s var(--dealer-transition);
}

.car-card:hover .card-hover-overlay span {
    transform: translateY(0);
}

.card-info {
    padding: 1rem;
}

.card-title {
    margin: 0;
    font-size: 1.05rem;
    color: var(--dealer-text);
    font-family: var(--font-brand, 'Inter', sans-serif);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.25;
    font-weight: 700;
}

.card-subline {
    margin-top: 0.3rem;
    color: #94a3b8;
    font-size: 0.78rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    margin-top: 0.75rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(148, 163, 184, 0.08);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.55rem;
}

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

.card-price-label {
    color: var(--dealer-muted);
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.card-price-value {
    font-family: var(--font-hud, 'Inter', sans-serif);
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #f8fafc, #93c5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-stock {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    height: 28px;
    padding: 0 0.55rem;
    border-radius: 8px;
    border: 1px solid var(--dealer-border);
    background: rgba(8, 13, 25, 0.55);
    font-size: 0.66rem;
    font-family: var(--font-brand, 'Inter', sans-serif);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    flex-shrink: 0;
}

.card-stock.is-low {
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.08);
    animation: stockPulse 2.5s ease-in-out infinite;
}

.card-stock.is-available {
    color: #86efac;
    border-color: rgba(16, 185, 129, 0.35);
    background: rgba(16, 185, 129, 0.08);
}

.card-stock.is-infinite {
    color: #93c5fd;
    border-color: rgba(56, 189, 248, 0.30);
    background: rgba(56, 189, 248, 0.06);
}


/* ─── Inspection Modal ─── */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(2, 6, 23, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: all;
}

.modal-glass-panel {
    width: min(1200px, calc(100% - 2rem));
    height: min(86vh, 820px);
    max-height: min(86vh, 820px);
    border-radius: var(--dealer-radius-lg);
    border: 1px solid rgba(148, 163, 184, 0.15);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    background: linear-gradient(165deg, rgba(13, 22, 39, 0.97), rgba(6, 11, 22, 0.98));
    box-shadow:
        0 30px 60px rgba(2, 6, 23, 0.55),
        0 0 40px rgba(56, 189, 248, 0.04);
    transform: scale(0.96) translateY(12px);
    transition: transform 0.35s var(--dealer-transition);
}

.modal-backdrop.active .modal-glass-panel {
    transform: scale(1) translateY(0);
}

.visual-col {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse 100% 80% at 45% 30%, rgba(56, 189, 248, 0.12), rgba(9, 16, 30, 0.96) 70%);
    overflow: hidden;
}

.visual-col::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(6, 11, 22, 0.50), transparent);
    pointer-events: none;
}

.hero-car-img {
    width: 86%;
    max-width: 660px;
    filter: drop-shadow(0 24px 32px rgba(2, 6, 23, 0.60));
    transition: transform 0.6s var(--dealer-transition);
}

.modal-backdrop.active .hero-car-img {
    animation: carReveal 0.7s var(--dealer-transition) both;
}

.spawn-code-badge {
    position: absolute;
    top: 1.2rem;
    left: 1.2rem;
    padding: 0.5rem 0.7rem;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    background: rgba(6, 11, 22, 0.75);
    backdrop-filter: blur(10px);
    z-index: 2;
}

.code-label {
    display: block;
    font-size: 0.6rem;
    color: var(--dealer-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: var(--font-brand, 'Inter', sans-serif);
    font-weight: 600;
}

.code-value {
    display: block;
    margin-top: 0.15rem;
    font-size: 1rem;
    font-family: var(--font-hud, 'Inter', sans-serif);
    font-weight: 700;
    color: var(--dealer-primary);
}

.data-col {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-left: 1px solid rgba(148, 163, 184, 0.10);
    background: rgba(6, 11, 22, 0.82);
}

.data-scroll-area {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 1.25rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, 0.25) transparent;
}

.data-scroll-area::-webkit-scrollbar {
    width: 5px;
}

.data-scroll-area::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.25);
}

.data-footer {
    padding: 0.9rem 1.25rem;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(11, 19, 36, 0.65);
}

.car-header {
    padding-bottom: 0.75rem;
    margin-bottom: 0.85rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.10);
}

.brand-watermark {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 10px;
    background: rgba(248, 250, 252, 0.95);
    padding: 0.3rem;
}

#modal-title {
    margin: 0.45rem 0 0;
    font-size: 1.65rem;
    line-height: 1.12;
    text-transform: uppercase;
    font-family: var(--font-brand, 'Inter', sans-serif);
    letter-spacing: 0.02em;
}

.car-slogan {
    margin: 0.3rem 0 0;
    color: var(--dealer-muted);
    font-size: 0.88rem;
    font-style: italic;
}

.price-section {
    margin-bottom: 0.9rem;
}

.price-label {
    display: block;
    font-size: 0.64rem;
    color: var(--dealer-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: var(--font-brand, 'Inter', sans-serif);
    font-weight: 600;
}

.price-tag {
    font-family: var(--font-hud, 'Inter', sans-serif);
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #f8fafc, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


/* ─── Stat Bars ─── */
.stats-container {
    border-radius: 12px;
    border: 1px solid var(--dealer-border);
    background: rgba(8, 13, 25, 0.60);
    padding: 0.8rem;
    margin-bottom: 0.95rem;
}

.stat-row {
    display: grid;
    grid-template-columns: 90px 1fr 32px;
    gap: 0.5rem;
    align-items: center;
}

.stat-row + .stat-row {
    margin-top: 0.55rem;
}

.stat-label {
    color: #cbd5e1;
    font-size: 0.72rem;
    font-weight: 500;
}

.stat-track {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    transition: width 0.9s var(--dealer-transition);
}

.stat-fill.speed {
    background: linear-gradient(90deg, #38bdf8, #7dd3fc);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.30);
}

.stat-fill.accel {
    background: linear-gradient(90deg, #f43f5e, #fb7185);
    box-shadow: 0 0 8px rgba(244, 63, 94, 0.30);
}

.stat-fill.hand {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.30);
}

.stat-fill.brake {
    background: linear-gradient(90deg, #10b981, #34d399);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.30);
}

.stat-pct {
    font-size: 0.68rem;
    color: var(--dealer-muted);
    font-family: var(--font-hud, 'Inter', sans-serif);
    font-weight: 600;
    text-align: right;
}


/* ─── Specs Grid ─── */
.specs-title {
    margin: 0 0 0.55rem;
    font-family: var(--font-brand, 'Inter', sans-serif);
    font-size: 0.72rem;
    color: #93c5fd;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
}

.spec-item {
    border-radius: 10px;
    border: 1px solid var(--dealer-border);
    background: rgba(8, 13, 25, 0.55);
    padding: 0.5rem 0.55rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    transition: border-color 0.2s ease;
}

.spec-item:hover {
    border-color: rgba(56, 189, 248, 0.20);
}

.spec-item i {
    color: var(--dealer-primary);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.spec-item .label {
    display: block;
    font-size: 0.6rem;
    color: var(--dealer-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 600;
}

.spec-item b {
    font-size: 0.82rem;
}

.full-width {
    grid-column: 1 / -1;
}

.car-description {
    margin-top: 0.9rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(148, 163, 184, 0.10);
}

.car-description p {
    margin: 0;
    color: #dbeafe;
    line-height: 1.50;
    font-size: 0.85rem;
}


/* ─── Purchase Button ─── */
.purchase-btn {
    width: 100%;
    height: 46px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: #00131f;
    font-family: var(--font-brand, 'Inter', sans-serif);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    font-weight: 800;
    font-size: 0.82rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s var(--dealer-transition), box-shadow 0.25s ease;
}

.purchase-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.purchase-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(56, 189, 248, 0.25);
}

.purchase-btn:hover::after {
    transform: translateX(100%);
}

.purchase-btn:active {
    transform: translateY(0);
}

.close-modal-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(6, 11, 22, 0.70);
    backdrop-filter: blur(8px);
    color: var(--dealer-text);
    cursor: pointer;
    z-index: 5;
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.close-modal-btn:hover {
    border-color: rgba(239, 68, 68, 0.50);
    color: #fca5a5;
    transform: scale(1.05);
}


/* ─── Toast Notifications ─── */
#toast-container {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 90;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    min-width: 280px;
    max-width: 380px;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.8rem 0.9rem;
    border-radius: 14px;
    border-left: 4px solid var(--dealer-primary);
    background: rgba(248, 250, 252, 0.97);
    color: #0f172a;
    box-shadow: 0 14px 32px rgba(2, 6, 23, 0.45);
    animation: toastIn 0.3s var(--dealer-transition);
    transition: opacity 0.3s ease, transform 0.3s ease;
}


/* ─── Confirm Modal ─── */
.confirm-backdrop {
    position: fixed;
    inset: 0;
    z-index: 85;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.confirm-backdrop.active {
    opacity: 1;
    pointer-events: all;
}

.confirm-panel {
    width: min(420px, calc(100% - 2rem));
    border-radius: var(--dealer-radius);
    overflow: hidden;
    border: 1px solid var(--dealer-border);
    background: linear-gradient(165deg, rgba(13, 22, 39, 0.97), rgba(6, 11, 22, 0.98));
    box-shadow: 0 26px 52px rgba(2, 6, 23, 0.50);
    transform: scale(0.95);
    transition: transform 0.3s var(--dealer-transition);
}

.confirm-backdrop.active .confirm-panel {
    transform: scale(1);
}

.confirm-header {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.confirm-header h2 {
    margin: 0;
    font-size: 1rem;
    font-family: var(--font-brand, 'Inter', sans-serif);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.confirm-body {
    padding: 1rem;
    text-align: center;
}

.confirm-body img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--dealer-border);
}

.confirm-body h3 {
    margin: 0.65rem 0 0.2rem;
    font-family: var(--font-brand, 'Inter', sans-serif);
    text-transform: uppercase;
    font-size: 0.92rem;
}

.confirm-body span {
    font-family: var(--font-hud, 'Inter', sans-serif);
    font-size: 1.7rem;
    font-weight: 700;
    background: linear-gradient(135deg, #f8fafc, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.confirm-body .warning {
    margin: 0.65rem 0 0;
    font-size: 0.78rem;
    color: #cbd5e1;
}

.confirm-body .warning i {
    color: var(--dealer-accent);
    margin-right: 0.2rem;
}

.confirm-footer {
    display: flex;
    gap: 0.55rem;
    padding: 0.9rem 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.btn-cancel,
.btn-confirm {
    flex: 1;
    height: 42px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font-brand, 'Inter', sans-serif);
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.07em;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-cancel {
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.20);
    background: rgba(11, 19, 36, 0.65);
}

.btn-cancel:hover {
    border-color: rgba(148, 163, 184, 0.35);
}

.btn-confirm {
    color: #052032;
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
}

.btn-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(56, 189, 248, 0.25);
}


/* ─── Footer ─── */
.exp-footer {
    margin-top: auto;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(3, 6, 15, 0.88);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.exp-footer-shell {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    padding: 1.5rem 0 2rem;
    width: 100%;
    margin: 0 auto;
    max-width: 1240px;
}

.exp-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.exp-footer-links a {
    text-decoration: none;
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    padding: 0.42rem 0.72rem;
    font-size: 0.78rem;
    font-family: var(--font-ui, 'Inter', sans-serif);
    transition: all 0.2s ease;
}

.exp-footer-links a:hover {
    color: var(--dealer-text);
    border-color: rgba(56, 189, 248, 0.50);
}

.exp-footer-note {
    margin: 0;
    color: var(--dealer-muted);
    font-size: 0.82rem;
    line-height: 1.6;
}

.exp-footer-strong {
    color: var(--dealer-text);
    font-weight: 700;
}

.exp-footer-watermark {
    position: absolute;
    right: 2.2rem;
    bottom: -18px;
    opacity: 0.10;
    pointer-events: none;
}

.exp-footer-watermark img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 10px 24px rgba(2, 6, 23, 0.50));
}


/* ─── Keyframes ─── */
@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes heroGlow {
    0%   { transform: translate(0, 0) scale(1); opacity: 0.4; }
    100% { transform: translate(-20px, 15px) scale(1.15); opacity: 0.7; }
}

@keyframes pulseGlow {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.45; }
}

@keyframes stockPulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.65; }
}

@keyframes carReveal {
    from {
        opacity: 0;
        transform: translateX(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}


/* ─── Responsive ─── */
@media (max-width: 1080px) {
    .dealer-hero {
        grid-template-columns: 1fr;
    }

    .dealer-hero-panel {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-glass-panel {
        grid-template-columns: 1fr;
        height: min(92vh, 820px);
        max-height: 92vh;
    }

    .visual-col {
        min-height: 240px;
    }

    .data-col {
        border-left: none;
        border-top: 1px solid rgba(148, 163, 184, 0.12);
    }

    .catalog-toolbar {
        flex-wrap: wrap;
    }

    .search-box {
        max-width: none;
        min-width: 200px;
    }
}

@media (max-width: 780px) {
    .dealer-main {
        width: calc(100% - 1rem);
        padding: 0.75rem 0 1.5rem;
    }

    .dealer-topbar-inner {
        flex-wrap: wrap;
        padding: 0.6rem 0.75rem;
        gap: 0.5rem;
        min-height: auto;
    }

    .dealer-top-actions {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .dealer-brand {
        font-size: 0.72rem;
    }

    .dealer-brand span {
        max-width: 200px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .dealer-nav {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .dealer-hero-copy,
    .dealer-hero-panel,
    .catalog-shell {
        border-radius: var(--dealer-radius);
    }

    .dealer-hero-copy {
        padding: 1rem;
    }

    .dealer-hero-panel {
        grid-template-columns: 1fr 1fr;
    }

    .catalog-shell {
        padding: 0.85rem;
    }

    .catalog-filters {
        padding: 0.55rem;
        border-radius: 12px;
    }

    .catalog-toolbar {
        gap: 0.4rem;
    }

    .sort-group {
        width: 100%;
        justify-content: center;
    }

    .showroom-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }

    .card-image-box {
        height: 190px;
    }

    #modal-title {
        font-size: 1.35rem;
    }

    .price-tag {
        font-size: 1.8rem;
    }

    .specs-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .dealer-topbar-inner {
        width: calc(100% - 0.5rem);
        padding: 0.5rem;
    }

    .dealer-brand img {
        height: 30px;
    }

    .dealer-brand {
        font-size: 0.65rem;
    }

    .dealer-brand span {
        max-width: 150px;
    }

    .dealer-kicker {
        font-size: 0.58rem;
    }

    .dealer-hero-copy h1 {
        font-size: 1.05rem;
        margin-top: 0.6rem;
    }

    .dealer-hero-copy p {
        font-size: 0.82rem;
    }

    .dealer-hero-panel {
        grid-template-columns: 1fr;
    }

    .showroom-grid {
        grid-template-columns: 1fr;
    }

    .card-image-box {
        height: 200px;
    }

    .card-title {
        font-size: 0.95rem;
    }

    .card-price-value {
        font-size: 1.08rem;
    }

    .modal-backdrop {
        align-items: flex-end;
        padding: 0;
    }

    .modal-glass-panel {
        width: 100%;
        height: 95vh;
        max-height: 95vh;
        border-radius: var(--dealer-radius) var(--dealer-radius) 0 0;
    }

    .visual-col {
        min-height: 170px;
    }

    .hero-car-img {
        width: 92%;
    }

    .spawn-code-badge {
        top: 0.6rem;
        left: 0.6rem;
        padding: 0.4rem 0.55rem;
    }

    .data-scroll-area {
        padding: 0.8rem;
    }

    .data-footer {
        padding: 0.7rem 0.8rem;
    }

    #modal-title {
        font-size: 1.15rem;
    }

    .price-tag {
        font-size: 1.5rem;
    }

    .stat-row {
        grid-template-columns: 78px 1fr 28px;
    }

    .confirm-panel {
        width: calc(100% - 1rem);
    }

    .search-box input {
        font-size: 16px; /* Prevents iOS zoom */
    }

    .sort-chip span {
        display: none;
    }
}
