/* ============================================================
   AMELI CHECKOUT V2 — Premium 2026 (v2.10)
   Palette "Cloud Dancer" · Fraunces + Inter · Lucide stroke-1.5
   Updates v2.10: hero, no express, implied consent, noise bg
   ============================================================ */

:root {
    /* — palette — Cloud Dancer (тёплый кремовый бежевый, как был изначально) — */
    --bg:           #FAF7F2;   /* тёплый кремовый фон */
    --bg-tinted:    #F3EEE3;
    --surface:      #FFFFFF;   /* белые карточки */
    --surface-soft: #F5F1EA;   /* овсяный для выделений */
    --ink:          #1A1410;   /* тёплый «почти-чёрный» */
    --ink-soft:     #2E251D;
    --muted:        #6B5D52;   /* тёплый серо-коричневый */
    --muted-soft:   #9A8B7E;
    --line:         #E8E0D5;   /* бежевые границы */
    --line-strong:  #D8CCBC;
    --brand:        #7a1f3f;   /* бордо (бренд) */
    --brand-hover:  #9A2A4F;
    --brand-soft:   #FDF4F1;
    --gold:         #B8924A;
    --success:      #2D7A4F;
    --danger:       #B8404C;

    /* — radii / shadows — */
    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 14px;
    --r-xl: 20px;
    --r-2xl: 28px;

    --sh-card:  0 1px 2px rgba(26,20,16,0.04), 0 0 0 1px rgba(26,20,16,0.04);
    --sh-cta:   0 1px 3px rgba(26,20,16,0.12), 0 1px 2px rgba(26,20,16,0.06);
    --sh-cta-hover: 0 8px 24px rgba(122,31,63,0.18), 0 2px 4px rgba(26,20,16,0.08);
    --sh-elevated: 0 1px 3px rgba(26,20,16,0.06), 0 8px 24px rgba(26,20,16,0.04);

    /* — typography — */
    --font-display: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* — spacing — */
    --gap-section: 32px;
    --gap-inner: 24px;
    --gap-field: 20px;
    --pad-section: 28px;
}

@media (min-width: 768px) {
    :root {
        --gap-section: 48px;
        --gap-inner: 32px;
        --pad-section: 36px;
    }
}

/* — reset — */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--bg);
    background-image:
        radial-gradient(at 20% -10%, rgba(184,146,74,0.06) 0%, transparent 50%),
        radial-gradient(at 80% 100%, rgba(122,31,63,0.04) 0%, transparent 50%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
a { color: var(--brand); text-decoration: none; transition: color .15s; }
a:hover { color: var(--brand-hover); }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 15px; }

/* — layout — */
.checkout-v2 {
    max-width: 1180px;
    margin: 0 auto;
    padding: 16px 16px 180px;
}
@media (min-width: 768px) {
    .checkout-v2 { padding: 32px 32px 80px; }
}

.checkout-v2__header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}
.checkout-v2__back {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    border-radius: 50%;
    transition: background .15s;
    margin-left: -10px;
    text-decoration: none;
}
.checkout-v2__back:hover { background: var(--surface-soft); color: var(--ink); }
.checkout-v2__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(28px, 5vw, 36px);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--ink);
}

/* — grid layout — */
.checkout-v2__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--gap-inner);
}
/* grid-элементы должны уметь сужаться ниже своего содержимого (иначе вылезают вправо на узких экранах) */
.checkout-v2__grid > * { min-width: 0; }
@media (min-width: 960px) {
    .checkout-v2__grid {
        grid-template-columns: minmax(0, 1.6fr) minmax(340px, 1fr);
        gap: 48px;
        align-items: start;
    }
}

#checkout-v2-form { display: flex; flex-direction: column; gap: var(--gap-section); }

/* — section — */
.section {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-2xl);
    padding: var(--pad-section);
    min-width: 0;
    box-shadow: var(--sh-card);
    transition: box-shadow .25s, transform .25s;
    /* fade-up animation */
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp .55s ease-out forwards;
    animation-delay: calc(var(--i, 0) * 70ms);
}
.section:hover { box-shadow: var(--sh-elevated); }

@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

