/* Стили для секции предложений автомобилей */

/* Основные стили секции */
.car-offers-section {
    background-color: #131316;
    color: var(--color-primary);
    padding: 80px 0;
    overflow: hidden;
}

/* Заголовок секции */
.car-offers-header {
    text-align: center;
    margin-bottom: 42px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.car-offers-badge {
    color: var(--color-accent);
    font-size: 16px;
    font-family: 'Geologica', sans-serif;
    font-weight: 500;
    line-height: 16px;
    text-transform: uppercase;
    letter-spacing: 0.48px;
    position: relative;
    padding: 6px 16px;
    border-radius: 20px;
    background: rgba(255, 219, 146, 0.15);
    border: 1px solid rgba(255, 219, 146, 0.3);
    backdrop-filter: blur(4px);
    overflow: hidden;
}

.car-offers-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
    transparent,
    rgba(255, 219, 146, 0.2),
    transparent
    );
    animation: badgeShine 2s infinite;
    z-index: -1;
}

@keyframes badgeShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.car-offers-badge {
    animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(255, 219, 146, 0);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 20px rgba(255, 219, 146, 0.3);
    }
}

.car-offers-title {
    color: var(--color-primary);
    font-size: 36px;
    font-family: 'Dela Gothic One', cursive;
    font-weight: 400;
    line-height: 43.2px;
    letter-spacing: 1.08px;
    margin: 0;
    text-align: center;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

/* Контейнер */
.car-offers-container {
    position: relative;
}

/* Десктопная сетка */
.car-offers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: start;
}

/* Мобильный слайдер - скрыт по умолчанию */
.car-offers-slider {
    display: none;
    position: relative;
    overflow: visible;
}

.car-offers-track {
    display: flex;
    transition: transform 0.4s ease;
}

.car-offer-slide {
    flex: 0 0 100%;
    width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
}

/* Карточка автомобиля */
.car-offer-card {
    width: 100%;
    padding-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: rgba(250, 250, 250, 0.02);
    border-radius: 20px;
    border: 2px solid rgba(250, 250, 250, 0.08);
    padding: 8px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.car-offer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 219, 146, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    border-radius: 20px;
    z-index: 1;
}

.car-offer-card:hover::before {
    opacity: 1;
}

.car-offer-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 219, 146, 0.3);
    box-shadow:
            0 16px 32px rgba(0, 0, 0, 0.4),
            0 0 20px rgba(255, 219, 146, 0.2);
    background: rgba(250, 250, 250, 0.04);
}

.car-offer-image {
    width: 100%;
    height: 320px;
    border-radius: 16px;
    border: 2px solid rgba(250, 250, 250, 0.12);
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.car-offer-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.car-offer-card:hover .car-offer-image::after {
    opacity: 1;
}

.car-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    filter: brightness(1.1) contrast(1.05);
}

.car-offer-card:hover .car-image {
    transform: scale(1.08);
}

/* Контент карточки */
.car-offer-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    z-index: 2;
    padding: 0 8px;
}

/* Цены */
.car-offer-prices {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 16px;
    background: rgba(250, 250, 250, 0.02);
    border-radius: 12px;
    margin: 0 -8px;
    border: 1px solid rgba(250, 250, 250, 0.06);
}

.car-price-current {
    display: flex;
    align-items: baseline;
    gap: 3px;
    position: relative;
}

.price-amount {
    color: var(--color-primary);
    font-size: 28px;
    font-family: 'Dela Gothic One', cursive;
    font-weight: 400;
    line-height: 33.6px;
    letter-spacing: 0.84px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: priceGlow 2.5s ease-in-out infinite;
}

@keyframes priceGlow {
    0%, 100% {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        filter: brightness(1);
    }
    50% {
        text-shadow:
                0 2px 4px rgba(0, 0, 0, 0.3),
                0 0 8px rgba(255, 219, 146, 0.6),
                0 0 16px rgba(255, 219, 146, 0.3);
        filter: brightness(1.1);
    }
}

.price-currency {
    color: var(--color-accent);
    font-size: 28px;
    font-family: 'Dela Gothic One', cursive;
    font-weight: 400;
    line-height: 33.6px;
    letter-spacing: 0.84px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: priceGlow 2.5s ease-in-out infinite;
}

.car-price-old {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    background: rgba(255, 0, 0, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 0, 0, 0.2);
    animation: oldPriceBlink 4s ease-in-out infinite;
}

@keyframes oldPriceBlink {
    0%, 95%, 100% { opacity: 1; }
    97.5% { opacity: 0.7; }
}

.price-instead {
    color: #70707B;
    font-size: 16px;
    font-family: 'Geologica', sans-serif;
    font-weight: 400;
    line-height: 25.6px;
}

