/* ==========================================================================
   1. Базовые настройки (Reset и Переменные)
   ========================================================================== */
:root {
    --primary-color: #2E7D32;       /* Базовый изумрудно-зеленый */
    --primary-hover: #1B5E20;       /* Более темный зеленый для ховеров */
    --bg-main: #FAFAFA;             /* Светлый фон сайта */
    --bg-card: #FFFFFF;             /* Чистый белый для блоков */
    --text-main: #212121;           /* Глубокий графитовый для текста */
    --text-muted: #666666;          /* Серый для второстепенного текста */
    --border-color: #E0E0E0;        /* Легкие границы */
    --error-color: #D32F2F;         /* Красный для ошибок */
    --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-system);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

/* ==========================================================================
   2. Шапка сайта (Header)
   ========================================================================== */
.main-header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-main);
}

.logo span {
    color: var(--primary-color);
}

.header-nav {
    display: flex;
    gap: 24px;
}

.nav-link {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 15px;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}

/* ==========================================================================
   3. Главный контент и Секция Поиска
   ========================================================================== */
.main-content {
    flex: 1;
}

.hero-search-section {
    background-color: var(--bg-card);
    padding: 80px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.hero-container {
    max-width: 720px;
    margin: 0 auto;
}

.hero-search-section h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 40px;
}

.search-form {
    display: flex;
    gap: 12px;
    background: var(--bg-main);
    padding: 8px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.1);
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 12px;
    padding-left: 12px;
}

.search-icon {
    width: 24px;
    height: 24px;
    color: var(--text-muted);
}

.search-form input {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 16px;
    color: var(--text-main);
    outline: none;
}

.search-form input::placeholder {
    color: #9E9E9E;
}

.btn-search {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-search:hover {
    background-color: var(--primary-hover);
}

/* ==========================================================================
   4. Блок контента / Ошибки
   ========================================================================== */
.content-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.error-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 40px;
    border: 1px solid var(--border-color);
}

.error-card h2 {
    font-size: 22px;
    margin-bottom: 16px;
}

.alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-danger {
    background-color: #FFEBEE;
    color: var(--error-color);
    border-left: 4px solid var(--error-color);
}

.error-card p {
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* ==========================================================================
   5. Подвал сайта (Footer)
   ========================================================================== */
.main-footer {
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 40px 0 20px 0;
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Алфавитная навигация */
.alphabet-navigation {
    margin-bottom: 40px;
}

.alphabet-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.alphabet-list {
    display: grid;
    grid-template-columns: repeat(27, minmax(0, 1fr)); 
    gap: 6px;
    list-style: none;
}

.alphabet-list a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    min-width: 0; 
    padding: 0;
}

.alphabet-list a:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #FFF;
}

.footer-counter {
    display: inline-flex;
    align-items: center;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.footer-counter:hover {
    opacity: 1;
}

/* Нижняя панель */
.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* ==========================================================================
   6. Адаптивность (Media Queries)
   ========================================================================== */

@media (max-width: 1024px) {
    .alphabet-list {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .alphabet-list a {
        min-width: 36px;
        height: 36px;
    }
}

@media (max-width: 768px) {
    .hero-search-section {
        padding: 40px 20px;
    }
    
    .hero-search-section h1 {
        font-size: 28px;
    }
    
    .search-form {
        flex-direction: column;
        background: transparent;
        border: none;
        padding: 0;
        gap: 12px;
    }
    
    .search-input-wrapper {
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 12px;
    }
    
    .btn-search {
        width: 100%;
        padding: 14px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ==========================================================================
   12. Сетка главной страницы (Взамен табличной верстки)
   ========================================================================== */

.main-page-grid {
    display: grid;
    grid-template-columns: 1fr 360px; /* Текст шире, сайдбар сжатый */
    gap: 48px;
    align-items: start;
}

/* Оформление текста */
.about-project .GB-h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-main);
    letter-spacing: -0.3px;
}

.about-project p {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 18px;
}

/* Шапка сайдбара категорий */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.sidebar-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
}

.view-all-button {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px dashed var(--primary-color);
    padding-bottom: 2px;
}

.view-all-button:hover {
    color: var(--primary-hover);
    border-bottom-color: var(--primary-hover);
}

/* Сетка иконок категорий */
.GB-mp-page-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: 12px;
    list-style: none;
}

