/* ========================================
   VehicleMart - Main Stylesheet
   ======================================== */

:root {
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --secondary: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --dark: #1f2937;
    --light: #f3f4f6;
    --text: #374151;
    --border: #e5e7eb;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* ========================================
   Global Styles
   ======================================== */

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

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.6;
}

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

/* ========================================
   Typography
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    color: var(--dark);
    margin-bottom: 1rem;
    font-weight: 600;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
    color: var(--text);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* ========================================
   Buttons
   ======================================== */

.btn-primary, .btn-secondary, .btn-login, .btn-signup, .btn-search {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

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

.btn-secondary:hover {
    background: #d97706;
}

.btn-login {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 0.5rem 1.25rem;
}

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

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

.btn-search {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

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

/* ========================================
   Navigation
   ======================================== */

.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.nav-links a {
    color: var(--text);
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.auth-links {
    display: flex !important;
    gap: 1rem !important;
    margin-left: auto;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 0.4rem;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text);
    transition: all 0.3s ease;
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 6rem 0;
    text-align: center;
}

.hero-content h1 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 3rem;
}

.hero-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.search-container {
    margin: 2rem 0;
}

.search-form {
    display: flex;
    justify-content: center;
}

.search-input-group {
    display: flex;
    width: 100%;
    max-width: 600px;
    gap: 0.5rem;
}

.search-input-group input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.action-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.action-card:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--white);
    transform: translateY(-4px);
}

.action-card i {
    font-size: 1.5rem;
}

/* ========================================
   Features Section
   ======================================== */

.features-section {
    padding: 4rem 0;
    background: var(--light);
}

.features-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
}

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

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text);
    font-size: 0.95rem;
}

/* ========================================
   Vehicles Grid
   ======================================== */

.vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.vehicle-card {
    background: var(--white);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

.vehicle-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.vehicle-image {
    position: relative;
    overflow: hidden;
    height: 200px;
    background: var(--light);
}

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

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

.vehicle-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--secondary);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.vehicle-content {
    padding: 1.5rem;
}

.vehicle-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.vehicle-specs {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    font-size: 0.85rem;
    color: var(--text);
}

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

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

.vehicle-seller {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
}

.seller-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--light);
    object-fit: cover;
}

.vehicle-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.vehicle-actions a {
    flex: 1;
    padding: 0.5rem;
    background: var(--primary);
    color: var(--white);
    text-align: center;
    border-radius: 0.3rem;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.vehicle-actions a:hover {
    background: var(--primary-dark);
}

/* ========================================
   Featured Section
   ======================================== */

.featured-section {
    padding: 4rem 0;
}

.featured-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

/* ========================================
   How It Works
   ======================================== */

.how-it-works {
    background: var(--light);
    padding: 4rem 0;
}

.how-it-works h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.step {
    text-align: center;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.step h3 {
    margin-bottom: 0.5rem;
}

/* ========================================
   Forms
   ======================================== */

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

input, textarea, select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.3rem;
    font-size: 1rem;
    font-family: inherit;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* ========================================
   CTA Section
   ======================================== */

.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.cta-section h2 {
    color: var(--white);
    margin-bottom: 2rem;
    font-size: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons a {
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

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

.cta-buttons .btn-primary:hover {
    background: var(--light);
    transform: translateY(-2px);
}

.cta-buttons .btn-secondary {
    background: var(--secondary);
    color: var(--white);
    border: 2px solid var(--white);
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background: var(--dark);
    color: var(--light);
    padding: 3rem 0 1rem;
}

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

.footer-section h4 {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-section p {
    color: rgba(243, 244, 246, 0.8);
    font-size: 0.95rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(243, 244, 246, 0.8);
    transition: color 0.3s ease;
}

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

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(243, 244, 246, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary);
}

.footer-bottom {
    border-top: 1px solid rgba(243, 244, 246, 0.1);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    color: rgba(243, 244, 246, 0.8);
    margin: 0;
}

.footer-bottom ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--white);
        gap: 0;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .search-input-group {
        flex-direction: column;
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    .vehicles-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-buttons a {
        width: 100%;
    }

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

    .footer-bottom ul {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }

    .hero {
        padding: 3rem 0;
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .action-card {
        padding: 1rem;
    }

    .vehicles-grid {
        grid-template-columns: 1fr;
    }

    .vehicle-specs {
        flex-wrap: wrap;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}
