/* ─────────────────────────────────────────────────────────────────────
   ТЕМА ПЕРЕКЛЮЧАТЕЛЯ: «Горизонтальные переключатели»
   Подключается ТОЛЬКО когда у привязки в карте ссылок выбрана эта тема
   (актуально для привязок типа «свитчер», когда на одной странице
   несколько шаблонов калькулятора — они переключаются вверху страницы).

   Корневой класс — .product-selector--horizontal на блоке свитчера.
   ───────────────────────────────────────────────────────────────────── */

.product-selector--horizontal {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0 0 24px;
}

.product-selector--horizontal .selector-cards-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0;
    justify-content: flex-start;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 4px;
    overflow: hidden;
}

/* Каждая «карточка» свитчера превращается в кнопку-вкладку */
.product-selector--horizontal .selector-card {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    background: transparent;
    border: none;
    border-radius: 6px;
    box-shadow: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-align: center;
}
.product-selector--horizontal .selector-card:hover {
    background: #f3f4f6;
}
.product-selector--horizontal .selector-card.active {
    background: #2563eb;
    color: #fff;
}
.product-selector--horizontal .selector-card.active .selector-text,
.product-selector--horizontal .selector-card.active .selector-title { color: #fff; }

/* Иконка — уменьшаем, прижимаем к тексту */
.product-selector--horizontal .selector-card .selector-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}
.product-selector--horizontal .selector-card.active .selector-icon {
    /* Если иконка тёмная — затемним до белого через filter (быстрый трюк) */
    filter: brightness(0) invert(1);
}

/* Текст в кнопке — компактный, в одну строку */
.product-selector--horizontal .selector-card .selector-title,
.product-selector--horizontal .selector-card .selector-text {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    margin: 0;
    white-space: nowrap;
    color: #111;
}

/* Mobile: переходим в вертикальный список */
@media (max-width: 768px) {
    .product-selector--horizontal .selector-cards-grid {
        flex-direction: column;
        padding: 6px;
    }
    .product-selector--horizontal .selector-card {
        justify-content: flex-start;
        padding: 12px 16px;
    }
}
