/* ==================================================
   ИСПРАВЛЕННЫЕ СТИЛИ ДЛЯ МОДУЛЯ TECDOC (v2)
   Стили изолированы и не конфликтуют с темой OpenCart
===================================================== */

#information-tecdoc .tecdoc-body-container {
    display: flex; 
    gap: 30px; 
    align-items: flex-start;
    margin-top: 30px;
}

#information-tecdoc h1, 
#information-tecdoc h2, 
#information-tecdoc h3 { 
    color: #111; 
    border-bottom: 2px solid #eee; 
    padding-bottom: 10px; 
    margin-top: 0; 
    margin-bottom: 20px;
}

#information-tecdoc h4 { 
    font-size: 1.1em; 
    border-bottom-style: dashed; 
    margin-top: 25px; 
}

/* ====================
   ШАПКА (ВЕРХНИЙ СЕЛЕКТОР)
==================== */
#information-tecdoc .vehicle-selector-wrapper { 
    background: white; 
    padding: 20px 30px; 
    border-radius: 8px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.08); 
    margin-bottom: 30px; 
}

#information-tecdoc .vehicle-selector-wrapper h1 { 
    border-bottom: none; 
    padding-bottom: 0; 
    margin-bottom: 20px; 
}

#information-tecdoc .vehicle-selector-wrapper form { 
    display: flex; 
    align-items: flex-end; 
    gap: 25px; 
    flex-wrap: wrap; 
}

#information-tecdoc .vehicle-selector-wrapper .form-group { 
    flex: 1; 
    min-width: 250px; 
}

#information-tecdoc .vehicle-selector-wrapper label { 
    display: block; 
    margin-top: 0; 
    margin-bottom: 5px; 
    font-weight: 600; 
}

.select2-container { width: 100% !important; }
.select2-container .select2-selection--single { height: 45px !important; }
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 43px !important; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 43px !important; }

/* ====================
   СЕТКИ ВЫБОРА (с исправленными размерами)
==================== */
#information-tecdoc .brand-grid, 
#information-tecdoc .model-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); 
    gap: 15px; 
    margin-top: 20px; 
}

#information-tecdoc .brand-tile { 
    display: flex; 
    flex-direction: column;
    align-items: center; 
    justify-content: center;
    padding: 15px 10px;
    border: 1px solid #e0e0e0; 
    border-radius: 8px; 
    text-decoration: none; 
    color: #333; 
    transition: box-shadow 0.3s, transform 0.3s; 
    background-color: #fff; 
    text-align: center;
}

#information-tecdoc .brand-tile img { 
    height: 40px;
    width: auto;
    max-width: 100%;
    object-fit: contain; 
}

#information-tecdoc .brand-tile span {
    margin-top: 15px;
    font-weight: 600; 
    font-size: 1em;
    line-height: 1.3;
}

#information-tecdoc .model-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px;
    min-height: 240px;
    border: 1px solid #e0e0e0; 
    border-radius: 8px; 
    text-decoration: none; 
    color: #333; 
    transition: box-shadow 0.3s, transform 0.3s; 
    background-color: #fff;
    overflow: hidden;
}

#information-tecdoc .brand-tile:hover, 
#information-tecdoc .model-tile:hover { 
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); 
    transform: translateY(-3px); 
    border-color: #007bff; 
}

#information-tecdoc .model-tile img {
    max-width: 100%;
    height: 120px;
    object-fit: contain;
    margin-bottom: 15px;
}

#information-tecdoc .model-tile .model-info {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#information-tecdoc .model-tile .model-name { 
    font-weight: 600; 
    font-size: 1em;
    line-height: 1.3;
}

#information-tecdoc .model-tile .model-years {
    font-size: 0.85em;
    color: #666;
    margin-top: 4px;
}

#information-tecdoc .generation-list { display: flex; flex-direction: column; gap: 10px; }
#information-tecdoc .generation-tile { display: block; padding: 15px 20px; border: 1px solid #e0e0e0; border-radius: 8px; text-decoration: none; color: #333; transition: box-shadow 0.3s, border-color 0.3s; background-color: #fff; font-size: 1.05em; font-weight: 500; }
#information-tecdoc .generation-tile:hover { border-color: #007bff; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }

/* ====================
   СТИЛИ ДЛЯ СКРЫТИЯ/ПОКАЗА МОДЕЛЕЙ
==================== */
#information-tecdoc .hidden-model {
    display: none;
}

#information-tecdoc .show-all-models-btn {
    grid-column: 1 / -1;
    justify-self: center;
    margin-top: 25px;
    padding: 12px 30px;
    font-size: 1em;
    font-weight: bold;
    color: #fff;
    background-color: #337ab7;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: none; 
}

#information-tecdoc .show-all-models-btn:hover {
    background-color: #286090;
}

/* ====================
   САЙДБАР И КОНТЕНТ
==================== */
#information-tecdoc .sidebar { flex: 0 0 300px; align-self: flex-start; position: sticky; top: 20px; }
#information-tecdoc .content { flex: 1; }
#information-tecdoc .content.full-width {
    width: 100%;
    max-width: 100%;
}

