/* ================= COLOR PALETTE ================= */

:root {
    --dark: #1C1D21;
    --neutral: #B4B8AB;
    --accent-red: #E01A4F;
    --accent-blue: #3F84E5;
    --bg-light: #f3f5f9;
    --white: #ffffff;
}

/* ================= GLOBAL ================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--bg-light);
    color: var(--dark);
}

/* ================= HEADER ================= */

.header {
    background: linear-gradient(180deg, var(--dark), #111);
    height: 140px;
    display: flex;
    align-items: center;
    border-bottom: 4px solid var(--accent-blue);
}

.header-inner {
    max-width: 1200px;
    margin: auto;
    width: 100%;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    height: 60px;
}

/* ================= NAV BUTTONS ================= */

.nav {
    display: flex;
    gap: 15px;
}

.nav-btn {
    padding: 12px 28px;
    border-radius: 30px;
    background: var(--white);
    border: 2px solid transparent;
    color: var(--dark);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 6px 15px rgba(0,0,0,0.25);
}

/* Hover */
.nav-btn:hover {
    background: var(--dark);
    color: var(--white);
    transform: translateY(-2px);
}

/* Active page */
.nav-btn.active {
    background: var(--accent-blue);
    color: var(--white);
}

/* ================= MAIN ================= */

.main {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

/* ================= FILTERS ================= */

.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.filters select {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--neutral);
    background: var(--white);
    font-size: 15px;
}

/* ================= CAR GRID ================= */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

/* ================= CARD ================= */

.card {
    background: var(--white);
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 45px rgba(0,0,0,0.2);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--neutral);
}

.card-body {
    padding: 16px;
}

.card-body h2 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
    line-height: 1.3;
}

.price {
    font-size: 22px;
    font-weight: 800;
    color: var(--accent-red);
    margin-bottom: 6px;
}

.meta {
    font-size: 14px;
    color: #555;
}

/* ================= PAGINATION ================= */

.pagination {
    text-align: center;
    margin-top: 30px;
}

.pagination a {
    padding: 9px 16px;
    margin: 4px;
    border-radius: 8px;
    background: var(--neutral);
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    transition: background 0.2s;
}

.pagination a:hover {
    background: var(--accent-red);
    color: var(--white);
}

.pagination a.active {
    background: var(--accent-red);
    color: var(--white);
}

/* ================= CONTACT ================= */

.contact {
    background: var(--white);
    padding: 30px;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

/* ================= FOOTER ================= */

.footer {
    background: var(--dark);
    border-top: 4px solid var(--accent-red);
    padding: 25px 0;
    font-size: 14px;
    color: var(--white);
}
.footer-inner {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer-right {
    display: flex;
    gap: 20px;
}

.footer-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--white);
}

.footer-item svg {
    width: 18px;
    height: 18px;
    fill: var(--accent-red);
}

.footer-item a {
    color: inherit;
    text-decoration: none;
}

.footer-item a:hover {
    text-decoration: underline;
}

/* ================= HERO IMAGE ================= */

.hero {
    position: relative;
    width: 100%;
    height: 260px;
    margin-bottom: 25px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        rgba(28,29,33,0.55),
        rgba(28,29,33,0.75)
    );
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
    padding: 20px;
}

.hero-overlay h1 {
    font-size: 34px;
    margin: 0 0 8px;
    font-weight: 800;
}

.hero-overlay p {
    font-size: 16px;
    opacity: 0.95;
}

/* ================= MOBILE ================= */

@media (max-width: 700px) {
    .header {
        height: auto;
        padding: 20px 0;
    }

    .header-inner {
        flex-direction: column;
        gap: 15px;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-btn {
        width: 150px;
        text-align: center;
    }

    .filters {
        flex-direction: column;
    }

    .hero {
        height: 180px;
    }

    .hero-overlay h1 {
        font-size: 22px;
    }

    .hero-overlay p {
        font-size: 14px;
    }

    .card img {
        height: 180px;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-right {
        flex-direction: column;
        gap: 10px;
    }
}


/* ================= ADMIN ================= */

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    margin-top: 20px;
    border-radius: 10px;
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.admin-table th {
    background: var(--dark);
    color: var(--white);
}

.admin-table tr.sold {
    opacity: 0.6;
    background: #f3f4f6;
}

.btn {
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: #fff;
    font-size: 13px;
    margin-right: 6px;
}

.btn.sold {
    background: var(--accent-blue);
}

.btn.delete {
    background: var(--accent-red);
}

.btn.delete:hover {
    filter: brightness(0.9);
}



/* ================= NEW HEADER LAYOUT ================= */

.site-header {
    width: 100%;
}

/* ---------- LOGO ROW ---------- */

.logo-row {
    background: #ffffff;
    border-bottom: 1px solid var(--neutral);
}

.logo-inner {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-part {
    height: 60px;
    width: auto;
}

/* ---------- NAV ROW ---------- */

.nav-row {
    background: var(--dark);
    border-bottom: 3px solid var(--accent-red);
}

.nav-inner {
    max-width: 1200px;
    margin: auto;
    padding: 12px 20px;
}

.nav-left {
    display: flex;
    gap: 12px;
}

/* Override nav button colors */
.nav-left .nav-btn {
    background: var(--accent-red);
    color: #ffffff;
    border-radius: 6px;
    padding: 10px 22px;
    font-weight: 600;
    box-shadow: none;
}

.nav-left .nav-btn:hover {
    background: #b8143e; /* darker red */
    transform: translateY(-1px);
}

.nav-left .nav-btn.active {
    background: var(--dark);
}

/* ---------- MOBILE ---------- */

@media (max-width: 700px) {
    .logo-inner {
        padding: 16px;
    }

    .logo-wrapper {
        justify-content: center;
        flex-wrap: wrap;
    }

    .logo-part {
        height: 48px;
    }

    .nav-inner {
        display: flex;
        justify-content: center;
    }

    .nav-left {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ================= NAV BUTTON COLOR OVERRIDE ================= */

/* Default state */
.nav-btn {
    background-color: var(--neutral); /* #B4B8AB */
    color: var(--dark);
}

/* Hover state – keep existing behavior */
.nav-btn:hover {
    background-color: var(--dark);
    color: #ffffff;
}

/* Active page */
.nav-btn.active {
    background-color: var(--accent-red);
    color: #ffffff;
}

/* ================= LOGO SCALING FIX ================= */

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 100%;
}

/* Force both logo parts to behave consistently */
.logo-part {
    height: 60px;
    width: auto;
    max-width: 100%;
    flex-shrink: 1;
}

/* Mobile scaling */
@media (max-width: 700px) {
    .logo-wrapper {
        max-width: 100%;
        justify-content: center;
    }

    .logo-part {
        height: 42px;        /* scales BOTH parts */
        max-width: 48%;
    }
}

/* ================= GOOGLE MAPS ================= */

.map-container {
    margin-top: 30px;
    width: 100%;
    height: 380px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Mobile */
@media (max-width: 700px) {
    .map-container {
        height: 260px;
    }
}