/* --- GLOBAL RESET & VARIABLES --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #ef4236;
    --primary-dark: #c0392b;
    --dark: #0f172a;
    --gray: #64748b;
    --light: #f1f5f9;
    --white: #ffffff;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body {
    background-color: var(--light);
    color: var(--dark);
    font-family: 'Plus Jakarta Sans', sans-serif; /* Ensure this font is loaded in header */
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden; /* Prevents horizontal scrollbar */
}

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    width: 92%; 
}

a { text-decoration: none; transition: all 0.2s ease; color: inherit; }
img { max-width: 100%; display: block; }
.bg-white { background-color: var(--white); }

/* --- HERO SECTION --- */
.hero-section {
    position: relative;
    background: var(--dark);
    padding: 100px 0 140px;
    color: white;
    text-align: center;
    /* Fallback color if image fails */
    background-color: #0f172a; 
    background-image: url('https://images.unsplash.com/photo-1601584115197-04ecc0da31d7?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
}

.hero-bg-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.7));
    z-index: 1;
}

.hero-container { position: relative; z-index: 10; }

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: white;
}

.hero-sub {
    font-size: 1.1rem;
    color: #cbd5e1;
    max-width: 600px;
    margin: 0 auto 40px;
}

/* --- FIXED HERO SEARCH BOX --- */
.hero-search-box {
    background: var(--white);
    padding: 8px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255,255,255,0.1);
    gap: 10px;
}

.search-input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 5px 15px;
}

.search-input-group label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 2px;
}

.search-select {
    width: 100%;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark);
    outline: none;
    background: transparent;
    cursor: pointer;
    height: 24px; /* Fix height for alignment */
}

.search-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

.search-btn {
    background: var(--primary);
    color: white;
    border: none;
    height: 56px; /* Matches input group height */
    padding: 0 30px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.search-btn:hover { background: var(--primary-dark); }

.hero-tags {
    margin-top: 25px;
    font-size: 0.85rem;
    color: #94a3b8;
}
.hero-tags span { margin-right: 5px; opacity: 0.7; }
.hero-tags a {
    color: white;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    margin-left: 10px;
}

/* --- TRUST STRIP --- */
.trust-strip {
    background: #1e293b;
    border-top: 1px solid #334155;
    padding: 20px 0;
    color: white;
    margin-bottom: 40px;
}
.trust-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap; /* Allows wrapping on small screens */
}
.trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.9rem;
}
.trust-item i { color: var(--primary); font-size: 1.2rem; }

/* --- SECTIONS GENERAL --- */
.section-pad { padding: 60px 0; }
.sec-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
    flex-wrap: wrap; /* Safety for mobile */
    gap: 10px;
}
h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.5px;
    margin-bottom: 5px;
}
.sec-sub { margin: 0; color: var(--gray); font-size: 0.95rem; }
.view-all {
    color: var(--primary);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

/* --- CATEGORY GRID (Fixed responsiveness) --- */
.cat-grid {
    display: grid;
    /* Auto-fit: Creates as many columns as fit, min 130px wide */
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 20px;
}
.cat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 10px;
    text-align: center;
    transition: 0.2s;
    height: 100%; /* Ensures equal height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.cat-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}
.cat-icon {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 8px;
}
.cat-card h3 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--dark);
}

/* --- VEHICLE CARDS (Fixed Overflow) --- */
.veh-list-grid {
    display: grid;
    /* Min 260px wide cards, auto-filling the row */
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
}
.veh-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
}
.veh-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-4px);
}

.badge-featured {
    position: absolute; top: 12px; left: 12px;
    background: #fbbf24; color: #78350f;
    font-size: 0.7rem; font-weight: 800;
    padding: 4px 8px; border-radius: 4px;
    z-index: 5; text-transform: uppercase;
}

.veh-img-box {
    height: 180px;
    background: #f8fafc;
    overflow: hidden;
    display: block;
    position: relative;
}
.veh-img-box img {
    width: 100%; 
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.veh-card:hover .veh-img-box img { transform: scale(1.05); }

.veh-content { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.veh-meta { font-size: 0.7rem; color: var(--gray); font-weight: 700; text-transform: uppercase; margin-bottom: 6px; }
.veh-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 12px;
    display: block;
    line-height: 1.3;
}
.veh-specs-row {
    display: flex; gap: 15px;
    margin-bottom: 15px;
    font-size: 0.8rem; color: var(--gray); font-weight: 600;
}
.veh-specs-row i { color: #94a3b8; margin-right: 4px; }

.veh-footer {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px dashed var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.veh-price small { display: block; font-size: 0.7rem; color: var(--gray); font-weight: normal; }
.veh-price { font-size: 1rem; font-weight: 800; color: var(--dark); }

.btn-outline {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 6px;
    background: white;
}
.btn-outline:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* --- CTA SECTION --- */
.cta-section { padding: 40px 0; }
.cta-box {
    background: linear-gradient(135deg, var(--primary) 0%, #d12f24 100%);
    border-radius: 16px;
    padding: 50px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 15px 30px rgba(239, 66, 54, 0.25);
    flex-wrap: wrap; /* Wrap on mobile */
    gap: 30px;
}
.cta-text { max-width: 600px; }
.cta-text h2 { color: white; font-size: 2rem; margin-bottom: 10px; }
.cta-text p { font-size: 1.05rem; opacity: 0.9; margin-bottom: 20px; }
.cta-features { list-style: none; padding: 0; display: flex; gap: 20px; margin: 0; }
.cta-features li { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.9rem; }
.btn-white {
    background: white; color: var(--primary);
    padding: 14px 30px; border-radius: 8px;
    font-weight: 800; font-size: 1rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    white-space: nowrap;
}
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 15px 30px rgba(0,0,0,0.2); }

/* --- APPLICATION GRID --- */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}
.app-card {
    height: 240px;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    background-size: cover;
    background-position: center;
    background-color: #cbd5e1; /* Fallback */
}
.app-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9), transparent);
    color: white;
}
.app-overlay h3 { margin: 0; font-size: 1.1rem; font-weight: 700; color: white; }
.app-overlay p { margin: 2px 0 0; font-size: 0.85rem; opacity: 0.8; color: #cbd5e1; }

/* --- BRANDS FLEX --- */
.brands-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}
.brand-circle {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gray);
}
.brand-circle:hover { border-color: var(--dark); color: var(--dark); transform: translateY(-2px); }
.brand-initial {
    width: 22px; height: 22px;
    background: #e2e8f0;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 9px; font-weight: 800;
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    .hero-section { padding: 80px 0 100px; }
    .hero-content h1 { font-size: 2.2rem; }
    
    .hero-search-box { 
        flex-direction: column; 
        padding: 15px; 
        gap: 15px;
    }
    
    .search-input-group { width: 100%; padding: 5px 0; border-bottom: 1px solid var(--border); }
    .search-divider { display: none; }
    .search-btn { width: 100%; justify-content: center; }
    
    .sec-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    
    .cta-box { text-align: center; padding: 30px 20px; }
    .cta-features { justify-content: center; flex-direction: column; gap: 10px; }
    .btn-white { width: 100%; justify-content: center; }
}