:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --navy: #08111f;
    --green: #166534;
    --green-bg: #dcfce7;
    --amber: #92400e;
    --amber-bg: #fef3c7;
    --red: #991b1b;
    --red-bg: #fee2e2;
    --shadow: 0 22px 55px rgba(15, 23, 42, .10);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 0 0, rgba(37, 99, 235, .12), transparent 32rem),
        radial-gradient(circle at 100% 0, rgba(14, 165, 233, .12), transparent 30rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

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

.site-header {
    width: min(1180px, calc(100% - 32px));
    margin: 18px auto 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, .82);
    border-radius: 22px;
    padding: 12px 14px;
    box-shadow: 0 12px 35px rgba(15, 23, 42, .06);
    position: sticky;
    top: 14px;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
}

.brand span,
.access-brand span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--navy), var(--blue));
    color: white;
    letter-spacing: -.05em;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--muted);
    font-weight: 700;
    font-size: 14px;
}

.site-nav a:hover {
    color: var(--blue);
}

.logout-btn {
    border: 0;
    background: #eff6ff;
    color: var(--blue-dark);
    font-weight: 900;
    border-radius: 14px;
    height: 42px;
    padding: 0 16px;
    cursor: pointer;
}

.hero,
.search-panel,
.results-section,
.about-contact-grid,
.vehicle-detail-hero,
.detail-layout,
.vehicle-info-grid,
.similar-section,
.not-found {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    padding: 74px 0 34px;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
    gap: 34px;
    align-items: center;
}

.pill {
    display: inline-flex;
    border-radius: 999px;
    background: rgba(37, 99, 235, .10);
    color: var(--blue-dark);
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 900;
    margin-bottom: 20px;
}

.pill.dark {
    background: rgba(15, 23, 42, .08);
    color: var(--navy);
}

.hero h1 {
    margin: 0;
    font-size: clamp(44px, 7vw, 86px);
    letter-spacing: -.075em;
    line-height: .93;
    max-width: 780px;
}

.hero p {
    color: var(--muted);
    font-size: clamp(17px, 2vw, 21px);
    line-height: 1.55;
    max-width: 650px;
    margin: 26px 0 0;
}

.hero-card {
    background:
        linear-gradient(135deg, rgba(15, 23, 42, .92), rgba(30, 64, 175, .92)),
        var(--navy);
    color: white;
    border-radius: 32px;
    padding: 26px;
    box-shadow: var(--shadow);
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    position: relative;
}

.hero-card::before {
    content: "";
    position: absolute;
    inset: -40% -20% auto auto;
    width: 240px;
    height: 240px;
    background: rgba(56, 189, 248, .32);
    filter: blur(25px);
    border-radius: 999px;
}

.hero-card-top {
    position: relative;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
}

.hero-card-top span {
    color: rgba(255,255,255,.72);
    font-weight: 800;
}

.hero-card-top strong {
    font-size: 54px;
    letter-spacing: -.06em;
}

.mini-chart {
    height: 140px;
    display: flex;
    align-items: flex-end;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.mini-chart span {
    flex: 1;
    border-radius: 999px 999px 8px 8px;
    background: linear-gradient(180deg, #7dd3fc, #2563eb);
    min-height: 34px;
}

.hero-card p {
    position: relative;
    margin: 0;
    color: rgba(255,255,255,.72);
    font-size: 15px;
}

.search-panel {
    background: rgba(255,255,255,.86);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255,255,255,.86);
    border-radius: 30px;
    padding: 22px;
    box-shadow: var(--shadow);
}

.search-head,
.search-footer,
.vehicle-title-row,
.detail-title-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
}

.search-head h2 {
    margin: 0;
    font-size: 26px;
    letter-spacing: -.04em;
}

.search-head p {
    margin: 4px 0 0;
    color: var(--muted);
}

.view-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.link-button,
.reset-link {
    border: 0;
    background: transparent;
    color: var(--blue-dark);
    font-weight: 900;
    cursor: pointer;
    padding: 8px 0;
}

.reset-link {
    color: var(--muted);
}

.basic-search,
.advanced-search {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.advanced-search {
    display: none;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 16px;
}

.advanced-search.is-open {
    display: grid;
}

label span {
    display: block;
    margin-bottom: 7px;
    color: #334155;
    font-weight: 900;
    font-size: 13px;
}

input,
select {
    width: 100%;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 12px;
    background: white;
    color: var(--text);
    outline: none;
}

input:focus,
select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(37,99,235,.10);
}