.section__head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}
.section__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: var(--brand);
    stroke-width: 1.5;
    margin-top: 4px;
}
.section__titles { flex: 1; min-width: 0; }
.section__eyebrow {
    display: block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
}
.section__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--ink);
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
@media (min-width: 768px) { .section__title { font-size: 26px; } }
/* номер шага — кружок перед заголовком (вместо прежней серой строки-дубля) */
.section__num {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
}

/* — radio / checkbox — */
.radio-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}
@media (min-width: 600px) {
    .radio-group { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.radio, .checkbox {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    min-height: 60px;
    border: 1.5px solid var(--line);
    border-radius: var(--r-md);
    background: var(--surface);
    cursor: pointer;
    transition: all .18s;
    position: relative;
}
.radio:hover, .checkbox:hover { border-color: var(--line-strong); background: var(--surface-soft); }
.radio--selected, .checkbox--selected {
    border-color: var(--ink);
    background: var(--surface-soft);
}
.radio input, .checkbox input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.radio::before {
    content: '';
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: 1.5px solid var(--line-strong);
    border-radius: 50%;
    background: var(--surface);
    transition: all .15s;
}
.radio--selected::before {
    border-color: var(--ink);
    background: var(--ink);
    box-shadow: inset 0 0 0 4px var(--surface);
}
.checkbox::before {
    content: '';
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: 1.5px solid var(--line-strong);
    border-radius: 6px;
    background: var(--surface);
    transition: all .15s;
}
.checkbox--selected::before {
    border-color: var(--ink);
    background: var(--ink);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FAF7F2' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
    background-size: 14px;
    background-position: center;
    background-repeat: no-repeat;
}
.radio > span:not(.radio__price), .checkbox > span:not(.checkbox__price) {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}
.radio__label, .checkbox__label {
    font-weight: 500;
    color: var(--ink);
    font-size: 15px;
}
.radio__sublabel, .checkbox__sublabel {
    font-size: 13px;
    color: var(--muted);
}
/* «Бесплатно — 50 символов» под «Добавить открытку» — зелёным, как акцент «бесплатно» */
.checkbox__sublabel--free {
    color: var(--success);
    font-weight: 500;
}
.radio__price {
    margin-left: auto;
    font-weight: 500;
    color: var(--success);
    font-size: 13px;
}

.radio__labels {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.radio__badge {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand);
    background: var(--brand-soft);
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid var(--brand);
    border-opacity: 0.2;
    white-space: nowrap;
}
.text-brand { color: var(--brand); }

/* — fields — */
.field { margin-top: var(--gap-field); }
.field:first-child { margin-top: 0; }
.field__label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}
.field__input,
.field__select,
.field__textarea {
    width: 100%;
    padding: 15px 16px;
    border: 1.5px solid var(--line);
    border-radius: var(--r-md);
    background: var(--surface);
    color: var(--ink);
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}
.field__input:focus,
.field__select:focus,
.field__textarea:focus {
    border-color: var(--ink);
    box-shadow: 0 0 0 4px rgba(26,20,16,0.05);
}
.field__textarea { min-height: 100px; resize: vertical; }
.field__hint {
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted);
}

/* — обязательное поле — красная звёздочка — */
.field__label--required::after {
    content: ' *';
    color: var(--danger);
    font-weight: 600;
    margin-left: 2px;
}

/* — Address autocomplete (DaData) — */
.field--suggest { position: relative; }

.suggest-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--sh-elevated);
    overflow: hidden;
    max-height: 320px;
    overflow-y: auto;
}
.suggest-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background .12s;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    color: var(--ink);
    line-height: 1.4;
}
.suggest-item:last-child { border-bottom: none; }
.suggest-item:hover { background: var(--surface-soft); }
.suggest-item__main { display: block; }

.alert-not-deliver {
    margin-top: 16px;
    padding: 16px 20px;
    background: linear-gradient(180deg, #FDF1EC 0%, #FBEAE3 100%);
    border: 1px solid #E8C9BC;
    border-left: 4px solid var(--brand);
    border-radius: var(--r-md);
    color: var(--ink);
    font-size: 14px;
    line-height: 1.5;
}
.alert-not-deliver strong {
    display: block;
    margin-bottom: 6px;
    color: var(--brand);
    font-weight: 600;
}
.alert-not-deliver a {
    color: var(--ink);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: var(--brand);
    text-underline-offset: 3px;
}
.alert-not-deliver a:hover { color: var(--brand); }

/* — блок «уточните данные» (адрес дозаполнить) — */
.address-extras {
    padding: 16px 18px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
}
.address-extras__title {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 12px;
}
.address-extras .field { margin-top: 14px; }
.address-extras .field:first-of-type { margin-top: 0; }

/* — крупный статус доставки (бесплатно / скидка / платная) — */
.delivery-status {
    margin-top: 14px;
    padding: 14px 18px;
    border-radius: var(--r-md);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1.5px solid transparent;
    transition: all .2s;
}
.delivery-status__icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
}
.delivery-status__text { flex: 1; }

