/* Стили для каталога */

/* Обтекание картинки в описании */
.catalog-image-float {
    float: right;
    object-fit: contain;
    margin: 0 0 20px 30px;
    border: 1px solid #4f73a6;
}

.steper__specs {
    margin-top: 20px;
    clear: both;
}

.steper__label {
    color: #2e5893;
    font-weight: 600;
    line-height: 100%;
    padding-bottom: 10px;
}

.steper__specs-list {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
}

.steper__specs-list li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Фильтры - стили из old_docs */
.chars__controls {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding-top: 4px;
}

.chars__label {
    align-items: center;
    background: #f8f8f8;
    color: #4f73a6;
    display: flex;
    font-weight: 600;
    gap: 8px;
    padding: 5px 11px;
}

.chars__label-icon {
    height: 10px;
    width: 10px;
}

.chars__label-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.chars__select {
    position: relative;
}

.fl-select {
    color: #4f73a6;
    display: flex;
    position: relative;
}

.fl-select.active .fl-select__arrow {
    transform: rotate(180deg);
}

.fl-select__inner {
    background: #fef1af;
    cursor: pointer;
    display: flex;
}

.fl-select__title {
    font-weight: 600;
    padding: 5px 14px;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

.fl-select__aside {
    background-color: #ffdb5c;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    justify-content: center;
    padding: 5px;
    width: 22px;
}

.fl-select__dropdown {
    background-color: #eee;
    bottom: 0;
    left: 0;
    opacity: 0;
    padding: 4px;
    position: absolute;
    right: 0;
    transform: translateY(100%);
    transition: opacity 0.15s ease, visibility 0s linear 0.15s;
    visibility: hidden;
    z-index: 9999;
    max-height: 400px;
    overflow-y: auto;
}

.fl-select__dropdown.active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.15s ease, visibility 0s linear 0s;
}

.fl-select__grid {
    display: grid;
    grid-gap: 2px;
    gap: 2px;
}

.fl-select__grid_3cols {
    grid-template-columns: repeat(3, 1fr);
}

.fl-select__grid_5cols {
    grid-template-columns: repeat(5, 1fr);
}

.fl-select__point {
    background: #fff;
    border: 1px solid #4f73a6;
    cursor: pointer;
    font-weight: 600;
    line-height: 120%;
    padding: 4px;
    text-align: center;
    transition: .4s ease;
}

.fl-select__point.active {
    background-color: #4f73a6;
    color: #fff;
}

.fl-select__point:hover {
    border-color: #ffdb5c;
}

.fl-select__arrow {
    transition: transform 0.2s ease;
}

.steper__content .siwt__picture img {
    display: block;
    margin: 0 auto;
}

.steper__content img {
    border: 1px solid #4f73a6;
    /* float: right;
    height: auto; 
    margin-bottom: 10px; 
    margin-left: 10px; */
    width: auto;
}

/* Таблица каталога */
.chars__head {
    background: #f1f8ff;
    padding: 9px 34px;
}

.chars__txt {
    padding-top: 4px;
}

.chars__table {
    padding-top: 5px;
    overflow-x: auto;
}

.chars__table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    /* table-layout: fixed; */
}

/* Заголовки таблицы */
.chars__table thead td {
    background: #4a90e2;
    color: white;
    font-weight: 600;
    padding: 12px 8px;
    border: 1px solid #3a7bc8;
    text-align: center;
    font-size: 13px;
    white-space: normal;
    line-height: 1.2;
    vertical-align: middle;
}

/* Ячейки данных */
.chars__table tbody td {
    padding: 10px 8px;
    border: 1px solid #dee2e6;
    text-align: center;
    font-size: 13px;
    vertical-align: middle;
}

/* Чередующиеся строки */
.chars__table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.chars__table tbody tr:nth-child(odd) {
    background: white;
}

.chars__table tbody tr:hover {
    background: #e3f2fd;
}

/* Ссылки в таблице */
.chars__table tbody td a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.chars__table tbody td a:hover {
    text-decoration: underline;
    color: #0056b3;
}

/* .chars__table table td:nth-child(1) {
    width: 18%; 
}

.chars__table table td:nth-child(6) {
    width: 11%;
}

.chars__table table td:nth-child(2),
.chars__table table td:nth-child(3),
.chars__table table td:nth-child(4),
.chars__table table td:nth-child(5),

.chars__table table td:nth-child(7) {
    width: 9%;
}

.chars__table table td:nth-child(8),
.chars__table table td:nth-child(9) {
    width: 12%; 
}

.chars__table table td:last-child {
    min-width: 80px;

    
} */
.fl-table td:first-child, .fl-table th:first-child {
        min-width: 120px !important;
        max-width: 250px !important;
}
@media (max-width: 768px) {
    .fl-table td:first-child:not([colspan]),
    .fl-table th:first-child:not([colspan]) {
        position: sticky !important;
        left: 0 !important;
        z-index: 10 !important;
    }
    
    /* Убираем sticky для ячеек с colspan */
    .fl-table td[colspan],
    .fl-table th[colspan] {
        position: static !important;
        left: auto !important;
        z-index: auto !important;
    }
}


