/* Black Friday flash sale — красная полоска в шапке (слот [banners]).
   Дизайн — «лестница скидок» из макета: заголовок, цепочка процентов
   (прошедшие перечёркнуты, текущий — белая плашка), кнопка с кодом текущего шага
   и таймер до его окончания. Подключается только когда активна акция типа
   ShopPromoFlashSale (см. modules/shoppromo/include.php). */

.bfs {
    position: relative;
    background: #F5372A;
    color: #fff;
    z-index: 31;
    font-family: inherit;
    overflow: hidden;
}

.bfs__in {
    max-width: 1310px;
    margin: 0 auto;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 26px;
    padding: 0 60px;
}

.bfs__ttl {
    font-weight: 900;
    font-size: 19px;
    letter-spacing: .05em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Крупный «−11%» — только на мобиле, где лестница скрыта */
.bfs__nx {
    display: none;
    font-weight: 900;
    font-size: 20px;
    line-height: 1;
    white-space: nowrap;
}

.bfs__lad {
    display: flex;
    align-items: center;
    gap: 4px;
}

.bfs__st {
    font-weight: 800;
    font-size: 13px;
    line-height: 1;
    padding: 6px 8px;
    border-radius: 20px;
    border: 1.5px solid rgba(255, 255, 255, .45);
    color: #fff;
    transition: .3s;
    white-space: nowrap;
}

.bfs__st.is-past {
    border-color: transparent;
    opacity: .5;
}

.bfs__st.is-cur {
    background: #fff;
    color: #F5372A;
    border-color: #fff;
    font-size: 16px;
    padding: 8px 11px;
    box-shadow: 0 4px 12px -4px rgba(15, 20, 43, .45);
}

.bfs__ar {
    width: 10px;
    height: 10px;
    opacity: .6;
    flex: none;
}

/* Кнопка с кодом текущего шага */
.bfs__code {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 0;
    background: #0F142B;
    color: #fff;
    border-radius: 30px;
    padding: 9px 15px 9px 14px;
    font: inherit;
    font-weight: 900;
    font-size: 15px;
    letter-spacing: .06em;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background .2s, transform .15s;
}

.bfs__code:hover {
    background: #000;
}

.bfs__code:active {
    transform: scale(.96);
}

.bfs__k {
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0;
    opacity: .7;
}

.bfs__cp svg {
    width: 13px;
    height: 13px;
    display: block;
}

.bfs__ok {
    display: none;
}

.bfs__code.is-copied .bfs__lbl,
.bfs__code.is-copied .bfs__cp {
    display: none;
}

.bfs__code.is-copied .bfs__ok {
    display: inline;
}

/* «Za 2 dni 05:12:33 rabat spadnie do 8%» */
.bfs__cd {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    white-space: nowrap;
}

.bfs__cd b {
    font-weight: 800;
}

.bfs__tm {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-variant-numeric: tabular-nums;
}

.bfs__u {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 4px;
    border-radius: 6px;
    background: rgba(15, 20, 43, .22);
}

.bfs__u[hidden] {
    display: none;
}

.bfs__u b {
    font-weight: 800;
    font-size: 15px;
    line-height: 1;
}

.bfs__u small {
    font-weight: 600;
    font-size: 8.5px;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-top: 2px;
    opacity: .7;
}

.bfs__sep {
    font-weight: 800;
    opacity: .5;
}

/* Компактный таймер — только на мобиле */
.bfs__tmc {
    display: none;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.bfs__fin {
    font-size: 14.5px;
    font-weight: 700;
    white-space: nowrap;
}

.bfs__x {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border: 0;
    background: transparent;
    color: #fff;
    opacity: .75;
    cursor: pointer;
    display: grid;
    place-items: center;
    padding: 0;
}

.bfs__x:hover {
    opacity: 1;
}

.bfs__x svg {
    width: 12px;
    height: 12px;
    display: block;
}

@media (max-width: 767px) {
    /* Полоска — последний видимый блок шапки (head-line0 на мобиле скрыт).
       Гасим margin-bottom шапки, иначе под акцией видна полоса фона.
       В корзине полоска стоит над шапкой — там отступ шапки нужен. */
    body:not(.bodybasket):not(.bodymakeorder) .header_wrapper.bfs-in-header {
        margin-bottom: 0;
    }

    /* В корзине полоска стоит между шапкой и контентом: отрицательный отступ h1
       (он подтягивал заголовок к шапке) больше не нужен — иначе «Koszyk» заезжает под акцию. */
    .bodybasket.bfs-shown h1 {
        margin-top: 0;
    }

    .bfs__in {
        height: auto;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px 10px;
        padding: 9px 32px 10px;
    }

    .bfs__ttl {
        font-size: 14px;
    }

    /* на мобиле лестница скрыта — вместо неё крупный −11% */
    .bfs__lad {
        display: none;
    }

    .bfs__nx {
        display: inline-flex;
    }

    .bfs__code {
        font-size: 13px;
        padding: 7px 11px;
    }

    .bfs__k {
        display: none;
    }

    .bfs__cd {
        width: 100%;
        justify-content: center;
        font-size: 12.5px;
        gap: 5px;
    }

    .bfs__tm {
        display: none;
    }

    .bfs__tmc {
        display: inline;
        background: rgba(15, 20, 43, .25);
        border-radius: 6px;
        padding: 2px 7px;
    }

    .bfs__fin {
        width: 100%;
        text-align: center;
        font-size: 12.5px;
        white-space: normal;
    }

    .bfs__x {
        right: 6px;
        top: 8px;
        transform: none;
        width: 24px;
        height: 24px;
    }

    .bfs__x svg {
        width: 10px;
        height: 10px;
    }
}