/* free (бесплатно) — насыщенный зелёный */
.delivery-status--free {
    background: #E8F5E9;
    border-color: #66BB6A;
    color: #1B5E20;
    font-size: 18px;
    font-weight: 700;
}
.delivery-status--free .delivery-status__icon { color: #2E7D32; }

/* discount (со скидкой 300₽) — золотистый */
.delivery-status--discount {
    background: #FFF8E1;
    border-color: #FFB300;
    color: #6D4C00;
}
.delivery-status--discount .delivery-status__icon { color: #B8860B; }

/* paid (обычная платная) — нейтральный кремовый */
.delivery-status--paid {
    background: var(--surface-soft);
    border-color: var(--line-strong);
    color: var(--ink);
}
.delivery-status--paid .delivery-status__icon { color: var(--brand); }
.field__select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231A1410' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
    padding-right: 44px;
    cursor: pointer;
}
.field--row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
    margin-top: var(--gap-field);
}
.field--row .field { margin-top: 0; }

.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 20px; }

/* — chips — */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.chip {
    padding: 12px 20px;
    min-height: 44px;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
    transition: all .18s;
}
.chip:hover { border-color: var(--line-strong); background: var(--surface-soft); }
.chip--selected {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--bg);
}

/* — Tinkoff Quick Pay widget block — */
.payment-online {
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-soft) 100%);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 18px 18px 22px;
    margin-bottom: 18px;
}
.payment-online__head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 14px;
}
.payment-online__title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 500;
    color: var(--ink);
}
.payment-online__sub {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.02em;
}
.tinkoff-widget {
    min-height: 56px;
}
.tinkoff-widget:empty::before {
    content: 'Загружаем способы оплаты…';
    display: block;
    color: var(--muted-soft);
    font-size: 13px;
    padding: 16px 0;
    text-align: center;
}

/* — кнопка «Оплатить картой» — собственная, под виджетом — */
/* Единый список способов оплаты — все плашки одинаковые, по центру */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Кнопка «Оплатить картой» — текст по центру, как у виджет-кнопок */
.pay-by-card-btn {
    width: 100%;
    min-height: 56px;
    padding: 10px 18px;
    background: var(--surface);
    border: 1.5px solid var(--line-strong);
    border-radius: 10px;
    color: var(--ink);
    font-family: inherit;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: all .18s;
    text-align: center;
}
.pay-by-card-btn:hover:not(:disabled) {
    border-color: var(--ink);
    background: var(--surface-soft);
    transform: translateY(-1px);
}
.pay-by-card-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.pay-by-card-btn__main {
    font-weight: 600;
    font-size: 15px;
    line-height: 1.2;
    color: var(--ink);
}
.pay-by-card-btn__sub {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.2;
}

/* Офлайн-плашки (наличные/перевод) — тот же вид, текст по центру */
.pay-method {
    width: 100%;
    min-height: 72px;
    padding: 14px 20px;
    background: var(--surface);
    border: 1.5px solid var(--line-strong);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-align: center;
    transition: all .18s;
}
.pay-method:hover { border-color: var(--ink); background: var(--surface-soft); transform: translateY(-1px); }
.pay-method--selected { border-color: var(--ink); background: var(--surface-soft); }
.pay-method input { position: absolute; opacity: 0; pointer-events: none; }
.pay-method__main {
    font-weight: 600;
    font-size: 17px;
    line-height: 1.2;
    color: var(--ink);
}
.pay-method__sub {
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.3;
}

