/* Base Variables and Resets */
:root {
    --primary: #cc0000; /* Deep automotive red */
    --primary-dark: #990000;
    --primary-light: #ff3333;
    --secondary: #1a1a1a;
    --text-dark: #333333;
    --text-gray: #666666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --transition: all 0.3s ease;
    --shadow: 0 4px 6px rgba(0,0,0,0.05), 0 10px 15px rgba(0,0,0,0.1);
    --shadow-hover: 0 10px 15px rgba(204, 0, 0, 0.1), 0 20px 25px rgba(0,0,0,0.15);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--secondary);
    line-height: 1.2;
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
}

.text-primary { color: var(--primary); }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
    text-align: center;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(204,0,0,0.3);
}

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

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

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Navigation */
.navbar {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logo-red {
    color: var(--primary);
}

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

.nav-link {
    font-weight: 500;
    color: var(--text-dark);
    position: relative;
}

.nav-link:hover {
    color: var(--primary);
}

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

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

/* Navigation Dropdown (Desktop) */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-header {
    display: flex;
    align-items: center;
    width: 100%;
}

.dropdown-toggle-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--secondary);
    align-items: center;
    justify-content: center;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    min-width: 240px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0;
    z-index: 100;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu .nav-link {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-dropdown-menu .nav-link::after {
    display: none;
}

.nav-dropdown-menu .nav-link:hover {
    background-color: var(--bg-light);
    color: var(--primary);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--secondary);
    cursor: pointer;
}

/* Main Content Container */
#app {
    min-height: calc(100vh - 80px - 300px); /* rough footprint subtracting header and footer */
}

/* Page Transitions */
.page-enter {
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero Section */
.hero {
    position: relative;
    height: 85vh;
    display: flex;
    align-items: center;
    background-color: var(--secondary);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 100%);
    z-index: 1;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.6;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    max-width: 600px;
}

.hero-content h1 {
    color: var(--white);
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: #e5e5e5;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

/* Section Selectors (City -> Brand -> Type) */
.selector-section {
    padding: 5rem 0;
    background-color: var(--white);
}

.selector-steps {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.step-item {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.step-item.active {
    color: var(--primary);
}

.step-item .step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #eee;
    font-size: 0.9rem;
}

.step-item.active .step-num {
    background-color: var(--primary);
    color: var(--white);
}

.selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 2rem;
}

.selector-card {
    background-color: var(--bg-light);
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.selector-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.selector-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.selector-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Featured Brands Section */
.brands-section {
    padding: 4rem 0;
    background-color: var(--bg-light);
}

.brands-grid {
    display: flex;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.brand-card {
    width: 200px;
    height: 120px;
    background-color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
}

.brand-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* 3S Services Highlight */
.services-highlight {
    padding: 5rem 0;
    background-color: var(--white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 2rem;
}

.service-card {
    padding: 2rem;
    background-color: var(--bg-light);
    border-top: 4px solid var(--primary);
    border-radius: 4px;
    transition: var(--transition);
}

.service-card:hover {
    box-shadow: var(--shadow);
}

.service-card .icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    display: inline-block;
}

.service-card h3 {
    margin-bottom: 1rem;
}

/* Vehicles Listing / Grid */
.vehicles-listing {
    padding: 4rem 0;
}

.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 2.5rem;
}

.vehicle-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.vehicle-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.vehicle-img-wrap {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.vehicle-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.vehicle-card:hover .vehicle-img-wrap img {
    transform: scale(1.05);
}

.vehicle-brand-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.vehicle-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.vehicle-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.vehicle-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.vehicle-specs-brief {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-gray);
    flex-wrap: wrap;
}

.vehicle-specs-brief span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.vehicle-card-actions {
    margin-top: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Vehicle Detail Page */
.vehicle-detail {
    padding: 3rem 0;
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.detail-gallery img {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.detail-info h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.detail-brand {
    font-size: 1.2rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: block;
}

.spec-list {
    list-style: none;
    margin: 2rem 0;
}

.spec-list li {
    padding: 1rem 0;
    border-bottom: 1px solid #eaeaea;
    display: flex;
    justify-content: space-between;
}

.spec-list li span:first-child {
    font-weight: 600;
    color: var(--text-gray);
}

/* Vehicle Detail Table Form */
.vehicle-specs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    box-shadow: var(--shadow);
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
}

.vehicle-specs-table th, 
.vehicle-specs-table td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid #eaeaea;
}

.vehicle-specs-table th {
    background-color: var(--bg-light);
    font-weight: 600;
    color: var(--secondary);
    width: 40%;
}

.vehicle-specs-table tr:last-child th,
.vehicle-specs-table tr:last-child td {
    border-bottom: none;
}

.spec-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.feature-tag {
    background-color: var(--bg-light);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--secondary);
}

/* Forms */
.lead-form-box {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--primary);
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(204,0,0,0.1);
}

/* Common Pages (About, Services, Contact) */
.page-header {
    background-color: var(--secondary);
    color: var(--white);
    padding: 6rem 0 4rem;
    text-align: center;
}

.page-header h1 {
    color: var(--white);
    margin-bottom: 1rem;
}

.content-section {
    padding: 5rem 0;
}

/* Footer */
.footer {
    background-color: var(--secondary);
    color: #e5e5e5;
    padding: 4rem 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer h3, .footer h4 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.footer p {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer a {
    display: block;
    margin-bottom: 0.75rem;
}

.footer a:hover {
    color: var(--primary);
}

.trust-badges {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.badge {
    background: rgba(255,255,255,0.1);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.footer-bottom {
    background-color: #111;
    text-align: center;
    padding: 1.5rem;
    font-size: 0.9rem;
}

/* Sticky WhatsApp */
.whatsapp-sticky {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 999;
    transition: var(--transition);
}

.whatsapp-sticky:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 14px rgba(0,0,0,0.3);
}

.whatsapp-sticky svg {
    width: 35px;
    height: 35px;
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
    .detail-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .mobile-order-1 {
        order: -1;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        gap: 0;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease;
    }
    
    .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        overflow-y: auto;
        max-height: calc(100vh - 80px);
    }
    
    .nav-link {
        width: 100%;
        padding: 1.5rem;
        text-align: center;
        border-bottom: 1px solid #eee;
    }
    
    /* Mobile Dropdown Overrides */
    .nav-dropdown-menu {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        background-color: var(--bg-light);
        border-radius: 0;
        width: 100%;
    }
    
    .nav-dropdown-menu.expanded {
        display: flex;
    }
    
    .nav-dropdown:hover .nav-dropdown-menu:not(.expanded) {
        display: none;
    }

    .dropdown-toggle-btn {
        display: flex;
        padding: 1.5rem;
        border-bottom: 1px solid #eee;
    }
    
    .nav-dropdown-header {
        display: flex;
        align-items: stretch;
    }
    
    .nav-dropdown-header .nav-link {
        flex-grow: 1;
        text-align: left;
        padding-left: 2rem;
    }
    
    .nav-dropdown-menu .nav-link {
        padding: 1rem 2rem;
        text-align: left;
        font-size: 0.9rem;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .nav-btn {
        width: calc(100% - 3rem);
        margin: 1.5rem;
    }
    
    h1 {
        font-size: 2.25rem;
    }
    
    .hero {
        height: auto;
        padding: 6rem 0;
    }
    
    .hero-buttons {
        flex-direction: column;
    }

    .selector-steps {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .brands-grid {
        gap: 1.5rem;
    }
}
