/* Promotions Slider Styles */
.promotions-slider {
    margin-bottom: 60px;
}

/* Новый слайдер - контейнеры */
.promo-slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.promo-slider {
    position: relative;
    width: 100%;
    overflow: hidden; /* Скрываем элементы за пределами */
    padding: 20px 0;
}

.slider-track {
    display: flex;
    gap: 20px;
    transition: transform 0.5s ease-in-out;
}

.slider-item {
    /* flex задается через JS */
    transition: all 0.5s ease-in-out, flex 0.5s ease-in-out, flex-basis 0.5s ease-in-out;
    min-width: 240px; /* минимальная ширина для неактивных */
    flex-shrink: 0; /* Не сжимать элементы */
    will-change: flex, flex-basis, transform;
}

.slider-item .promo-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    border-radius: 24px;
    padding: 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.5s ease-in-out, background 0.5s ease-in-out, transform 0.5s ease-in-out;
    color: #4a5568;
    position: relative;
    will-change: background, transform;
}

.promo-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-height: 150px;
}

/* Уменьшенные отступы для 1 слайда */
.slider-item[style*="height: 500px"] .promo-content-wrapper {
    gap: 10px;
}

.slider-item[style*="height: 500px"] .promo-title {
    margin-bottom: 0.5rem;
}

.slider-item[style*="height: 500px"] .promo-description {
    margin: 8px 0;
}

.slider-item[style*="height: 500px"] .promo-discount {
    margin: 10px 0;
}

.slider-item .promo-title {
    color: #2d3748;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.slider-item .promo-description {
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.5;
    transition: opacity 0.3s ease;
    margin: 10px 0;
}

.slider-item .promo-discount {
    font-size: 48px;
    font-weight: 800;
    color: white;
    margin: 15px 0;
    text-align: left;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
}

.slider-item.active .promo-discount {
    color: white !important;
}

.slider-item .promo-button {
    background: white;
    color: #2549d8;
    border: none;
    padding: 12px 30px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.slider-item.active .promo-button:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Скрываем описание, скидку и кнопку у неактивных слайдов */
.slider-item:not(.active) .promo-description {
    display: none;
}

.slider-item:not(.active) .promo-discount {
    display: none;
}

.slider-item:not(.active) .promo-button {
    display: none;
}

/* Активный слайд - КРИТИЧНЫЕ стили с !important */
.slider-item.active .promo-card {
    background: linear-gradient(135deg, #2549d8 0%, #1e3cb8 100%) !important;
    color: white !important;
}

.slider-item.active .promo-title {
    color: white !important;
}

.slider-item.active .promo-description {
    color: rgba(255, 255, 255, 0.95) !important;
    display: block !important;
    font-size: 1rem;
}

.slider-item.active .promo-discount {
    display: flex !important;
    color: white !important;
}

.slider-item.active .promo-button {
    display: inline-block !important;
    margin-top: 10px;
}

/* Старый слайдер (для совместимости) */
.promo-slide {
    background: var(--brand-50);
    border-radius: 24px;
    padding: 40px;
    margin: 20px 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.promo-slide.active {
    background: var(--brand-500);
    color: var(--0);
    transform: scale(1.02);
    box-shadow: 0px 8px 25px rgba(37, 73, 216, 0.3);
}

.promo-slide:not(.active) {
    background: var(--50);
    color: var(--600);
    opacity: 0.7;
}

.promo-slide:not(.active) .promo-description {
    display: none;
}

.promo-slide:not(.active) .promo-discount {
    display: none;
}

.promo-slide:not(.active) .btn {
    display: none;
}

.promo-content {
    padding: 20px 0;
}

.promo-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.promo-slide.active .promo-title {
    color: var(--0);
}

.promo-slide:not(.active) .promo-title {
    color: var(--600);
    font-size: 24px;
}

.promo-description {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
    opacity: 0.9;
}

.promo-slide.active .promo-description {
    color: var(--0);
}

.promo-discount {
    font-size: 48px;
    font-weight: 800;
    color: white;
    margin-bottom: 30px;
    text-align: center;
}

.promo-slide.active .promo-discount {
    color: var(--0);
}

.promo-image {
    text-align: center;
}

.promo-image img {
    max-height: 400px;
    width: auto;
    border-radius: 16px;
}

/* Стили для 1 слайда (1400x500) */
.slider-item[style*="height: 500px"] .promo-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 30px 40px;
}

.slider-item[style*="height: 500px"] .promo-content-wrapper {
    flex: 1;
    max-width: 600px;
    min-height: auto;
}

.slider-item[style*="height: 500px"] .promo-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-item[style*="height: 500px"] .promo-image img {
    max-height: 420px;
    max-width: 100%;
    object-fit: contain;
}

/* Owl Carousel Customization */
.owl-carousel .owl-item {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.owl-carousel .owl-item.active {
    opacity: 1;
}

.owl-carousel .owl-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    z-index: 10;
}

.owl-carousel .owl-nav button {
    position: absolute;
    top: 0;
    width: 50px;
    height: 50px;
    background: var(--0) !important;
    border: 2px solid var(--brand-500) !important;
    border-radius: 50% !important;
    color: var(--brand-500) !important;
    font-size: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
}

.owl-carousel .owl-nav button:hover {
    background: var(--brand-500) !important;
    color: var(--0) !important;
    transform: scale(1.1);
}

.owl-carousel .owl-nav .owl-prev {
    left: -25px;
}

.owl-carousel .owl-nav .owl-next {
    right: -25px;
}

.owl-carousel .owl-dots {
    text-align: center;
    margin-top: 30px;
}

.owl-carousel .owl-dots .owl-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--100) !important;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.owl-carousel .owl-dots .owl-dot.active {
    background: var(--brand-500) !important;
    transform: scale(1.2);
}

/* Responsive */
@media (max-width: 768px) {
    .promo-slide {
        padding: 20px;
        margin: 10px 5px;
    }
    
    .promo-title {
        font-size: 24px;
    }
    
    .promo-slide:not(.active) .promo-title {
        font-size: 20px;
    }
    
    .promo-description {
        font-size: 14px;
    }
    
    .promo-discount {
        font-size: 36px;
    }
    
    .owl-carousel .owl-nav button {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .owl-carousel .owl-nav .owl-prev {
        left: -20px;
    }
    
    .owl-carousel .owl-nav .owl-next {
        right: -20px;
    }
}

/* Promotion Detail Page Styles */
.promotion-detail {
    background: var(--0);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0px 0px 4.8px 0px rgba(0, 0, 0, 0.06);
}

.promotion-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--900);
    line-height: 1.2;
}

