/* Основной контейнер попапа */
.custom-constructor {
    display: flex !important;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    background: #fff;
    overflow: hidden;
}

/* Адаптация под мобильные (полный экран) */
@media (max-width: 767px) {


    .mfp-container {
        padding: 0 !important;
    }
}

.mfp-container {
    padding: 0 !important;
}

.mfp-content {
    height: 100%;
    width: 100%;
    vertical-align: top !important;
    /* Убираем вертикальное центрирование */
}

/* Зафиксированный заголовок */
.window-title {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-start;
    /* Прижимаем закрытие к верху */
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background: #fff;
    z-index: 10;
}

.header-sub-info {
    font-size: 13px;
    color: #777;
    line-height: 1.4;
}

.js-current-weight-val {
    font-weight: 600;
    color: #333;
    display: none;
}

.header-added-wrap {
    display: block;
    /* С новой строки под весом */
    margin: auto 20px;
}

.js-added-text {
    color: #e4012d;
    /* Выделяем цветом добавленные позиции */
    font-weight: 500;
}

.product-title {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    line-height: 1.2;
    margin-bottom: 4px;
}

.header-content {
    flex: 1;
    padding-right: 15px;
    /* Чтобы текст не налезал на крестик */
}

.window-title span {
    font-size: 16px;
    font-weight: 700;
}

.window-close {
    flex: 0 0 30px;
    height: 30px;
    background: #f4f4f4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-top: -2px;
    /* Небольшая корректировка позиции */
}

.window-close::before {
    content: "✕";
    font-size: 16px;
    color: #000;
}

/* Скроллящаяся область */
.window-content {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0 20px;
}

.modal-main-custom {
    padding-bottom: 20px;
}

.window-content p {
    font-size: 16px;
    font-weight: 700;
    margin: 20px 0 10px 0;
    color: #000;
}

.window-content .info {
    font-size: 14px;
    color: #888;
    margin-top: 10px;
}

/* Выбор веса (Radio-чипсы) */
.weight {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.weight .radio-box {
    margin: 0;
}

.weight .radio-box input {
    display: none;
}

.weight .radio-box label {
    display: block;
    padding: 8px 16px;
    background: #f4f4f4;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
    border: 1px solid transparent;
}

.weight .radio-box input:checked+label {
    background: #e4012d;
    color: #fff;
}

/* Список добавок */
.items.foodlist {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.items.foodlist .item {
    display: flex;
    align-items: center;
    /* flex-direction: column; */
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.items.foodlist .item .title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #1d2029;
    flex: 1;
}

.items.foodlist .item img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
}

/* Управление количеством */
.items.foodlist .item .sum {
    display: flex;
    align-items: center;
    gap: 12px;
}

.items.foodlist .item .price {
    font-weight: 700;
    font-size: 14px;
    min-width: 60px;
    text-align: right;
    display: none;
}

.items.foodlist .item .amt {
    display: flex;
    align-items: center;
    background: #f4f4f4;
    border-radius: 8px;
    padding: 4px;
}

.amt span.minus,
.amt span.plus {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #fff;
    border-radius: 6px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.amt span.minus::before {
    content: "−";
    color: #e4012d;
}

.amt span.plus::before {
    content: "+";
    color: #28a745;
}

.additive-item-count-val {
    padding: 0 10px;
    font-size: 13px;
    font-weight: 600;
}

.js-count-val {
    font-size: 15px;
}

/* Состояние лимита */
.js-additive-item.limit-reached {
    opacity: 0.4;
    filter: grayscale(0.8);
}

.btn-plus-disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* Убрать ингредиенты */
.items-remove-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

@media (max-width: 480px) {
    .items-remove-list {
        grid-template-columns: 1fr;
    }
}



/* Зафиксированный подвал */
.bottom {
    flex: 0 0 auto;
    padding: 15px 20px;
    border-top: 1px solid #eee;
}

.custom-constructor>button {
    display: none;
}

.bottom .btn>span {
    margin-left: 5px;
}

.bottom .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    width: 100%;
    background: #e4012d;
    /* Цвет вашего бренда */
    color: #fff;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    border: none;
    cursor: pointer;
}

/* Убираем лишние внешние отступы у Aspro, если они есть */
.mfp-inline-holder .mfp-content {
    line-height: normal;
}

/* Фикс для Magnific Popup, чтобы он не добавлял лишних отступов */
.mfp-content {
    height: 100%;
    vertical-align: top !important;
    /* Убирает центрирование по вертикали */
}

/* Кастомный скроллбар для эстетики */
.window-content::-webkit-scrollbar {
    width: 4px;
}

.window-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.window-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}
/* Состояние кнопки при отправке */
.bottom .btn.is-loading {
    opacity: 0.7;
    cursor: not-allowed;
    background-color: #999 !important; /* Серый цвет во время загрузки */
    box-shadow: none;
}

/* Добавим простую анимацию "мигания" для текста "Добавляем..." */
.bottom .btn.is-loading span {
    animation: blink 1s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.remove-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f9f9f9;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    border: 1px solid transparent;
}

.remove-item.is-deleted {
    background: #fff0f0;
    border-color: #ffcccc;
    text-decoration: line-through;
    opacity: 0.7;
}

.remove-status-icon:before {
    content: '✕'; /* Иконка удаления */
    color: #ccc;
    font-weight: bold;
}

.remove-item.is-deleted .remove-status-icon:before {
    color: #e4012d;
}

.remove-item-name {
    font-size: 14px;
    color: #000;
}