/* =========================================================
 * info-ticker — промо-полоса с автопрокруткой
 * Источник: center-crm.ru (адаптирован под smp-stroi.ru)
 * ========================================================= */

.info-ticker {
    position: relative;
    width: 100%;
    height: 48px;
    background: #d81f1f;
    overflow: hidden;
    z-index: 5;
    -webkit-user-select: none;
    user-select: none;
}
.info-ticker__viewport {
    height: 100%;
    overflow: hidden;
    touch-action: pan-y;
    cursor: grab;
}
.info-ticker__viewport:active { cursor: grabbing; }
.info-ticker__track {
    display: flex;
    height: 100%;
    transition: transform .45s cubic-bezier(.4,0,.2,1);
    will-change: transform;
}
.info-ticker__slide {
    flex: 0 0 100%;
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 56px;
    overflow: hidden;
}
.info-ticker__text {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
    font-size: clamp(11px, 2.1vw, 16px);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: .4px;
    text-align: center;
}
.info-ticker__text a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: opacity .2s ease;
}
.info-ticker__text a:hover,
.info-ticker__text a:focus-visible { opacity: .8; }

.info-ticker__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,.16);
    color: #fff;
    cursor: pointer;
    transition: background-color .2s ease;
}
.info-ticker__btn:hover,
.info-ticker__btn:focus-visible { background: rgba(255,255,255,.32); }
.info-ticker__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.info-ticker__btn svg { width: 18px; height: 18px; }
.info-ticker__btn--prev { left: 10px; }
.info-ticker__btn--next { right: 10px; }

.info-ticker__glare {
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    z-index: 2;
    background: linear-gradient(105deg, transparent 0%, rgba(255,255,255,.38) 50%, transparent 100%);
    transform: skewX(-18deg);
    opacity: 0;
    pointer-events: none;
}
.info-ticker__glare.is-running { animation: infoTickerGlare .9s ease forwards; }

@keyframes infoTickerGlare {
    from { left: -60%; opacity: 0; }
    20%  { opacity: .9; }
    80%  { opacity: .9; }
    to   { left: 120%; opacity: 0; }
}

@media screen and (max-width: 600px) {
    .info-ticker__slide { padding: 0 44px; }
    .info-ticker__btn { width: 28px; height: 28px; }
    .info-ticker__btn svg { width: 15px; height: 15px; }
}

@media (prefers-reduced-motion: reduce) {
    .info-ticker__track { transition: none; }
    .info-ticker__glare.is-running { animation: none; }
    .info-ticker__btn { transition: none; }
}

/* ═══ SCROLL_FIX_START ═══ */
/* Фикс: наш info-ticker не часть шапки и не должен уезжать при скролле.
 * В main.css осталось правило донора
 *   body.p2-header-hidden .info-ticker { transform: translateY(-100%) }
 * У донора info-ticker был НАД #top-menu и уезжал вместе с ним.
 * У нас он самостоятельный блок — нейтрализуем это правило. */
body.p2-header-hidden .info-ticker,
body.p2-tm-fixed .info-ticker,
body.p2-header-hidden.p2-tm-fixed .info-ticker {
    transform: none !important;
    transition: none !important;
}
/* ═══ SCROLL_FIX_END ═══ */
