/* ==================== Global Styles ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #002C5F;
    --secondary-color: #0066CC;
    --accent-color: #E31837;
    --text-dark: #1a1a1a;
    --text-light: #64748b;
    --border-color: #e5e7eb;
    --bg-light: #f8f9fa;
    --success-color: #10b981;
    --error-color: #ef4444;
}

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

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

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

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

/* ==================== Header ==================== */
.main-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo h1 {
    font-size: 1.8em;
    color: var(--primary-color);
    margin: 0;
}

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

.tagline {
    font-size: 0.85em;
    color: var(--text-light);
    margin: 0;
}

.main-nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.main-nav a {
    color: var(--text-dark);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

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

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

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

.login-btn {
    background: var(--secondary-color);
    color: white !important;
    padding: 10px 24px !important;
    border-radius: 6px;
}

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

.login-btn::after {
    display: none;
}

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

.hero-content h2 {
    font-size: 3.5em;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.3em;
    margin-bottom: 40px;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* ==================== Buttons ==================== */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1em;
}

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

.btn-primary:hover {
    background: #c51530;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(227, 24, 55, 0.3);
}

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

.btn-secondary:hover {
    background: transparent;
    color: white;
}

.btn-full {
    width: 100%;
}

/* ==================== Sections ==================== */
.models-section,
.categories-section,
.features-section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5em;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 700;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1em;
    color: var(--text-light);
    margin-bottom: 50px;
}

/* ==================== Models Grid ==================== */
.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.model-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.model-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--bg-light);
}

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

.model-card:hover .model-image img {
    transform: scale(1.1);
}

.model-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 44, 95, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.model-card:hover .model-overlay {
    opacity: 1;
}

.view-parts-btn {
    background: white;
    color: var(--primary-color);
    padding: 12px 28px;
    border-radius: 6px;
    font-weight: 600;
}

.view-parts-btn:hover {
    background: var(--accent-color);
    color: white;
}

.model-card h3 {
    font-size: 1.5em;
    color: var(--primary-color);
    padding: 20px 20px 5px;
}

.model-card p {
    color: var(--text-light);
    padding: 0 20px 20px;
}

/* ==================== Categories Grid ==================== */
.categories-section {
    background: var(--bg-light);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.category-card {
    background: white;
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.category-card:hover {
    border-color: var(--secondary-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 102, 204, 0.15);
}

.category-icon {
    font-size: 3em;
    margin-bottom: 20px;
}

.category-card h3 {
    font-size: 1.4em;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.category-card p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.category-card a {
    color: var(--secondary-color);
    font-weight: 600;
}

.category-card a:hover {
    color: var(--accent-color);
}

/* ==================== Features ==================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.feature {
    text-align: center;
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    margin: 0 auto 20px;
}

.feature h3 {
    font-size: 1.3em;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.feature p {
    color: var(--text-light);
}

/* ==================== Footer ==================== */
.main-footer {
    background: var(--primary-color);
    color: white;
    padding: 60px 0 20px;
}

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

.footer-section h4 {
    margin-bottom: 20px;
    font-size: 1.2em;
}

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

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.main-footer.minimal {
    padding: 30px 0;
}

.main-footer.minimal .footer-bottom {
    border-top: none;
    padding-top: 0;
}

/* ==================== Login Page ==================== */
.login-page {
    background: var(--bg-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.login-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.login-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 1000px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.login-left {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.car-showcase {
    position: relative;
    margin-bottom: 30px;
}

.car-showcase img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.car-info {
    text-align: center;
    color: white;
    margin-top: 20px;
}

.car-info h3 {
    font-size: 1.8em;
    margin-bottom: 10px;
}

.car-info p {
    font-size: 1.1em;
    opacity: 0.9;
    margin-bottom: 15px;
}

.explore-link {
    color: white;
    font-weight: 600;
    opacity: 0.9;
}

.explore-link:hover {
    opacity: 1;
}

.showcase-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: white;
    width: 30px;
    border-radius: 5px;
}

.login-right {
    padding: 60px 50px;
}

.login-box h2 {
    font-size: 2em;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.login-subtitle {
    color: var(--text-light);
    margin-bottom: 40px;
}

.login-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1em;
    transition: all 0.3s ease;
}

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

.form-group input.error {
    border-color: var(--error-color);
}

.error-message {
    color: var(--error-color);
    font-size: 0.85em;
    margin-top: 6px;
    display: block;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9em;
}

.checkbox-label input {
    cursor: pointer;
}

.forgot-link {
    font-size: 0.9em;
    color: var(--secondary-color);
}

.login-divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.login-divider span {
    background: white;
    padding: 0 15px;
    color: var(--text-light);
    position: relative;
    z-index: 1;
}

.signup-section {
    text-align: center;
}

.signup-section p {
    margin-bottom: 15px;
    color: var(--text-light);
}

.login-help {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9em;
    color: var(--text-light);
}

/* ==================== Responsive Design ==================== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }

    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .hero-content h2 {
        font-size: 2.5em;
    }

    .hero-buttons {
        flex-direction: column;
        max-width: 300px;
        margin: 0 auto;
    }

    .login-container {
        grid-template-columns: 1fr;
    }

    .login-left {
        padding: 40px 30px;
    }

    .login-right {
        padding: 40px 30px;
    }

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