#multistep-checkout {
    max-width: 800px;
    margin: 30px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

/* Купон-промокод */
.msc-coupon-toggle-wrap {
    max-width: 100%;
    margin: 30px auto 0;
}

.msc-coupon-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 14px;
    color: #2d3748;
    text-decoration: none;
}

.msc-coupon-toggle span {
    font-weight: 400;
    color: #b8637a;
    text-decoration: underline;
}
.msc-coupon-input {
    margin-bottom: 1em;
    width: 200px !important;
    height: 50px !important;
    min-width: 80%;
}
.msc-coupon-apply { max-width: 18%;}
.msc-coupon-toggle:hover span {
    color: #237a72;
}

.msc-coupon-form {
    max-width: 100%;
    margin: 15px auto 0;
}

.msc-coupon-row {
    display: flex;
    gap: 12px;
    margin-bottom: 0;
}

.msc-coupon-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.msc-coupon-input:focus {
    outline: none;
    border-color: #237a72;
}

.msc-coupon-apply {
    margin-top: 0;
    width: auto;
    padding: 0 24px;
    white-space: nowrap;
}

/* Шаги */
.step {
    animation: fadeIn 0.4s ease;
}

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

.step-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.step-number {
 display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px !important;
    height: 40px;
    background: linear-gradient(135deg, #237a72 0%, #237a72 100%);
    color: white;
    border-radius: 50%;
    font-weight: bold;
    padding: 0 18px;
    font-size: 13px;
    margin-right: 15px;
}

.step-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #2d3748;
}

/* Формы */
.form-row {
    margin-bottom: 25px;
}

.form-row label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-row input[type="text"],
.form-row input[type="tel"],
.form-row input[type="date"],
.form-row select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f7fafc;
    height: 48px;
    color: #000 !important;
}

.form-row input:focus,
.form-row select:focus {
    outline: none;
    border-color: #237a72;
    background: white;
    box-shadow: 0 0 0 3px rgba(188, 168, 241, 0.1);
}

.form-row input.error {
    border-color: #fc8181;
    background: #fff5f5;
}

.error-message {
    display: block;
    color: #fc8181;
    font-size: 12px;
    margin-top: 8px;
    margin-left: 5px;
}

/* Карточки для типа доставки - минималистичные */
.delivery-type-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.delivery-card {
    cursor: pointer;
    position: relative;
}

.delivery-card input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.delivery-card-content {
    padding: 25px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    transition: all 0.3s ease;
    background: white;
    text-align: center;
}

.delivery-card input:checked + .delivery-card-content {
    border-color: #237a72;
    background: linear-gradient(135deg, rgba(188, 168, 241, 0.05) 0%, rgba(106, 61, 190, 0.05) 100%);
    box-shadow: 0 5px 15px rgba(188, 168, 241, 0.2);
}

.delivery-title {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.delivery-desc {
    display: block;
    font-size: 12px;
    color: #718096;
}

/* Кастомные радиокнопки для районов */
.radio-group-custom {
    background: #f7fafc;
    border-radius: 12px;
    padding: 10px;
}

.radio-custom {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin: 5px 0;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: white;
    border: 1px solid #e2e8f0;
}

.radio-custom:hover {
    background: #edf2f7;
    border-color: #237a72;
}

.radio-custom input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-custom-icon {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e0;
    border-radius: 50%;
    margin-right: 12px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.radio-custom input:checked + .radio-custom-icon {
    border-color: #237a72;
    background: #237a72;
    box-shadow: inset 0 0 0 4px white;
}

.radio-custom-text {
    flex: 1;
    font-size: 15px;
    color: #2d3748;
    font-weight: 500;
}

.radio-price {
    font-weight: 600;
    color: #48bb78;
    font-size: 14px;
    background: #f0fff4;
    padding: 4px 10px;
    border-radius: 20px;
}

/* Кастомный чекбокс */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    position: relative;
    padding-left: 35px;
    user-select: none;
}

.checkbox-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: absolute;
    left: 0;
    top: 2px;
    height: 22px;
    width: 22px;
    background-color: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.checkbox-label:hover input ~ .checkmark {
    background-color: #edf2f7;
}

.checkbox-label input:checked ~ .checkmark {
    background-color: #237a72;
    border-color: #237a72;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-label input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-label .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label span:last-child {
    margin-left: 5px;
    color: #2d3748;
    line-height: 1.4;
}

.checkbox-label a {
    color: #237a72;
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.privacy-policy-row {
    margin: 20px 0;
}

/* Стилизованный select */
.styled-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23bca8f1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    cursor: pointer;
}

/* Стилизованная дата */
.styled-date {
    cursor: pointer;
}

/* Карточки способов оплаты */
.payment-methods-group {
    display: grid;
    gap: 15px;
}

.payment-method-card {
    cursor: pointer;
    position: relative;
}

.payment-method-card input {
    position: absolute;
    opacity: 0;
}

.payment-method-content {
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    background: white;
}

.payment-method-card input:checked + .payment-method-content {
    border-color: #237a72;
    background: linear-gradient(135deg, rgba(188, 168, 241, 0.05) 0%, rgba(106, 61, 190, 0.05) 100%);
}

.payment-icon {
    font-size: 24px;
    margin-right: 15px;
}

.payment-title {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    flex: 1;
}

/* Кнопки */
.step-buttons {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.button {
    margin-top: 1em;
    /* background: #bca8f1; */
    width: 100%;
    height: 46px;
    font-size: 16px !important;
    font-weight: 400;
    padding: 2px 0;
    color: #000;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 50px;
    border-radius: 19px !important;
    font-weight: 400 !important;
}

.button:hover {
   
    transform: translateY(-1px);
}

.prev-step {
    background: #edf2f7;
    color: #4a5568;
}

.prev-step:hover {
    background: #e2e8f0;
}

#place_order {
    background: #237a72;
    color: #000;
}

#place_order:hover {
    background: #237a72;
}

