* {
    box-sizing: border-box;
}

:root {
    --bg: #f4f6f8;
    --surface: #ffffff;
    --text: #102033;
    --text-light: #5c6673;
    --border: #dce3ea;
    --accent: #b42318;
    --accent-dark: #8f1d16;
    --shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 12px 30px rgba(15, 23, 42, 0.12);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    overflow-x: hidden;
}

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

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

.page {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
    padding: 0 0 80px;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    width: 100%;
    padding: 0 32px 0 0;
    background: #000000;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.brand-mark {
    display: flex;
    align-items: center;
    gap: 0;
    min-width: 0;
    flex: 0 0 auto;
    padding: 0;
    order: -1;
}

.logo-desktop {
    width: 60px;
    height: auto;
    transform: scaleX(-1);
    display: block;
}

.logo-mobile {
    display: block;
    width: 200px;
    height: auto;
    margin: 0 0 0 -10px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-left: auto;
}

.nav-group {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    font-size: 1rem;
    font-weight: 600;
    color: #FFFFFF;
    transition: color 0.2s ease, border-color 0.2s ease;
    border-bottom: 2px solid transparent;
    padding-bottom: 5px;
}

.nav-links a:hover,
.nav-links a.active {
    color: #E0E0E0;
    border-bottom-color: #E0E0E0;
}

