/* Black Friday — персональная цена по промокоду (inc/black-friday.php, assets/js/black-friday.js)
   Стиль повторяет каталог темы: #262626 / #018692, скругление 5px, кнопки как «Dettagli». */

:root {
    --bf-ink: #262626;
    --bf-teal: #018692;
    --bf-muted: #6e6e6f;
    --bf-line: #e4e4e4;
    --bf-soft: #f7f7f7;
}

.donno-bf-slot[hidden],
.donno-bf-unlock__error[hidden] { display: none !important; }

/* Метка «BLACK FRIDAY» */
.donno-bf-tag {
    display: inline-block;
    margin-right: 8px;
    padding: 2px 7px;
    border-radius: 3px;
    background: var(--bf-ink);
    color: #fff !important;
    font-size: 11px;
    font-weight: 700;
    line-height: 16px;
    letter-spacing: .08em;
    text-transform: uppercase;
    vertical-align: middle;
}

/* Сброс глобальных стилей темы для наших кнопок */
.donno-bf-badge button,
.donno-bf-unlock button {
    min-width: 0;
    margin: 0;
    box-shadow: none;
    text-transform: none;
    letter-spacing: normal;
    line-height: 1;
    -webkit-appearance: none;
    appearance: none;
}

/* ---------- таймер ---------- */

.donno-bf-timer__label { margin-right: 6px; color: var(--bf-muted); }
.donno-bf-timer__unit { margin-right: 6px; white-space: nowrap; }
.donno-bf-timer__unit:last-child { margin-right: 0; }
.donno-bf-timer__unit b { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- страница товара ---------- */

.donno-bf-slot { margin: 0 0 16px; }
.donno-bf-hidden { display: none !important; }

/* цена BF в разметке цены темы; сверху — метка, снизу — короткая пометка */
.donno-bf-price__label {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    color: var(--bf-ink);
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
}
.donno-bf-price__block { margin: 0 !important; }
.donno-bf-from { font-size: 16px; font-weight: 400; color: var(--bf-muted); }
.donno-bf-price__all { color: var(--bf-teal) !important; font-weight: 600; text-decoration: none !important; white-space: nowrap; }
.donno-bf-price__all:hover { text-decoration: underline !important; }
.donno-bf-price__note {
    margin: 6px 0 0 !important;
    color: var(--bf-muted);
    font-size: 13px;
    line-height: 18px;
}
.donno-bf-price--muted {
    padding: 10px 14px;
    border-left: 3px solid var(--bf-line);
    background: var(--bf-soft);
    color: var(--bf-muted);
    font-size: 14px;
    line-height: 20px;
}

/* ---------- карточки каталога ---------- */

.donno-bf-old-price bdi,
.donno-bf-old-price .woocommerce-Price-amount {
    color: var(--bf-muted) !important;
    font-size: 20px !important;
    text-decoration: line-through;
}
.donno-bf-old-price del { display: none; }

.donno-bf-card-price {
    margin: 10px 0 4px;
    text-align: center;
    line-height: 1.2;
}
.donno-bf-card-price__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--bf-ink);
    vertical-align: middle;
}
.donno-bf-card-price__value {
    display: block;
    margin-top: 4px;
    color: var(--bf-teal);
    font-size: 30px !important;
    font-weight: 600;
    line-height: 32px !important;
    font-variant-numeric: tabular-nums;
}
.donno-bf-card-price__value small { font-size: 16px; font-weight: 400; color: var(--bf-muted); }

/* ---------- плашка: компактная карточка → полоса внизу экрана ---------- */

.donno-bf-badge {
    display: block !important;
    visibility: visible !important;
    font-family: inherit;
}

/* --- карточка (левый нижний угол) --- */
.donno-bf-badge__card {
    position: fixed;
    left: 84px;                  /* справа от кнопки «наверх»; правый угол занят чатом */
    bottom: 22px;
    z-index: 2147483000;
    width: 210px;
    border-radius: 14px;
    background: #0b0b0b;
    box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .5), 0 0 0 1px rgba(25, 195, 207, .25);
    animation: donnoBfIn .45s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes donnoBfIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.donno-bf-badge__panel {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 18px 16px;
    color: #fff !important;
    text-decoration: none !important;
}

