/* Переменные проекта */
:root {
  --primary-color: #00569f;
  --secondary-bg: #212957;
  --text-dark: #333333;
  --gray: #333333;
  --text-muted: #555555;
  --light-gray: #bcbcbc;
  --white: #ffffff;
  --border-radius: 5px;
  --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Общие сбросы и базовые стили */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--white);
  color: var(--text-dark);
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--font-main);
}

/* Стандартные кнопки компании (для будущих блоков) */
.btn-primary {
  background-color: var(--primary-color);
  color: var(--white);
  border-radius: var(--border-radius);
  padding: 10px 20px;
  font-weight: 600;
  transition: opacity 0.3s ease;
}
.btn-primary:hover {
  opacity: 0.9;
}

/* Контейнер из ТЗ */
.container {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 10px;
}

/* Служебные иконки */
.icon-svg {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
}

/* ==========================================================================
   1 ЛИНИЯ ДИЗАЙНА (TOP LINE)
   ========================================================================== */
.top-line {
  border-bottom: 1px solid #f0f0f0; /* Легкая разделяющая полоса */
  padding: 10px 0;
}

.top-line__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Бургер (по умолчанию скрыт на десктопе) */
.burger-btn {
  display: none;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.burger-btn img {
  width: 100%;
  height: auto;
}

/* Геолокация */
.top-location {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-location {
  font-size: 12px;
  color: var(--text-muted);
  background: transparent;
  padding: 2px 5px;
}
.btn-location:hover {
  color: var(--primary-color);
}


/* Мини-меню * /
.top-menu {
  display: flex;
  list-style: none;
  gap: 25px;
}

.top-menu a {
  font-size: 14px;
  color: var(--text-muted);
}

.top-menu a:hover {
  color: var(--primary-color);
}
/**/

/* Главное горизонтальное меню */
.top-menu {
  display: flex;
  list-style: none;
  gap: 25px;
  margin: 0;
  padding: 0;
}

/* Обязательно для контекста позиционирования выпадающего списка */
.top-menu > li {
  position: relative;
  padding-bottom: 10px; /* Чтобы не терялся ховер при переносе курсора на подменю */
}

.top-menu a {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  display: inline-block;
}

.top-menu a:hover {
  color: var(--primary-color);
}

/* Стили для выпадающего подменю (второй уровень) */
.top-menu ul {
  display: none; /* Скрываем по умолчанию */
  position: absolute;
  top: 100%; /* Появляется строго под родительской ссылкой */
  left: 0;
  min-width: 240px; /* Минимальная ширина, чтобы текст не сильно сжимался */
  background-color: #fff; /* Задайте нужный фон */
  list-style: none;
  margin: 0;
  padding: 10px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Легкая тень */
  z-index: 100;
}

/* Стили ссылок внутри подменю */
.top-menu ul li a {
  display: block;
  padding: 8px 20px;
  font-size: 13px; /* Можно сделать чуть меньше главного меню */
  line-height: 1.4;
}

/* Показ подменю при наведении на родительский <li> */
.top-menu li:hover > ul {
  display: block;
}


/* Контейнер ссылки, у которой есть подменю */
.top-menu li:has(ul) > a {
  display: inline-flex;
  align-items: center;
  gap: 8px; /* Отступ между текстом и стрелочкой */
}

/* Создаем стрелочку через псевдоэлемент */
.top-menu li:has(ul) > a::after {
  content: "";
  display: inline-block;
  width: 8px;  /* Ширина стрелочки */
  height: 8px; /* Высота стрелочки */
  
  background-color: currentColor; 
  -webkit-mask-image: url('/img/icons/arrow-down.svg');
  mask-image: url('/img/icons/arrow-down.svg');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  
  transition: transform 0.2s ease; /* Плавный поворот при наведении */
}

/* Опционально: поворачиваем стрелочку вверх при наведении на меню */
.top-menu li:has(ul):hover > a::after {
  transform: rotate(180deg);
}

/* Общий контейнер контактов в 1-й линии */
.top-contacts {
  display: flex;
  align-items: center;
  gap: 30px; /* Расстояние между блоком телефонов и почтой */
}

/* Блок с телефонами */
.top-phones {
  display: flex;
  flex-direction: row; /* Телефоны выстроены в строку на десктопе */
  gap: 20px; /* Расстояние между первым и вторым телефоном, чтобы не слипались */
}

/* Обертка для иконки и телефона */
.phone-item {
  display: flex;
  align-items: center;
  gap: 6px; /* Расстояние между иконкой телефона и самим номером */
}

/* Ссылка на телефон */
.phone-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  white-space: nowrap; /* Запрещаем перенос номера на новую строку внутри плашки */
}

.phone-link:hover {
  color: var(--primary-color);
}

/* Ссылка на email (для симметрии) */
.email-link {
  display: flex;
  align-items: center;
  gap: 8px; /* Расстояние между иконкой оператора и текстом почты */
  font-size: 14px;
  color: var(--text-muted);
}

.email-link:hover {
  color: var(--primary-color);
}

/* Корректировка адаптивности (медиа-запросы) */
@media (max-width: 768px) {
  .top-phones {
    flex-direction: column; /* На планшетах/мобильных телефоны аккуратно встанут друг под друга */
    gap: 8px; /* Небольшой вертикальный отступ */
  }
}

/* ==========================================================================
   МОБИЛЬНОЕ МЕНЮ (САЙДБАР)
   ========================================================================== */
.mobile-sidebar {
  position: fixed;
  top: 0;
  left: -320px; /* Изначально спрятано слева */
  width: 300px;
  height: 100%;
  background-color: var(--secondary-bg);
  z-index: 999;
  transition: left 0.3s ease;
  padding: 60px 25px 30px 25px;
  display: flex;
  flex-direction: column;
  overflow-y: auto; /* Независимый скролл */
}

.mobile-sidebar.active {
  left: 0;
}

/* Крестик закрытия */
.sidebar-close {
  position: absolute;
  top: 15px;
  right: 15px;
  cursor: pointer;
}

/* Ссылки в сайдбаре * /
.sidebar-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
}

.sidebar-nav a {
  color: var(--white);
  font-size: 18px;
  display: block;
}
/**/

/* Основной список сайдбара */
.sidebar-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0;
  padding: 0;
  margin-bottom: 40px;
}

/* Ссылки первого уровня */
.sidebar-nav a {
  color: var(--white);
  font-size: 18px;
  display: block;
  text-decoration: none;
}

/* Стили для вложенного меню (второй уровень) - ВСЕГДА ВИДИМО */
.sidebar-nav ul ul {
  display: flex;       /* Делаем вложенный список тоже флексовым */
  flex-direction: column;
  gap: 12px;           /* Чуть меньший отступ между подпунктами */
  margin-top: 12px;    /* Отступ сверху от родительской ссылки */
  padding-left: 15px;  /* Сдвиг вправо для создания иерархии */
  margin-bottom: 0;    /* Сбрасываем нижний маргин */
}

