/* AutoScout24 JSON Cars Styles */

.as24-cars-grid {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

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

.as24-car-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.as24-car-card .car-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

.as24-car-card:hover .car-image img {
    transform: scale(1.05);
}

.as24-car-card .car-info {
    padding: 15px;
}

.as24-car-card h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
}

.as24-car-card h3 a {
    text-decoration: none;
    color: inherit;
}

.as24-car-card h3 a:hover {
    color: #007cba;
}

.as24-filters h3 {
    margin: 0 0 15px 0;
    color: #333;
}

.as24-filters select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

.as24-filters select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 123, 186, 0.2);
}

.as24-car-details {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}


.as24-car-details .car-header h1 {
    margin: 0 0 10px 0;
    font-size: 32px;
}

.as24-car-details .image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.as24-car-details .image-gallery img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.as24-car-details .image-gallery img:hover {
    transform: scale(1.05);
}

.as24-car-details .car-basic-info,
.as24-car-details .car-equipment,
.as24-car-details .car-seller {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.as24-car-details .car-seller {
    background: #f0f8ff;
}

.as24-car-details h3 {
    margin: 0 0 15px 0;
    color: #333;
    border-bottom: 2px solid #007cba;
    padding-bottom: 5px;
}

/* Image Modal */
#imageModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    cursor: pointer;
}

#imageModal .modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
}

#imageModal img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
}

#imageModal .modal-title {
    color: white;
    text-align: center;
    margin-top: 10px;
    font-size: 18px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .as24-cars-grid {
        grid-template-columns: 1fr;
    }
    
    .as24-car-details .car-header h1 {
        font-size: 24px;
    }
    
    .as24-car-details .image-gallery {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .as24-filters {
        padding: 10px;
    }
    
    .as24-filters > div {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .as24-car-details {
        padding: 10px;
    }
    
    .as24-car-details .car-header {
        padding: 20px;
    }
    
    .as24-car-details .car-header h1 {
        font-size: 20px;
    }
}

/* Loading Animation */
.as24-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* No Results */
#as24-no-results {
    text-align: center;
    padding: 40px;
    color: #666;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #ddd;
}

#as24-no-results h3 {
    margin: 0 0 10px 0;
    color: #666;
}

/* Price Highlight */
.car-price {
    font-size: 20px;
    font-weight: bold;
    color: #007cba;
}

.car-price.large {
    font-size: 28px;
}

/* Equipment List */
.equipment-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.equipment-item {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #28a745;
}

.equipment-item h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

.equipment-item ul {
    margin: 0;
    padding-left: 20px;
}

.equipment-item li {
    margin-bottom: 5px;
    color: #666;
}

/* Seller Info */
.seller-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.seller-info-item {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #007cba;
}

.seller-info-item strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.seller-info-item span {
    color: #666;
}
