/* General Body & Typography */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
}

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

h1, h2, h3 {
    color: #2c3e50;
    margin-bottom: 20px;
}

h1 { font-size: 2.5em; }
h2 { font-size: 2em; text-align: center; margin-top: 40px; }
h3 { font-size: 1.5em; }

a {
    color: #3498db;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header */
header {
    background-color: #2c3e50;
    color: #fff;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

header h1 {
    margin: 0;
    color: #fff;
    float: left;
    font-size: 1.8em;
}

header h1 a {
    color: #fff;
    text-decoration: none;
}

header nav {
    float: right;
}

header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

header nav ul li {
    display: inline-block;
    margin-left: 20px;
}

header nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

header nav ul li a:hover {
    color: #3498db;
    text-decoration: none;
}

/* Clearfix for header */
header .container::after {
    content: "";
    display: table;
    clear: both;
}

/* Hero Section */
#hero {
    background: src="/images/test1/image.jpg" no-repeat center center/cover;
    color: #fff;
    text-align: center;
    padding: 100px 0;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5); /* Overlay for readability */
}

.hero-content {
    position: relative;
    z-index: 1;
}

#hero h2 {
    font-size: 3em;
    margin-bottom: 10px;
    color: #fff;
}

#hero p {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #eee;
}

.btn {
    display: inline-block;
    background-color: #3498db;
    color: #fff;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    text-decoration: none;
}

.btn-details {
    background-color: #2ecc71; /* Green for details */
}

.btn-details:hover {
    background-color: #27ae60;
}

.btn-contact {
    background-color: #e67e22; /* Orange for contact */
    margin-left: 10px;
}

.btn-contact:hover {
    background-color: #d35400;
}


/* Sections */
section {
    padding: 60px 0;
    background-color: #fff;
    margin-top: 20px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0,0,0,0.05);
}

#inventory h2, #about h2, #contact h2 {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

#inventory h2::after, #about h2::after, #contact h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #3498db;
    margin: 10px auto 0;
}


/* Car Listing Styles */
.car-listing {
    display: flex;
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
    margin-bottom: 50px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.car-images {
    flex: 1; /* Takes up equal space */
    min-width: 300px; /* Minimum width before wrapping */
    padding: 20px;
    text-align: center;
    background-color: #ecf0f1;
}

.car-images .main-image {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 10px;
}

.thumbnail-gallery {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.thumbnail-gallery img {
    width: 80px; /* Fixed width for thumbnails */
    height: 60px; /* Fixed height for thumbnails */
    object-fit: cover;
    border-radius: 3px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.thumbnail-gallery img.active,
.thumbnail-gallery img:hover {
    border-color: #3498db;
    transform: translateY(-2px);
}

.car-details {
    flex: 1.5; /* Takes up more space for details */
    min-width: 300px; /* Minimum width before wrapping */
    padding: 20px 30px;
}

.car-details h3 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 1.8em;
}

.car-details .price {
    font-size: 2em;
    color: #e74c3c;
    font-weight: bold;
    margin-bottom: 20px;
}

.car-details ul {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.car-details ul li {
    background-color: #f8f8f8;
    padding: 8px 12px;
    margin-bottom: 5px;
    border-left: 3px solid #3498db;
    border-radius: 3px;
}

.car-details .description {
    margin-bottom: 25px;
    font-size: 0.95em;
    color: #555;
}


/* About Section */
#about p {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 20px;
    font-size: 1.1em;
}


/* Contact Section */
.contact-info {
    text-align: center;
    margin-bottom: 40px;
}

.contact-info p {
    margin: 10px 0;
    font-size: 1.1em;
}

.contact-info ul {
    list-style: none;
    padding: 0;
    margin-top: 15px;
}

.contact-info ul li {
    margin-bottom: 5px;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
    width: calc(100% - 20px); /* Account for padding */
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form input[type="tel"]:focus,
.contact-form textarea:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

.contact-form textarea {
    resize: vertical;
}

.contact-form .btn {
    width: auto;
    display: block;
    margin: 0 auto;
    text-align: center;
}


/* Footer */
footer {
    background-color: #2c3e50;
    color: #fff;
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
}

footer p {
    margin: 0;
    font-size: 0.9em;
}

.social-links {
    margin-top: 15px;
}

.social-links a {
    color: #fff;
    margin: 0 10px;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #3498db;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        float: none;
        text-align: center;
        margin-bottom: 15px;
    }

    header nav {
        float: none;
        text-align: center;
    }

    header nav ul li {
        margin: 0 10px;
    }

    #hero h2 {
        font-size: 2.2em;
    }

    #hero p {
        font-size: 1em;
    }

    .car-listing {
        flex-direction: column; /* Stack image and details vertically */
    }

    .car-images, .car-details {
        min-width: unset; /* Remove min-width to allow full stacking */
        width: 100%;
        padding: 15px;
    }

    .btn-contact {
        margin-left: 0; /* Remove left margin for stacking */
        margin-top: 10px; /* Add top margin */
    }
}

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

    h1 { font-size: 2em; }
    h2 { font-size: 1.8em; }
    h3 { font-size: 1.3em; }

    header nav ul li {
        display: block;
        margin: 10px 0;
    }

    #hero {
        padding: 60px 0;
    }

    .contact-form {
        padding: 20px;
    }

    .thumbnail-gallery img {
        width: 60px;
        height: 45px;
    }
}/* Car Detail Page Specific Styles */
#car-detail {
background-color: #fff;
padding: 40px;
border-radius: 8px;
box-shadow: 0 0 15px rgba(0,0,0,0.05);
}