/* Ссылки второго уровня */
.sidebar-nav ul ul a {
  font-size: 15px;     /* Размер шрифта подпунктов чуть меньше */
  opacity: 0.8;        /* Делаем их слегка приглушенными для баланса */
  transition: opacity 0.2s ease, color 0.2s ease;
}

/* Эффект при наведении на подпункты */
.sidebar-nav ul ul a:hover {
  opacity: 1;
  color: var(--primary-color); /* Или любой другой цвет акцента */
}

/* Стили для блока контактов внизу */
.sidebar-nav .sidebar-contacts {
  display: flex;
  flex-direction: column;
  gap: 12px;
}


.sidebar-contacts {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
}

.sidebar-contacts a {
  color: var(--white);
  font-size: 15px;
  opacity: 0.8;
}

/* Затемнение фона при открытии меню */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  display: none;
}

.sidebar-overlay.active {
  display: block;
}

/* ==========================================================================
   АДАПТИВНОСТЬ (МЕДИА-ЗАПРОСЫ)
   ========================================================================== */
@media (max-width: 992px) {
  .top-nav {
    display: none; /* Скрываем десктопное мини-меню */
  }
}

@media (max-width: 768px) {
  .burger-btn {
    display: flex; /* Показываем бургер всегда на мобильных */
  }
  
  .top-line__container {
    gap: 15px;
    justify-content: flex-start;
  }

  .top-contacts {
    margin-left: auto; /* Прижимает контакты вправо */
    gap: 15px;
  }

  .email-link span {
    display: none; /* На мобильных оставляем только иконку почты для экономии места */
  }
}

@media (max-width: 576px) {
  .top-phones {
    display: none; /* На совсем маленьких экранах прячем телефоны из 1-й линии (они есть в меню) */
  }
}






/* ==========================================================================
   2 ЛИНИЯ ДИЗАЙНА (MAIN LINE)
   ========================================================================== */
.main-line {
  padding: 20px 0;
  border-bottom: 1px solid #f0f0f0;
  position: relative; /* Важно для абсолютного позиционирования мега-меню */
}

.main-line__container {
  display: flex;
  align-items: center;
  gap: 30px;
}

.site-logo {
  flex-shrink: 0;
  display: block;
}

.site-logo img {
  width: 250px;
  height: auto;
  display: block;
}

/* Кнопка "Каталог" */
.catalog-wrapper {
  position: static; /* Мега-меню должно равняться ширине всей линии, а не обертки */
}

.btn-catalog {
  background-color: var(--primary-color);
  color: var(--white);
  border-radius: var(--border-radius);
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background-color 0.2s;
}

.btn-catalog .icon-svg {
  filter: brightness(0) invert(1); /* Делает иконку белой, если оригинальный SVG темный */
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   МЕГА-МЕНЮ ("ПРОСТЫНЯ") С ЖЕСТКИМ ОГРАНИЧЕНИЕМ ВЫСОТЫ И СКРОЛЛОМ
   ========================================================================== */

.mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: var(--white);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  z-index: 950;
  border-top: 1px solid #f0f0f0;
  display: none; /* Управляется через JS */
  padding: 25px 0;
  
  /* ЖЕСТКОЕ ОГРАНИЧЕНИЕ: Задаем фиксированную высоту <простыни> */
  height: 480px; 
  box-sizing: border-box;
}

.mega-menu__container {
  display: flex;
  position: relative;
  /* Контейнер занимает строго внутреннюю высоту меню (за вычетом паддингов) */
  height: calc(100% - 0px); 
  align-items: stretch;
}

/* --- Архитектура 1-го уровня (Левая колонка) --- */
.mega-level-1 {
  list-style: none;
  width: 300px;
  border-right: 1px solid #eef0f2;
  /* Занимает всю высоту контейнера и скроллится, если категорий много */
  height: 100%;
  overflow-y: auto;
  padding-right: 5px;
}

.mega-level-1 > li > a {
  display: block;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  border-radius: var(--border-radius) 0 0 var(--border-radius);
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Эффект наведения и активного состояния на 1 уровне */
.mega-level-1 > li:hover > a,
.mega-level-1 > li.active > a {
  background-color: #f4f7f9;
  color: var(--primary-color);
}

/* --- Архитектура 2-го уровня (Правая сетка подкатегорий) --- */
.mega-level-2 {
  list-style: none;
  position: absolute;
  top: 0;
  left: 320px;
  width: calc(100% - 320px);
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  padding: 12px 20px;
  box-sizing: border-box;
  
  /* РЕШЕНИЕ ПРОБЛЕМЫ: Сетка строго в пределах высоты родителя со скроллом */
  height: 100%; 
  overflow-y: auto; 
  align-content: start; 
}

/* Показываем 2 уровень только у активного/наведенного пункта 1 уровня */
.mega-level-1 > li:hover .mega-level-2,
.mega-level-1 > li.active .mega-level-2 {
  display: grid;
}

.mega-level-2 > li > a {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-dark);
  display: block;
  margin-bottom: 10px;
  transition: color 0.2s ease;
}

.mega-level-2 > li > a:hover {
  color: var(--primary-color);
}

/* --- Архитектура 3-го уровня (Обычный список под вторым) --- */
.mega-level-3 {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mega-level-3 a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.mega-level-3 a:hover {
  color: var(--primary-color);
}

/* --- Стилизация аккуратных скроллбаров (Появляются при надобности) --- */
.mega-level-1::-webkit-scrollbar,
.mega-level-2::-webkit-scrollbar {
  width: 5px;
}

.mega-level-1::-webkit-scrollbar-track,
.mega-level-2::-webkit-scrollbar-track {
  background: transparent;
}

.mega-level-1::-webkit-scrollbar-thumb,
.mega-level-2::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 10px;
}

.mega-level-1::-webkit-scrollbar-thumb:hover,
.mega-level-2::-webkit-scrollbar-thumb:hover {
  background: #cbd5e1;
}


/* Блок поиска */
.search-block {
  flex-grow: 1;
  position: relative;
}

.search-form {
  display: flex;
  align-items: center;
  border: 1px solid #dcdcdc;
  border-radius: var(--border-radius);
  padding: 5px 5px 5px 15px;
  background: transparent;
}

.search-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.5;
}

.search-input {
  border: none;
  outline: none;
  padding: 8px 15px;
  width: 100%;
  font-size: 15px;
  font-family: var(--font-main);
  background: transparent;
}

.search-submit {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 15px;
  transition: color 0.2s;
}

.search-submit:hover {
  color: var(--primary-color);
}