.chars__table table td {
    width: auto;
}

/* Скрытые строки при фильтрации */
.chars__table tbody tr.filtered-hidden {
    display: none;
}

/* Блоки контента */
.content-block {
    margin-bottom: 30px;
}

.content-block--text .steper__txt {
    line-height: 1.6;
}

.content-block--specs_list ul {
    list-style: disc;
    padding-left: 20px;
}

.content-block--specs_list li {
    margin-bottom: 8px;
}

.content-block--image .steper__picture {
    max-width: 500px;
    margin: 0 auto;
}

.content-block--table .fl-table {
    margin-top: 15px;
}

.content-block--gallery .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.gallery__item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.gallery__img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* Дополнительные блоки */
.tabs__controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tb-controls__btn {
    border: 1px solid #4f73a6;
    color: #4f73a6;
    display: block;
    font-weight: 700;
    padding: 5px 16px;
    transition: border-color .4s ease;
    background: none;
    cursor: pointer;
}

.tb-controls__btn.active {
    background-color: #4f73a6;
    color: #fff;
}

.tb-controls__btn:hover {
    border-color: #ffdb5c;
}

.tabs__view {
    display: none;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 350ms ease, transform 350ms ease;
}

.tabs__view.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 350ms ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tabs__img {
    max-width: 100%;
    margin: 20px 0;
}

.tabs__footer {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
}

