/* PROMO-BF2026 — карточка товара (Чёрная пятница 27.11.2026). Подключает Dlx_Promo::head(), пока акция идёт.
   Все селекторы от body.dlx-product; скрипт — media/js/promo-bf2026-card.js. */

body.dlx-product {
    --bfc-ink: #1F1D1E;
    --bfc-red: #DD1D1D;
    --bfc-red-soft: #FF6B6B;
    --bfc-ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- плашка на фото: «Чорна п’ятниця · −5%» ---------- */
body.dlx-product .itemImg .bfc-photo {
    position: absolute; left: 14px; top: 14px; z-index: 4;
    display: inline-flex; align-items: center; gap: 4px;
    height: 28px; padding: 0 12px;
    border-radius: 999px;
    background: var(--bfc-ink); color: #fff;
    font: 800 12px/1 var(--ff, "Manrope", system-ui, sans-serif);
    letter-spacing: .02em; white-space: nowrap;
    pointer-events: none;
}
body.dlx-product .itemImg .bfc-photo i { font-style: normal; color: var(--bfc-red-soft); }
/* значок «Вибір країни» занимает тот же угол — плашка уходит ниже */
body.dlx-product .itemImg .itemImgVibir ~ .bfc-photo { top: 88px; }

/* ---------- плашка рядом с «Є у наявності»: «27.11 · −5%» ---------- */
body.dlx-product .infop-mob .bfc-date {
    display: inline-flex; align-items: center; gap: 4px;
    height: 28px; padding: 0 11px;
    border-radius: 999px;
    background: var(--bfc-ink); color: #fff;
    font: 800 12.5px/1 var(--ff, "Manrope", system-ui, sans-serif);
    white-space: nowrap;
}
body.dlx-product .infop-mob .bfc-date i { font-style: normal; color: var(--bfc-red-soft); }

/* ---------- кнопки фасовки: старая серым, новая красным ---------- */
body.dlx-product .itemPriceList li .weight-price {
    display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline;
    column-gap: 5px;
}
body.dlx-product .itemPriceList li .bfc-was { color: var(--muted, #716C68); font-weight: 600; text-decoration-thickness: 1.5px; opacity: .9; }
body.dlx-product .itemPriceList li .bfc-now { color: var(--bfc-red); font-weight: 800; }
body.dlx-product .itemPriceList li.selected .bfc-was { color: rgba(255, 255, 255, .6); }
body.dlx-product .itemPriceList li.selected .bfc-now { color: var(--bfc-red-soft); }

/* ---------- крупная цена ---------- */
body.dlx-product #selectedPrice.bfc .price-container.bfc-price {
    position: relative;
    display: flex; flex-direction: row; align-items: center; gap: 14px;
}
body.dlx-product #selectedPrice.bfc .price-actual { color: var(--bfc-red); margin-right: 0; }
body.dlx-product #selectedPrice.bfc .bfc-side {
    display: inline-flex; flex-direction: column; align-items: flex-start; gap: 9px;
    align-self: center; margin-right: 0;
}
body.dlx-product #selectedPrice.bfc .bfc-side .price-old {
    margin: 0; font: 600 16px/1.1 var(--ff, "Manrope", system-ui, sans-serif);
    color: var(--muted, #716C68);
    text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: var(--bfc-ink);
}
body.dlx-product #selectedPrice.bfc .bfc-side .discount-badge {
    margin: 4px 0 0; top: 0; position: static;
    display: inline-block;
    padding: 5px 10px; border-radius: 10px;
    background: var(--bfc-ink); color: #fff;
    font: 800 15px/1 var(--ff-display, "Unbounded", sans-serif);
    letter-spacing: 0;
    transform: rotate(-8deg); transform-origin: left center;
}

