/* Стили для скелетонов загрузки */

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-card {
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s;
}

.skeleton-image {
    width: 100%;
    height: 220px;
    background: #f0f0f0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #c0c0c0;
}

.skeleton-content {
    padding: 20px;
}

.skeleton-title {
    height: 24px;
    background: #e0e0e0;
    border-radius: 4px;
    margin-bottom: 12px;
}

.skeleton-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 15px;
}

.skeleton-spec {
    height: 16px;
    background: #f0f0f0;
    border-radius: 4px;
}

.skeleton-price-section {
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
    margin-top: 15px;
}

.skeleton-price {
    height: 32px;
    background: #e0e0e0;
    border-radius: 4px;
    margin-bottom: 8px;
    width: 60%;
}

.skeleton-price-info {
    height: 14px;
    background: #f0f0f0;
    border-radius: 4px;
    margin-bottom: 3px;
    width: 80%;
}

.skeleton-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.skeleton-button {
    flex: 1;
    height: 40px;
    background: #f0f0f0;
    border-radius: 8px;
}

/* Индикатор загрузки */
.loading-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(44, 90, 160, 0.9);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Плавная анимация появления реальных данных */
.car-card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease-out forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Анимация для обновления фильтров */
.filter-updating {
    opacity: 0.7;
    pointer-events: none;
    transition: opacity 0.3s;
}

.filter-item.updating {
    background: #f0f7ff;
    border-radius: 4px;
    padding: 2px;
    margin: -2px;
    transition: all 0.3s;
}

/* Индикатор прогресса загрузки */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #2c5aa0, #4CAF50);
    transition: width 0.3s ease;
    z-index: 1000;
}

/* Стили для быстрого первоначального отображения */
.quick-load-message {
    background: #f0f7ff;
    border: 2px solid #2c5aa0;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #2c5aa0;
}

.quick-load-message .icon {
    font-size: 20px;
}

/* Адаптивность для скелетонов */
@media (max-width: 768px) {
    .skeleton-specs {
        grid-template-columns: 1fr;
    }
    
    .skeleton-buttons {
        flex-direction: column;
    }
}