/* ==========================================================================
   ФУНДАМЕНТАЛЬНЫЕ СТИЛИ И СКЕЛЕТ САЙТА (thermohome.net)
   ========================================================================== */

/* Базовый сброс и макет */
body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
}

.container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 15px;
    box-sizing: border-box;
}

.content {
    flex-grow: 1;
    padding-left: 20px;
}

/* --- Стили Верхней Навигации (Header) --- */
.main-header {
    background: #000;
    color: #fff;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.top-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

.top-nav ul li a {
    color: #fff;
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    transition: background-color 0.3s;
}

/* Стили для логотипа в навигации */
.nav-logo a {
    padding: 0 15px 0 0 !important;
    display: flex !important;
    align-items: center !important;
    height: 40px;
}

.nav-logo img {
    height: 40px;
    width: auto;
}

.top-nav ul li a:hover,
.top-nav ul li a.active {
    background-color: #ff6600;
    font-weight: bold;
}

.search-bar input {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    outline: none;
}

/* --- Стили Выпадающего меню --- */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 10;
    min-width: 200px;
}

.dropdown-content a {
    color: #333 !important;
    padding: 12px 16px;
    text-align: left;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* --- Стили Боковой Навигации (Sidebar) --- */
.sidebar-nav {
    flex-basis: 250px;
    background: #fff;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    height: fit-content;
    box-sizing: border-box;
}

.sidebar-nav h2 {
    color: #333;
    font-size: 1.2em;
    margin-bottom: 10px;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
}

.sidebar-nav li a {
    text-decoration: none;
    color: #333;
    padding: 10px 0;
    display: block;
    border-bottom: 1px solid #eee;
}

.sidebar-nav ul li a.active,
.active-category a {
    font-weight: bold;
    color: #ff6600 !important;
}

/* --- Стили Хлебных Крошек (Breadcrumbs) --- */
.breadcrumbs ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
}

.breadcrumbs li {
    display: inline;
    font-size: 0.9em;
    color: #555;
}

.breadcrumbs li + li:before {
    content: "/\00a0";
    padding: 0 5px;
    color: #ccc;
}

.breadcrumbs li:last-child a {
    color: #333;
    cursor: default;
    text-decoration: none;
}

.breadcrumbs a {
    text-decoration: none;
    color: #007bff;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   СТИЛИ КОНТЕНТНЫХ БЛОКОВ И КАТАЛОГА ТОВАРОВ
   ========================================================================== */

/* Стили для Каталога товаров (Index/Category page) */
.product-grid {
    display: grid;
    /* Адаптивная сетка: 4 колонки на больших экранах, меньше на маленьких */
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0; /* Отступы сверху и снизу */
}

.product-item {
    border: 1px solid #ddd;
    padding: 15px; /* Увеличил паддинг */
    text-align: center;
    background: #fff;
    border-radius: 4px;
}

.product-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.product-item img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
    transition: transform 0.2s ease-in-out;
}

.product-item img:hover {
    transform: scale(1.05);
}

.product-item .certified {
    font-size: 0.8em;
    color: #007bff;
    margin-bottom: 5px;
}

.product-item .title {
    font-weight: bold;
    margin-bottom: 5px;
}

.product-item .price {
    font-size: 1.2em;
    color: #28a745;
    margin-bottom: 5px;
}

.product-item .min-order {
    font-size: 0.9em;
    color: #6c757d;
}


/* Стили для конкретной страницы продукта/статьи (.pvsk-article) */
.pvsk-article {
    padding: 20px;
}

.pvsk-article h1 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #333;
}

.pvsk-article h2 {
    font-size: 1.5em;
    margin-top: 30px;
    margin-bottom: 10px;
    color: #333;
}

.pvsk-article p {
    margin-bottom: 15px;
}

.table-wrapper {
    overflow-x: auto;
}

/* --- Стили Таблиц (Общие и .pvsk-table) --- */
table {
    width: 100%; /* Лучше 100% для адаптивности */
    max-width: 900px; /* Ограничиваем максимальную ширину */
    border-collapse: collapse;
    margin-bottom: 20px;
    font-family: sans-serif;
}

.pvsk-table {
    width: 100%; /* Используем 100% ширины контейнера */
    font-size: 1em; /* Увеличил базовый шрифт для читаемости */
}

th, td, .pvsk-table th, .pvsk-table td {
    border: 1px solid #ddd;
    padding: 10px; /* Увеличил отступы */
    text-align: left;
    vertical-align: top;
}

