/* ============================================================================
   УЛУЧШЕННЫЙ ДИЗАЙН КОНФИГУРАТОРА - ЧЁТКАЯ СТРУКТУРА В 2 КОЛОНКИ
   Систематизированная сетка без пустого пространства
   ============================================================================ */

/* Основной контейнер конфигуратора */
.configurator-cnc {
    background: #fff;
    padding: 0 !important;
    margin-bottom: 0;
    width: 100% !important;
    max-width: 100% !important;
}

/* Сетка в две колонки */
.config-two-column-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin: 0;
    width: 100%;
}

/* Колонка конфигуратора */
.config-column {
    border: 2px solid #e0e0e0;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.config-column:first-child {
    border-right: 1px solid #e0e0e0;
}

.config-column:last-child {
    border-left: 1px solid #e0e0e0;
}

/* Заголовок секции */
.config-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #F31D1B 0%, #ff4d4d 100%);
    padding: 15px 20px;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #d31917;
}

/* Кнопка сброса секции */
.config-section-reset {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    padding: 4px 12px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
}

.config-section-reset:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #F31D1B;
    border-color: #fff;
}

/* Контейнер для группы опций */
.config-options-group {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
    background: #fff;
    flex: 1;
}

/* Стиль для кнопок-опций - СТРОГАЯ СТРУКТУРА */
.config-option-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
    color: #333;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: left;
    margin: 0;
}

.config-option-button:hover {
    background: #f8f8f8;
    border-left: 4px solid #F31D1B;
    padding-left: 16px;
}

/* Активная опция */
.config-option-button.active {
    background: #fff5f5;
    border-left: 4px solid #F31D1B;
    color: #F31D1B;
    font-weight: 600;
    padding-left: 16px;
}

/* Иконка проверки для активной опции */
.config-option-button.active::after {
    content: "✓";
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #F31D1B;
    color: #fff;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    flex-shrink: 0;
}

/* Скрытый radio input */
.config-option-button input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Текст опции и цена */
.config-option-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.config-option-name {
    font-size: 15px;
    font-weight: 500;
}

.config-option-button .option-price {
    font-size: 13px;
    color: #999;
    font-weight: 400;
}

.config-option-button.active .option-price {
    color: #F31D1B;
    font-weight: 600;
}

/* Опция "нет/не установлены" - другой стиль */
.config-option-button.option-none {
    background: #fafafa;
    color: #999;
}

.config-option-button.option-none:hover {
    background: #f0f0f0;
}

.config-option-button.option-none.active {
    background: #e8e8e8;
    color: #666;
    border-left-color: #999;
}

/* Глобальная кнопка сброса всех настроек */
.config-global-reset {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 20px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-bottom: 3px solid #F31D1B;
    color: #666;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0;
    width: 100%;
}

.config-global-reset:hover {
    background: #fff5f5;
    color: #F31D1B;
    border-color: #F31D1B;
}

.config-global-reset::before {
    content: "↺";
    font-size: 20px;
}

/* История выборов - убрана для чистоты структуры */
.config-history {
    display: none;
}

/* Итоговая цена - на всю ширину внизу */
.config-total-price {
    background: linear-gradient(135deg, #F31D1B 0%, #ff4d4d 100%);
    color: #fff;
    padding: 25px 30px;
    margin: 0;
    text-align: center;
    border-top: 3px solid #d31917;
    grid-column: 1 / -1; /* На обе колонки */
}

.config-total-price-label {
    font-size: 14px;
    margin-bottom: 8px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.config-total-price-value {
    font-size: 42px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.config-total-price-currency {
    font-size: 28px;
}

/* Адаптивность - 2 колонки на десктопе, 1 на мобильных */

/* Десктоп и большие планшеты - 2 колонки */
@media (min-width: 993px) {
    .config-two-column-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Планшеты - переход к 1 колонке */
@media (max-width: 992px) {
    .config-two-column-grid {
        grid-template-columns: 1fr !important;
    }
    
    .config-column {
        border-left: 2px solid #e0e0e0 !important;
        border-right: 2px solid #e0e0e0 !important;
    }
    
    .config-column:not(:last-child) {
        border-bottom: 1px solid #e0e0e0;
    }
}

/* Мобильные устройства - компактный вид */
@media (max-width: 768px) {
    .config-two-column-grid {
        grid-template-columns: 1fr !important;
    }
    
    .config-section-title {
        font-size: 15px;
        padding: 12px 15px;
    }
    
    .config-section-reset {
        font-size: 11px;
        padding: 3px 10px;
    }
    
    .config-option-button {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .config-option-name {
        font-size: 14px;
    }
    
    .option-price {
        font-size: 12px;
    }
    
    .config-total-price {
        padding: 20px 15px;
    }
    
    .config-total-price-value {
        font-size: 28px;
    }
    
    .config-total-price-currency {
        font-size: 20px;
    }
    
    .config-global-reset {
        font-size: 14px;
        padding: 12px 15px;
    }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
    .config-section-title {
        font-size: 14px;
        padding: 10px 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .config-option-button {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .config-total-price-value {
        font-size: 24px;
    }
}

/* Плавное появление опций */
.config-option-button {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Разделитель между группами опций */
.config-subsection {
    border-top: 2px solid #f0f0f0;
    padding-top: 0;
}

.config-subsection-title {
    padding: 12px 20px;
    background: #f8f8f8;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e0e0e0;
}