/* — sber-info — */
.sber-info {
    margin-top: 20px;
    padding: 24px;
    background: linear-gradient(180deg, var(--brand-soft) 0%, var(--surface-soft) 100%);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
}
.sber-info__title {
    margin: 0 0 10px;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 20px;
    color: var(--ink);
}
.sber-info p { margin: 8px 0; font-size: 14px; color: var(--muted); }
.sber-info p strong { color: var(--ink); font-weight: 500; }
.sber-info__card {
    font-family: 'SF Mono', Menlo, monospace;
    font-size: 18px;
    letter-spacing: 0.1em;
    background: var(--surface);
    padding: 16px 20px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    margin: 14px 0;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    text-align: center;
}
.sber-info__copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    border-radius: var(--r-sm);
    font-size: 13px;
    font-weight: 500;
    transition: all .15s;
}
.sber-info__copy:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* — summary aside — */
.checkout-v2__summary { position: relative; }
@media (min-width: 960px) {
    .checkout-v2__summary { position: sticky; top: 24px; }
}

.summary {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-2xl);
    padding: var(--pad-section);
    box-shadow: var(--sh-card);
}

/* — cart preview — */
.cart-preview {
    border-bottom: 1px solid var(--line);
    padding-bottom: 22px;
    margin-bottom: 22px;
}
.cart-preview__title {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 16px;
}
.cart-preview__list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-height: 340px;
    overflow-y: auto;
}
.cart-line {
    position: relative;
    overflow: hidden;
    border-radius: var(--r-md);
}
/* передний план строки — его двигаем при свайпе, под ним красная плашка «Удалить» */
.cart-line__fg {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 1;
    background: var(--surface);
    will-change: transform;
    touch-action: pan-y;
}
.cart-line__img {
    width: 72px;
    height: 72px;
    border-radius: var(--r-md);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--surface-soft);
    box-shadow: 0 1px 2px rgba(26,20,16,0.06);
}
.cart-line__info { flex: 1; min-width: 0; }
.cart-line__name {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    line-height: 1.35;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.cart-line__count {
    font-size: 12px;
    color: var(--muted);
}
.cart-line__price {
    font-weight: 500;
    color: var(--ink);
    font-size: 15px;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

/* — кнопка-крестик «удалить позицию» (работает везде: мышь + тач) — */
.cart-line__remove {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    margin-left: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--muted-soft);
    border-radius: 50%;
    transition: background .15s, color .15s;
    -webkit-tap-highlight-color: transparent;
}
.cart-line__remove:hover { background: var(--surface-soft); color: var(--danger); }
.cart-line__remove:active { background: #F3E0E2; color: var(--danger); }
.cart-line__remove svg { width: 18px; height: 18px; }

/* — красная плашка «Удалить», проявляется при свайпе влево — */
.cart-line__delete-hint {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding-right: 20px;
    background: var(--danger);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--r-md);
}
.cart-line__delete-hint svg { width: 18px; height: 18px; }
/* лёгкая подсветка строки, пока тянут */
.cart-line--swiping { box-shadow: 0 1px 6px rgba(184,64,76,0.18); }

/* — пустая корзина (после удаления всех позиций) — */
.cart-empty {
    text-align: center;
    padding: 8px 0 4px;
}
.cart-empty__text {
    color: var(--muted);
    font-size: 14px;
    margin: 0 0 14px;
}
.cart-empty__link {
    display: inline-block;
    padding: 11px 20px;
    border: 1.5px solid var(--line-strong);
    border-radius: var(--r-md);
    color: var(--ink);
    font-weight: 500;
    font-size: 14px;
    transition: all .15s;
}
.cart-empty__link:hover { border-color: var(--ink); background: var(--surface-soft); color: var(--ink); }

/* — summary rows — */
.summary__rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.summary__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 14px;
    color: var(--muted);
}
.summary__row span:last-child {
    color: var(--ink);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}
.summary__row--bold {
    border-top: 1px solid var(--line);
    padding-top: 16px;
    margin-top: 10px;
    font-size: 16px;
    color: var(--ink);
}
.summary__row--bold span:first-child {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--ink);
}
.summary__row--bold span:last-child {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 500;
    color: var(--ink);
}

/* — coupon — */
.summary__coupon { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.summary__coupon-input { display: flex; gap: 8px; }
.summary__coupon-input input {
    flex: 1;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--surface);
    color: var(--ink);
    font-size: 13px;
}
.summary__coupon-input input:focus { border-color: var(--ink); outline: none; }
.summary__coupon-input button {
    padding: 11px 18px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    border-radius: var(--r-sm);
    font-size: 13px;
    font-weight: 500;
    transition: all .15s;
}
.summary__coupon-input button:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* — rating — */
.summary__rating {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
}
.summary__rating-stars { display: inline-flex; gap: 1px; color: var(--gold); }
.summary__rating-stars svg { width: 14px; height: 14px; }