/* Контейнер выпадающей панели результатов */
.search-results-preview {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--white);
  border: 1px solid #eef0f2;
  border-top: none;
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  z-index: 999;
  display: none;
}

.search-results-scroll {
  max-height: 420px;
  overflow-y: auto;
  padding: 5px;
}

/* Современная карточка найденного товара */
.search-preview-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 15px;
  border-bottom: 1px solid #f7f9fa;
  transition: background-color 0.2s ease;
}

.search-preview-item:last-child {
  border-bottom: none;
}

.search-preview-item:hover {
  background-color: #f8fafc;
}

/* Квадратный бокс для фотографии */
.search-preview-img-box {
  width: 55px;
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  flex-shrink: 0;
}

.search-preview-img-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Информация о товаре */
.search-preview-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.search-preview-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  text-decoration: none;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-preview-title:hover {
  color: var(--primary-color);
}

.search-preview-price {
  font-size: 13px;
  color: var(--primary-color);
  font-weight: 700;
}

/* Маленькая аккуратная кнопка Перейти */
.search-preview-go {
  padding: 6px 14px !important;
  font-size: 12px !important;
  font-weight: 600;
  flex-shrink: 0;
}

.search-preview-empty {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}






/* Пользовательские кнопки (Сравнение, Избранное, Корзина) */
.user-actions {
  display: flex;
  align-items: center;
  gap: 25px;
  flex-shrink: 0;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.action-btn:hover {
  color: var(--primary-color);
}

.action-btn__icon {
  position: relative;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-btn__icon img {
  width: 100%;
  height: 100%;
}

/* Красные баджи уведомлений на иконках */
.action-badge {
  position: absolute;
  top: -5px;
  right: -8px;
  background-color: #e62e2e;
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ==========================================================================
   АДАПТИВНОСТЬ ДЛЯ 2 ЛИНИИ
   ========================================================================== */
@media (max-width: 1200px) {
  .site-logo img { width: 180px; }
  .main-line__container { gap: 15px; }
  .user-actions { gap: 15px; }
}

@media (max-width: 992px) {
  /* Скрываем кнопку каталога полностью на планшетах и мобильных */
  .catalog-wrapper {
    display: none !important;
  }

  /* Перестраиваем шапку на планшетах */
  .main-line__container {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .search-block {
    order: 3; /* Поиск уходит на новую строку во всю ширину */
    width: 100%;
    margin-top: 10px;
  }
}


@media (max-width: 576px) {
  .site-logo img { width: 140px; }
  .btn-catalog span { display: none; } /* Оставляем только иконку */
  .action-btn span { display: none; }  /* Прячем текст снизу, оставляем только иконки */
}







/*swipers*/

.hero-section {
  background: transparent;
  padding: 20px 0;
}

/* ==========================================================================
   КОРРЕКТИРОВКА СЕТКИ 3-Й ЛИНИИ (3/4 и 1/4 С УЧЕТОМ МЕЖБЛОЧНОГО ОТСТУПА)
   ========================================================================== */
.hero-section__container {
  display: flex;
  gap: 20px; /* Фиксированное горизонтальное расстояние 20px по ТЗ */
}

/* 1-й слайдер: Главный (занимает ровно 3/4 ширины минус часть отступа) */
.hero-slider-main-wrap {
  width: calc(75% - 15px); /* 3/4 от общей ширины с вычетом пропорциональной доли gap */
  position: relative;
}

/* 2-й слайдер: Дополнительный (занимает ровно 1/4 ширины минус часть отступа) */
.hero-slider-side-wrap {
  width: calc(25% - 5px); /* 1/4 от общей ширины с вычетом пропорциональной доли gap */
  position: relative;
}

/* Ограничение высоты слайдеров */
.swiper-main, 
.swiper-side {
  width: 100%;
  height: 400px;
  border-radius: var(--border-radius);
}

.swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Защита от деформации картинок */
  display: block;
}

/* Кастомизация точек пагинации под черточки 15х3 пикселя */
.hero-section .swiper-pagination {
  bottom: 20px !important; /* Отступ снизу */
}

/* Стилизация всех черточек */
.hero-section .swiper-pagination-bullet {
  width: 25px !important;
  height: 7px !important;
  background-color: #000000 !important; /* Черные по ТЗ */
  border-radius: 2px !important; /* Строгие прямоугольники, без закруглений */
  opacity: 0.3 !important;
  margin: 0 4px !important;
  border:1px solid #ececec;
  transition: opacity 0.3s ease, background-color 0.3s ease;
}

/* Стилизация активной черточки */
.hero-section .swiper-pagination-bullet-active {
  opacity: 1 !important;
  background-color: var(--primary-color) !important; /* Подсветка основным цветом */
}

/* Адаптивный перенос для планшетов и мобильных */
/* Адаптивный сброс сетки для планшетов и мобильных (оставляем как было - во всю ширину) */
@media (max-width: 992px) {
  .hero-section__container {
    flex-direction: column; /* Слайдеры встают друг под друга */
  }
  .hero-slider-main-wrap, 
  .hero-slider-side-wrap {
    width: 100%; /* На мобильных экранах занимают 100% полезной ширины */
  }
}


@media (max-width: 576px) {
  .swiper-main, 
  .swiper-side {
    height: 240px;
  }
}




/* --- Стилизация стрелок навигации Swiper (Видны всегда, полупрозрачно) --- */
.hero-section .swiper-button-prev,
.hero-section .swiper-button-next {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.9); /* Почти белая подложка */
  border-radius: var(--border-radius); /* Закругление 5px из :root */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  
  /* Стрелки видны всегда, но приглушены на 40% яркости */
  opacity: 0.0; 
}

/* При наведении мыши на область соответствующего слайдера делаем стрелки ярче */
.hero-slider-main-wrap:hover .swiper-button-prev,
.hero-slider-main-wrap:hover .swiper-button-next,
.hero-slider-side-wrap:hover .swiper-button-prev,
.hero-slider-side-wrap:hover .swiper-button-next {
  opacity: 0.95;
}

/* Меняем цвет и размер внутренних иконок Swiper */
.hero-section .swiper-button-prev::after,
.hero-section .swiper-button-next::after {
  font-size: 16px !important; /* Небольшая аккуратная стрелочка */
  font-weight: bold;
  color: var(--primary-color); /* Синий цвет бренда из :root */
}

/* Эффект при наведении курсора прямо на саму кнопку стрелки */
.hero-section .swiper-button-prev:hover,
.hero-section .swiper-button-next:hover {
  opacity: 1 !important; /* Полная 100% яркость */
  background-color: var(--primary-color); /* Фирменный синий фон */
}

/* При наведении на саму кнопку стрелка внутри окрашивается в белый */
.hero-section .swiper-button-prev:hover::after,
.hero-section .swiper-button-next:hover::after {
  color: var(--white); 
}

/* Позиционирование от краев слайдера */
.hero-section .swiper-button-prev {
  left: 15px;
}
.hero-section .swiper-button-next {
  right: 15px;
}

/* Адаптив: полностью убираем стрелки на смартфонах и планшетах, там листают пальцем */
@media (max-width: 768px) {
  .hero-section .swiper-button-prev,
  .hero-section .swiper-button-next {
    display: none !important;
  }
}










/* ==========================================================================
   4 ЛИНИЯ ДИЗАЙНА (СЕТКА ИЗ 4 ПЛАШЕК - ВЫСОТА 120PX)
   ========================================================================== */
.categories-section {
  background: transparent; /* Все блоки без фона по ТЗ */
  padding: 20px 0;
}

/* Статичная сетка для 4 элементов с расстоянием 20px */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 равные колонки */
  gap: 20px; /* Расстояние между кнопками 20px по ТЗ */
}

/* Карточка-плашка категории */
.category-card {
  background-color: #f3f3f3; /* Белый фон */
  border: 1px solid #ececec; /* Легкая рамка */
  border-radius: 10px;       /* Закругление 10px по ТЗ */
  height: 150px;             /* Фиксированная высота 120px */
  padding: 15px;
  
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.02);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;

  /* Настройки фонового изображения оборудования */
  background-repeat: no-repeat;
  background-position: top right; /* Сдвинуто в верхний правый угол под текстом */
  background-size: 50%;           /* Размер строго 50% от карточки */
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.06);
  border-color: var(--primary-color); /* Рамка подсвечивается основным цветом */
}

