/* ==========================================================================
   ANIMATIONS & DYNAMIC ENHANCEMENTS
   ========================================================================== */

/* ===== SCROLL FADE-UP ===== */
.fade-up {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.55s ease, transform 0.55s ease;
    will-change: opacity, transform;
}
.fade-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .fade-up {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Stagger delays for grid children */
.stagger-children > .fade-up:nth-child(1)  { transition-delay: 0s; }
.stagger-children > .fade-up:nth-child(2)  { transition-delay: 0.07s; }
.stagger-children > .fade-up:nth-child(3)  { transition-delay: 0.14s; }
.stagger-children > .fade-up:nth-child(4)  { transition-delay: 0.21s; }
.stagger-children > .fade-up:nth-child(5)  { transition-delay: 0.28s; }
.stagger-children > .fade-up:nth-child(6)  { transition-delay: 0.35s; }
.stagger-children > .fade-up:nth-child(7)  { transition-delay: 0.42s; }
.stagger-children > .fade-up:nth-child(8)  { transition-delay: 0.49s; }
.stagger-children > .fade-up:nth-child(9)  { transition-delay: 0.56s; }
.stagger-children > .fade-up:nth-child(10) { transition-delay: 0.63s; }

/* ===== STATS COUNTER BAR ===== */
/* ===== УТП-СЛАЙДЕР ===== */
.utp-slider {
    margin: var(--spacing-lg) 0 var(--spacing-xl);
    background: linear-gradient(135deg, #3b0f82 0%, #722ed1 55%, #2a4ec4 100%);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}

.utp-slides {
    position: relative;
    min-height: 200px;
}

.utp-slide {
    display: none;
    align-items: center;
    gap: 40px;
    padding: 48px 48px 40px;
    animation: utp-in 0.5s ease;
}

.utp-slide.is-active {
    display: flex;
}

@keyframes utp-in {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

.utp-slide__icon {
    color: rgba(255,255,255,0.55);
    flex-shrink: 0;
}

.utp-slide__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.utp-slide__kicker {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
}

.utp-slide__headline {
    font-family: var(--font-headers);
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
}

.utp-slide__headline span {
    color: #c9a0ff;
}

.utp-slide__text {
    font-size: 14px;
    color: rgba(255,255,255,0.72);
    line-height: 1.6;
    max-width: 560px;
}

.utp-slide__stat {
    flex-shrink: 0;
    text-align: right;
    padding-left: 40px;
    border-left: 1px solid rgba(255,255,255,0.15);
}

.utp-slide__num {
    font-family: var(--font-headers);
    font-size: 64px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    white-space: nowrap;
}

.utp-slide__num span {
    font-size: 36px;
    color: #c9a0ff;
}

.utp-slide__num-label {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    margin-top: 6px;
}

.utp-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 48px 20px;
}

.utp-dots {
    display: flex;
    gap: 8px;
}

.utp-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, transform 0.2s;
}

.utp-dot.is-active {
    background: #fff;
    transform: scale(1.3);
}

.utp-progress {
    flex: 1;
    height: 2px;
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
    overflow: hidden;
}

.utp-progress__bar {
    height: 100%;
    width: 0%;
    background: rgba(255,255,255,0.7);
    border-radius: 2px;
    transition: width linear;
}

/* ===== HERO SLIDER FADE ===== */
.hero-slide {
    transition: opacity 0.65s ease;
}

/* ===== SCROLL-TO-TOP BUTTON ===== */
/* ===== CHAT BUTTON ===== */
.chat-btn {
    position: fixed;
    bottom: 92px;
    right: 32px;
    width: 54px;
    height: 54px;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 400;
    box-shadow: 0 4px 16px rgba(114, 46, 209, 0.4);
    transition: background 0.2s, transform 0.2s;
    position: fixed;
}

.chat-btn:hover {
    background: var(--color-accent-hover);
    transform: scale(1.08);
}

.chat-btn__pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--color-accent);
    opacity: 0.4;
    animation: chat-pulse 2s ease-out infinite;
    pointer-events: none;
}

@keyframes chat-pulse {
    0%   { transform: scale(1); opacity: 0.4; }
    70%  { transform: scale(1.6); opacity: 0; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* ===== SCROLL TOP ===== */
.scroll-top-btn {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 46px;
    height: 46px;
    background: var(--color-accent);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 900;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.3s, transform 0.3s, background 0.2s;
    pointer-events: none;
}
.scroll-top-btn.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.scroll-top-btn:hover { background: var(--color-accent-hover); }

/* ===== CATALOG CARD HOVER IMAGE ZOOM ===== */
.catalog-img-wrap {
    overflow: hidden;
}
.catalog-img {
    transition: transform 0.35s ease;
}
.catalog-card:hover .catalog-img {
    transform: scale(1.06);
}

/* ===== PRODUCT CARD HOVER LIFT ===== */
.product-card {
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(114, 46, 209, 0.10);
}

/* ===== NEWS CARD HOVER ===== */
.news-card {
    transition: box-shadow 0.25s ease;
}
.news-card:hover {
    box-shadow: 0 6px 20px rgba(9, 30, 66, 0.10);
}
.news-img {
    transition: transform 0.35s ease;
    overflow: hidden;
}
.news-card:hover .news-img {
    transform: scale(1.03);
}

/* brands marquee moved to style.css */

/* ===== MOBILE ===== */
@media (max-width: 767px) {
    .stats-bar {
        grid-template-columns: 1fr 1fr;
    }
    .utp-slide {
        flex-direction: column;
        gap: 20px;
        padding: 32px 24px 24px;
        align-items: flex-start;
    }
    .utp-slide__stat {
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.15);
        padding-left: 0;
        padding-top: 16px;
        text-align: left;
        width: 100%;
    }
    .utp-slide__num { font-size: 44px; }
    .utp-slide__headline { font-size: 20px; }
    .utp-controls { padding: 0 24px 16px; }

    .scroll-top-btn {
        bottom: 20px;
        right: 16px;
        width: 40px;
        height: 40px;
    }

    /* disable on mobile — elements visible immediately */
    .fade-up {
        opacity: 1;
        transform: none;
    }
}
