/* --- Root Branding & Variables --- */
:root {
    --bg-black: #050505;
    --card-gray: #111111;
    --accent-silver: #a8a8a8;
    --text-white: #ffffff;
    --text-dim: #999999;
    --whatsapp-green: #25D366;
    --finance-green: #00ff88;
}

* {
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-black);
    color: var(--text-white);
    font-family: 'Montserrat', -apple-system, sans-serif;
    margin: 0;
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- Glassmorphism Navigation --- */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #222;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.logo {
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: 6px;
    text-transform: uppercase;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
    margin: 0;
    padding: 0;
    align-items: center;
}

nav ul li a {
    color: var(--text-white);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.cta-pill {
    background: white;
    color: black !important;
    padding: 10px 20px;
    border-radius: 50px;
    transition: 0.3s;
}

/* --- WhatsApp Floating Action Button --- */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--whatsapp-green);
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 0.8rem;
    z-index: 9999;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
    transition: 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.05);
    background-color: #1ebe57;
}

/* --- Hero Section & Animations --- */
.hero {
    height: 50vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(rgba(0,0,0,0.75), rgba(0,0,0,0.75)), url('herobackground.png');
    background-size: cover;
    background-position: center;
    margin-top: 60px;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: clamp(1.8rem, 6vw, 4rem);
    letter-spacing: 10px;
    margin: 0;
    text-transform: uppercase;
    animation: fadeInUp 1s ease forwards;
}

.subtitle {
    letter-spacing: 5px;
    color: var(--accent-silver);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Inventory Grid --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 35px;
    padding: 80px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

/* --- Professional Car Card --- */
.car-card {
    background: var(--card-gray);
    position: relative;
    border: 1px solid #222;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
}

.car-card:hover {
    transform: translateY(-10px);
    border-color: #555;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.img-container {
    overflow: hidden;
    height: 250px;
}

.main-car-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s ease;
}

.car-card:hover .main-car-photo {
    transform: scale(1.1);
}

/* --- Interactive Multi-Image Gallery --- */
.thumb-gallery {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: #0a0a0a;
    overflow-x: auto;
    border-bottom: 1px solid #222;
}

.thumb-gallery::-webkit-scrollbar {
    height: 3px;
}

.thumb-gallery::-webkit-scrollbar-thumb {
    background: #333;
}

.thumb {
    width: 75px;
    height: 50px;
    object-fit: cover;
    cursor: pointer;
    border: 1px solid #333;
    opacity: 0.5;
    transition: 0.3s;
    flex-shrink: 0;
}

.thumb:hover {
    opacity: 1;
    border-color: white;
}

/* --- Card Content & Finance Info --- */
.card-content {
    padding: 25px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 5px;
}

.car-card h3 {
    font-size: 1.1rem;
    margin: 0;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 700;
}

.vin-small {
    font-size: 0.6rem;
    color: #444;
    letter-spacing: 1px;
}

.price {
    font-size: 1.6rem;
    color: var(--text-white);
    font-weight: 300;
    margin: 10px 0;
}

.est-payment {
    font-size: 0.8rem;
    color: var(--finance-green);
    letter-spacing: 1px;
    margin-bottom: 20px;
    font-weight: 700;
}

/* --- Buttons --- */
.card-actions {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
}

.btn-solid {
    background: white;
    color: black;
    border: none;
    padding: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: 0.3s;
}

.btn-solid:hover {
    background: var(--accent-silver);
}

.btn-whatsapp-small {
    background: transparent;
    border: 1px solid var(--whatsapp-green);
    color: var(--whatsapp-green);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 0.8rem;
    transition: 0.3s;
}

.btn-whatsapp-small:hover {
    background: var(--whatsapp-green);
    color: black;
}

/* --- Map Section --- */
.map-section {
    padding: 100px 40px;
    background: #000;
}

.section-title {
    text-align: center;
    letter-spacing: 8px;
    margin-bottom: 50px;
    font-weight: 300;
    text-transform: uppercase;
}

.map-container {
    max-width: 1200px;
    margin: 0 auto;
    border: 1px solid #222;
    filter: grayscale(100%) invert(92%) contrast(85%); /* Luxury Dark Map Look */
}

/* --- Featured Badge --- */
.featured-style {
    border: 1px solid #444;
}

.tag {
    position: absolute;
    top: 20px;
    left: 20px;
    background: white;
    color: black;
    padding: 6px 15px;
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 2px;
    z-index: 10;
}
/* --- Mobile Responsive Optimizations --- */
@media (max-width: 768px) {
    /* Add this inside your existing mobile media query */
    .brand-logo {
        height: 22px !important;
    }

    .logo {
        font-size: 16px !important; /* Scales text slightly down on mobile */
    }

    /* ... your other mobile rules remain here ... */
}
    .main-header {
        flex-direction: column;
        padding: 10px 15px;
        align-items: flex-start;
        gap: 8px;
    }

    .logo {
        font-size: 0.9rem;
        letter-spacing: 2px;
    }

    nav ul {
        width: 100%;
        justify-content: space-between;
        gap: 10px;
    }

    nav ul li a {
        font-size: 0.55rem;
        letter-spacing: 0.5px;
    }

    .cta-pill {
        padding: 8px 12px;
    }

    /* 2. Push Hero Down & Scale Heading Text */
    .hero {
        height: auto;
        min-height: 45vh;
        margin-top: 100px; /* Clears the taller mobile header */
        padding: 30px 15px;
    }

    .hero-content h1 {
        font-size: 1.8rem !important; /* Forces title to fit mobile screens */
        letter-spacing: 3px !important;
        line-height: 1.2;
    }

    .hero p {
        font-size: 0.8rem;
        padding: 0 10px;
    }

    /* 3. Clean Up Search & Inventory Spacing */
    .search-container, .filter-wrapper {
        margin: 15px auto !important;
        width: 92% !important;
    }

    .grid-container {
        grid-template-columns: 1fr;
        padding: 20px 15px;
        gap: 20px;
    }

    /* 4. Map Section Adjustments */
    .map-section {
        padding: 60px 20px;
    }

    /* 5. Floating WhatsApp Button Padding */
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        padding: 10px 18px;
        font-size: 0.75rem;
    }
    @media (max-width: 768px) {
    header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        padding: 15px !important;
    }
    header .logo {
        justify-content: center;
        text-align: center;
    }
    header .nav-actions {
        justify-content: center;
        width: 100%;
        display: flex;
        gap: 8px;
    }
    @media (max-width: 768px) {
    header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        padding: 15px !important;
    }
    header .logo {
        justify-content: center;
        text-align: center;
    }
    header .nav-actions {
        justify-content: center;
        width: 100%;
        display: flex;
        gap: 8px;
    }
    header .nav-actions a,
    header .nav-actions button {
        flex: 1;
        justify-content: center;
        text-align: center;
        padding: 10px 8px !important;
        font-size: 12px !important;
    }
}