/* Заголовок слева сверху */
.category-card__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  align-self: flex-start;
  max-width: 55%; /* Чтобы длинный текст не перекрывал картинку */
  line-height: 1.2;
}

/* Подпись слева снизу серого цвета #333 */
.category-card__count {
  font-size: 11px;
  color: #333333;
  opacity: 0.7;
  align-self: flex-start;
}

/* Адаптивное перестроение сетки под планшеты и мобильные */
@media (max-width: 992px) {
  .categories-grid {
    grid-template-columns: repeat(2, 1fr); /* По 2 плашки в ряд */
  }
}

@media (max-width: 480px) {
  .categories-grid {
    grid-template-columns: 1fr; /* В 1 колонку на смартфонах */
    gap: 12px;
  }
  .category-card {
    height: 110px; /* Чуть снижаем высоту на экранах телефонов для компактности */
  }
}







/* ==========================================================================
   5 ЛИНИЯ ДИЗАЙНА (БАННЕР ВО ВСЮ ШИРИНУ)
   ========================================================================== */
.banner-line {
  background: transparent; /* Блок без фона по ТЗ */
  padding: 15px 0;         /* Небольшие отступы сверху и снизу между линиями */
}

.banner-line__container {
  /* Контейнер ограничивает ширину до 1300px согласно нашему ТЗ */
}

.banner-link {
  display: block;
  width: 100%;
  height: 120px;          /* Фиксированная высота 120пкс по ТЗ */
  overflow: hidden;
  border-radius: var(--border-radius); /* Наше закругление 5px из :root */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03); /* Легкая воздушная тень */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.banner-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.banner-img {
  width: 100%;
  height: 120px;          /* Высота картинки 120пкс по ТЗ */
  display: block;
  object-fit: cover;      /* Картинка масштабируется и заполняет блок без искажения пропорций */
  object-position: center; /* Центрируем изображение */
}

/* Адаптивность под мобильные телефоны */
@media (max-width: 576px) {
  .banner-link,
  .banner-img {
    height: 80px;         /* На смартфонах уменьшаем высоту до 80px, чтобы баннер смотрелся аккуратно */
  }
}












/* ==========================================================================
   6 ЛИНИЯ ДИЗАЙНА (ТАБЫ И СЛАЙДЕР ТОВАРОВ)
   ========================================================================== */
.products-tabs-section {
  background: transparent;
  padding: 30px 0;
}

/* Стили кнопок переключения вкладок */
.tabs-nav {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
}

.tab-btn {
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: var(--border-radius); /* Наше закругление 5px */
  transition: opacity 0.3s ease, transform 0.2s ease;
}

.tab-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Управление показом панелей */
.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
}

/* Контейнер слайдера товаров */
.swiper-products {
  width: 100%;
  padding: 10px 0 20px 0; /* Место снизу для теней карточек */
}

/* Стилизация товарной карточки */
.product-card {
  background-color: var(--white);
  border: 1px solid #f0f0f0;
  border-radius: var(--border-radius); /* 5px */
  padding: 20px;
  display: flex;
  flex-direction: column;
  height: auto;
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.product-card:hover {
  box-shadow: 0 10px 25px rgba(0,0,0,0.06);
  border-color: #01a6ea;
}

/* ИСПРАВЛЕНО И СОГЛАСОВАНО С ТЗ: Контейнер для фото 100% на 300px */
.product-card__img-box {
  width: 100%;
  height: 300px; /* Высота строго 300px по ТЗ */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 15px;
  background-color: transparent;
}

.product-card__img-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain; /* Картинка любого формата вписывается по центру без искажений */
}

/* Наименование товара */
.product-card__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 12px;
  min-height: 44px; /* Ограничение высоты под двухстрочные названия */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Характеристики */
.product-card__chars {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
  border-top: 1px dashed #f0f0f0;
  padding-top: 12px;
}

.char-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.char-row span {
  color: var(--text-muted);
}

.char-row strong {
  color: var(--text-dark);
  font-weight: 500;
}

/* Нижняя часть (Цена + Кнопка Купить) */
.product-card__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto; /* Прижимает блок к самому низу карточки */
}

.product-card__price {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
}

.product-card__buy {
  background-color: var(--primary-color) !important; /* Наш фирменный цвет 00569f */
  padding: 8px 20px;
  font-size: 14px;
}

/* Стрелочки навигации Swiper для товаров */
.swiper-products .swiper-button-prev,
.swiper-products .swiper-button-next {
  width: 40px;
  height: 40px;
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  opacity: 0.5;
  transition: opacity 0.3s, background-color 0.3s;
}

.swiper-products:hover .swiper-button-prev,
.swiper-products:hover .swiper-button-next {
  opacity: 1;
}

.swiper-products .swiper-button-prev:hover,
.swiper-products .swiper-button-next:hover {
  background-color: var(--primary-color);
}

.swiper-products .swiper-button-prev::after,
.swiper-products .swiper-button-next::after {
  font-size: 15px !important;
  color: var(--primary-color);
  font-weight: bold;
}

.swiper-products .swiper-button-prev:hover::after,
.swiper-products .swiper-button-next:hover::after {
  color: var(--white);
}

/* Выравнивание по высоте десктопа на случай неровного контента */
.swiper-products .swiper-wrapper {
  align-items: stretch;
}






