.calculator-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

/* Карточки слева */
.calc-card {
    background: #ffffff;
    padding: 25px;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    margin-bottom: 25px;
    transition: box-shadow 0.2s ease, border 0.2s ease;
    border: 1px solid transparent;
}

.calc-card:hover {
    box-shadow: 0 12px 35px rgba(0,0,0,0.08);
    border: 1px solid #eaeaea;
}

/* Заголовок блока */
.calc-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.step-number {
    width: 32px;
    height: 32px;
    background: #0d6efd;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Услуги */
.service-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.service-item {
    border: 2px solid #eaeaea;
    padding: 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.2s;
}

.service-item:hover {
    border-color: #0d6efd;
}

.service-item.active {
    border-color: #0d6efd;
    background: #f0f6ff;
}

/* Доп услуги */
.extra-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.extra-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.2s ease;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    border: 2px solid transparent;
}

.extra-item:hover {
    background: #eef4ff;
    border-color: #0d6efd;
}

.extra-item:has(input:checked) {
    background: #eef4ff;
    border-color: #0d6efd;
}

.extra-item input {
    accent-color: #0d6efd;
}


/* Кнопка */
.add-btn {
    border-radius: 15px;
    padding: 15px;
    font-weight: 600;
}

.calculator-right {
    position: relative; /* обязательное для sticky */
}

/* ПРАВАЯ КОЛОНКА */
.order-card {
    background: #ffffff;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    position: sticky; /* чтобы блок плавно закреплялся при скролле */
    top: 20px;
    display: flex;
    flex-direction: column;
    max-height: 140vh; /* ограничиваем высоту блока */
}

/* Заголовок и футер не скроллятся */
.order-header,
.order-footer {
    flex-shrink: 0;
}

/* Список заказов с прокруткой */
.order-items-wrapper{
max-height: 520px;
overflow-y:auto;
}


.order-title {
    color: #6c757d;
    font-size: 14px;
    letter-spacing: 1px;
}

.order-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 14px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.2s ease;
}

.order-item:hover {
    background: #eef4ff;
}

.order-item-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.remove-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s ease;
    border: 1px solid #e0e0e0;
}

.remove-btn:hover {
    background: #ffeded;
    border-color: #dc3545;
    color: #dc3545;
}


.total {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
}

.manager-note {
    font-size: 13px;
    color: #6c757d;
    margin-top: 10px;
}

.order-submit-btn:disabled {
    background-color: #adb5bd !important;
    border-color: #adb5bd !important;
    cursor: not-allowed;
}

.order-btn:disabled {
    background-color: #adb5bd !important;
    border-color: #adb5bd !important;
    cursor: not-allowed;
}

.order-note {
    font-size: 13px;
    color: #6c757d;
    margin-top: 10px;
    line-height: 1.4;
}

#calculator {
    scroll-margin-top: 40px;
}

#confirmOrderBtn {
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#confirmOrderBtn .btn-text {
    display: inline-block;
}

#confirmOrderBtn.loading {
    pointer-events: none;
    opacity: 0.8;
}

#confirmOrderBtn.loading .btn-text {
    visibility: hidden;
    opacity: 0;
}

#confirmOrderBtn.loading::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: button-spin 0.6s linear infinite;
}

@keyframes button-spin {
    to {
        transform: rotate(360deg);
    }
}
