.calWrap {
    background: rgba(246, 245, 244, 1);
    min-height: calc(100vh - 120px);
    padding: 40px 0 80px;
}

/* --- СТИЛИ КАЛЬКУЛЯТОРА --- */
.calc-header {
    text-align: center;
    margin-bottom: 40px;
}

.calc-header h1 {
    font-family: 'Manrope', sans-serif;
    font-size: 36px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.calc-header p {
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Категории и Слайдер блюд */
.calc-menu-box {
    background: #fff;
    padding: 30px;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
}

.calc-categories {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 24px;
}

.calc-categories::-webkit-scrollbar {
    height: 4px;
}

.calc-categories::-webkit-scrollbar-thumb {
    background: #E30613;
    border-radius: 10px;
}

.calc-cat-btn {
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: 13px;
    text-transform: uppercase;
    color: #888;
    background: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.2s;
}

.calc-cat-btn.is-active,
.calc-cat-btn:hover {
    color: #E30613;
}

.calc-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.calc-products-grid::-webkit-scrollbar {
    width: 6px;
}

.calc-products-grid::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.calc-prod-card {
    text-align: center;
    position: relative;
    padding-bottom: 20px;
}

.calc-prod-img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
    transition: 0.3s;
}

.calc-prod-card:hover .calc-prod-img {
    transform: translateY(-5px);
}

.calc-prod-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
}

/* Кнопка добавления (Плюсик) */
.calc-add-btn {
    position: absolute;
    top: 110px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #8CC63F;
    color: #fff;
    border: 2px solid #fff;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 4px 10px rgba(140, 198, 63, 0.4);
}

.calc-add-btn:hover {
    background: #7ab32e;
    transform: translateX(-50%) scale(1.1);
}

/* Рабочая область (Итого + Выбранные блюда) */
.calc-workspace {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

/* Блоки итогов */
.calc-summary-box {
    background: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.calc-summary-title {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.calc-nutri-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.calc-nutri-val {
    font-weight: 800;
    color: #333;
}

.calc-total-kcal {
    font-family: 'Manrope', sans-serif;
    font-size: 48px;
    font-weight: 900;
    margin: 24px 0 0;
    line-height: 1;
}

.calc-total-lbl {
    font-size: 12px;
    color: #888;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
}

/* Выбранные блюда */
.calc-selected-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    align-content: flex-start;
}

.calc-sel-item {
    text-align: center;
    position: relative;
    padding: 20px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #eee;
}

.calc-sel-img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 12px;
}

.calc-sel-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 16px;
    min-height: 34px;
}

.calc-sel-kcal {
    font-family: 'Manrope', sans-serif;
    font-size: 28px;
    font-weight: 800;
    margin-top: 16px;
}

.calc-sel-lbl {
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
}

.calc-remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #E30613;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: 0.2s;
}

.calc-remove-btn:hover {
    background: #c20511;
    transform: scale(1.1);
}

/* Модалка суточной нормы */
.norm-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.norm-modal.is-open {
    display: flex;
}

.norm-modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    position: relative;

    /* 🟢 ИСПРАВЛЕНИЕ: Чтобы внутренние отступы не выталкивали модалку за пределы экрана */
    box-sizing: border-box;
}

/* 🟢 ИСПРАВЛЕНИЕ: Жестко контролируем ширину инпутов внутри модального окна */
.norm-modal-content .input {
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    /* Не дает сетке разъехаться */
}

/* 🟢 ИСПРАВЛЕНИЕ: Спасает колонки внутри сетки от расширения */
.norm-modal-content div {
    min-width: 0;
}

.norm-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #888;
}

@media (max-width: 900px) {
    .calc-workspace {
        grid-template-columns: 1fr;
    }
}