.GB-mp-page-categories li a {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    aspect-ratio: 1 / 1;
    transition: all 0.2s ease;
}

.GB-mp-page-categories li a:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.08);
}

.GB-mp-page-categories img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(30%);
    transition: filter 0.2s ease;
}

.GB-mp-page-categories li a:hover img {
    filter: grayscale(0%);
}

/* Сетка брендов (Производители) */
.GB-manufacturers {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.GB-manufacturers-brands {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
    list-style: none;
    margin-bottom: 40px;
}

.GB-manufacturers-brands li a {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    height: 64px;
    transition: all 0.2s ease;
}

.GB-manufacturers-brands li a:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.GB-manufacturers-brands img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.5;
    transition: all 0.2s ease;
}

.GB-manufacturers-brands li a:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* Стилизация кнопки все бренды */
.dwe-all {
    text-align: center;
}

.download-button {
    display: inline-block;
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.download-button:hover {
    background-color: var(--primary-color);
    color: #ffffff;
}

/* Мобильная адаптивность для двухколоночного грида */
@media (max-width: 992px) {
    .main-page-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* ==========================================================================
   13. Страница бренда (Хлебные крошки и Интро)
   ========================================================================== */
.breadcrumbs-nav {
    margin-bottom: 24px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    font-size: 14px;
    color: var(--text-muted);
}

.breadcrumb li a:hover {
    color: var(--primary-color);
}

.breadcrumb li:not(:last-child)::after {
    content: "/";
    margin-left: 8px;
    color: var(--border-color);
}

.breadcrumb li.active {
    color: var(--text-main);
    font-weight: 500;
}

.brand-intro-block {
    margin-bottom: 40px;
}

.brand-intro-block h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.brand-intro-block p {
    font-size: 15px;
    color: var(--text-muted);
    max-width: 800px;
    line-height: 1.6;
}

/* ==========================================================================
   14. Сетка категорий бренда (Взамен старого неупорядоченного списка)
   ========================================================================== */
.brand-categories-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 40px;
}

.s-h2-hite {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.categories-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.brand-grid-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    list-style: none;
}

.brand-grid-list li a {
    display: block;
    padding: 12px 16px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-grid-list li a:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #FFF;
    transform: translateY(-1px);
}

/* Пагинация */
.pagination-container {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    gap: 6px;
    list-style: none;
}

.pagination li a, .pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}

.pagination li.active a {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination li a:hover:not(.active) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination li.disabled opacity {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ==========================================================================
   15. Современные карточки документов с превью
   ========================================================================== */
.brand-manuals-preview-section {
    margin-bottom: 50px;
}

.modern-manuals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.manual-preview-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.manual-preview-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 6px 16px rgba(0,0,0,0.04);
}

.card-image-thumb {
    background: var(--bg-main);
    border-radius: 8px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    overflow: hidden;
}

.card-image-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.card-info-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    gap: 10px;
}

.card-title-link {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-main);
}

.card-title-link:hover {
    color: var(--primary-color);
}

.card-pages-badge {
    align-self: flex-start;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-main);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

/* ==========================================================================
   16. Минималистичная таблица документов (Most Searched)
   ========================================================================== */
.most-searched-section {
    margin-top: 50px;
}

.most-searched-section .q-h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
}

.table-responsive-wrapper {
    width: 100%;
    overflow-x: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.modern-brand-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
}