.promotion-description {
    font-size: 18px;
    color: var(--600);
    line-height: 1.6;
}

.promotion-content {
    font-size: 16px;
    color: var(--900);
    line-height: 1.6;
}

.promotion-content h1,
.promotion-content h2,
.promotion-content h3,
.promotion-content h4,
.promotion-content h5,
.promotion-content h6 {
    color: var(--900);
    margin-top: 30px;
    margin-bottom: 15px;
}

.promotion-content p {
    margin-bottom: 15px;
}

.promotion-content ul,
.promotion-content ol {
    margin-bottom: 15px;
    padding-left: 30px;
}

.promotion-content li {
    margin-bottom: 5px;
}

.discount-badge {
    display: inline-block;
    background: var(--brand-500);
    color: var(--0);
    padding: 15px 30px;
    border-radius: 16px;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
}

.promotion-dates {
    background: var(--brand-50);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--brand-100);
}

.promotion-sidebar .card {
    border: 1px solid var(--100);
    border-radius: 16px;
    box-shadow: 0px 0px 4.8px 0px rgba(0, 0, 0, 0.06);
}

.promotion-sidebar .card-header {
    background: var(--brand-50);
    border-bottom: 1px solid var(--100);
    border-radius: 16px 16px 0 0;
    padding: 20px;
}

.promotion-sidebar .card-title {
    color: var(--900);
    font-weight: 600;
}

.promotion-stats .stat-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--100);
}

.promotion-stats .stat-item:last-child {
    border-bottom: none;
}

.product-item {
    padding: 15px;
    border: 1px solid var(--100);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.product-item:hover {
    border-color: var(--brand-500);
    box-shadow: 0px 4px 15px rgba(37, 73, 216, 0.1);
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--900);
    line-height: 1.3;
}

.product-price .current-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--brand-500);
}

/* Breadcrumb */
.breadcrumb {
    background: var(--50);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 0;
}

.breadcrumb-item a {
    color: var(--brand-500);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--brand-600);
}

.breadcrumb-item.active {
    color: var(--600);
}

/* Responsive */
@media (max-width: 768px) {
    .promotion-detail {
        padding: 20px;
    }
    
    .promotion-title {
        font-size: 24px;
    }
    
    .promotion-description {
        font-size: 16px;
    }
    
    .discount-badge {
        font-size: 20px;
        padding: 12px 24px;
    }
    
    .promotion-dates {
        padding: 15px;
    }
    
    .promotion-sidebar .card-header {
        padding: 15px;
    }
    
    .product-item {
        padding: 10px;
    }
}
