/* --- СТРАНИЦА ОФОРМЛЕНИЯ ЗАКАЗА --- */
.page-cart {
    padding-bottom: 80px;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
    margin-top: 24px;
}

.cart-left {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.cart-section {
    background: #fff;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
}

.cart-section h2 {
    font-family: 'Manrope', sans-serif;
    font-size: 24px;
    margin: 0 0 24px;
    border-bottom: 2px solid #f5f5f5;
    padding-bottom: 16px;
}

/* Товары в корзине */
.main-cart-item {
    display: grid;
    grid-template-columns: 80px 1fr 120px 100px 40px;
    gap: 20px;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px dashed #eee;
}

.main-cart-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.mc-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    background: #fdfdfd;
}

.mc-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 4px;
}

.mc-addons {
    font-size: 13px;
    color: #888;
    line-height: 1.4;
}

.mc-price {
    font-weight: 800;
    font-size: 18px;
    text-align: right;
}

.qty-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f5f5f5;
    border-radius: 12px;
    padding: 4px;
    width: 100px;
}

.qty-btn {
    background: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.qty-btn:hover {
    background: #E30613;
    color: white;
}

.qty-num {
    font-weight: 700;
    width: 24px;
    text-align: center;
}

.mc-remove {
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 20px;
    transition: 0.2s;
}

.mc-remove:hover {
    color: #E30613;
}

/* Блок деталей (Доставка/Самовывоз) */
.checkout-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}

.checkout-toggle .btn {
    flex: 1;
    border: 2px solid #eee;
    color: #333;
    background: #fff;
    transition: 0.2s;
}

.checkout-toggle .btn.is-active {
    border-color: #E30613;
    color: #E30613;
    background: rgba(227, 6, 19, 0.05);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-full {
    grid-column: span 2;
}

/* Правый блок (Итого) */
.cart-right {
    position: sticky;
    top: 100px;
}

.summary-box {
    background: #fff;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    color: #666;
    margin-bottom: 12px;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 24px;
    font-weight: 800;
    font-family: 'Manrope', sans-serif;
    margin: 20px 0;
    padding-top: 20px;
    border-top: 2px solid #f5f5f5;
}

@media (max-width: 900px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-right {
        position: static;
    }

    .main-cart-item {
        grid-template-columns: 60px 1fr;
        gap: 10px;
    }

    .mc-img {
        width: 60px;
        height: 60px;
    }

    .qty-control {
        grid-column: 2;
        width: 120px;
    }

    .mc-price {
        grid-column: 2;
        text-align: left;
    }

    .mc-remove {
        position: absolute;
        top: 10px;
        right: 0;
    }

    .main-cart-item {
        position: relative;
    }
}

@media (max-width: 480px) {
    .cart-layout {
        gap: 16px;
    }

    .cart-section {
        padding: 16px;
        border-radius: 18px;
    }

    .cart-section h2 {
        font-size: 20px;
        margin-bottom: 16px;
    }

    .main-cart-item {
        padding: 14px 0;
        grid-template-columns: 56px 1fr;
        gap: 10px;
    }

    .mc-img {
        width: 56px;
        height: 56px;
        border-radius: 10px;
    }

    .mc-title {
        font-size: 15px;
    }

    .qty-control {
        width: 110px;
        padding: 4px;
    }

    .mc-remove {
        top: 6px;
        right: 6px;
        font-size: 18px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-full {
        grid-column: auto;
    }

    .summary-box {
        padding: 16px;
        border-radius: 18px;
    }

    .summary-row,
    .summary-total {
        font-size: 14px;
    }

    .summary-total {
        font-size: 20px;
        flex-direction: column;
        gap: 6px;
        align-items: flex-start;
    }

    .checkout-toggle {
        gap: 8px;
    }
}

/* Маленькие переключатели для формы */
.checkout-toggle.toggle-sm {
    margin-bottom: 0;
}

.checkout-toggle.toggle-sm .btn {
    padding: 10px 12px;
    font-size: 14px;
    border-radius: 10px;
}