/* ==========================================================================
   7 ЛИНИЯ ДИЗАЙНА (ВТОРОЙ БАННЕР ВО ВСЮ ШИРИНУ)
   ========================================================================== */
.banner-line-two {
  background: transparent; /* Блок без фона по ТЗ */
  padding: 15px 0 25px 0;   /* Небольшие отступы вокруг баннера */
}







/* ==========================================================================
   8 ЛИНИЯ ДИЗАЙНА (ТЕКСТ О КОМПАНИИ / SEO-БЛОК)
   ========================================================================== */
.about-section {
  background: transparent; /* Без фона */
  padding: 30px 0 5px 0;
}

.about-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.about-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
}

.about-date {
  font-size: 13px;
  color: var(--text-muted);
}

.about-intro p, .about-middle-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-dark);
  margin-bottom: 15px;
}

.about-subtitle {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-dark);
  margin: 30px 0 15px 0;
}

/* Обертка для скрытия текста */
.about-more-content {
  display: none; /* Управляется скриптом JS */
}

/* Сетки для объектов и услуг */
.about-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 25px;
}

/* Карточки объектов (с цифрами) */
.about-card {
  border: 1px solid #eef0f2;
  border-radius: var(--border-radius);
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.about-card__num {
  font-size: 24px;
  font-weight: 700;
  color: #01a6ea; /* Вспомогательный голубой цвет из табов */
  opacity: 0.7;
}

.about-card p {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.3;
}

/* Карточки услуг */
.service-card {
  border-left: 3px solid var(--primary-color);
  background-color: #fafbfc;
  padding: 12px 18px;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.service-card__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.service-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Блок брендов и акции */
.about-brands-box {
  background-color: #f4f7f9;
  border-radius: var(--border-radius);
  padding: 20px;
  margin: 25px 0;
}

.about-brands-box p {
  font-size: 15px;
  margin-bottom: 12px;
}

.about-promo-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 14px;
}

/* Область тегов-ссылок */
.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.about-tag {
  background-color: #ffffff;
  border: 1px solid #ececec;
  color: var(--text-dark);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 20px; /* Круглые теги */
  transition: all 0.2s ease;
}

.about-tag:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background-color: #fafbfc;
}

/* Стилизация кнопки Показать/Скрыть */
.about-btn-wrap {
  text-align: center;
  margin-top: 20px;
  position: relative;
}

/* Создаем красивый легкий градиент размытия над кнопкой, когда текст скрыт */
.about-section:not(.open) .about-intro {
  position: relative;
}

.about-toggle-btn {
  background-color: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 30px;
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
}

.about-toggle-btn:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

/* Адаптивность для SEO-блока */
@media (max-width: 992px) {
  .about-grid {
    grid-template-columns: repeat(2, 1fr); /* По 2 карточки в ряд на планшетах */
  }
}

@media (max-width: 576px) {
  .about-header {
    flex-direction: column;
    gap: 5px;
  }
  .about-title {
    font-size: 20px;
  }
  .about-grid {
    grid-template-columns: 1fr; /* В 1 колонку на смартфонах */
    gap: 12px;
  }
}






/* ==========================================================================
   9 ЛИНИЯ ДИЗАЙНА (СЛАЙДЕР БРЕНДОВ НА SWIPER.JS)
   ========================================================================== */
.brands-section {
  background: transparent; /* Все блоки без фонов по ТЗ */
  padding: 30px 0;
}

.brands-slider-wrapper {
  position: relative;
  padding: 0 50px; /* Отступы по бокам, чтобы вынести стрелочки наружу */
}

.swiper-brands {
  width: 100%;
  height: 90px; /* Оптимальная высота для логотипов брендов */
}

/* Оформление карточки бренда */
.brand-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
}

.brand-slide img {
  max-width: 100%;
  max-height: 70px; /* Ограничиваем высоту логотипов, чтобы они не были громоздкими */
  object-fit: contain; /* Пропорции картинок не искажаются */
  opacity: 0.6; /* Слегка приглушаем картинки в стиле современного минимализма */
  filter: grayscale(100%); /* Делаем логотипы черно-белыми для стильного вида */
  transition: opacity 0.3s ease, filter 0.3s ease;
}

/* При наведении мышки бренд становится цветным и ярким */
.brand-slide:hover img {
  opacity: 1;
  filter: grayscale(0%);
}

/* Кастомизация стрелочек навигации для брендов */
.brands-slider-wrapper .swiper-button-prev,
.brands-slider-wrapper .swiper-button-next {
  width: 36px;
  height: 36px;
  background-color: var(--white);
  border: 1px solid #ececec;
  border-radius: var(--border-radius); /* Наше закругление 5px */
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.brands-slider-wrapper .swiper-button-prev:hover,
.brands-slider-wrapper .swiper-button-next:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.brands-slider-wrapper .swiper-button-prev::after,
.brands-slider-wrapper .swiper-button-next::after {
  font-size: 13px !important;
  font-weight: bold;
  color: var(--primary-color);
}

.brands-slider-wrapper .swiper-button-prev:hover::after,
.brands-slider-wrapper .swiper-button-next:hover::after {
  color: var(--white);
}

/* Точное позиционирование за пределами самого слайдера */
.brands-slider-wrapper .swiper-button-prev { left: 0; }
.brands-slider-wrapper .swiper-button-next { right: 0; }

/* Адаптив: на мобильных скрываем стрелки, так как там удобно свайпать пальцем */
@media (max-width: 768px) {
  .brands-slider-wrapper {
    padding: 0; /* Убираем боковые паддинги на смартфонах */
  }
  .brands-slider-wrapper .swiper-button-prev,
  .brands-slider-wrapper .swiper-button-next {
    display: none !important;
  }
  .swiper-brands {
    height: 70px;
  }
  .brand-slide img {
    max-height: 50px;
    opacity: 0.9;
    filter: grayscale(0%); /* На мобильных лучше сразу показать цветные лого */
  }
}




/* ==========================================================================
   10 ЛИНИЯ ДИЗАЙНА (ФУТЕР / ПОДВАЛ САЙТА)
   ========================================================================== */
.site-footer {
  background-color: var(--secondary-bg); /* Темно-синий фон #212957 из :root */
  color: var(--white); /* Белый текст */
  padding: 50px 0 25px 0;
  margin-top: 40px; /* Отступ от верхнего блока о компании */
}

/* 1 СТРОКА */
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 25px;
  margin-bottom: 35px;
}

.footer-contacts {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
}

