/* Акция на главной: яркая полоса над шапкой и тариф «CRM + приложение». */

:root {
    --promo-hot: #ff3d2e;
    --promo-hot-2: #ff7a1a;
    --promo-hot-ink: #d9220f;
    --promo-yellow: #ffe14d;
}

.promo-discount {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    padding: 4px 9px;
    border-radius: 8px;
    background: var(--promo-hot);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 900;
    letter-spacing: -0.01em;
    line-height: 1.1;
    transform: rotate(-3deg);
    box-shadow: 0 6px 14px rgba(255, 61, 46, 0.35);
}

/* Полоса над шапкой: едет вместе с шапкой при прокрутке */
.promo-strip {
    position: sticky;
    top: 0;
    z-index: 101;
    background: linear-gradient(90deg, var(--promo-hot) 0%, var(--promo-hot-2) 100%);
    color: #fff;
}

.promo-strip[hidden] {
    display: none;
}

html.has-promo .site-header {
    top: var(--promo-h, 0px);
}

html.has-promo .plan {
    scroll-margin-top: calc(var(--header-h) + var(--promo-h, 0px) + 16px);
}

@media (max-width: 1399px) {
    html.has-promo body.nav-open .site-nav {
        top: calc(var(--header-h) + var(--promo-h, 0px));
        max-height: calc(100dvh - var(--header-h) - var(--promo-h, 0px));
    }
}

.promo-strip__inner {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding-top: 7px;
    padding-bottom: 7px;
}

.promo-discount--strip {
    padding: 5px 10px;
    background: var(--promo-yellow);
    color: #b3150a;
    font-size: 1.05rem;
    box-shadow: 0 4px 12px rgba(120, 20, 0, 0.25);
    animation: promo-pop 2.4s ease-in-out infinite;
}

@keyframes promo-pop {
    0%, 80%, 100% { transform: rotate(-3deg) scale(1); }
    88% { transform: rotate(-3deg) scale(1.12); }
}

@media (prefers-reduced-motion: reduce) {
    .promo-discount--strip { animation: none; }
}

.promo-strip__text {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.3;
}

.promo-strip__text strong {
    font-weight: 800;
}

.promo-strip__text s {
    opacity: 0.75;
    font-weight: 600;
}

.promo-strip__gift {
    margin-left: 6px;
    color: var(--promo-yellow);
    font-weight: 800;
}

.promo-strip__until {
    margin-left: 10px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    font-weight: 600;
}

.promo-strip__btn {
    flex: 0 0 auto;
    padding: 8px 16px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #d9220f;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(120, 20, 0, 0.2);
}

.promo-strip__close {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.promo-strip__short {
    display: none;
}

@media (max-width: 640px) {
    .promo-strip__inner {
        gap: 8px;
        min-height: 0;
    }

    .promo-strip .promo-strip__long,
    .promo-strip__until {
        display: none;
    }

    .promo-strip strong.promo-strip__short,
    .promo-strip span.promo-strip__short {
        display: block;
    }

    .promo-discount--strip {
        padding: 4px 7px;
        font-size: 0.95rem;
    }

    .promo-strip__btn {
        padding: 7px 12px;
    }

    .promo-strip__text {
        font-size: 0.84rem;
    }

    .promo-strip__gift {
        margin-left: 0;
        font-size: 0.8rem;
    }
}

/* Тариф «CRM + приложение» */
.plan--promo {
    position: relative;
    border: 2px solid var(--promo-hot) !important;
    box-shadow: 0 18px 40px rgba(255, 61, 46, 0.2);
}

.plan__ribbon {
    position: absolute;
    top: -14px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--promo-hot) 0%, var(--promo-hot-2) 100%);
    color: #fff;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 6px 16px rgba(255, 61, 46, 0.35);
}

.plan__ribbon b {
    font-size: 0.9rem;
    font-weight: 900;
    color: var(--promo-yellow);
    letter-spacing: 0;
}

.plan__promo {
    display: grid;
    gap: 8px;
    margin: 12px 0 0;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 61, 46, 0.07);
}

.plan__promo-price {
    margin: 6px 0 0;
}

.plan__promo-total {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin: 0;
}

.plan__promo-total strong {
    color: var(--promo-hot-ink);
    font-size: 2.6rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
}

.plan__promo-total span {
    font-size: 1rem;
    font-weight: 800;
}

.plan__promo-was {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 0;
}

.plan__promo-was s {
    color: var(--text-muted, #52525b);
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration-color: var(--promo-hot);
    text-decoration-thickness: 2px;
}

.plan__promo-was .promo-discount {
    font-size: 0.82rem;
}

.plan__promo-sum {
    white-space: nowrap;
}

.plan__promo-sum s {
    color: var(--text-muted, #52525b);
    font-size: 0.82rem;
    font-weight: 600;
}

.plan__promo-then {
    margin: 2px 0 0;
    padding-top: 8px;
    border-top: 1px dashed rgba(255, 61, 46, 0.3);
    color: var(--text-muted, #52525b);
    font-size: 0.86rem;
    font-weight: 600;
}

.promo-from {
    display: block;
    color: var(--promo-hot-ink);
    font-size: 0.75rem;
    font-weight: 700;
    text-align: right;
}

.promo-note {
    margin: 6px 0 0;
    color: var(--promo-hot-ink);
    font-size: 0.82rem;
    font-weight: 700;
}

.plan__promo-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.35;
}

.plan__promo-row strong {
    color: var(--promo-hot-ink);
    font-weight: 800;
}

.promo-slots {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 0.86rem;
    font-weight: 800;
    color: var(--promo-hot-ink);
}

.promo-slots i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--promo-hot);
    box-shadow: 0 0 0 0 rgba(255, 61, 46, 0.5);
    animation: promo-pulse 1.6s ease-out infinite;
}

@keyframes promo-pulse {
    to { box-shadow: 0 0 0 8px rgba(255, 61, 46, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .promo-slots i { animation: none; }
}

.plan__promo-btn {
    margin-top: 2px;
    padding: 12px 14px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--promo-hot) 0%, var(--promo-hot-2) 100%);
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(255, 61, 46, 0.3);
}

/* Тёмная тема */
:root[data-theme="dark"] {
    --promo-hot-ink: #ff6b5c;
}

:root[data-theme="dark"] .plan__promo {
    background: rgba(255, 61, 46, 0.12);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --promo-hot-ink: #ff6b5c;
    }

    :root:not([data-theme="light"]) .plan__promo {
        background: rgba(255, 61, 46, 0.12);
    }
}