.modern-brand-table th {
    background: var(--bg-main);
    padding: 16px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.modern-brand-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

.modern-brand-table tr:last-child td {
    border-bottom: none;
}

.td-number {
    color: var(--text-muted);
    font-weight: 500;
}

.td-model {
    color: var(--text-main);
}

.sub-model {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.table-doc-link {
    font-weight: 600;
    color: var(--primary-color);
}

.table-doc-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.table-doc-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.td-pages {
    font-weight: 500;
    color: var(--text-main);
}

.btn-table-read {
    display: inline-block;
    padding: 6px 14px;
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-table-read:hover {
    background: var(--primary-color);
    color: #FFF;
}

/* Адаптивность для таблицы */
@media (max-width: 768px) {
    .brand-grid-list {
        grid-template-columns: 1fr 1fr;
    }
}

/* ==========================================================================
   17. Страница категории девайсов бренда
   ========================================================================== */

.category-main-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.category-products-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Сетка карточек устройств */
.modern-devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

/* Сама карточка девайса */
.device-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.device-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.05);
}

/* Область изображения девайса */
.device-card-thumb {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-main);
    border-radius: 8px;
    padding: 12px;
    overflow: hidden;
}

.device-card-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply; /* Убирает грязные белые фоны картинок */
    transition: transform 0.2s ease;
}

.device-card:hover .device-card-thumb img {
    transform: scale(1.03);
}

/* Ссылка-название девайса */
.device-card-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 40px; /* Фиксированная высота для выравнивания сетки */
}

.device-card-title:hover {
    color: var(--primary-color);
}

/* Текстовая строка с популярными моделями */
.commonly-used-models-box {
    background: var(--bg-card);
    border-left: 4px solid var(--primary-color);
    border-top: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    border-radius: 0 8px 8px 0;
    padding: 20px;
}

.commonly-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 24px;
    letter-spacing: -0.4px;
}

.commonly-list {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Адаптивные медиа-запросы для сетки девайсов */
@media (max-width: 576px) {
    .modern-devices-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 16px;
    }
    
    .device-card {
        padding: 12px;
    }
    
    .device-card-thumb {
        height: 110px;
    }
    
    .device-card-title {
        font-size: 13px;
        height: 36px;
    }
}

/* ==========================================================================
   18. Страница модели девайса (Карточки инструкций)
   ========================================================================== */

.model-main-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.model-documents-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-bottom: 60px;
}

/* Главный контейнер карточки документа */
.document-holder-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.document-card-title {
    font-size: 20px;
    font-weight: 700;
}

.document-card-title a {
    color: var(--text-main);
}

.document-card-title a:hover {
    color: var(--primary-color);
}

/* Внутренний грид карточки: характеристики слева, контент справа */
.document-card-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 32px;
    align-items: start;
}

/* Список характеристик мануала */
.document-meta-specs {
    list-style: none;
    background: var(--bg-main);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.document-meta-specs strong {
    color: var(--text-muted);
    font-weight: 600;
}

/* Заголовки внутренних блоков контента */
.gu-h {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* Стрип с миниатюрами страниц PDF */
.preview-pages-strips {
    display: flex;
    gap: 16px;
    list-style: none;
    flex-wrap: wrap;
}

.preview-pages-strips img {
    height: 140px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: white;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* Зона текстового оглавления скролла */
.scrollable-text-box {
    max-height: 160px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-main);
    padding: 16px;
}

.document-text-lines {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
}

.document-text-lines li {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: var(--text-main);
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 4px;
}

.page-num-indicator {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
}

/* Блок нижних кнопок управления */
.document-action-buttons {
    display: flex;
    gap: 16px;
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

.btn-action-view, .btn-action-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-action-view {
    background: var(--primary-color);
    color: white;
}

.btn-action-view:hover {
    background: var(--primary-hover);
}

.btn-action-download {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-main);
}

.btn-action-download:hover {
    border-color: var(--text-main);
    background: var(--text-main);
    color: white;
}

/* ==========================================================================
   19. Секция похожих товаров (Related Products)
   ========================================================================== */

.related-products-section {
    border-top: 1px solid var(--border-color);
    padding-top: 40px;
}

.related-section-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.related-product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 16px;
    align-items: center;
}

.related-card-thumb {
    width: 80px;
    height: 80px;
    background: var(--bg-main);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    flex-shrink: 0;
}

.related-card-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.related-card-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.related-card-badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary-color);
    letter-spacing: 0.5px;
}