.donno-bf-badge__title {
    display: flex;
    flex-direction: column;
    font-size: 30px;
    font-weight: 800;
    line-height: .95;
    letter-spacing: .01em;
    text-transform: uppercase;
    color: #fff;
}
.donno-bf-badge__title span:last-child {
    background: linear-gradient(90deg, #19c3cf 0%, #8ff0f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.donno-bf-badge__cd {
    display: inline-flex;
    align-items: baseline;
    gap: 1px;
    margin-top: 10px;
    font-size: 14px;
    line-height: 18px;
    color: rgba(255, 255, 255, .85);
    font-variant-numeric: tabular-nums;
}
.donno-bf-badge__cd b { font-weight: 600; }
.donno-bf-badge__cd i { font-style: normal; color: rgba(255, 255, 255, .4); margin: 0 3px 0 1px; }

.donno-bf-badge__cta {
    margin-top: 12px;
    padding: 7px 14px;
    border-radius: 999px;
    background: #19c3cf;
    color: #0b0b0b;
    font-size: 11px;
    font-weight: 700;
    line-height: 14px;
    letter-spacing: .1em;
    text-transform: uppercase;
    transition: background .2s;
}
.donno-bf-badge__panel:hover .donno-bf-badge__cta { background: #fff; }

.donno-bf-badge .donno-bf-badge__min {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: rgba(255, 255, 255, .5);
    font-size: 18px;
    line-height: 24px;
    text-transform: none;
    cursor: pointer;
    transition: color .2s, background .2s;
}
.donno-bf-badge .donno-bf-badge__min:hover { color: #fff; background: rgba(255, 255, 255, .1); }

/* --- полоса внизу экрана --- */
.donno-bf-badge__bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2147483000;
    display: none;
    align-items: center;
    height: 44px;
    padding-bottom: env(safe-area-inset-bottom);
    background: #0b0b0b;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, .18);
    animation: donnoBfBarIn .35s ease both;
}
.donno-bf-badge__bar::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 2px;
    background: linear-gradient(90deg, #018692, #19c3cf, #018692);
}
@keyframes donnoBfBarIn { from { transform: translateY(100%); } to { transform: none; } }

.donno-bf-badge__bar-link {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    height: 100%;
    color: #fff !important;
    text-decoration: none !important;
}
.donno-bf-badge__bar-title {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .24em;
    text-transform: uppercase;
}
.donno-bf-badge__bar .donno-bf-badge__cd { margin: 0; font-size: 13px; }
.donno-bf-badge__bar-cta {
    color: #19c3cf;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    transition: color .2s;
}
.donno-bf-badge__bar-link:hover .donno-bf-badge__bar-cta { color: #fff; }

.donno-bf-badge .donno-bf-badge__expand {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-left: 1px solid rgba(255, 255, 255, .08);
    background: transparent;
    color: rgba(255, 255, 255, .6);
    font-size: 16px;
    line-height: 44px;
    text-transform: none;
    cursor: pointer;
}
.donno-bf-badge .donno-bf-badge__expand:hover { color: #fff; background: rgba(255, 255, 255, .06); }

.donno-bf-badge.is-min .donno-bf-badge__card { display: none; }
.donno-bf-badge.is-min .donno-bf-badge__bar { display: flex; }

/* полоса не должна закрывать низ страницы и кнопку «наверх» */
body.donno-bf-bar-on { padding-bottom: 44px; }
body.donno-bf-bar-on .scroll-to-top-btn { bottom: 56px !important; }

.donno-bf-badge a:focus-visible,
.donno-bf-badge button:focus-visible { outline: 2px solid #19c3cf; outline-offset: -2px; }

@media (max-width: 767px) {
    .donno-bf-badge__card { left: 10px; bottom: max(10px, env(safe-area-inset-bottom)); width: 180px; }
    .donno-bf-badge__title { font-size: 26px; }
    .donno-bf-badge__bar-link { gap: 12px; padding-left: 44px; }   /* центрируем с учётом кнопки справа */
    .donno-bf-badge__bar-title { font-size: 12px; letter-spacing: .16em; }
    .donno-bf-badge__bar-cta { font-size: 0; }
    .donno-bf-badge__bar-cta span { font-size: 16px; }
}

/* левый нижний поп-ап квиза занял бы место плашки */
body.donno-bf-on .quiz-pop { display: none !important; }

@media (prefers-reduced-motion: reduce) {
    .donno-bf-badge__card,
    .donno-bf-badge__bar { animation: none; }
}
@media print {
    .donno-bf-badge { display: none !important; }
}

/* ---------- корзина ---------- */

.donno-bf-cart-price { text-decoration: none; font-weight: 600; color: var(--bf-teal); }
.woocommerce-mini-cart del,
.donno-bf-mini__old { color: var(--bf-muted); font-weight: 400; margin-right: 4px; }

/* мини-корзина: строка «Black Friday applicato» */
li.donno-bf-mini {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin: 4px 0 0 !important;
    padding: 10px 12px !important;
    border-left: 3px solid var(--bf-teal);
    background: var(--bf-soft);
    font-size: 13px;
    line-height: 18px;
    color: var(--bf-ink);
    list-style: none !important;
}
li.donno-bf-mini::before { content: none !important; display: none !important; }
li.donno-bf-mini .donno-bf-tag { flex: 0 0 auto; margin: 0; }
.donno-bf-mini__save { display: block; color: var(--bf-teal); font-weight: 600; }

/* ---------- страница офферов ---------- */

.donno-bf-offers { margin: 0 0 60px; }

/* шапка: тёмная лента с таймером */
.donno-bf-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px 40px;
    margin: 0 0 32px;
    padding: 26px 36px;
    border-radius: 4px;
    background: #111;
    color: #fff;
    box-shadow: inset 0 -2px 0 var(--bf-teal);
}
.donno-bf-head__intro { display: flex; flex-direction: column; gap: 6px; }
.donno-bf-head__eyebrow {
    font-size: 15px;
    font-weight: 600;
    line-height: 20px;
    letter-spacing: .32em;
    text-transform: uppercase;
    color: #fff;
}
.donno-bf-head__line { font-size: 14px; line-height: 20px; color: rgba(255, 255, 255, .6); }

.donno-bf-cd { display: flex; align-items: flex-start; gap: 10px; }
.donno-bf-cd__unit { display: flex; flex-direction: column; align-items: center; min-width: 48px; }
.donno-bf-cd__unit b {
    font-size: 34px;
    font-weight: 300;
    line-height: 38px;
    font-variant-numeric: tabular-nums;
    color: #fff;
}
.donno-bf-cd__unit small {
    margin-top: 4px;
    font-size: 10px;
    line-height: 12px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .5);
}
.donno-bf-cd__sep { font-size: 28px; font-weight: 200; line-height: 38px; color: rgba(255, 255, 255, .3); }

@media (max-width: 767px) {
    .donno-bf-head { flex-direction: column; padding: 22px 18px; text-align: center; }
    .donno-bf-head__intro { align-items: center; }
    .donno-bf-head__eyebrow { font-size: 13px; letter-spacing: .26em; }
    .donno-bf-cd { gap: 6px; }
    .donno-bf-cd__unit { min-width: 40px; }
    .donno-bf-cd__unit b { font-size: 28px; line-height: 32px; }
    .donno-bf-cd__sep { font-size: 22px; line-height: 32px; }
}

.donno-bf-unlock {
    max-width: 480px;
    margin: 24px auto 0;
    padding: 20px;
    border-radius: 5px;
    background: var(--bf-soft);
    text-align: center;
}
.donno-bf-unlock__label { display: block; margin-bottom: 10px; font-size: 16px; font-weight: 600; color: var(--bf-ink); }
.donno-bf-unlock__row { display: flex; gap: 8px; }
.donno-bf-unlock__row input {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #fff;
    font-size: 16px;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.donno-bf-unlock__row input:focus { outline: none; border-color: var(--bf-teal); }
.donno-bf-unlock__row input[aria-invalid="true"] { border-color: #c0392b; }
.donno-bf-unlock .donno-bf-unlock__btn {
    height: 44px;
    padding: 0 24px;
    border: 0;
    border-radius: 5px;
    background: var(--bf-ink);
    color: #fff;
    font-size: 16px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .3s;
}
.donno-bf-unlock .donno-bf-unlock__btn:hover { background: var(--bf-teal); }
.donno-bf-unlock .donno-bf-unlock__btn:disabled { opacity: .6; cursor: progress; }
.donno-bf-unlock__error { margin: 8px 0 0 !important; color: #c0392b; font-size: 14px; }

.donno-bf-offers[data-state="locked"] .donno-bf-offers__list { display: none; }
.donno-bf-offers[data-state="unlocked"] .donno-bf-unlock { display: none; }

/* сетка: 4 колонки, вся карточка — ссылка на товар */
.donno-bf-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px 20px;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
}
.donno-bf-grid > li { display: block !important; margin: 0 !important; padding: 0 !important; }
.donno-bf-grid > li::before { content: none !important; display: none !important; }

.donno-bf-item__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: var(--bf-ink) !important;
    text-decoration: none !important;
}
.donno-bf-item__link:focus-visible { outline: 2px solid var(--bf-teal); outline-offset: 4px; }

.donno-bf-item__media {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 4px;
    background: #f5f5f5;
}
.donno-bf-item__media img {
    display: block;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    margin: 0 !important;
    mix-blend-mode: multiply;   /* белый фон фото сливается с серым */
    transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.donno-bf-item__link:hover .donno-bf-item__media img { transform: scale(1.05); }
.donno-bf-item__save {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 8px;
    border-radius: 2px;
    background: #111;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
    letter-spacing: .04em;
}
.donno-bf-item__save .woocommerce-Price-amount,
.donno-bf-item__save bdi { color: inherit !important; font-size: inherit !important; }

.donno-bf-item__body { display: flex; flex: 1; flex-direction: column; padding: 14px 2px 0; }
.donno-bf-item__name {
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.donno-bf-item__prices { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin-top: 6px; }
.donno-bf-item__price,
.donno-bf-item__price .woocommerce-Price-amount {
    color: var(--bf-ink) !important;
    font-size: 19px !important;
    font-weight: 600;
    line-height: 24px;
    font-variant-numeric: tabular-nums;
}
.donno-bf-item__price small { font-size: 13px; font-weight: 400; color: var(--bf-muted); }
.donno-bf-item__old,
.donno-bf-item__old .woocommerce-Price-amount { color: #9a9a9a !important; font-size: 14px !important; font-weight: 400; }
.donno-bf-item__cta {
    align-self: flex-start;
    margin-top: auto;
    padding-top: 12px;
    color: var(--bf-ink);
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
    letter-spacing: .14em;
    text-transform: uppercase;
    background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
    transition: background-size .3s ease, color .3s;
}
.donno-bf-item__link:hover .donno-bf-item__cta { color: var(--bf-teal); background-size: 100% 1px; }

@media (max-width: 1199px) {
    .donno-bf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .donno-bf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
    .donno-bf-item__name { font-size: 13px; line-height: 18px; }
    .donno-bf-item__price,
    .donno-bf-item__price .woocommerce-Price-amount { font-size: 17px !important; }
}
@media (prefers-reduced-motion: reduce) {
    .donno-bf-item__media img,
    .donno-bf-item__cta { transition: none; }
}

.donno-bf-offers__msg { margin-top: 20px !important; color: var(--bf-muted); font-size: 14px; text-align: center !important; }

.donno-bf-diag {
    margin-top: 30px;
    padding: 14px 16px;
    border-left: 3px solid #c0392b;
    background: #fdf3f2;
    font-size: 14px;
    line-height: 20px;
}
.donno-bf-diag ul { margin: 8px 0 0 !important; padding-left: 18px !important; }
.donno-bf-diag li { display: list-item !important; margin: 0 0 4px !important; list-style: disc !important; }
.donno-bf-diag li::before { content: none !important; }

@media (max-width: 575px) {
    .donno-bf-unlock__row { flex-direction: column; }
}