.back-to-inventory {
    display: inline-block;
    margin-bottom: 30px;
    font-weight: bold;
    color: #3498db;
    transition: color 0.3s ease;
}

.back-to-inventory:hover {
    color: #2980b9;
    text-decoration: underline;
}

.car-title {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 40px;
    color: #2c3e50;
}

.car-gallery {
    text-align: center;
    margin-bottom: 40px;
}

.main-image-detail {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.thumbnail-gallery-detail {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.thumbnail-gallery-detail img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.thumbnail-gallery-detail img.active,
.thumbnail-gallery-detail img:hover {
    border-color: #3498db;
    transform: translateY(-3px);
}

.car-specs-price {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
    justify-content: space-between;
}

.car-price-block {
    flex: 1;
    min-width: 250px;
    background-color: #e74c3c;
    color: #fff;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.price-detail {
    font-size: 3.5em;
    font-weight: bold;
    margin: 0 0 15px;
}

.car-price-block .btn {
    background-color: #2c3e50;
    color: #fff;
    width: 80%;
    padding: 15px 20px;
    font-size: 1.1em;
}

.car-price-block .btn:hover {
    background-color: #34495e;
}

.car-specifications {
    flex: 2;
    min-width: 300px;
    background-color: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.car-specifications h3 {
    margin-top: 0;
    color: #3498db;
    text-align: center;
    margin-bottom: 25px;
}

.car-specifications ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.car-specifications ul li {
    background-color: #fff;
    padding: 10px 15px;
    border-left: 4px solid #2ecc71;
    border-radius: 5px;
    font-size: 0.95em;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.car-description-long {
    margin-top: 40px;
    padding: 25px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.car-description-long h3 {
    color: #3498db;
    margin-bottom: 20px;
    text-align: center;
}

.car-description-long p {
    margin-bottom: 15px;
    text-align: justify;
    line-height: 1.8;
}

.features-list {
    list-style: none;
    padding: 0;
    margin-top: 25px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px;
}

.features-list li {
    background-color: #ecf0f1;
    padding: 10px 15px;
    border-radius: 5px;
    border-left: 4px solid #e67e22;
    font-size: 0.9em;
}

.contact-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.contact-section h2 {
    text-align: center;
    color: #2c3e50;
}

/* Inherit contact-form styles from main CSS */
/* @media for car-detail page */
@media (max-width: 768px) {
    .car-specs-price {
        flex-direction: column;
    }

    .car-price-block, .car-specifications {
        min-width: unset;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .thumbnail-gallery-detail img {
        width: 90px;
        height: 60px;
    }

    .car-specifications ul {
        grid-template-columns: 1fr; /* Stack items */
    }

    .features-list {
        grid-template-columns: 1fr;
    }
}