/* — sticky CTA + implied consent — */
.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(250,247,242,0.92);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-top: 1px solid var(--line);
    padding: 14px 16px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
    z-index: 100;
    box-shadow: 0 -8px 24px rgba(26,20,16,0.06);
}
@media (min-width: 960px) {
    .sticky-cta {
        position: static;
        background: transparent;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        border-top: none;
        padding: 24px 0 0;
        box-shadow: none;
    }
}
.sticky-cta__inner {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-pay {
    width: 100%;
    min-height: 64px;
    padding: 20px 24px;
    background: var(--ink);
    color: var(--bg);
    border: none;
    border-radius: var(--r-md);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.01em;
    box-shadow: var(--sh-cta);
    transition: all .2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    position: relative;
    overflow: hidden;
}
.btn-pay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.12) 50%, transparent 70%);
    opacity: 0;
    transition: opacity .25s;
}
.btn-pay:hover:not(:disabled) {
    background: var(--brand);
    box-shadow: var(--sh-cta-hover);
    transform: translateY(-1px);
}
.btn-pay:hover:not(:disabled)::after { opacity: 1; }
.btn-pay:active:not(:disabled) { transform: translateY(0); }
.btn-pay:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-pay__dash { margin: 0 8px; color: rgba(250,247,242,0.45); }
.btn-pay__amount { font-variant-numeric: tabular-nums; font-weight: 700; }
.btn-pay__arrow { margin-left: 10px; display: inline-flex; }
.btn-pay__arrow svg { width: 20px; height: 20px; }

/* — agree checkbox + hint (above CTA button) — */
.cta-agree {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: var(--r-md);
    cursor: pointer;
    transition: all .18s;
    user-select: none;
}
.cta-agree:hover { border-color: var(--line-strong); background: var(--surface-soft); }
.cta-agree--checked {
    border-color: var(--ink);
    background: var(--surface-soft);
}
.cta-agree input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.cta-agree__box {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: 1.5px solid var(--line-strong);
    border-radius: 6px;
    background: var(--surface);
    margin-top: 1px;
    transition: all .15s;
}
.cta-agree--checked .cta-agree__box {
    border-color: var(--ink);
    background: var(--ink);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FAF7F2' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
    background-size: 14px;
    background-position: center;
    background-repeat: no-repeat;
}
.cta-agree__text {
    flex: 1;
    font-size: 13px;
    line-height: 1.45;
    color: var(--ink);
}
.cta-agree__text a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--line-strong);
    text-underline-offset: 3px;
    transition: text-decoration-color .15s;
}
.cta-agree__text a:hover { text-decoration-color: var(--brand); color: var(--brand); }

.cta-hint {
    text-align: center;
    font-size: 12px;
    color: var(--brand);
    line-height: 1.4;
    padding: 0 8px;
    margin-top: -2px;
}

/* — utility — */
.rouble::after { content: ' ₽'; opacity: 0.7; }
.text-muted { color: var(--muted); }

/* — spinner — */
.spinner {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(250,247,242,0.3);
    border-top-color: var(--bg);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* — reduced motion — */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0s !important; transition-duration: 0s !important; }
    .section { opacity: 1; transform: none; }
}