.footer-phone, .footer-email {
  color: var(--white) !important; /* Ссылки белые по ТЗ */
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.footer-phone:hover, .footer-email:hover {
  opacity: 0.8;
}

.footer-logo img {
  width: 150px; /* Размер 150пикс по ТЗ */
  height: auto;
  display: block;
  /* Если оригинальный логотип темный, убираем коммент со строки ниже для инверсии в белый цвет: */
  /* filter: brightness(0) invert(1); */
}

/* 2 СТРОКА: Сетка 5 колонок */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr); /* Ровно 5 колонок по ТЗ */
  gap: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 40px;
  margin-bottom: 25px;
}

.footer-col__title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 18px;
  color: var(--white);
  letter-spacing: 0.5px;
}

.footer-col__menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col__menu a {
  color: var(--white) !important; /* Ссылки белые по ТЗ */
  font-size: 14px;
  text-decoration: none;
  opacity: 0.7; /* Делаем ссылки чуть приглушенными для читаемости */
  transition: opacity 0.2s ease, padding-left 0.2s ease;
  display: inline-block;
}

.footer-col__menu a:hover {
  opacity: 1;
  padding-left: 3px; /* Элегантный микро-эффект сдвига при ховере */
}

/* 3 СТРОКА */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  opacity: 0.6;
}

.footer-copy {
  display: block;
  align-items: center;
  gap: 25px;
  flex-wrap: wrap;
}

.footer-policy {
  color: var(--white) !important;
  text-decoration: underline;
}
.footer-policy:hover {
  text-decoration: none;
}

.footer-dev{
  width:350px;
  text-align:right;
}
.footer-dev a {
  color: var(--white) !important;
  font-weight: 600;
  text-decoration: underline;
}
.footer-dev a:hover {
  text-decoration: none;
}

/* ==========================================================================
   АДАПТИВНОСТЬ ФУТЕРА ПОД МОБИЛЬНЫЕ УСТРОЙСТВА
   ========================================================================== */
@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr); /* 3 колонки на планшетах */
  }
}

@media (max-width: 768px) {
  .footer-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .footer-contacts {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 колонки на мелких экранах */
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr; /* В 1 колонку на смартфонах */
    gap: 25px;
  }
}






/* Добавьте в конец блока поиска в xcss.css */
.search-preview-empty {
  padding: 15px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* Красивое выделение жирным букв, которые совпали при вводе */
.search-preview-title strong {
  color: var(--primary-color);
  font-weight: 700;
}










/* ==========================================================================
   СТИЛИ ДЛЯ ЦЕНТРАЛЬНОЙ ЧАСТИ ВНУТРЕННЕЙ СТРАНИЦЫ (12 РУБРИК)
   ========================================================================== */
.page-content {
  background: transparent;
  padding: 40px 0;
  min-height: 500px;
}

/* Главный заголовок внутренней страницы */
.page-main-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 30px;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 15px;
}

/* Сетка для 12 внутренних подрубрик (4 колонки на десктопе) */
.inner-categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* По 4 плашки в ряд */
  gap: 20px; /* Расстояние между кнопками 20px по ТЗ */
}

/* ПРИМЕЧАНИЕ: Сами классы .category-card, .category-card__title и 
   .category-card__count мы уже идеально настроили для 4-й линии, 
   поэтому они автоматически применят высоту 120px, белый фон, 
   закругление 10px и фоновые картинки 50% top-right. */

/* Адаптивное перестроение сетки из 12 плашек */
@media (max-width: 1200px) {
  .inner-categories-grid {
    grid-template-columns: repeat(3, 1fr); /* По 3 плашки на небольших мониторах */
  }
}

@media (max-width: 992px) {
  .inner-categories-grid {
    grid-template-columns: repeat(2, 1fr); /* По 2 плашки в ряд на планшетах */
  }
  .page-main-title {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .inner-categories-grid {
    grid-template-columns: 1fr; /* Строго в 1 колонку на смартфонах */
    gap: 15px;
  }
  .page-main-title {
    font-size: 20px;
    margin-bottom: 20px;
  }
}






/* ==========================================================================
   СТИЛИ ДЛЯ ХЛЕБНЫХ КРОШЕК (BREADCRUMBS)
   ========================================================================== */
.breadcrumbs {
  margin-bottom: 15px; /* Отступ снизу до заголовка h1 */
  background: transparent; /* Без фона */
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  gap: 8px; /* Расстояние между элементами */
  padding: 0;
  margin: 0;
}

.breadcrumbs__item {
  font-size: 13px;
  color: var(--text-muted); /* Наш серый #555 из :root */
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Элегантный разделитель (слеш) между ссылками */
.breadcrumbs__item:not(:last-child)::after {
  content: "/";
  color: #cccccc;
  font-weight: normal;
}

.breadcrumbs__link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumbs__link:hover {
  color: var(--primary-color); /* Подсветка фирменным синим при наведении */
}

/* Активная (текущая) страница - темнее, без ссылки и не кликабельна */
.breadcrumbs__item--current {
  color: var(--text-dark); /* #333 из :root */
  font-weight: 500;
}

/* Микро-адаптив: на совсем маленьких экранах уменьшаем шрифт, чтобы крошки не ломали строку */
@media (max-width: 480px) {
  .breadcrumbs__item {
    font-size: 12px;
  }
}









/* ==========================================================================
   СТИЛИ ДЛЯ ВИТРИНЫ КАТАЛОГА ТОВАРОВ И ПАГИНАЦИИ
   ========================================================================== */
/* Сетка витрины (строго 4 колонки на десктопе) */
.catalog-products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 карточки в ряд по ТЗ */
  gap: 20px; /* Расстояние между карточками */
  margin-bottom: 40px;
}

/* Примечание: Сами стили .product-card берутся из настроенных нами в 6-й линии,
   поэтому картинки 300px и кнопки "Купить" в цвете 00569f подхватятся автоматически */

/* Нижний блок каталога */
.catalog-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
  margin-top: 20px;
  border-top: 1px solid #f0f0f0;
  padding-top: 30px;
}

/* Кнопка Показать ещё */
.catalog-load-more {
  background-color: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  font-size: 15px;
  font-weight: 600;
  padding: 12px 40px;
  border-radius: var(--border-radius); /* 5px */
  cursor: pointer;
  transition: all 0.3s ease;
}

.catalog-load-more:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

/* Цифровая пагинация */
.pagination__list {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 5px;
  padding: 0;
  margin: 0;
}

.pagination__link, .pagination__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  border: 1px solid #eef0f2;
  border-radius: var(--border-radius); /* 5px */
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.pagination__link:hover:not(.pagination__link--active),
.pagination__arrow:hover:not(.disabled) {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background-color: #fafbfc;
}

/* Активная страница в пагинации */
.pagination__link--active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--white) !important;
  cursor: default;
}

/* Заблокированные стрелки переключения */
.pagination__arrow.disabled {
  opacity: 0.4;
  cursor: default;
  background-color: #f8fafc;
}