.search-footer {
    margin-top: 18px;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 14px;
    padding: 0 18px;
    font-weight: 900;
    border: 1px solid transparent;
    cursor: pointer;
    text-align: center;
}

.primary-btn {
    background: var(--blue);
    color: white;
}

.primary-btn:hover {
    background: var(--blue-dark);
}

.secondary-btn {
    background: #eff6ff;
    color: var(--blue-dark);
    border-color: #bfdbfe;
}

.ghost-btn {
    background: white;
    color: var(--text);
    border-color: var(--line);
}

.full {
    width: 100%;
}

.results-section {
    padding: 32px 0;
}

.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.vehicle-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 16px 38px rgba(15,23,42,.06);
    transition: .2s ease;
}

.vehicle-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.vehicle-image {
    display: block;
    height: 235px;
    background: #dbeafe;
    position: relative;
    overflow: hidden;
}

.vehicle-image.small-img {
    height: 175px;
}

.vehicle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-placeholder,
.placeholder-large {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background:
        linear-gradient(135deg, rgba(15,23,42,.9), rgba(37,99,235,.88)),
        var(--navy);
    color: white;
    font-weight: 900;
}

.featured-badge {
    position: absolute;
    left: 14px;
    top: 14px;
    border-radius: 999px;
    padding: 7px 11px;
    background: white;
    color: var(--blue-dark);
    font-size: 12px;
    font-weight: 900;
}

.vehicle-content {
    padding: 20px;
}

.vehicle-content h3 {
    margin: 0;
    font-size: 21px;
    letter-spacing: -.035em;
}

.vehicle-content h3 a:hover {
    color: var(--blue);
}

.vehicle-title-row p {
    margin: 4px 0 0;
    color: var(--muted);
}

.status {
    display: inline-flex;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
    background: #f1f5f9;
    color: #475569;
}

.status-available {
    background: var(--green-bg);
    color: var(--green);
}

.status-reserved {
    background: var(--amber-bg);
    color: var(--amber);
}

.status-sold {
    background: var(--red-bg);
    color: var(--red);
}

.price {
    font-size: 26px;
    font-weight: 950;
    letter-spacing: -.04em;
    margin: 18px 0;
}

.spec-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.spec-grid span {
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid var(--line);
    padding: 9px 10px;
    color: #475569;
    font-size: 14px;
    font-weight: 750;
}

.short-desc {
    color: var(--muted);
    line-height: 1.5;
    min-height: 42px;
}

.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.card-actions a {
    flex: 1;
}

.empty-results,
.not-found {
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 55px 22px;
}

.empty-results h2,
.not-found h1 {
    margin: 0 0 10px;
    font-size: 34px;
    letter-spacing: -.04em;
}

.empty-results p,
.not-found p {
    color: var(--muted);
}

.about-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    padding: 20px 0 52px;
}

.info-card,
.spec-card,
.dealer-box {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 26px;
    box-shadow: 0 16px 38px rgba(15,23,42,.05);
}

.info-card h2,
.spec-card h2,
.dealer-box h2,
.similar-section h2 {
    margin: 0 0 12px;
    font-size: 26px;
    letter-spacing: -.04em;
}

.info-card p,
.dealer-box p,
.description-text {
    color: var(--muted);
    line-height: 1.65;
}

.contact-links {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.contact-links a {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 13px 14px;
    font-weight: 850;
    background: #f8fafc;
}

.site-footer {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 24px;
    border-top: 1px solid var(--line);
    padding-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    color: var(--muted);
}

.site-footer strong {
    color: var(--text);
}

.access-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 0, rgba(37,99,235,.22), transparent 30rem),
        radial-gradient(circle at 100% 35%, rgba(14,165,233,.14), transparent 30rem),
        linear-gradient(135deg, #f8fafc 0%, #edf4ff 100%);
}

.access-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.access-card {
    width: min(100%, 460px);
    border-radius: 34px;
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255,255,255,.85);
    box-shadow: var(--shadow);
    padding: 34px;
}

.access-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 950;
    margin-bottom: 26px;
}

.access-kicker {
    color: var(--blue);
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 950;
    letter-spacing: .10em;
    margin-bottom: 10px;
}

