/* ========================================
   AutoFR — Premium Vehicle Listing
   ======================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --gold:        #C8A24E;
    --gold-light:  #E8D5A0;
    --gold-dark:   #A07A28;
    --dark:        #0A0A0A;
    --dark-card:   #141414;
    --dark-subtle: #1A1A1A;
    --dark-border: #2A2A2A;
    --text:        #F0F0F0;
    --text-muted:  #8A8A8A;
    --red-sold:    #C0392B;
    --radius:      16px;
    --radius-sm:   10px;
    --transition:  0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--dark);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

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

/* --- Header --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--dark-border);
    transition: background var(--transition);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 2px;
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.logo-auto {
    color: var(--text);
}

.logo-fr {
    color: var(--gold);
}

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

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: color var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-contact {
    color: var(--gold) !important;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-transform: none;
}

.nav-contact:hover {
    color: var(--gold-light) !important;
}

.nav-contact::after {
    background: var(--gold-light);
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero Section --- */
.hero {
    padding: 140px 2rem 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(200, 162, 78, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero-title .highlight {
    color: var(--gold);
}

.hero-subtitle {
    font-size: 1.15rem;
    font-weight: 300;
    color: var(--text-muted);
    max-width: 550px;
    margin: 0 auto 1.2rem;
    line-height: 1.7;
}

/* --- Filters --- */
.filters {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    padding: 0 2rem;
}

.filter-btn {
    background: var(--dark-subtle);
    color: var(--text-muted);
    border: 1px solid var(--dark-border);
    padding: 0.6rem 1.6rem;
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition);
}

.filter-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.filter-btn.active {
    background: var(--gold);
    color: var(--dark);
    border-color: var(--gold);
    font-weight: 600;
}

/* --- Vehicle Grid --- */
.grid-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem 6rem;
}

.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

/* --- Vehicle Card --- */
.vehicle-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
    opacity: 0;
    transform: translateY(30px);
    animation: cardIn 0.6s ease forwards;
}

.vehicle-card:hover {
    transform: translateY(-6px);
    border-color: rgba(200, 162, 78, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(200, 162, 78, 0.05);
}

@keyframes cardIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vehicle-card:nth-child(1)  { animation-delay: 0.05s; }
.vehicle-card:nth-child(2)  { animation-delay: 0.10s; }
.vehicle-card:nth-child(3)  { animation-delay: 0.15s; }
.vehicle-card:nth-child(4)  { animation-delay: 0.20s; }
.vehicle-card:nth-child(5)  { animation-delay: 0.25s; }
.vehicle-card:nth-child(6)  { animation-delay: 0.30s; }
.vehicle-card:nth-child(7)  { animation-delay: 0.35s; }
.vehicle-card:nth-child(8)  { animation-delay: 0.40s; }
.vehicle-card:nth-child(9)  { animation-delay: 0.45s; }
.vehicle-card:nth-child(10) { animation-delay: 0.50s; }
.vehicle-card:nth-child(11) { animation-delay: 0.55s; }
.vehicle-card:nth-child(12) { animation-delay: 0.60s; }

/* Card image */
.card-image {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.vehicle-card:hover .card-image img {
    transform: scale(1.06);
}

/* Type badge */
.card-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(10, 10, 10, 0.75);
    backdrop-filter: blur(8px);
    color: var(--gold);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    border: 1px solid rgba(200, 162, 78, 0.25);
}

/* VENDU banner */
.sold-banner {
    position: absolute;
    top: 22px;
    right: -35px;
    background: var(--red-sold);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 0.4rem 3rem;
    transform: rotate(45deg);
    z-index: 10;
    box-shadow: 0 2px 12px rgba(192, 57, 43, 0.5);
}

.vehicle-card.is-sold .card-image img {
    filter: none;
}

/* Card body */
.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: 0.3px;
}

.card-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem 1.5rem;
    margin-bottom: 1.4rem;
}

.spec {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.spec-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark-subtle);
    border: 1px solid var(--dark-border);
    border-radius: 8px;
    color: var(--gold);
}

.spec-icon svg {
    width: 16px;
    height: 16px;
}

.spec-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.spec-label {
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
}

.spec-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

/* Card footer */
.card-footer {
    padding: 0 1.5rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.card-price {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gold);
}

.card-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gold);
    color: var(--dark);
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.7rem 1.5rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.card-btn:hover {
    background: var(--gold-light);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(200, 162, 78, 0.3);
}

.card-btn svg {
    width: 14px;
    height: 14px;
    transition: transform var(--transition);
}

.card-btn:hover svg {
    transform: translateX(3px);
}

.vehicle-card.is-sold .card-btn {
    background: var(--dark-border);
    color: var(--text-muted);
    pointer-events: none;
}

.vehicle-card.is-sold .card-price {
    color: var(--text-muted);
    text-decoration: line-through;
    text-decoration-color: var(--red-sold);
}

/* --- Stats bar --- */
.stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding: 0 2rem 3rem;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gold);
    line-height: 1;
}

.stat-label {
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

/* --- Footer --- */
.site-footer {
    border-top: 1px solid var(--dark-border);
    padding: 3rem 2rem;
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-tagline {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- Responsive --- */
@media (max-width: 768px) {

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--dark-card);
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        padding: 2rem;
        border-left: 1px solid var(--dark-border);
        transition: right var(--transition);
        z-index: 1000;
    }

    .nav.open {
        right: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .header-inner {
        height: 60px;
    }

    .hero {
        padding: 130px 1.5rem 50px;
    }

    .vehicle-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .grid-container {
        padding: 0 1.2rem 4rem;
    }

    .stats {
        gap: 2rem;
    }

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

    .card-image {
        height: 220px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .card-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .card-btn {
        justify-content: center;
    }

    .card-price {
        text-align: center;
    }
}

/* --- Mobile nav overlay --- */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

.nav-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark);
}

::-webkit-scrollbar-thumb {
    background: var(--dark-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-dark);
}

/* --- Selection --- */
::selection {
    background: var(--gold);
    color: var(--dark);
}

/* Filter transition for cards */
.vehicle-card.hidden {
    display: none;
}