.related-card-details h3 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.related-card-meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* Адаптивность для карточек документов */
@media (max-width: 768px) {
    .document-card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .document-holder-card {
        padding: 20px;
    }
}

/* ==========================================================================
   20. Конечная страница просмотра мануала (PDF Viewer Page)
   ========================================================================== */

.manual-view-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

/* Сетка верхней панели: Характеристики + Кнопка */
.manual-top-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    margin-bottom: 40px;
    align-items: stretch;
}

.specs-table-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
}

.modern-specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    font-size: 14px;
}

.modern-specs-table td {
    padding: 10px 0;
    border-bottom: 1px solid var(--bg-main);
}

.modern-specs-table tr:last-child td {
    border-bottom: none;
}

.modern-specs-table td:first-child {
    color: var(--text-muted);
    font-weight: 500;
    width: 140px;
}

.modern-specs-table td:last-child {
    color: var(--text-main);
    font-weight: 600;
}

/* Блок действия загрузки */
.download-action-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 20px;
}

.main-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: var(--primary-color);
    color: #FFFFFF;
    width: 100%;
    padding: 16px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.main-download-btn:hover {
    background-color: var(--primary-hover);
}

/* Блок рейтинга */
.rating-badge-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rating-stars {
    color: #FFB300;
    font-size: 20px;
    letter-spacing: 2px;
}

.rating-badge-box p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Секция фрейма PDF */
.pdf-viewer-section {
    margin-bottom: 40px;
}