.access-card h1 {
    margin: 0 0 10px;
    font-size: clamp(32px, 7vw, 48px);
    letter-spacing: -.06em;
    line-height: .98;
}

.access-card p {
    margin: 0 0 24px;
    color: var(--muted);
    line-height: 1.55;
}

.access-form {
    display: grid;
    gap: 12px;
}

.access-form button {
    height: 50px;
    border: 0;
    border-radius: 14px;
    background: var(--blue);
    color: white;
    font-weight: 950;
    cursor: pointer;
}

.access-footer {
    margin-top: 22px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.alert {
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 800;
}

.alert.error {
    background: var(--red-bg);
    color: var(--red);
}

.vehicle-detail-hero {
    padding: 56px 0 18px;
}

.back-link {
    color: var(--blue-dark);
    font-weight: 900;
}

.detail-title-row {
    margin-top: 20px;
    align-items: flex-end;
}

.detail-title-row h1 {
    margin: 14px 0 6px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: .95;
    letter-spacing: -.07em;
}

.detail-title-row p {
    margin: 0;
    color: var(--muted);
    font-size: 20px;
}

.detail-price {
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 950;
    letter-spacing: -.06em;
    white-space: nowrap;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, .6fr);
    gap: 24px;
    align-items: start;
}

.gallery-panel {
    min-width: 0;
}

.main-gallery-image {
    height: 540px;
    border-radius: 30px;
    overflow: hidden;
    background: #dbeafe;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

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

.gallery-thumbs {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.gallery-thumbs button {
    height: 82px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    background: #e2e8f0;
}

.gallery-thumbs button.active {
    border-color: var(--blue);
}

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

.dealer-box {
    position: sticky;
    top: 100px;
}

.dealer-actions {
    display: grid;
    gap: 10px;
    margin: 20px 0;
}

.dealer-meta {
    border-top: 1px solid var(--line);
    padding-top: 18px;
}

.dealer-meta span,
.dealer-meta strong {
    display: block;
}

.dealer-meta span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    margin-bottom: 4px;
}

.vehicle-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    padding: 30px 0;
}

.spec-card.wide {
    grid-column: 1 / -1;
}

.detail-spec-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.detail-spec-grid div {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
    background: #f8fafc;
}

.detail-spec-grid span,
.detail-spec-grid strong {
    display: block;
}

.detail-spec-grid span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    margin-bottom: 5px;
}

.equipment-list {
    list-style: none;
    margin: 0;
    padding: 0;
    columns: 3;
    column-gap: 18px;
}

.equipment-list li {
    break-inside: avoid;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
    background: #f8fafc;
    font-weight: 750;
}

.muted {
    color: var(--muted);
}

.similar-section {
    padding: 10px 0 52px;
}

.vehicle-grid.small {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1050px) {
    .hero,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .dealer-box {
        position: static;
    }

    .basic-search,
    .advanced-search {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .vehicle-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .site-header {
        flex-wrap: wrap;
        top: 8px;
    }

    .site-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        border-top: 1px solid var(--line);
        padding-top: 10px;
    }

    .hero {
        padding-top: 46px;
    }

    .hero h1 {
        font-size: clamp(40px, 12vw, 62px);
    }

    .search-head,
    .search-footer,
    .detail-title-row {
        flex-direction: column;
        align-items: stretch;
    }

    .basic-search,
    .advanced-search,
    .vehicle-info-grid,
    .about-contact-grid {
        grid-template-columns: 1fr;
    }

    .vehicle-grid,
    .vehicle-grid.small {
        grid-template-columns: 1fr;
    }

    .main-gallery-image {
        height: 340px;
        border-radius: 24px;
    }

    .gallery-thumbs {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .equipment-list {
        columns: 1;
    }

    .card-actions {
        flex-direction: column;
    }
}

@media (max-width: 460px) {
    .hero,
    .search-panel,
    .results-section,
    .about-contact-grid,
    .vehicle-detail-hero,
    .detail-layout,
    .vehicle-info-grid,
    .similar-section,
    .not-found,
    .site-footer,
    .site-header {
        width: min(100% - 22px, 1180px);
    }

    .access-card,
    .search-panel,
    .info-card,
    .spec-card,
    .dealer-box {
        border-radius: 22px;
        padding: 20px;
    }

    .vehicle-image {
        height: 210px;
    }
}
