
/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    color: #333;
    background: url("/images/backgroung.jpg") center center/cover no-repeat fixed, darkgrey;
}

/* Layout Containers */
.container,
.container-search {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    flex-wrap: wrap;
}

/* Header & Navigation */
header {
    background-color: #2B2B33FF;
    color: white;
    padding: 20px 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.site-logo {
    height: 40px;
    max-width: 100%;
    display: block;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

nav a {
    color: white;
    text-decoration: none;
    margin: 5px 10px;
    font-weight: bold;
}

/* Featured Listings */
.featured-scroll {
    margin: auto;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 40px;
    width: 100%;
    max-width: 1200px;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 20px;
}

.featured-listings h2 {
    text-align: center;
    padding: 30px 0;
}

.car-card {
    height: 210px;
    width: 200px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.car-card a {
    display: block;
    color: inherit;
    text-decoration: none;
    height: 100%;
    width: 100%;
}


.car-card:hover {
    transform: translateY(-3px);
}

.car-card img {
    width: 100%;
    height: 130px;
    object-fit: fill;
}

.car-info-wrapper {
    display: block;
    padding: 10px;
}

.car-card-name {
    font-size: 15px;
    color: #2b2b33;
}
.price-year-wrapper {
    display: block;
}
.car-card-price {
    padding: 5px 0;
    font-size: 12px;
}
.car-card-year {
    font-size: 12px;
}

/* Footer */
footer {
    background-color: #2b2b33;
    color: white;
    text-align: center;
    padding: 15px 0;
    margin-top: 40px;
}

/* Search Section */
.search-tabs {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin: 30px auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

.tab-buttons {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
}

.tab-buttons button {
    flex: 1;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    background: #eee;
    border: none;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    transition: 0.2s;
}

.tab-buttons button.active {
    background: #fff;
    border-bottom: 3px solid orange;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.search-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.search-form select,
.search-form input,
.search-button {
    padding: 12px;
    font-size: 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.search-button {
    background: orange;
    color: white;
    font-weight: bold;
    border: none;
    cursor: pointer;
}

/* Listing Results */
.listing-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 960px;
    margin: 30px auto;
    padding: 0 15px;
}

.listing-card {
    display: flex;
    height: 200px;
    max-width: 680px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}
.listing-card a {
    display: flex;
    color: inherit;
    text-decoration: none;
    max-width: 680px;
    height: 200px;
}


.listing-card:hover {
    transform: translateY(-2px);
}

.listing-card img {
    width: 250px;
    height: 200px;
    object-fit: contain;
}

.listing-details {
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

.listing-details h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: #003366;
}

.listing-price {
    font-size: 20px;
    font-weight: bold;
    color: #d62828;
}

.listing-location {
    font-size: 14px;
    color: #444;
    margin-top: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        align-items: center;
    }

    .site-logo {
        height: 30px;
        margin-bottom: 10px;
    }
    .featured-scroll {
        margin: auto;
        gap: 10px;
        padding: 10px;
        width: 100%;
    }

    .car-card {
        width: 45%;
    }

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



    .listing-card img {
        width: 250px;
        height: 200px;
        object-fit: contain;
    }

    .listing-details {
        padding: 15px;
    }
}

@media (max-width: 480px) {

    .featured-scroll {
        margin: auto;
        gap: 10px;
        padding: 10px;
        width: 100%;
    }
    .car-card {
        width: 48%;
    }

    .car-card img {
        height: 130px;
        object-fit: cover;
    }
    .listing-card img {
        width: 200px;
        height: 200px;
        object-fit: contain;
    }
    .listing-details h3 {
        font-size: 15px;
        margin-bottom: 4px;
        color: #003366;
    }
}
/* Hide toggle by default, show only on mobile */
.mobile-toggle {
    display: none;
    background: orange;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

/* Desktop: search-tabs always visible */
.search-tabs {
    display: block;
}

/* Mobile behavior */
@media (max-width: 768px) {
    .mobile-toggle {
        display: inline-block;
    }

    .search-tabs {
        display: none;
        margin-top: 20px;
    }

    .search-tabs.active {
        display: block;
    }
}