/* Адаптивность */
@media (max-width: 768px) {
    /* Адаптивная картинка - сохраняем обтекание справа */
    .catalog-image-float {
        float: right;
        margin: 0 0 15px 15px;
        max-width: 150px;
    }
    
    .chars__head {
        padding: 9px 10px;
    }
    
    .chars__controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .chars__select {
        min-width: auto;
        width: 100%;
    }
    
    /* На планшетах оставляем 2 колонки */
    .fl-select__grid_3cols,
    .fl-select__grid_5cols {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .chars__table {
        font-size: 12px;
    }
    
    .chars__table thead td,
    .chars__table tbody td {
        padding: 8px 4px;
    }
    
    .tabs__controls {
        flex-wrap: wrap;
    }
    
    .tb-controls__btn {
        padding: 8px 15px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    /* На телефонах тоже оставляем 2 колонки для фильтров */
    .fl-select__grid_3cols {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Для фильтра с большим количеством значений - 3 колонки */
    .fl-select__grid_5cols {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .content-block--gallery .gallery {
        grid-template-columns: 1fr;
    }
}

/* Дополнительные стили для табов из старой документации */
.tb-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Убираем конфликтующие стили - используем только стили выше */

@media (max-width: 575px) {
    .tb-controls__btn {
        width: 100%;
    }
}

.tb-view {
    display: none;
    opacity: 0;
    transition: opacity 350ms ease, transform 350ms ease;
    transform: translateY(15px);
}

.tb-view.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Стили для таблиц в табах */
.fl-table__title {
    padding-bottom: 10px;
}

.fl-table__action {
    display: flex;
    justify-content: center;
    padding: 6px 0;
}

.fl-table tr.hide {
    display: none;
}

.fl-table table {
    width: 100%;
}

.fl-table table td {
    border: 1px solid #4f73a6;
    padding: 5px;
    text-align: center;
}

.fl-table table thead td {
    background: #f1f8ff;
    color: #4f73a6;
    font-weight: 700;
}

.fl-table table tbody td {
    padding: 0 5px;
}

.fl-table table tbody td a {
    color: #4f73a6;
    font-weight: 700;
    text-align: left;
}

@media (max-width: 720px) {
    .fl-table {
        overflow: auto;
        position: relative;
    }
    
    .fl-table_sticky_cols td:first-child {
        background-color: #fff;
        left: 0;
        position: sticky;
    }
    
    .fl-table table {
        display: inline-block;
        max-width: 100%;
        white-space: nowrap;
        width: auto;
    }
}

/* Дополнительные стили для табов */
.tabs__title {
    padding-bottom: 16px;
}

.tabs__controls {
    margin-bottom: 12px;
}

.tabs__body {
    overflow: hidden;
    position: relative;
    max-width: 100%;
    width: 100%;
}




/* Дополнительные стили для мобильных устройств */
@media (max-width: 768px) {
    .tabs__view .fl-table td {
        min-width: 60px;
        font-size: 12px;
        padding: 4px 2px;
    }
    
    .tabs__view .fl-table td:first-child {
        min-width: 100px !important;
    }
}

/* КРИТИЧЕСКИ ВАЖНЫЕ стили для контейнера табов */
.tabs {
    max-width: 100% !important;
    width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.tabs__body {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* УНИВЕРСАЛЬНЫЕ стили для всех таблиц в табах */
.fl-table {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    /* margin: 20px 0; */
    overflow-x: visible !important;
}

.fl-table table {
    width: 100% !important;
    max-width: 100% !important;
    /* table-layout: fixed !important; */
    border-collapse: collapse;
}

.fl-table td {
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 4px !important;
    border: 1px solid #4f73a6 !important;
    word-wrap: break-word !important;
}
.tabs__body .fl-table td:first-child {
    width: 12% !important;
}
.wide-table-td td:first-child {
    width: 12% !important;
}
.fl-table td:first-child {
    /* width: auto !important; */
    white-space: normal !important;
    word-wrap: break-word !important;
}

.fl-table thead td {
    background: #f1f8ff !important;
    color: #4f73a6 !important;
    font-weight: 700 !important;
}

/* Мобильные устройства - включаем прокрутку с улучшенным sticky */
@media (max-width: 768px) {
    .fl-table {
        overflow-x: auto !important;
        position: relative !important;
        isolation: isolate !important;
    }
    
    .fl-table table {
        width: auto !important;
        min-width: 600px !important;
        table-layout: auto !important;
        position: relative !important;
        border-collapse: separate !important;
        border-spacing: 0 !important;
    }
    
    .fl-table td {
        white-space: nowrap !important;
        min-width: 60px;
        max-width: 200px;
        position: relative !important;
        border-right: 1px solid #4f73a6 !important;
        border-bottom: 1px solid #4f73a6 !important;
    }
    
    .fl-table td:first-child,
    .fl-table th:first-child {
        min-width: 100px !important;

        max-width: 250px !important;
        position: sticky !important;
        left: 0 !important;
        z-index: 10 !important;
        border-left: 1px solid #4f73a6 !important;
        /* border-right: 2px solid #4f73a6 !important; */
    }
    
    .fl-table tbody td:first-child {
        background-color: #fff !important;
        /* box-shadow: 1px 0 3px rgba(0,0,0,0.1) !important; */
    }
    
    .fl-table thead td:first-child {
        background-color: #f1f8ff !important;
        z-index: 11 !important;
        /* box-shadow: 1px 0 3px rgba(0,0,0,0.1) !important; */
    }
    
    .fl-table td[rowspan]:first-child {
        background-color: #f1f8ff !important;
        z-index: 11 !important;
        /* box-shadow: 1px 0 3px rgba(0,0,0,0.1) !important; */
    }
}

/* Дополнительная защита от переполнения */
.steper__box,
.steper__content,
.layout__box_type_content {
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

/* ИСПРАВЛЕНИЕ: Разрешаем dropdown фильтров выходить за пределы блока */
/* Эти правила должны идти ПОСЛЕ всех других overflow правил для приоритета */
.chars {
    overflow: visible !important;
}

.chars__head {
    overflow: visible !important;
    position: relative;
    z-index: 100;
}

.chars__controls {
    overflow: visible !important;
}

/* Переопределяем overflow для контейнеров, содержащих фильтры */
.steper__box:has(.chars),
.steper__content:has(.chars),
.layout__box_type_content:has(.chars) {
    overflow: visible !important;
}

/* Если :has() не поддерживается, используем прямое переопределение */
.steper__box,
.steper__content,
.layout__box_type_content {
    overflow-y: visible !important;
}

.tabs__img {
    transition: .4s ease;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.tabs__img_type_1 {
    padding-top: 50%;
    /* min-height: 300px; */
}

.tabs__img_type_2 {
    padding-top: 60%;
    /* min-height: 400px; */
}

.tabs__footer {
    background: #fbfbfb;
    padding: 22px 34px;
}

.tabs__wrap {
    display: block;
    overflow: hidden;
}

.tabs__wrap:hover .tabs__img {
    transform: scale(1.1);
}

.tabs__bottom {
    margin-top: 10px;
}

.tabs__info {
    padding: 25px 15px 30px;
    text-align: center;
}

.tabs__graph {
    margin: 0 auto;
    max-width: 600px;
}

.tabs__txt {
    padding: 16px 34px;
}

@media (max-width: 992px) {
    .tabs__footer {
        padding: 12px;
    }
}

@media (max-width: 575px) {
    .tabs__info {
        padding: 15px;
    }
    
    .tabs__txt {
        padding: 16px;
    }
}



/* КРИТИЧЕСКИ ВАЖНЫЕ исправления для таблиц в табах */
.tabs {
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.tabs__body {
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.tabs__view {
    max-width: 100% !important;
    overflow-x: visible !important;
    box-sizing: border-box !important;
}

.steper__content {
    padding: 14px 20px 14px 20px !important;
}