#information-tecdoc .category-tree { 
    background: white; 
    padding: 20px; 
    border-radius: 8px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.08); 
}
#information-tecdoc .category-tree ul { list-style-type: none; padding-left: 25px; margin: 0;}
#information-tecdoc .category-tree li { padding: 5px 0; display: flex; align-items: center; }
#information-tecdoc .category-tree a { text-decoration: none; color: #333; transition: color 0.2s; }
#information-tecdoc .category-tree a:hover { color: #007bff; }
#information-tecdoc .category-tree a.active { font-weight: bold; color: #007bff; }


/* ===== НОВЫЕ СТИЛИ ДЛЯ ИКОНКИ ПЛЮС/МИНУС ===== */
#information-tecdoc .category-tree .toggle-icon {
    display: inline-block;
    position: relative;
    cursor: pointer;
    width: 16px;
    height: 16px;
    border: 2px solid #007bff;
    border-radius: 50%;
    margin-right: 8px;
    flex-shrink: 0; /* Предотвращает сжатие иконки */
    transition: transform 0.3s ease, background-color 0.3s ease;
}

/* Рисуем сам "плюс" с помощью псевдо-элементов */
#information-tecdoc .category-tree .toggle-icon::before,
#information-tecdoc .category-tree .toggle-icon::after {
    content: '';
    position: absolute;
    background-color: #007bff;
    transition: all 0.3s ease;
}

/* Горизонтальная линия */
#information-tecdoc .category-tree .toggle-icon::before {
    top: 50%;
    left: 3px;
    right: 3px;
    height: 2px;
    margin-top: -1px;
}

/* Вертикальная линия */
#information-tecdoc .category-tree .toggle-icon::after {
    top: 3px;
    bottom: 3px;
    left: 50%;
    width: 2px;
    margin-left: -1px;
}

/* Состояние "раскрыто" (превращаем в минус) */
#information-tecdoc .category-tree .toggle-icon.expanded {
    transform: rotate(45deg); /* Поворачиваем всю иконку для красивого эффекта */
}
#information-tecdoc .category-tree .toggle-icon.expanded::after {
    transform: rotate(90deg); /* Поворачиваем вертикальную линию, чтобы она "слилась" с горизонтальной */
}

/* Пустышка для выравнивания категорий без дочерних элементов */
#information-tecdoc .category-tree .no-toggle {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    flex-shrink: 0;
}
/* ===== КОНЕЦ НОВЫХ СТИЛЕЙ ===== */


/* Таблица с запчастями */
#information-tecdoc table { width: 100%; border-collapse: collapse; margin-top: 15px; font-size: 14px; background: white; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.08); overflow: hidden; }
#information-tecdoc th, 
#information-tecdoc td { padding: 12px 15px; border-bottom: 1px solid #ddd; text-align: left; vertical-align: middle; }
#information-tecdoc th { background-color: #f2f2f2; font-weight: 600; }
#information-tecdoc tr:last-child td { border-bottom: none; }
#information-tecdoc .part-link { color: #007bff; text-decoration: none; font-weight: bold; }
#information-tecdoc .part-link:hover { text-decoration: underline; }

#information-tecdoc tfoot td {
    text-align: center;
    border-bottom: none;
    padding: 20px 0;
}
#information-tecdoc .show-unpriced-btn {
    padding: 10px 25px;
    font-size: 1em;
    font-weight: 600;
    color: #337ab7;
    background-color: #fff;
    border: 2px solid #337ab7;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}
#information-tecdoc .show-unpriced-btn:hover {
    background-color: #337ab7;
    color: #fff;
}

/* ====================
   МОДАЛЬНОЕ ОКНО
==================== */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 1000; display: none; justify-content: center; align-items: center; padding: 40px; box-sizing: border-box; }
.modal-window { background: white; padding: 30px; border-radius: 8px; max-width: 900px; max-height: 90vh; overflow-y: auto; position: relative; }
.modal-close { position: absolute; top: 10px; right: 15px; font-size: 24px; font-weight: bold; cursor: pointer; color: #888; }
.part-details-modal .part-main-info { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.part-details-modal .part-images { flex: 1 1 200px; text-align: center; }
.part-details-modal .part-images img { max-width: 100%; height: auto; border: 1px solid #ddd; border-radius: 4px; }
.part-details-modal .part-summary { flex: 2 1 300px; }
.part-details-modal .part-summary p { margin: 5px 0; font-size: 16px; }

.expandable-list { list-style-type: none; padding-left: 0; }
.expandable-list .hidden-items { display: none; }
.expandable-list .show-all-btn { background: none; border: 1px solid #007bff; color: #007bff; padding: 5px 10px; margin-top: 10px; cursor: pointer; border-radius: 4px; font-weight: bold; }
.expandable-list .show-all-btn:hover { background: #e9f5ff; }