/*
 * karWheels - Main Stylesheet
 * 
 * This file contains all custom styles for the karWheels website.
 */

/* Global Styles */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --accent-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --border-color: #dee2e6;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
}

@font-face {
    font-family: 'Roboto';
    src: url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&display=swap');
    font-display: swap;
}

body {
    font-family: 'Roboto', sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #f5f5f5;
}

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

a:hover {
    color: #0a58ca;
}

/* Header & Navigation */
.top-bar {
    font-size: 0.9rem;
}

.navbar .nav-link {
    font-weight: 500;
    padding: 0.75rem 1rem;
}

.navbar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.dropdown-menu {
    border-radius: 0;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: none;
}

.dropdown-item:hover {
    background-color: var(--light-color);
}

.search-form .form-control {
    border-radius: 0.25rem 0 0 0.25rem;
}

.search-form .btn {
    border-radius: 0 0.25rem 0.25rem 0;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/hero-bg.jpg') no-repeat center center;
    background-size: cover;
    padding: 100px 0;
    color: white;
    margin-bottom: 2rem;
}

.hero-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero-section p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Car Cards */
.car-card {
    background-color: #fff;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
    height: 100%;
}

.car-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.car-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.car-card .card-body {
    padding: 1.25rem;
}

.car-card .card-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

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

.car-card .price {
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.car-card .rating {
    color: var(--warning-color);
    margin-bottom: 1rem;
}

.car-card .card-text {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.car-card .btn-group {
    width: 100%;
}

/* Section Titles */
.section-title {
    position: relative;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    text-align: center;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

.section-title h2 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--secondary-color);
}

/* Car Makes Grid */
.make-card {
    background-color: #fff;
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
    height: 100%;
}

.make-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.make-card img {
    height: 80px;
    width: auto;
    margin-bottom: 1rem;
}

.make-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Body Types Grid */
.body-type-card {
    background-color: #fff;
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
    height: 100%;
}

.body-type-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.body-type-card img {
    height: 80px;
    width: auto;
    margin-bottom: 1rem;
}

.body-type-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Car Details Page */
.car-details-header {
    background-color: #fff;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 2rem;
}

.car-details-header h1 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.car-details-header .make {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.car-details-header .price {
    font-weight: 700;
    color: var(--accent-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.car-details-header .rating {
    color: var(--warning-color);
    margin-bottom: 1rem;
}

.car-gallery {
    margin-bottom: 2rem;
}

.car-gallery .main-image {
    height: 400px;
    width: 100%;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.car-gallery .thumbnail {
    height: 80px;
    width: 100%;
    object-fit: cover;
    border-radius: 0.25rem;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.car-gallery .thumbnail:hover,
.car-gallery .thumbnail.active {
    opacity: 1;
}

.car-specs {
    background-color: #fff;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 2rem;
}

.car-specs h2 {
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.car-specs .spec-item {
    margin-bottom: 1.5rem;
}

.car-specs .spec-item .spec-label {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.car-description {
    background-color: #fff;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 2rem;
}

.car-description h2 {
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

/* Reviews Section */
.reviews-section {
    background-color: #fff;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 2rem;
}

.reviews-section h2 {
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.review-card {
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.review-card .user-info {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.review-card .user-info img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 1rem;
}

.review-card .user-info .username {
    font-weight: 600;
}

.review-card .rating {
    color: var(--warning-color);
    margin-bottom: 0.5rem;
}

.review-card .review-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.review-card .review-date {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.review-form {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-top: 2rem;
}

.review-form h3 {
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* Compare Cars Page */
.compare-section {
    background-color: #fff;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 2rem;
}

.compare-section h2 {
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.compare-form {
    margin-bottom: 2rem;
}

.compare-table {
    width: 100%;
}

.compare-table th {
    background-color: var(--light-color);
    font-weight: 600;
    padding: 1rem;
}

.compare-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

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

.compare-table .feature-name {
    font-weight: 600;
    background-color: var(--light-color);
}

/* Authentication Pages */
.auth-form {
    background-color: #fff;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    max-width: 500px;
    margin: 0 auto;
}

.auth-form h2 {
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-form .form-text {
    font-size: 0.9rem;
}

.auth-form .form-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* User Profile Page */
.profile-section {
    background-color: #fff;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 2rem;
}

.profile-section h2 {
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1.5rem;
}

.profile-info .info-item {
    margin-bottom: 1rem;
}

.profile-info .info-label {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

/* Search Results Page */
.search-results {
    background-color: #fff;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 2rem;
}

.search-results h2 {
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.search-results .result-count {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

/* Pagination */
.pagination {
    margin-top: 2rem;
}

.pagination .page-link {
    color: var(--primary-color);
    border-color: var(--border-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Footer */
footer {
    margin-top: 3rem;
}

footer h5 {
    font-weight: 600;
}

footer .border-bottom {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

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

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    text-align: center;
    line-height: 40px;
    display: none;
    z-index: 999;
}

/* Responsive Styles */
@media (max-width: 767.98px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .car-details-header {
        padding: 1.5rem;
    }
    
    .car-gallery .main-image {
        height: 300px;
    }
    
    .car-specs,
    .car-description,
    .reviews-section,
    .compare-section,
    .search-results {
        padding: 1.5rem;
    }
}

@media (max-width: 575.98px) {
    .hero-section {
        padding: 40px 0;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .section-title h2 {
        font-size: 1.5rem;
    }
    
    .car-gallery .main-image {
        height: 250px;
    }
    
    .car-details-header h1 {
        font-size: 1.5rem;
    }
}