th, .pvsk-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Стили для выделения групп параметров */
tbody tr:first-child td,
.pvsk-table tr.table-group td {
    font-weight: bold;
    background-color: #e9e9e9 !important;
    text-align: center;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 1px;
}

/* --- Стили Модального Окна (Галереи) --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 900px;
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {transform: scale(0.1)}
    to {transform: scale(1)}
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: red;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close:hover, .close:focus {
    color: #bbb;
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
}

/* --- Различные Сетки (Фото, Компоненты) --- */
.photo-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}

.component-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.product-card, .component-card {
    border: 1px solid #ddd;
    padding: 15px;
    text-align: center;
    background: #fff;
    border-radius: 4px;
}

.product-card img, .product-card video, .component-card img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    display: block;
    object-fit: cover;
}


/* --- Утилиты и Кнопки --- */
.btn {
    display: inline-block;
    background: #ff6600;
    color: #fff;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 4px;
}

/* ==========================================================================
   АДАПТИВНОСТЬ (MEDIA QUERIES)
   ========================================================================== */

@media (max-width: 900px) {
    .main-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .top-nav ul {
        margin-top: 10px;
        flex-wrap: wrap;
    }
    .container {
        flex-direction: column;
    }
    .content {
        padding-left: 0;
    }
}

@media (max-width: 768px) {
    table, .pvsk-table {
        display: block;
        overflow-x: auto;
        width: 100% !important;
    }

    .pvsk-article {
        padding: 15px;
    }

    .pvsk-article h1 {
        font-size: 1.75em;
    }

    .pvsk-article h2 {
        font-size: 1.25em;
    }

    .pvsk-table {
        font-size: 0.8em; /* Еще больше уменьшаем шрифт на маленьком экране */
    }
}

/* стили для видео */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* Авто-сетка */
    gap: 20px; /* Отступы между карточками */
    padding: 20px;
}

.video-card {
    background: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.video-card:hover {
    transform: translateY(-5px); /* Эффект при наведении */
}

.video-thumbnail {
    position: relative;
    padding-bottom: 56.25%; /* Пропорции 16:9 */
    height: 0;
}

.video-thumbnail iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-info {
    padding: 15px;
}

.video-info h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
}

.video-info p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}
/* конец стили для видео */
iframe {
    border: none; /* Это полная замена frameborder="0" */
}
/* стили для блога */
.blog-container {
    display: flex;
    max-width: 1100px;
    margin: 40px auto;
    gap: 40px; /* Расстояние между лентой и сайдбаром */
    padding: 0 20px;
}

.blog-main {
    flex: 3; /* Основная часть занимает 75% ширины */
}

.blog-sidebar {
    flex: 1; /* Сайдбар занимает 25% */
    min-width: 250px;
}

/* Стили карточки статьи */
.post-card {
    margin-bottom: 50px;
    border-bottom: 1px solid #eee;
    padding-bottom: 30px;
}

.post-image {
    width: 100%;
    height: 350px;
    object-fit: cover; /* Картинка не растягивается, а обрезается под размер */
    border-radius: 10px;
    margin-bottom: 20px;
}

.read-btn {
    display: inline-block;
    margin-top: 15px;
    color: #007bff;
    font-weight: bold;
    text-decoration: none;
}

/* Стили сайдбара */
.sidebar-widget {
    background: #fdfdfd;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 30px;
}

.categories {
    list-style: none;
    padding: 0;
}

.categories li {
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px dashed #ccc;
}

.categories a {
    text-decoration: none;
    color: #333;
}

.categories a:hover {
    color: red; /* Фирменный акцент */
}

/* Форма подписки */
input[type="email"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    box-sizing: border-box;
}

button {
    width: 100%;
    background: #333;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
}

/* Адаптивность для мобильных */
@media (max-width: 800px) {
    .blog-container {
        flex-direction: column; /* Сайдбар уходит под статьи */
    }
}
/* финиш стили для блога */

/* Стили для фото в блоге */
/* Сетка для трёх фото в ряд */
.blog-photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.blog-photo-grid img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    border-radius: 8px;
    background-color: #f5f5f5;
}

/* Основные фото статей */
.blog-post-image {
    object-fit: contain;
    max-width: 100%;
    max-height: 300px;
    width: auto;
    height: auto;
    margin: 0 auto;
    display: block;
    background-color: #f5f5f5;
}

/* Адаптивность для мобильных */
@media (max-width: 600px) {
    .blog-photo-grid {
        grid-template-columns: 1fr;
    }

    .blog-photo-grid img {
        height: auto;
        max-height: 200px;
    }
}
/* финиш Стили для фото в блоге */