.menu-button {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    flex-direction: column;
    gap: 5px;
    background: #000000;
    border: 1px solid #444444;
    border-radius: 10px;
    color: #FFFFFF;
    cursor: pointer;
    margin-right: auto;
    order: -1;
    box-shadow: var(--shadow);
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.menu-button:hover,
.menu-button:focus-visible {
    color: #E0E0E0;
    border-color: #C0C0C0;
    transform: translateY(-1px);
}

.menu-button span {
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
    transition: transform 0.3s ease, opacity 0.2s ease;
}

.mobile-drawer {
    display: none;
    position: fixed;
    inset: 0 auto 0 0;
    width: min(320px, 86vw);
    padding: 76px 18px 24px;
    gap: 8px;
    background: #000000;
    border-right: 1px solid #333333;
    box-shadow: 18px 0 44px rgba(15, 23, 42, 0.18);
    transform: translateX(-105%);
    opacity: 0;
    visibility: hidden;
    overflow-y: auto;
    transition: transform 0.35s ease, opacity 0.25s ease, visibility 0s linear 0.35s;
    z-index: 150;
    flex-direction: column;
}

.mobile-drawer.is-open {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    transition: transform 0.35s ease, opacity 0.25s ease, visibility 0s linear 0s;
}

.menu-close {
    display: none;
    position: absolute;
    top: 16px;
    right: 16px;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex-direction: column;
    gap: 5px;
    padding: 0;
    background: #000000;
    border: 1px solid #444444;
    border-radius: 10px;
    color: #FFFFFF;
    cursor: pointer;
    z-index: 10;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.menu-close:hover,
.menu-close:focus-visible {
    color: #E0E0E0;
    border-color: #C0C0C0;
}

.menu-close span {
    width: 21px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
}

.menu-close span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-close span:nth-child(2) {
    opacity: 0;
}

.menu-close span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-drawer a {
    width: 100%;
    padding: 15px 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #FFFFFF;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.3;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.mobile-drawer a:hover,
.mobile-drawer a:focus-visible,
.mobile-drawer a.active {
    background: #1F1F1F;
    border-color: #C0C0C0;
    color: #E0E0E0;
    transform: translateX(3px);
}

.drawer-backdrop {
    position: fixed;
    inset: 0;
    padding: 0;
    border: 0;
    background: rgba(15, 23, 42, 0.48);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    cursor: pointer;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
    z-index: 140;
}

.drawer-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.3s ease, visibility 0s linear 0s;
}

body.menu-open {
    overflow: hidden;
}


.hero {
    margin: 0;
    padding: 0;
}

.hero-main {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.vehicle-showcase {
    margin: 0 0 24px;
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.showcase-heading {
    margin-bottom: 24px;
}

.showcase-heading h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.5rem, 3vw, 2.15rem);
    letter-spacing: -0.025em;
}

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

.showcase-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fafc;
    color: var(--text);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.showcase-card:hover,
.showcase-card:focus-visible {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.showcase-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: center;
    background: #eef2f6;
}

.showcase-title {
    min-height: 2.8em;
    padding: 14px 16px 4px;
    color: var(--text);
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.4;
}

.showcase-price {
    padding: 0 16px 16px;
    color: #1d4f91;
    font-size: 1.15rem;
    font-weight: 750;
}

.showcase-more {
    display: flex;
    width: fit-content;
    margin: 28px auto 0;
}

.banner-full {
    width: 100%;
    margin: 0;
    padding: 0;
    display: block;
}

.banner-full img {
    width: 100%;
    height: auto;
    display: block;
}

.hero-text h1 {
    margin: 20px 0 20px;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text);
    font-weight: 700;
}

.hero-text p {
    margin: 0 0 30px;
    color: var(--text-light);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 100%;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 28px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.button.primary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.button.primary:hover {
        background: #f5f5f5;
}

.button.secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.button.secondary:hover {
    background: #f5f5f5;
}

.section h1,
.section h2 {
    margin: 0 0 14px;
    color: var(--text);
    letter-spacing: -0.025em;
}

.section h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.15;
}

.section p,
.footer p,
.contact-card p {
    margin: 0;
    color: var(--text-light);
    line-height: 1.8;
}

.section {
    padding: 56px 40px;
    border-radius: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.section .eyebrow {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 999px;
    background: #fbe9e7;
    color: var(--accent-dark);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}

.section h2 {
    font-size: clamp(1.6rem, 3vw, 2.15rem);
    margin-bottom: 22px;
    color: var(--text);
}

.section-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.card {
    padding: 24px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid var(--border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.card h3 {
    margin: 0 0 12px;
    font-size: 1.1rem;
    color: var(--text);
    font-weight: 600;
}

.card p {
    margin: 0;
    line-height: 1.75;
    color: var(--text-light);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.contact-card {
    padding: 26px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid var(--border);
}

.contact-card h2,
.contact-card h3 {
    margin: 0 0 12px;
    font-size: 1.35rem;
    color: var(--text);
    font-weight: 750;
}

.contact-card-label {
    margin-bottom: 10px;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.contact-card a {
    color: var(--accent-dark);
    font-size: 1.25rem;
    font-weight: 800;
    text-decoration: none;
}

.contact-card a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.vehicle-table {
    font-family: inherit;
    isolation: isolate;
}

.vehicle-table-body {
    min-width: 0;
}

@media (max-width: 768px) {
    .admin-page .action-btns {
        flex-direction: row !important;
        width: auto !important;
        gap: 6px;
    }

    .admin-page .action-btns .btn-sm {
        width: 40px !important;
        height: 40px;
        padding: 8px !important;
        font-size: 0 !important;
    }

    .admin-page .action-menu {
        position: relative;
        display: block;
    }

    .admin-page .action-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        padding: 0;
        border: 1px solid var(--border);
        border-radius: 6px;
        background: var(--surface);
        color: var(--text-light);
        cursor: pointer;
        font: inherit;
    }

    .admin-page .action-menu-toggle:hover,
    .admin-page .action-menu-toggle:focus-visible,
    .admin-page .action-menu.is-open .action-menu-toggle {
        border-color: var(--accent);
        color: var(--accent);
    }

    .admin-page .action-menu-toggle .fas {
        font-style: normal;
        font-size: 1.4rem;
        line-height: 1;
    }

    .admin-page .action-menu-toggle .fas::before {
        content: '⋮';
    }

    .admin-page .action-menu-dropdown {
        position: fixed;
        z-index: 1200;
        display: none;
        flex-direction: column;
        gap: 4px;
        min-width: 160px;
        max-width: calc(100vw - 24px);
        padding: 6px;
        border: 1px solid var(--border);
        border-radius: 8px;
        background: var(--surface);
        box-shadow: var(--shadow-lg);
    }

    .admin-page .action-menu.is-open .action-menu-dropdown {
        display: flex;
    }

    .admin-page .action-menu-dropdown .btn-sm {
        width: 100% !important;
        height: auto;
        min-height: 40px;
        justify-content: flex-start;
        padding: 10px 12px !important;
        font-size: 0.85rem !important;
    }

    .admin-page .action-menu-dropdown .btn-sm::before {
        display: none;
    }
}

.action-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-menu-toggle {
    display: none;
}

.action-menu-dropdown {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--text-light);
    font-size: 0.9rem;
}

@media (max-width: 1000px) {
    .navbar {
        justify-content: flex-start;
        gap: 0;
    }

    .brand-mark {
        flex: 1;
        justify-content: center;
        order: 0;
        padding: 0;
    }

    .logo-desktop {
        display: none;
    }

    .logo-mobile {
        display: block;
        margin: 0 auto;
        width: 200px;
    }

    .hero {
        margin: 40px 0 60px;
        padding: 0 20px;
    }

    .section-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .nav-links {
        display: none;
    }

    .menu-button {
        display: flex;
        position: absolute;
        top: 50%;
        left: 12px;
        transform: translateY(-50%);
        z-index: 160;
        margin: 0;
        padding: 0;
    }

    .menu-close {
        display: flex;
    }

    .navbar {
        position: sticky;
        top: 0;
        padding: 0 16px;
    }

    .mobile-drawer {
        display: flex;
    }
    

    .section {
        padding: 40px 20px;
    }

    .section h1 {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }

    .section h2 {
        font-size: 1.5rem;
    }

    .hero-text h1 {
        font-size: clamp(1.8rem, 6vw, 2.8rem);
    }

    .vehicle-showcase {
        padding: 28px 24px;
    }

    .page {
        width: min(100%, calc(100% - 40px));
    }
}

@media (max-width: 560px) {
    .page {
        width: min(100% - 20px, 100%);
        padding: 0 0 60px;
    }

    .navbar {
        padding: 0 12px;
    }

    .logo-mobile {
        width: min(200px, calc(100vw - 96px));
    }

    .hero {
        margin: 30px 0 50px;
        padding: 0 16px;
    }

    .hero-text h1 {
        font-size: clamp(1.6rem, 8vw, 2.2rem);
        margin-bottom: 16px;
    }

    .hero-text p {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }

    .vehicle-showcase {
        padding: 24px 16px;
    }

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

    .showcase-title {
        min-height: 3.8em;
        padding: 10px 10px 3px;
        font-size: 0.82rem;
    }

    .showcase-price {
        padding: 0 10px 12px;
        font-size: 0.92rem;
    }

    .showcase-more {
        width: 100%;
        margin-top: 22px;
    }

    .button {
        min-height: 44px;
        padding: 0 20px;
        font-size: 0.9rem;
    }

    .section {
        padding: 30px 16px;
    }

    .section h1 {
        font-size: 1.75rem;
    }

    .section h2 {
        font-size: 1.3rem;
    }

    .contact-card {
        padding: 20px;
    }

    .section-grid {
        gap: 16px;
    }

    .contact-grid {
        gap: 20px;
    }

    .mobile-drawer {
        width: min(320px, 88vw);
        max-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