/* ---------- эффект «Лічильник» ---------- */
body.dlx-product #selectedPrice.bfc .bfc-layer { position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; }
body.dlx-product #selectedPrice.bfc .bfc-odo {
    position: absolute; display: flex; overflow: hidden;
    color: var(--bfc-ink); white-space: nowrap;
    transition: color .3s;
}
body.dlx-product #selectedPrice.bfc .bfc-odo.bfc-red { color: var(--bfc-red); }
body.dlx-product #selectedPrice.bfc .bfc-col { display: flex; flex-direction: column; transition: transform 1.4s cubic-bezier(.3, 1.4, .4, 1); }
body.dlx-product #selectedPrice.bfc .bfc-col > span { display: block; }
body.dlx-product #selectedPrice.bfc .bfc-cur { display: block; }
body.dlx-product #selectedPrice.bfc .bfc-tape {
    position: absolute; left: -14px; right: -14px; height: 28px;
    background: var(--bfc-ink); color: #fff; overflow: hidden;
    transform: rotate(-4deg) scaleX(0); transform-origin: left;
    animation: bfcTapeIn .35s .3s cubic-bezier(.7, 0, .3, 1) forwards, bfcTapeOut .4s 2.3s ease-in forwards;
}
body.dlx-product #selectedPrice.bfc .bfc-tape span {
    display: block; white-space: nowrap;
    font: 800 13px/28px var(--ff-display, "Unbounded", sans-serif); letter-spacing: .06em;
    animation: bfcMarq 6s linear infinite;
}

/* пока идёт прокрутка: настоящая цена скрыта (текст остаётся в DOM для «1 клик»), штамп и «было» ждут */
body.dlx-product #selectedPrice.bfc .bfc-run .price-actual { color: transparent; }
body.dlx-product #selectedPrice.bfc .bfc-run.bfc-odo-off .price-actual { color: var(--bfc-red); }
body.dlx-product #selectedPrice.bfc .bfc-run.bfc-odo-off .bfc-odo { opacity: 0; }
body.dlx-product #selectedPrice.bfc .bfc-run .bfc-side .price-old { opacity: 0; animation: bfcWasIn .4s 2.5s var(--bfc-ease) forwards; }
body.dlx-product #selectedPrice.bfc .bfc-run .bfc-side .discount-badge { opacity: 0; animation: bfcStamp .4s 2.65s var(--bfc-ease) forwards; }

@keyframes bfcTapeIn { 0% { transform: rotate(-4deg) scaleX(0); } 100% { transform: rotate(-4deg) scaleX(1); } }
@keyframes bfcTapeOut { to { transform: rotate(-4deg) translateY(60px); opacity: 0; } }
@keyframes bfcMarq { to { transform: translateX(-50%); } }
@keyframes bfcWasIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes bfcStamp {
    0% { opacity: 0; transform: rotate(-8deg) scale(2.4); }
    60% { opacity: 1; transform: rotate(-8deg) scale(.9); }
    100% { opacity: 1; transform: rotate(-8deg) scale(1); }
}

/* ---------- под кнопкой ---------- */
body.dlx-product .bfc-until {
    margin: 14px 0 6px;
    font-size: 13px; line-height: 1.4; color: var(--ink-2, #4A4648);
}
body.dlx-product .bfc-until b { color: var(--bfc-ink); }

@media (max-width: 1000px) {
    body.dlx-product #selectedPrice.bfc .price-container.bfc-price { justify-content: center; }
    body.dlx-product .bfc-until { text-align: center; }
}
@media (max-width: 360px) {
    body.dlx-product .itemImg .bfc-photo { left: 10px; top: 10px; font-size: 11px; padding: 0 10px; }
    body.dlx-product .itemPriceList li .weight-price { font-size: 12.5px; column-gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
    body.dlx-product #selectedPrice.bfc .bfc-layer { display: none; }
    body.dlx-product #selectedPrice.bfc .bfc-run .price-actual { color: var(--bfc-red); }
    body.dlx-product #selectedPrice.bfc .bfc-run .bfc-side .price-old,
    body.dlx-product #selectedPrice.bfc .bfc-run .bfc-side .discount-badge { opacity: 1; animation: none; }
    body.dlx-product #selectedPrice.bfc .bfc-run .bfc-side .discount-badge { transform: rotate(-8deg); }
}