/* Текст-оферта под способами оплаты (вариант Б — согласие = факт нажатия) */
.payment-consent {
    margin: 16px 2px 0;
    font-size: 12px;
    line-height: 1.5;
    color: #8a8580;
}
.payment-consent a {
    color: #6b6560;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.payment-consent a:hover { color: #2a2520; }

/* Окна доставки — компактная сетка чипов */
.chips--slots {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
@media (min-width: 480px) {
    .chips--slots { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.chips--slots .chip {
    width: 100%;
    text-align: center;
    justify-content: center;
    font-variant-numeric: tabular-nums;
}

/* ============================================================
   МОБИЛЬНАЯ ВЕРСТКА: сводка заказа (список товаров + итоги) — НАВЕРХ.
   Человек сначала видит, что заказал, и только потом заполняет форму.
   На десктопе (≥960px) сводка остаётся липкой колонкой справа — не трогаем.
   ============================================================ */
@media (max-width: 959px) {
    .checkout-v2__summary { order: -1; }
    /* страховка: на мобиле ничего не должно вылезать вправо и заставлять зумить */
    .checkout-v2 { overflow-x: clip; }
}


/* === Cart line quantity controls (P0 fix — было: только удалить) === */
.cart-line__variant {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}
.cart-line__qty {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    background: var(--surface-soft, #F5F1EA);
    border-radius: 999px;
    padding: 2px;
    width: fit-content;
}
.cart-line__qty-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--ink);
    font-size: 20px;
    line-height: 1;
    font-weight: 600;
    border-radius: 50%;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background .12s;
    position: relative;
}
/* Расширяем tap-hit-зону до 44×44 без изменения визуала */
.cart-line__qty-btn::before {
    content: "";
    position: absolute;
    inset: -6px;
}
.cart-line__qty-btn:hover { background: rgba(0,0,0,.06); }
.cart-line__qty-btn:active { background: rgba(0,0,0,.12); }
.cart-line__qty-btn:disabled { opacity: .4; cursor: not-allowed; }
.cart-line__count-value {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
    font-size: 15px;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}


/* === Лента дат: горизонтальная прокрутка (P1 UX — убрали натив date) === */
.chips--days {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    margin-right: -16px;      /* лента «выезжает» за край карточки — намёк на прокрутку */
    padding-right: 16px;
    scroll-snap-type: x proximity;
}
.chips--days::-webkit-scrollbar { display: none; }
.chips--days .chip {
    flex: 0 0 auto;
    white-space: nowrap;
    scroll-snap-align: start;
}

/* ===== Онлайн-оплата одной кнопкой (06.08.2026) =====
   Виджет банка убран: он не успевал открыть оплату за 2,4 с, и телефон её
   блокировал — до оплаты доходил один заказ из четырёх. Теперь один переход
   на страницу Т-Банка, где покупатель выбирает способ. */
.pay-online-btn {
    width: 100%;
    min-height: 88px;
    padding: 16px 20px;
    background: var(--brand);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: var(--sh-cta);
    transition: all .18s;
}
.pay-online-btn:hover:not(:disabled) {
    background: var(--brand-hover);
    box-shadow: var(--sh-cta-hover);
    transform: translateY(-1px);
}
.pay-online-btn:disabled { opacity: .5; cursor: not-allowed; }
.pay-online-btn__main {
    font-weight: 700;
    font-size: 19px;
    line-height: 1.2;
    letter-spacing: .01em;
}
/* Перечень способов — читаемыми плашками, а не мелкой подписью */
.pay-online-btn__ways {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}
.pay-way {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(255,255,255,.16);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
}
.pay-online-note {
    margin: 10px 0 2px;
    text-align: center;
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.4;
}

/* ===== Способы оплаты одним списком (06.08.2026) =====
   Кнопки виджета банка (T-Pay, SberPay, СБП) и наши плашки (наличные, перевод,
   карта) должны читаться как один блок: одинаковая высота, скругление, рамка
   и расстояние между. Значения подобраны под вид кнопок Т-Банка. */
.payment-methods { gap: 12px; }

.pay-method,
.pay-method--card {
    min-height: 74px;
    padding: 14px 20px;
    background: #fff;
    border: 1px solid #E3E3E3;
    border-radius: 14px;
    font-family: inherit;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-align: center;
    cursor: pointer;
    transition: border-color .18s, background .18s;
}
.pay-method:hover,
.pay-method--card:hover:not(:disabled) {
    border-color: #B9B9B9;
    background: #FCFCFC;
    transform: none;
}
.pay-method--selected {
    border-color: var(--ink);
    background: #FAFAFA;
}
.pay-method--card:disabled { opacity: .5; cursor: not-allowed; }
.pay-method__main {
    font-weight: 600;
    font-size: 17px;
    line-height: 1.25;
    color: var(--ink);
}
.pay-method__sub {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.3;
}
/* Виджет банка выше — убираем лишний отступ, чтобы список шёл сплошняком */
.tinkoff-widget { margin-bottom: 0; }

/* Звёздочка обязательного поля */
.field__req { color: var(--danger); font-weight: 600; }

/* Доставка с неизвестной ценой — нейтральный, не зелёный «бесплатно» */
.delivery-status--unknown, .dstatus--unknown { color: #6B5D52; }

/* Плавное исчезновение строки при удалении товара (07.08.2026).
   Alpine скрывает строку через x-show с x-transition.opacity и ждёт
   события окончания перехода. Перехода в стилях не было — событие не
   приходило, и удалённый товар оставался в списке полупрозрачным
   «призраком»: сумма уже пересчитана, а строка всё ещё висит. */
.cart-line{transition:opacity .22s ease,transform .22s ease}
.cart-line[style*="display: none"]{display:none!important}

/* Неполный телефон (10.08.2026).
   Заказ с номером «+7» или «9» проходил как обычный, и менеджер не мог
   дозвониться — человек при этом думал, что всё оформил. Теперь поле
   подсвечивается, а под ним появляется подсказка. */
.field__input--warn { border-color: #E0A03A; background: #FFFBF3; }
.field__hint--warn { color: #B87514; }
[x-cloak] { display: none !important; }

/* Чего не хватает для оформления. 18.08.2026: покупатель трижды получал
   «заполните имя, телефон и адрес» без единого намёка, какое поле не так,
   и ушёл без заказа. Теперь список видно на странице, до всяких нажатий. */
.checkout-missing {
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid #E0A03A;
    border-radius: 10px;
    background: #FFFBF3;
    color: #7A4E0B;
    font-size: 14px;
    line-height: 1.45;
}
.checkout-missing strong { display: block; margin-bottom: 2px; }
.field__input--missing {
    border-color: #C0392B !important;
    background: #FDF3F2;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, .12);
}

/* Ошибка под конкретным полем — красным, чтобы отличалась от жёлтых
   замечаний «обратите внимание». 18.08.2026 */
.field__hint--err { color: #C0392B; font-weight: 500; }

/* Список того, что осталось поправить: по пунктам, каждый — ссылка,
   которая уводит к своему полю. */
.checkout-missing__list {
    margin: 8px 0 10px;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.checkout-missing__list li { line-height: 1.4; }
.checkout-missing__list a {
    color: #7A4E0B;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.checkout-missing__go {
    appearance: none;
    border: 1px solid #C48A2A;
    background: #fff;
    color: #7A4E0B;
    border-radius: 8px;
    padding: 7px 14px;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}
.checkout-missing__go:hover { background: #FFF4E2; }


/* ===== Упаковка: галочки над способами оплаты (26.08.2026) ==================
   Просьба Зинаиды: покупатели часто просят «оформите покрасивее», а сказать
   об этом на сайте было негде. Выбирается одно из двух или ничего. */

.pack-options { display: flex; flex-direction: column; gap: 10px; }

.pack-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    font-family: inherit;
    background: var(--surface);
    border: 1.5px solid var(--line-strong);
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    transition: border-color .18s, background .18s;
}
.pack-option:hover:not(:disabled) { border-color: var(--brand); }
.pack-option:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.pack-option:disabled { opacity: .6; cursor: default; }
.pack-option--on { border-color: var(--brand); background: var(--brand-soft); }

.pack-option__box {
    flex: none;
    width: 22px;
    height: 22px;
    border: 1.5px solid var(--line-strong);
    border-radius: var(--r-sm);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: background .18s, border-color .18s, color .18s;
}
.pack-option--on .pack-option__box {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.pack-option__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pack-option__name { font-size: 15px; font-weight: 600; color: var(--ink); }
.pack-option__note { font-size: 13px; color: var(--muted); }
.pack-option__price { flex: none; font-size: 15px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.pack-option--on .pack-option__price { color: var(--brand); }

.pack-hint { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.pack-hint--on { color: var(--brand); }

/* Упаковка лежит в корзине обычным товаром (иначе она не попала бы в чек),
   но в списке заказа её не показываем: управление — только галочкой выше.
   Иначе рядом были бы кнопки «+»/«−» и можно было бы набрать две упаковки. */
.cart-line[data-id="1630"],
.cart-line[data-id="1631"] { display: none !important; }

@media (max-width: 560px) {
    .pack-option { padding: 12px 14px; gap: 11px; }
    .pack-option__name { font-size: 14px; }
    .pack-option__note { font-size: 12px; }
}