.price-old-amount {
    color: #FF6B6B;
    font-size: 16px;
    font-family: 'Dela Gothic One', cursive;
    font-weight: 400;
    line-height: 19.2px;
    letter-spacing: 0.48px;
    text-decoration: line-through;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Заголовок автомобиля */
.car-offer-title {
    color: #E4E4E7;
    font-size: 18px;
    font-family: 'Geologica', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    line-height: 21.6px;
    text-align: center;
    padding: 8px 12px;
    background: rgba(250, 250, 250, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(250, 250, 250, 0.1);
    transition: all 0.3s ease;
}

.car-offer-card:hover .car-offer-title {
    color: var(--color-accent);
    background: rgba(255, 219, 146, 0.1);
    border-color: rgba(255, 219, 146, 0.3);
}

/* Навигация мобильного слайдера */
.car-offers-navigation {
    position: absolute;
    top: 50%;
    left: 15px;
    right: 15px;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 3;
    /* Исключаем кружочки из расчета высоты навигации */
    margin-bottom: -60px;
}

.car-nav-btn {
    width: 48px;
    height: 48px;
    background: rgba(250, 250, 250, 0.08);
    border: 2px solid rgba(250, 250, 250, 0.12);
    border-radius: 50%;
    color: var(--color-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: all;
    backdrop-filter: blur(12px);
    font-size: 18px;
}

.car-nav-btn:hover {
    background: rgba(250, 250, 250, 0.12);
    border-color: rgba(250, 250, 250, 0.16);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.car-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.car-nav-btn:disabled:hover {
    transform: none;
    background: rgba(250, 250, 250, 0.08);
    border-color: rgba(250, 250, 250, 0.12);
}

/* Индикаторы - исправляем обрезку */
.car-offers-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
    padding: 16px 0; /* Добавляем внутренние отступы */
    position: relative;
}

.car-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    position: relative;
    /* Добавляем место для анимации */
    margin: 4px;
}

.car-dot.active {
    background: #FFDB92;
    transform: scale(1.2);
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 219, 146, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(255, 219, 146, 0);
    }
}

.car-dot:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.car-dot.active:hover {
    background: #FFDB92;
    transform: scale(1.2);
}

/* Адаптивные стили для больших планшетов */
@media (max-width: 1200px) {
    .car-offers-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .car-offer-image {
        height: 300px;
    }
}

/* Адаптивные стили для планшетов */
@media (max-width: 991px) {
    .car-offers-section {
        padding: 60px 0;
    }

    .car-offers-title {
        font-size: 32px;
        line-height: 38.4px;
    }

    .car-offer-image {
        height: 280px;
    }

    .price-amount,
    .price-currency {
        font-size: 24px;
        line-height: 28.8px;
    }

    .price-instead,
    .price-old-amount {
        font-size: 14px;
    }

    .car-offer-title {
        font-size: 16px;
        line-height: 19.2px;
    }
}

/* Мобильная версия - слайдер */
@media (max-width: 768px) {
    .car-offers-section {
        padding: 60px 0 20px 0; /* Уменьшаем нижний отступ секции */
    }

    .car-offers-header {
        margin-bottom: 32px;
        gap: 8px;
    }

    .car-offers-badge {
        font-size: 14px;
        line-height: 14px;
        letter-spacing: 0.42px;
        padding: 4px 12px;
    }

    .car-offers-title {
        font-size: 24px;
        line-height: 28.8px;
    }

    /* Скрываем сетку, показываем слайдер */
    .car-offers-grid {
        display: none;
    }

    .car-offers-slider {
        display: block;
        padding-bottom: 0; /* Убираем padding-bottom, используем margin для dots */
    }

    .car-offer-image {
        height: 240px;
    }

    .price-amount,
    .price-currency {
        font-size: 20px;
        line-height: 24px;
    }

    .car-offer-title {
        font-size: 16px;
        line-height: 19.2px;
    }

    .car-nav-btn {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }

    /* Увеличиваем отступы для кружочков на мобильных */
    .car-offers-dots {
        padding: 20px 0;
        margin-top: 24px;
    }
}

/* Стили для очень маленьких экранов */
@media (max-width: 576px) {
    .car-offers-section {
        padding: 40px 0 10px 0; /* Корректируем отступы */
    }

    .car-offers-title {
        font-size: 20px;
        line-height: 24px;
    }

    .car-offer-image {
        height: 220px;
    }

    .price-amount,
    .price-currency {
        font-size: 18px;
        line-height: 21.6px;
    }

    .car-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .car-offers-navigation {
        left: 10px;
        right: 10px;
    }

    .car-dot {
        width: 14px;
        height: 14px;
        margin: 3px; /* Уменьшаем отступы для маленьких экранов */
    }

    .car-offers-slider {
        padding-bottom: 0; /* Убираем padding-bottom */
    }

    .car-offers-dots {
        padding: 16px 0;
        margin-top: 20px;
    }
}