.viewer-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.frame-browser-holder {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background: #FFF;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

/* Элегантная горизонтальная лента быстрого переключения страниц */
.gallery-navigation-section {
    margin-bottom: 40px;
}

.thumbnail-fast-gallery {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 0 16px 0;
    scroll-behavior: smooth;
}

.thumbnail-fast-gallery img {
    height: 110px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #FFF;
    padding: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.thumbnail-fast-gallery img:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Оглавление контента мануала */
.clean-chapters-list {
    list-style: none;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.clean-chapters-list li {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    font-size: 14px;
    border-bottom: 1px dashed var(--bg-main);
    padding-bottom: 8px;
}

.clean-chapters-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.clean-chapters-list li span:first-child {
    color: var(--text-main);
}

/* Минималистичный раскрывающийся спойлер текста */
.extracted-text-wrapper {
    margin: 40px 0;
}

.modern-details-spoiler {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.modern-details-spoiler summary {
    padding: 16px 24px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-main);
}

.modern-details-spoiler summary::-webkit-details-marker {
    display: none;
}

.spoiler-arrow {
    transition: transform 0.2s ease;
}

.modern-details-spoiler[open] .spoiler-arrow {
    transform: rotate(180deg);
}

.spoiler-inner-content {
    padding: 24px;
    border-top: 1px solid var(--border-color);
    background: #FFF;
}

.spoiler-inner-content pre {
    font-family: monospace;
    font-size: 13px;
    color: var(--text-muted);
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
}

/* Сетка похожих документов внизу */
.related-manuals-footer-block {
    margin-top: 60px;
}

.related-docs-inline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.related-doc-card-thumb {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.doc-img-box {
    background: var(--bg-main);
    height: 140px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.doc-img-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.related-doc-card-thumb a {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-main);
}

.related-doc-card-thumb a:hover {
    color: var(--primary-color);
}

.doc-page-badge {
    align-self: flex-start;
    font-size: 12px;
    background: var(--bg-main);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--text-muted);
}

/* Адаптивность для конечной страницы */
@media (max-width: 992px) {
    .manual-top-grid {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------------------------------------------------------- */

/* ==========================================================================
   Дополнение: Современные карточки последних документов (Recent Documents)
   ========================================================================== */

/* Перевод контейнера на современную сетку вместо старых флоатов/инлайнов */
.screec {
    margin-top: 24px;
    margin-bottom: 48px;
}

.manuals-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

/* Стилизация самой карточки документа */
.manual-block {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    height: 100%; /* Чтобы все карточки в ряду были одной высоты */
}

.manual-block:hover {
    border-color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.06);
    transform: translateY(-2px);
}

/* Контейнер для превью изображения (миниатюры) */
.manual-block img {
    background: var(--bg-main);
    border-radius: 8px;
    height: 180px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    object-fit: contain;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: transform 0.2s ease;
}

.manual-block:hover img {
    transform: scale(1.02);
}

/* Ссылка на документ (Заголовок карточки) */
.manual-block a {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Ограничение в 2 строки для красивого выравнивания */
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 40px; 
    transition: color 0.2s ease;
}

.manual-block a:hover {
    color: var(--primary-color);
}

/* Короткое описание под заголовком */
.manual-block p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Ограничение описания в 3 строки */
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1; /* Выталкивает счетчик страниц строго вниз карточки */
}

/* Элемент с количеством страниц */
.manual-block .page-badge-wrapper {
    margin-top: auto; /* Прижимает к низу карточки */
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.manual-block p[id^="ID-"] {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
    background: var(--bg-main);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    margin: 0;
}

/* Специфический фикс для иконки или текста страниц внутри бейджа */
.manual-block p[id^="ID-"] span[inf-data="pages"]::before {
    content: " pages";
}

/* Адаптивность для мобильных экранов */
@media (max-width: 576px) {
    .manuals-container {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 16px;
    }
    
    .manual-block {
        padding: 12px;
        gap: 10px;
    }
    
    .manual-block img {
        height: 130px;
        padding: 6px;
    }
    
    .manual-block a {
        font-size: 13px;
        height: 36px;
    }
    
    .manual-block p {
        display: none; /* Скрываем громоздкие тексты описания на мобилках для чистоты дизайна */
    }
}

/* ==========================================================================
   Дополнение: Блоки Essential Guide и Часто задаваемые вопросы (FAQ)
   ========================================================================== */

/* Блок Essential Guide */
.essential-guide-block {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color); /* Акцентная линия слева в стиле сайта */
    border-radius: 8px;
    padding: 24px;
    margin: 40px 0;
}

.essential-guide-block h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 16px;
    letter-spacing: -0.3px;
}

.essential-guide-notice {
    font-size: 13px;
    color: var(--text-muted);
    background: var(--bg-main);
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.essential-guide-section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

.essential-guide-block p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

.essential-guide-tips {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.essential-guide-tips li {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    position: relative;
    padding-left: 20px;
}

/* Красивые маркеры для списков вместо стандартных точек */
.essential-guide-tips li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 18px;
    top: -2px;
}

/* Блок FAQ (Часто задаваемые вопросы) */
.faq-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    margin: 40px 0;
}

.faq-section h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 24px;
    letter-spacing: -0.4px;
}

.faq-container {
    display: flex;
    flex-direction: column;
}

.faq-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.faq-item:first-child {
    padding-top: 0;
}

.faq-item:last-child {
    padding-bottom: 0;
    border-bottom: none; /* Убираем нижнюю границу у последнего элемента */
}

.faq-question {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 10px;
    line-height: 1.4;
}

.faq-answer {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Адаптивность для мобильных экранов */
@media (max-width: 768px) {
    .faq-section {
        padding: 20px;
    }
    
    .essential-guide-block {
        padding: 16px;
    }
}