/* Секции доставки */
#pickup_options,
#delivery_options,
#recipient_fields {
    animation: slideDown 0.3s ease;
    margin-top: 20px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
#multistep-checkout h3 {
    /* font-weight: 400; */
    /* font-style: normal; */
    display: block;
}
form.checkout h3 {
    font-size: 1.1em;
    font-weight: bolder;
    overflow: hidden;
    padding-top: 10px;
    text-transform: uppercase;
    display: none;
}
/* Адаптивность */
@media (max-width: 768px) {
    #multistep-checkout {
        padding: 20px;
        margin: 15px;
    }
    .msc-coupon-input {width:100% !important}
    .msc-coupon-toggle-wrap,
    .msc-coupon-form {
        margin-left: 15px;
        margin-right: 15px;
    }
    
    .msc-coupon-row {
        flex-direction: column;
    }
    
    .msc-coupon-apply {
        width: 100%;
    }
    
    .delivery-type-group {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .step-buttons {
        flex-direction: column;
    }
    
    .step-header h3 {
        font-size: 20px;
    }
    
    .step-number {
        width: 32px !important;
        height: 32px;
        font-size: 11px;
        padding: 0 12px;
    }
    
    .button {
        margin-top: 0.5em;
    }
    
    .radio-custom {
        padding: 10px;
    }
    
    .radio-price {
        font-size: 12px;
        padding: 2px 8px;
    }
}

/* Анимация ошибок */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

input.error {
    animation: shake 0.3s ease;
}

/* Стили для disabled состояний */
.button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Улучшенный фокус для accessibility */
.button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid #237a72;
    outline-offset: 2px;
}

/* Стили для обязательных полей */
.required {
    color: #fc8181;
    margin-left: 3px;
}

/* Мини-корзина внутри стандартного блока .checkout-sidebar */
.msc-mini-cart {
    margin-bottom: 10px;
}

.msc-mini-cart-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.msc-mini-cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: opacity 0.2s ease;
}

.msc-mini-cart-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.msc-mini-cart-item.msc-updating {
    opacity: 0.5;
    pointer-events: none;
}

.msc-mini-cart-item-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.msc-mini-cart-item-info {
    flex: 1;
    min-width: 0;
}

.msc-mini-cart-item-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.msc-mini-cart-item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.msc-qty-btn {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f7fafc;
    color: #2d3748;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;margin: 0;
}

.msc-qty-btn:hover {
    background: #237a72;
    border-color: #237a72;
    color: #fff;
}

.msc-qty-input {
    width: 42px;
    height: 26px;
    text-align: center;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    color: #000 !important;
    background: #f7fafc;
    padding: 0;margin: 0;width: 69px !important;
    padding: 0 !important;
    text-align: center;
}

.msc-mini-cart-item-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.msc-mini-cart-item-price {
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
    white-space: nowrap;
}

.msc-mini-cart-remove {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #a0aec0;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.msc-mini-cart-remove:hover {
    color: #fc8181;
}

.msc-mini-cart-totals {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 15px;
    color: #2d3748;
}

.mini-cart-total {
    font-size: 18px;
    font-weight: 700;
}

.msc-mini-cart-empty {
    color: #718096;
    font-size: 14px;
}

/* Блок доппродаж — выводится сразу после мини-корзины */
.msc-upsell {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.msc-upsell-title {
    margin: 0 0 15px;
    font-size: 15px;
    font-weight: 600;
    color: #2d3748;
}

.msc-upsell-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.msc-upsell-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.msc-upsell-item-image img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.msc-upsell-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.msc-upsell-item-name {
    font-size: 13px;
    font-weight: 600;
    color: #2d3748;
    line-height: 1.3;
}

.msc-upsell-item-price {
    font-size: 13px;
    color: #718096;
}

.msc-upsell-item-price .amount {
    color: #718096;
}

.msc-upsell-add {
    flex-shrink: 0;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #2d3748;
    background: #f7fafc;
    border: 1px solid #237a72;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.msc-upsell-add:hover {
    background: #237a72;
    color: #fff;
}

.msc-upsell-add:disabled {
    opacity: 0.7;
    cursor: default;
}

@media (max-width: 768px) {
    .msc-upsell-item-name {
        font-size: 12px;
    }
}