/* Car Listings Styles */
.car-listings-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Filter Styles */
.car-filters {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.car-filters h3 {
    margin-top: 0;
    margin-bottom: 20px;
}

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

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

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.filter-actions {
    text-align: right;
    margin-top: 20px;
}

.filter-actions button {
    padding: 10px 20px;
    margin-left: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.filter-actions button[type="submit"] {
    background: #0073aa;
    color: white;
}

.filter-actions button[type="reset"] {
    background: #666;
    color: white;
}

/* Car List Styles */
.car-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.car-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.car-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.car-image {
    height: 200px;
    overflow: hidden;
}

.car-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #666;
}

.car-info {
    padding: 20px;
}

.car-info h3 {
    margin: 0 0 15px 0;
    color: #333;
}

.car-details {
    margin-bottom: 20px;
}

.detail-item {
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

.detail-item.price {
    font-size: 1.2em;
    color: #0073aa;
    font-weight: bold;
    border-top: 1px solid #eee;
    padding-top: 10px;
    margin-top: 15px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: #0073aa;
    color: white;
}

.btn-secondary {
    background: #666;
    color: white;
}

.btn:hover {
    opacity: 0.9;
}

/* Car Detail Styles */
.car-detail-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.car-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.back-link {
    color: #0073aa;
    text-decoration: none;
}

.car-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.car-gallery {
    position: sticky;
    top: 20px;
}

.main-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
}

.thumbnail-gallery {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: #0073aa;
}

.car-specifications h2 {
    margin-bottom: 20px;
    color: #333;
}

.spec-section {
    margin-bottom: 30px;
}

.spec-section h3 {
    margin-bottom: 15px;
    color: #0073aa;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.spec-label {
    font-weight: bold;
    color: #666;
}

.spec-value {
    color: #333;
}

.car-description,
.car-contact {
    grid-column: 1 / -1;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #ddd;
}

.description-text {
    line-height: 1.6;
    color: #555;
}

.contact-buttons {
    margin-top: 20px;
}

.contact-buttons .btn {
    margin-right: 15px;
}

.loading,
.error {
    text-align: center;
    padding: 40px;
    color: #666;
}

.error {
    color: #d63638;
}

/* Responsive Design */
@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
    }

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

    .car-detail-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .car-detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}