/* ================================================================
   РАСЧЁТ СТОИМОСТИ ЗЕФИРОК
   ================================================================ */

.zo-root { padding: 28px 32px; }

@media (max-width: 640px) {
    .zo-root { padding: 18px 14px; }
}

/* ---------- Секции ---------- */
.zo-section {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px dashed #E8E2DA;
}

.zo-section:last-child { border-bottom: none; }

.zo-section__title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: 22px;
    color: #4A1F3D;
    margin: 0 0 18px;
    letter-spacing: -.01em;
}

/* ---------- Зефирки: сетка из 2 карточек ---------- */
.zo-flavors {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 16px;
}

.zo-flavor {
    display: flex;
    gap: 16px;
    padding: 18px;
    border-radius: 20px;
    border: 2px solid #E8E2DA;
    transition: border-color .2s, transform .15s;
}

.zo-flavor--purple {
    background: linear-gradient(135deg, #FAF0FB 0%, #F1E0F5 100%);
    border-color: #D5A6DD;
}

.zo-flavor--purple:hover { border-color: #8E24AA; }

.zo-flavor--white {
    background: linear-gradient(135deg, #FFFDF7 0%, #F5EFE3 100%);
    border-color: #E0D5C0;
}

.zo-flavor--white:hover { border-color: #B58D5A; }

.zo-flavor__image {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    border: 2px solid rgba(255,255,255,.6);
    box-shadow: 0 4px 10px -4px rgba(0,0,0,.15);
}

.zo-flavor__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.zo-flavor__body {
    flex-grow: 1;
    min-width: 0;
}

.zo-flavor__name {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: 20px;
    color: #4A1F3D;
    margin: 0 0 4px;
}

.zo-flavor__desc {
    font-size: 12.5px;
    color: #6B6470;
    margin: 0 0 14px;
    line-height: 1.4;
}

.zo-flavor__controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Слайдер */
.zo-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    outline: none;
    cursor: pointer;
}

.zo-flavor--purple .zo-slider {
    background: linear-gradient(90deg, #E1BEE7 0%, #8E24AA 100%);
}

.zo-flavor--white .zo-slider {
    background: linear-gradient(90deg, #F5EFE3 0%, #B58D5A 100%);
}

.zo-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #4A1F3D;
    box-shadow: 0 3px 8px -2px rgba(0,0,0,.3);
    cursor: pointer;
    transition: transform .15s;
}

.zo-slider::-webkit-slider-thumb:hover { transform: scale(1.1); }

.zo-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #4A1F3D;
    box-shadow: 0 3px 8px -2px rgba(0,0,0,.3);
    cursor: pointer;
}

/* Кнопки − / + и число */
.zo-flavor__num-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}

.zo-flavor__btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid #E8E2DA;
    background: #fff;
    color: #4A1F3D;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background .15s, transform .1s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zo-flavor__btn:hover { background: #F1E0F5; }
.zo-flavor__btn:active { transform: scale(.92); }

.zo-flavor__input {
    width: 70px;
    padding: 8px 10px;
    border: 1.5px solid #E8E2DA;
    border-radius: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 700;
    color: #4A1F3D;
    text-align: center;
    background: #fff;
}

.zo-flavor__input:focus {
    outline: none;
    border-color: #8E24AA;
}

/* Итого количество */
.zo-total-qty {
    text-align: center;
    padding: 14px;
    background: #FAF0FB;
    border-radius: 14px;
    font-size: 15px;
    color: #4A1F3D;
    border: 1px dashed #D5A6DD;
}

.zo-total-qty strong {
    font-family: 'JetBrains Mono', monospace;
    font-size: 20px;
    color: #8E24AA;
    margin-left: 6px;
}

/* ---------- Опции ---------- */
.zo-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.zo-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: #FAF6F0;
    border: 1.5px solid #E8E2DA;
    border-radius: 14px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}

.zo-check:hover {
    border-color: #8E24AA;
    background: #FAF0FB;
}

.zo-check input { display: none; }

.zo-check__box {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border-radius: 6px;
    border: 2px solid #C5B8A5;
    background: #fff;
    position: relative;
    transition: all .15s;
    margin-top: 2px;
}

.zo-check input:checked + .zo-check__box {
    background: #8E24AA;
    border-color: #8E24AA;
}

.zo-check input:checked + .zo-check__box::after {
    content: '✓';
    position: absolute;
    inset: 0;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zo-check__text {
    font-size: 14px;
    line-height: 1.4;
    color: #1A1420;
}

.zo-check__text strong {
    display: block;
    color: #4A1F3D;
    font-weight: 700;
    margin-bottom: 2px;
}

.zo-check__hint {
    display: block;
    font-size: 12.5px;
    color: #6B6470;
}

.zo-check--required {
    border-color: #FFC107;
    background: #FFF8E1;
}

.zo-check--required input:checked + .zo-check__box {
    background: #F57C00;
    border-color: #F57C00;
}

.zo-check--error {
    border-color: #E53935 !important;
    background: #FFEBEE !important;
}

/* ---------- Зона доставки ---------- */
.zo-delivery-zone {
    margin-bottom: 16px;
    padding: 16px 18px;
    background: #F0F8FF;
    border: 1.5px dashed #64B5F6;
    border-radius: 14px;
    animation: zoFadeIn .3s ease;
}

.zo-delivery-note {
    margin-top: 10px;
    font-size: 13px;
    color: #1565C0;
    line-height: 1.5;
}

.zo-delivery-note--warn {
    color: #E65100;
    font-weight: 600;
}

/* ---------- Поля ---------- */
.zo-field {
    display: block;
    margin-bottom: 14px;
}

.zo-field--full { grid-column: 1 / -1; }

.zo-field__label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #6B6470;
    margin-bottom: 6px;
}

.zo-input,
.zo-select {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #E8E2DA;
    border-radius: 12px;
    background: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    color: #1A1420;
    transition: border-color .2s;
}

.zo-input:focus,
.zo-select:focus {
    outline: none;
    border-color: #8E24AA;
    box-shadow: 0 0 0 3px rgba(142, 36, 170, .1);
}

.zo-textarea { resize: vertical; min-height: 60px; }

.zo-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

/* ---------- Итоговая сумма ---------- */
.zo-summary {
    padding: 22px 24px;
    background: linear-gradient(135deg, #FAF0FB 0%, #F1E0F5 100%);
    border: 2px solid #D5A6DD;
    border-radius: 20px;
    margin-top: 20px;
    margin-bottom: 18px;
}

.zo-summary__row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 15px;
    color: #4A1F3D;
    border-bottom: 1px dashed rgba(142, 36, 170, .2);
}

.zo-summary__row span:last-child {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
}

.zo-summary__row--urgent span:last-child { color: #E65100; }
.zo-summary__row--delivery span:last-child { color: #1565C0; }

.zo-summary__total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 2px solid #8E24AA;
    font-size: 17px;
    font-weight: 700;
    color: #4A1F3D;
}

.zo-summary__total span:last-child {
    font-family: 'JetBrains Mono', monospace;
    font-size: 30px;
    font-weight: 900;
    color: #8E24AA;
}

.zo-summary__note {
    margin: 10px 0 0;
    font-size: 12.5px;
    color: #6B6470;
    font-style: italic;
}

.zo-summary__warn {
    margin: 10px 0 0;
    padding: 10px 14px;
    background: #FFEBEE;
    border-left: 4px solid #E53935;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    color: #B71C1C;
    line-height: 1.5;
}

/* ---------- Кнопки ---------- */
.zo-actions {
    display: flex;
    justify-content: center;
    margin: 20px 0 14px;
}

.zo-btn {
    padding: 16px 32px;
    border-radius: 14px;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s, box-shadow .2s;
}

.zo-btn--primary {
    background: linear-gradient(135deg, #8E24AA 0%, #4A1F3D 100%);
    color: #fff;
    box-shadow: 0 8px 20px -8px rgba(142, 36, 170, .6);
}

.zo-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -8px rgba(142, 36, 170, .7);
}

.zo-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
}

.zo-hint-small {
    text-align: center;
    font-size: 13px;
    color: #6B6470;
    line-height: 1.5;
    margin: 0 0 8px;
}

.zo-hint-small strong { color: #4A1F3D; }

/* ---------- Правила ---------- */
.zo-rules {
    margin-top: 32px;
    padding: 24px 28px;
    background: #FFFDF7;
    border: 2px dashed #D5A6DD;
    border-radius: 20px;
}

.zo-rules__title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: 20px;
    color: #4A1F3D;
    margin: 0 0 12px;
}

.zo-rules__list {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
}

.zo-rules__list li {
    position: relative;
    padding: 6px 0 6px 22px;
    font-size: 14.5px;
    line-height: 1.5;
    color: #1A1420;
}

.zo-rules__list li::before {
    content: '❋';
    position: absolute;
    left: 0;
    top: 6px;
    color: #8E24AA;
    font-size: 12px;
}

.zo-rules__text {
    font-size: 14.5px;
    line-height: 1.6;
    color: #1A1420;
    margin: 0 0 16px;
}

.zo-rules__footer {
    padding-top: 14px;
    border-top: 1px dashed #D5A6DD;
    font-size: 12.5px;
    font-style: italic;
    color: #6B6470;
    text-align: center;
    margin: 0;
}

@keyframes zoFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Адаптив ---------- */
@media (max-width: 640px) {
    .zo-flavor {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .zo-flavor__num-wrap { justify-content: center; }
    .zo-summary__total span:last-child { font-size: 24px; }
}

/* ---------- Уведомление об успехе ---------- */
.zo-success {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(26, 20, 32, .55);
    backdrop-filter: blur(4px);
    animation: zoFadeIn .25s ease;
}

.zo-success[hidden] { display: none; }

.zo-success__inner {
    max-width: 460px;
    width: 100%;
    padding: 36px 32px;
    background: linear-gradient(135deg, #FAF0FB 0%, #F1E0F5 100%);
    border: 3px solid #8E24AA;
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 20px 60px -20px rgba(142, 36, 170, .5);
    animation: zoPop .4s cubic-bezier(.5, 1.6, .5, 1);
}

@keyframes zoPop {
    from { opacity: 0; transform: scale(.9) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.zo-success__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #8E24AA;
    color: #fff;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 18px;
}

.zo-success__title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: 26px;
    color: #4A1F3D;
    margin: 0 0 10px;
    line-height: 1.2;
}

.zo-success__text {
    font-size: 15px;
    line-height: 1.6;
    color: #1A1420;
    margin: 0 0 14px;
}

.zo-success__order {
    display: inline-block;
    padding: 10px 18px;
    background: #fff;
    border-radius: 12px;
    font-size: 14px;
    color: #4A1F3D;
    margin: 0 0 22px;
}

.zo-success__order strong {
    font-family: 'JetBrains Mono', monospace;
    font-size: 17px;
    color: #8E24AA;
}

.zo-btn--ghost {
    background: #fff;
    color: #4A1F3D;
    border: 2px solid #8E24AA;
    box-shadow: none;
}

.zo-btn--ghost:hover {
    background: #8E24AA;
    color: #fff;
    transform: translateY(-2px);
}