@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #1e1e1e;
    --secondary: #2c2c2c;
    --accent: #1e8749; /* Green from the mockup */
    --accent-hover: #166838;
    --danger: #d9423e;
    --danger-hover: #b93734;
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --bg-dark: #121212;
    --bg-card: rgba(44, 44, 44, 0.7);
    --border: rgba(255, 255, 255, 0.1);
    --radius: 8px;
    --transition: all 0.3s ease;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(231, 76, 60, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Glassmorphism helpers */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.glass:hover {
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    transform: translateY(-2px);
    border-color: rgba(30,135,73,0.3);
}

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

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 0;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    text-shadow: 0 2px 5px rgba(0,0,0,0.8);
}

.nav-brand {
    font-size: 24px;
    font-weight: 700;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-brand img {
    height: 30px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent);
}

.mobile-only-link {
    display: none;
}
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
}

/* Buttons */
.btn {
    padding: 10px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

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

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

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

.btn-danger:hover {
    background-color: var(--danger-hover);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border);
    color: white;
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Hero Section */
.hero {
    height: 80vh;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding-top: 80px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(18, 18, 18, 0.3) 0%, rgba(18, 18, 18, 1) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.1;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

/* Search Box */
.search-box {
    display: flex;
    gap: 15px;
    padding: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.search-input {
    flex: 1;
    min-width: 150px;
}

.search-input select, .search-input input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: white;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
}
.search-input select option {
    background: var(--bg-dark);
    color: white;
}

/* Sections */
.section {
    padding: 80px 0;
    position: relative;
    z-index: 2;
}

.section-header {
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
}

/* Car Grid */
.car-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.car-card {
    transition: var(--transition);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.car-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-color: rgba(255,255,255,0.2);
}

.car-image-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.car-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.car-card:hover .car-image {
    transform: scale(1.05);
}

.car-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-available { background: var(--accent); color: white; }
.badge-sold { background: var(--danger); color: white; }

.car-details {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.car-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: white;
    text-decoration: none;
}

.car-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.car-footer {
    margin-top: auto;
}

.car-footer .btn {
    width: 100%;
}

/* Utilities */
.text-accent { color: var(--accent); }
.text-danger { color: var(--danger); }
.mt-4 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1.5rem; }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

/* Car Single View */
.car-hero {
    height: 50vh;
    background-size: cover;
    background-position: center;
    position: relative;
    margin-top: 80px;
    border-radius: var(--radius);
    overflow: hidden;
}
.car-info-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}
.info-card {
    padding: 30px;
}
.spec-list {
    list-style: none;
    margin-top: 20px;
}
.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}
.spec-label { color: var(--text-secondary); }
.spec-value { font-weight: 600; }

/* Responsive */
@media (max-width: 900px) {
    .search-box {
        flex-direction: column;
        align-items: stretch;
    }
    .inventory-layout {
        flex-direction: column;
    }
    .filters-sidebar {
        width: 100%;
        position: static;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    /* Mobile Navigation */
    .mobile-menu-btn { display: block; }
    .desktop-only-btn { display: none; }
    .mobile-only-link { display: block; }
    
    .nav-links { 
        position: fixed;
        top: 80px; /* Below navbar */
        left: 0;
        right: 0;
        background: rgba(18, 18, 18, 0.98);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        flex-direction: column;
        padding: 30px;
        gap: 20px;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease-in-out;
        opacity: 0;
        pointer-events: none;
    }
    
    .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        opacity: 1;
        pointer-events: all;
    }
    
    .nav-links a { font-size: 1.2rem; display: block; padding: 10px 0; }
    
    /* Hero Adjustments */
    .hero { min-height: unset; height: auto; padding: 150px 0 100px; }
    .hero h1 { font-size: 3rem !important; }
    .hero p { font-size: 1.1rem !important; margin-bottom: 30px; }
    .hero .container > div:nth-child(3) { /* Button container */
        flex-direction: column;
        gap: 15px !important;
        margin-bottom: 40px !important;
        width: 100%;
        max-width: 300px;
    }
    .hero .container > div:nth-child(3) a { width: 100%; margin: 0; }
    
    /* Section Headers */
    .section-header { flex-direction: column; gap: 20px; text-align: center; }
    .section-header h2 { font-size: 2rem !important; }
    
    /* Car Detail Page */
    .car-info-grid { grid-template-columns: 1fr; }
    .car-hero { height: 35vh; margin-top: 100px; }
    
    /* Footer */
    footer .container { text-align: center; }
    footer .container > div {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .section { padding: 50px 0; }
    .hero h1 { font-size: 2.2rem !important; }
    .floating-whatsapp { bottom: 20px; right: 20px; width: 50px; height: 50px; }
    .floating-whatsapp svg { width: 28px; height: 28px; }
    .search-box { padding: 15px !important; }
    .search-input select, .search-input input, .btn { font-size: 0.95rem !important; }
}

/* Floating WhatsApp Widget */
.floating-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: var(--transition);
}
.floating-whatsapp svg {
    width: 35px;
    height: 35px;
}
.floating-whatsapp:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

/* Category Cards */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: -40px;
    position: relative;
    z-index: 10;
}
.category-card {
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius);
    padding: 25px 15px;
    text-align: center;
    transition: var(--transition);
    color: white;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}
.category-card:hover {
    transform: translateY(-8px);
    background: rgba(255,255,255,0.05);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.category-card svg {
    width: 48px;
    height: 48px;
    stroke: var(--accent);
}

/* Inventory Layout */
.inventory-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}
.filters-sidebar {
    width: 300px;
    flex-shrink: 0;
    padding: 25px;
    position: sticky;
    top: 100px; /* offset for navbar */
}

/* Feature/Trust Badges */
.feature-box {
    text-align: center;
    padding: 30px;
    border-radius: var(--radius);
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.feature-box:hover {
    transform: translateY(-8px);
    background: rgba(0,0,0,0.4);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.feature-icon {
    width: 60px;
    height: 60px;
    background: rgba(30, 135, 73, 0.1);
    color: var(--accent);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
}
.feature-icon svg {
    width: 30px;
    height: 30px;
}