/* Адаптивное сжатие сетки товаров */
@media (max-width: 1200px) {
  .catalog-products-grid {
    grid-template-columns: repeat(3, 1fr); /* 3 товара в ряд */
  }
}

@media (max-width: 868px) {
  .catalog-products-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 товара в ряд */
  }
}

@media (max-width: 480px) {
  .catalog-products-grid {
    grid-template-columns: 1fr; /* Строго 1 товар в ряд на смартфонах */
    gap: 15px;
  }
}







/* ==========================================================================
   СТИЛИ ДЛЯ ШАБЛОНА ТЕКСТОВОЙ СТРАНИЦЫ (О КОМПАНИИ, СТАТЬИ И Т.Д.)
   ========================================================================== */
.text-page-header {
  margin-bottom: 25px;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 15px;
}

/* Убираем нижний отступ у h1 на текстовой странице, так как теперь есть дата */
.text-page-header .page-main-title {
  margin-bottom: 5px;
  border-bottom: none;
  padding-bottom: 0;
}

.text-page-date {
  font-size: 13px;
  color: var(--text-muted);
}

/* Оформление типографики статьи */
.text-page-article {
  max-width: 100%; /* Ограничиваем ширину текста, чтобы длинные строки не утомляли глаза */
  line-height: 1.7;
  font-size: 15px;
  color: var(--text-dark);
}

.text-page-article p {
  margin-bottom: 20px; /* Отступы между абзацами */
}

.text-page-article h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 35px 0 15px 0;
  color: var(--text-dark);
  line-height: 1.3;
}

/* Красивые кастомные списки */
.text-page-article ul {
  list-style: none; /* Убираем стандартные черные точки */
  padding-left: 0;
  margin-bottom: 25px;
}

.text-page-article ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
}

/* Рисуем синие аккуратные маркеры вместо точек */
.text-page-article ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background-color: var(--primary-color); /* Синий цвет компании */
  border-radius: 50%;
}

/* Акцентная плашка для акций/скидок */
.text-page-promo {
  background-color: #f4f7f9;
  border-left: 4px solid var(--primary-color);
  padding: 15px 20px;
  margin: 30px 0;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--primary-color);
}

.text-page-promo .icon-svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Адаптивность под смартфоны */
@media (max-width: 576px) {
  .text-page-article {
    font-size: 14px;
  }
  .text-page-article h2 {
    font-size: 18px;
  }
}











/* ==========================================================================
   СТИЛИ ДЛЯ СТРАНИЦЫ КАРТОЧКИ ТОВАРА (PRODUCT PAGE)
   ========================================================================== */
.product-main-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 25px;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 15px;
  flex-wrap: wrap;
  gap: 15px;
}

.product-actions-bar {
  display: flex;
  gap: 20px;
}

.prod-action-btn {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
}
.prod-action-btn:hover {
  color: var(--primary-color);
}

/* --- Ограничение размеров иконок в быстрых действиях карточки товара --- */
.prod-action-btn {
  background: transparent;
  border: none;
  font-size: 13px;
  color: var(--text-muted);
  display: inline-flex;  /* Flexbox-выравнивание */
  align-items: center;   /* Центрируем иконку и текст по вертикали */
  gap: 6px;              /* Отступ между иконкой и текстом */
  font-weight: 500;
  cursor: pointer;
  padding: 5px 0;
  transition: color 0.2s ease;
}

.prod-action-btn:hover {
  color: var(--primary-color);
}

.prod-action-btn svg,.prod-action-btn img,
.prod-action-btn .icon-svg {
  width: 16px !important;
  height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0; /* Запрещаем иконке сжиматься, если текст длинный */
}


/* Сетка главной рабочей области (45% / 40% / Остаток через флексы или calc) */
.product-main-area {
  display: flex;
  gap: 30px;
  margin-bottom: 50px;
}

/* Блок фото (45%) */
.product-gallery-block {
  width: 45%;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.product-main-image {
  width: 100%;
  height: 380px;
  border: 1px solid #eef0f2;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #fff;
}

.product-main-image img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

/* Превьюшки ракурсов */
.product-thumbs {
  display: flex;
  gap: 10px;
}

.thumb-item {
  width: 70px;
  height: 70px;
  border: 1px solid #eef0f2;
  border-radius: var(--border-radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  background: #fff;
  transition: border-color 0.2s;
}

.thumb-item.active, .thumb-item:hover {
  border-color: var(--primary-color);
}

.thumb-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Блок кратких характеристик (40%) */
.product-short-chars {
  width: 40%;
}

.area-sub-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-dark);
}

/* Блок покупки (Остаток) */
.product-buy-block {
  flex-grow: 1; /* Занимает оставшееся пространство */
  border: 1px solid #eef0f2;
  border-radius: 10px;
  padding: 25px;
  display: flex;
  flex-direction: column;
  height: max-content;
}

.buy-block__art {
  font-size: 13px;
  color: var(--text-muted); /* Серый #555 из :root */
  margin-bottom: 4px;       /* Небольшой отступ вниз до статуса "В наличии" */
  font-weight: bold;
  text-align:right;
}

/* Слегка увеличим отступ у статуса снизу, чтобы отделить его от цены */
.buy-block__status {
  font-size: 13px;
  color: #2e7d32; /* Зеленый */
  font-weight: 600;
  margin-bottom: 15px; 
}


.buy-block__price {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.buy-block__btn {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  margin-bottom: 20px;
  gap: 10px;
}

.buy-block__delivery {
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid #f0f0f0;
  padding-top: 15px;
}

/* ЛИНИЯ КАРТОЧНЫХ ТАБОВ */
.product-details-tabs {
  margin-bottom: 60px;
}

.p-tabs-nav {
  display: flex;
  border-bottom: 1px solid #eef0f2;
  gap: 30px;
  margin-bottom: 25px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.p-tabs-nav::-webkit-scrollbar {
  height: 0px;           /* Скрываем полосу горизонтального скролла в Chrome, чтобы не мозолила глаза */
  background: transparent;
}

.p-tab-btn {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-muted);
  padding-bottom: 12px;
  position: relative;
  white-space: nowrap;
}

.p-tab-btn.active {
  color: var(--primary-color);
}

.p-tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
}

.p-tab-panel {
  display: none;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-dark);
}

.p-tab-panel.active {
  display: block;
}

.p-tab-panel p {
  margin-bottom: 15px;
}

.p-tab-panel ul {
  padding-left: 20px;
  margin-bottom: 20px;
}

.inner-tab-title {
  font-size: 16px;
  font-weight: 600;
  margin: 25px 0 15px 0;
}

/* Таблицы технических параметров внутри табов */
.chars-table {
  width: 100%;
  max-width: 600px;
  border-collapse: collapse;
}

.chars-table td {
  padding: 10px 0;
  border-bottom: 1px dashed #eef0f2;
  font-size: 14px;
}

