/* CarsLookup - Main Stylesheet */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-600: #475569;
    --gray-800: #1e293b;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

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

/* Header */
.main-header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--dark);
}

.logo-icon {
    font-size: 28px;
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
}

.main-nav {
    display: flex;
    gap: 25px;
}

.main-nav a {
    text-decoration: none;
    color: var(--gray-600);
    font-weight: 500;
    transition: color 0.2s;
}

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

/* Main Content */
.main-content {
    min-height: calc(100vh - 180px);
    padding: 30px 0;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
    margin: -30px 0 30px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
}

.hero-stat {
    text-align: center;
}

.hero-stat .number {
    font-size: 2rem;
    font-weight: 700;
}

.hero-stat .label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Search Box */
.search-box {
    max-width: 600px;
    margin: 30px auto 0;
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
}

.search-box button {
    padding: 15px 30px;
    background: var(--dark);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.search-box button:hover {
    background: #0f172a;
}

/* Section Titles */
.section-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--dark);
}

/* Brand Grid */
.brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}

.brand-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: var(--dark);
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.brand-card .brand-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.brand-card .brand-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.brand-card .brand-count {
    font-size: 0.85rem;
    color: var(--secondary);
}

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

.car-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.car-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.car-card-image {
    height: 160px;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.car-card-body {
    padding: 20px;
}

.car-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.car-card-title a {
    color: var(--dark);
    text-decoration: none;
}

.car-card-title a:hover {
    color: var(--primary);
}

.car-card-subtitle {
    color: var(--secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.car-card-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.car-spec {
    background: var(--gray-100);
    padding: 8px 12px;
    border-radius: 6px;
}

.car-spec-label {
    font-size: 0.75rem;
    color: var(--secondary);
    text-transform: uppercase;
}

.car-spec-value {
    font-weight: 600;
    color: var(--dark);
}

/* Specs Table (Car Detail Page) */
.specs-section {
    background: white;
    border-radius: var(--radius);
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.specs-section-title {
    background: var(--primary);
    color: white;
    padding: 12px 20px;
    font-weight: 600;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table tr {
    border-bottom: 1px solid var(--gray-200);
}

.specs-table tr:last-child {
    border-bottom: none;
}

.specs-table th {
    text-align: left;
    padding: 12px 20px;
    background: var(--gray-100);
    color: var(--secondary);
    font-weight: 500;
    width: 40%;
}

.specs-table td {
    padding: 12px 20px;
    color: var(--dark);
}

/* Compare Page */
.compare-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.compare-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.compare-header {
    background: var(--gray-100);
    padding: 20px;
    text-align: center;
}

.compare-header h3 {
    margin-bottom: 5px;
}

.compare-body {
    padding: 20px;
}

.compare-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-200);
}

.compare-row:last-child {
    border-bottom: none;
}

.compare-label {
    color: var(--secondary);
}

.compare-value {
    font-weight: 600;
}

/* Search Filters */
.filters {
    background: white;
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.filter-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 150px;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--gray-600);
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 14px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

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

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

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 30px;
}

.pagination a,
.pagination span {
    padding: 10px 15px;
    background: white;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--dark);
    box-shadow: var(--shadow);
}

.pagination a:hover {
    background: var(--primary);
    color: white;
}

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

/* Breadcrumbs */
.breadcrumbs {
    margin-bottom: 20px;
    color: var(--secondary);
}

.breadcrumbs a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

/* Footer */
.main-footer {
    background: var(--dark);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

.footer-stats {
    margin-top: 10px;
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .main-header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-nav {
        gap: 15px;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .brand-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .filter-row {
        flex-direction: column;
    }
}