.chars-table tr td:first-child {
  color: var(--text-muted);
}

 cruelty-free.chars-table tr td:last-child {
  font-weight: 600;
  text-align: right;
  color: var(--text-dark);
}

/* Заголовки блоков рекомендаций ниже */
.product-recommend-section {
  margin-top: 50px;
}

.recommend-section-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-dark);
}

/* Адаптивность для мобилок */
@media (max-width: 992px) {
  .product-main-area {
    flex-direction: column;
  }
  .product-gallery-block, .product-short-chars, .product-buy-block {
    width: 100%;
  }
}



.product-short-desc {
  margin-top: 25px; /* Отступ сверху от таблицы характеристик */
  border-top: 1px solid #f0f0f0; /* Легкая разделительная линия для аккуратности */
  padding-top: 15px;
}

.product-short-desc p {
  font-size: 14px;
  line-height: 1.6; /* Комфортное межстрочное расстояние для 4-5 строк */
  color: var(--text-dark); /* Наш базовый темный цвет #333 */
  margin: 0;
}





/* ==========================================================================
   БЛОК ПЕРЕКЛЮЧЕНИЯ МОДИФИКАЦИЙ В КАРТОЧКЕ ТОВАРА
   ========================================================================== */
.product-modifications {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 20px;
  margin-bottom: 5px;
}

.mod-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Название группы параметров (Охлаждение, Площадь) */
.mod-group__title {
  font-size: 13px;
  color: var(--text-muted); /* Наш серый #555 из :root */
  font-weight: 600;
}

/* Сетка кнопок */
.mod-group__variants {
  display: flex;
  flex-wrap: wrap;
  gap: 8px; /* Расстояние между кнопочками */
}

/* Кнопка-ссылка на модификацию */
.mod-variant-btn {
  background-color: #ffffff;
  border: 1px solid #dcdcdc;
  color: var(--text-dark);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--border-radius); /* 5px из :root */
  text-align: center;
  min-width: 55px;
  transition: all 0.2s ease;
  display: inline-block;
}

/* Эффект наведения мыши */
.mod-variant-btn:hover:not(.active) {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background-color: #f4f7f9;
}

/* Активная выбранная модель в серии */
.mod-variant-btn.active {
  background-color: var(--primary-color) !important; /* Наш фирменный цвет 00569f */
  border-color: var(--primary-color) !important;
  color: var(--white) !important; /* Белый текст */
  cursor: default;
  box-shadow: 0 2px 6px rgba(0, 86, 159, 0.2);
}












/* ==========================================================================
   СТИЛИ ИИ-КОНСУЛЬТАНТА (СТРОКА ВОПРОСА И ВСПЛЫВАЮЩИЙ ЧАТ)
   ========================================================================== */
/* 1. Блок быстрого вопроса в карточке */
.ai-quick-ask {
  margin-top: 25px;
  border-top: 1px dashed #ececec;
  padding-top: 20px;
}

.ai-quick-ask__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-color); /* Выделяем фирменным синим */
  margin-bottom: 8px;
}

.ai-quick-ask__form {
  display: flex;
  border: 1px solid var(--primary-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  background: #ffffff;
}

.ai-quick-input {
  border: none;
  outline: none;
  padding: 10px 15px;
  flex-grow: 1;
  font-size: 13.5px;
  color: var(--text-dark);
}
.ai-quick-input::placeholder {
  color: #a1a1a1;
}

.ai-quick-submit {
  background-color: var(--primary-color);
  color: var(--white);
  font-weight: 600;
  font-size: 13.5px;
  padding: 0 20px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}
.ai-quick-submit:hover { opacity: 0.9; }

/* 2. Фиксированный Виджет чата (справа внизу) */
.ai-chat-widget {
  position: fixed;
  bottom: -500px; /* Изначально спрятан снизу */
  right: 30px;
  width: 360px;
  height: 460px;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Плавный выезд с пружиной */
}

.ai-chat-widget.active {
  bottom: 30px; /* Позиция при открытии */
}

/* Шапка чата */
.ai-chat-header {
  background-color: var(--secondary-bg); /* Темно-синий #212957 */
  color: var(--white);
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ai-chat-manager {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-avatar {
  width: 35px;
  height: 35px;
  background-color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.ai-manager-info {
  display: flex;
  flex-direction: column;
}

.ai-name {
  font-size: 14px;
  font-weight: 600;
}

.ai-status {
  font-size: 11px;
  color: #4caf50; /* Зеленый онлайн */
  opacity: 0.9;
}

.ai-chat-close {
  background: none;
  border: none;
  color: var(--white);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
}
.ai-chat-close:hover { opacity: 1; }

/* Окно сообщений */
.ai-chat-body {
  flex-grow: 1;
  padding: 20px;
  background-color: #f8fafc;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Стили сообщений */
.ai-message {
  max-width: 85%;
  padding: 10px 14px;
  font-size: 13.5px;
  line-height: 1.4;
  border-radius: 8px;
}

.ai-message--bot {
  background-color: #ffffff;
  color: var(--text-dark);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.ai-message--user {
  background-color: var(--primary-color);
  color: var(--white);
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

/* Подвал чата */
.ai-chat-footer {
  display: flex;
  border-top: 1px solid #eef0f2;
  padding: 10px 15px;
  background: #ffffff;
  align-items: center;
  gap: 10px;
}

.ai-chat-input {
  border: none;
  outline: none;
  flex-grow: 1;
  font-size: 14px;
}

.ai-chat-send {
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
  transition: transform 0.2s;
}
.ai-chat-send:hover { transform: scale(1.1); }

/* Адаптив под мобилки */
@media (max-width: 480px) {
  .ai-chat-widget {
    right: 15px;
    width: calc(100% - 30px);
    height: 400px;
  }
}




/* Ссылка "Все характеристики" под краткой таблицей */
.prod-link-more {
  display: inline-block;
  font-size: 13.5px;
  color: var(--primary-color); /* Наш синий 00569f */
  font-weight: 600;
  text-decoration: underline;
  margin-top: 10px;
  margin-bottom: 5px;
  transition: opacity 0.2s ease;
}

.prod-link-more:hover {
  text-decoration: none;
  opacity: 0.8;
}



.phr ul {
    list-style: none;
    padding: 0;
    margin: 0;
    max-width: 500px;
    font-family: sans-serif;
}

.phr ul li {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 10px;
    font-size: 14px;
}

.phr ul li .main {
    color: #666;
    display: flex;
    flex-grow: 1;
}

.phr ul li .main::after {
    content: "";
    flex-grow: 1;
    border-bottom: 1px dotted #ccc;
    margin: 0 10px 4px 10px;
}

.phr ul li .page {
    color: #000;
    font-weight: bold;
    white-space: nowrap;
}

.phr ul li:nth-child(n+5) {    
    display: none;
}