/* ============================================================================
   Эффорт Групп — ЭТАП 4 «страницы», 25.09.2026
   ----------------------------------------------------------------------------
   Подключается в обеих шапках последним (после motion3). Только оформление и порядок
   показа: тексты, адреса, H1 и разметка для роботов остаются прежними, ничего не
   удаляется из HTML. Откат: снять строки с меткой eg4-20260925.
   ========================================================================== */

/* --- 1. Раздел: товары выше ------------------------------------------------ */
/* SEO-вступление раздела (картинка + текст) визуально уходит под список товаров —
   текст остаётся в разметке и виден, просто после товаров. */
.list_section {
  display: flex;
  flex-direction: column;
}
.list_section > .section_top_text {
  order: 10;
  margin-top: 32px;
}
@media (max-width: 767px) {
  /* Подразделы — строкой-лентой вместо столбика в 14 пунктов. */
  .left_block_filter .product-widget:not(.product-widget-BT) .widget-category-list {
    display: flex !important;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    margin-top: 14px !important;
    padding-bottom: 6px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .left_block_filter .product-widget:not(.product-widget-BT) .widget-category-list::-webkit-scrollbar {
    display: none;
  }
  .left_block_filter .product-widget:not(.product-widget-BT) .single-widget-category {
    flex: none;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }
  .left_block_filter .product-widget:not(.product-widget-BT) .single-widget-category a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid #E0DDD6;
    border-radius: 999px;
    background: #fff;
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
  }
  /* Декоративная картинка раздела на телефоне не нужна — текст остаётся. */
  .list_section .section_top_text_pict {
    display: none !important;
  }
}

/* --- 2. Сертификаты и письма-отзывы: плотная сетка ------------------------- */
.aboutReviews__mails {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
  gap: 16px !important;
}
.aboutReviews__mails__item {
  min-width: 0;
}
.aboutReviews__mails__item__img {
  height: auto !important;
  min-height: 0 !important;
}
.aboutReviews__mails__item__img img {
  max-width: 100% !important;
  height: auto !important;
  max-height: 260px;
  object-fit: contain;
}
.aboutReviews__mails__item.m4-off {
  display: none !important;
}
@media (max-width: 767px) {
  .aboutReviews__mails {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
  .aboutReviews__mails__item__img img {
    max-height: 200px;
  }
}
/* --- 3. Производители: поиск, плотная сетка, подпись вместо битого лого ---- */
.m4-search {
  margin: 0 0 18px;
}
.m4-search input {
  width: 100%;
  max-width: 520px;
  height: 48px;
  padding: 0 16px;
  border: 1px solid #E0DDD6;
  border-radius: 14px;
  background: #fff;
  font: 400 16px/1.2 "Zona Pro", Arial, sans-serif;
}
.m4-search .m4-none {
  margin-top: 10px;
  color: #606566;
  font-size: 14px;
}
.brand__row {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.brand__row > .brand__item {
  width: 100% !important;          /* у темы жёсткие 218 px — плитка должна быть шириной ячейки */
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  flex: none !important;
}
.brand__row > .brand__item a,
.brand__row > .brand__item img {
  max-width: 100% !important;
}
.brand__item.m4-off {
  display: none !important;
}
.brand__item.m4-noimg a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  padding: 12px;
  color: #1F2024;
  font: 600 15px/1.25 "Zona Pro", Arial, sans-serif;
  text-align: center;
  text-decoration: none;
}
.brand__item.m4-noimg img {
  display: none !important;
}
@media (max-width: 767px) {
  .brand__row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
}

/* --- 4. Бренд: справка свёрнута, товары ближе к первому экрану ------------ */
.brand-text .text-block.m4-fold {
  position: relative;
  max-height: 7.8em;
  overflow: hidden;
}
.brand-text .text-block.m4-fold::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3em;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
  pointer-events: none;
}
.m4-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  margin: 8px 0 4px;
  padding: 0;
  border: 0;
  background: none;
  color: #AF3C0B;
  font: 600 14px/1.2 "Zona Pro", Arial, sans-serif;
  cursor: pointer;
}
.m4-more:hover {
  text-decoration: underline;
}

/* --- 5. Поддержка: карточки сеткой вместо столбика на всю ширину ---------- */
@media (min-width: 768px) {
  .supportList {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 16px;
  }
  .supportList__item {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 14px;
    margin: 0 !important;
    padding: 20px !important;
    border: 1px solid #E6E3DD;
    border-radius: 14px;
    background: #fff !important;
  }
  .supportList__item__text {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* --- 6. Услуги: сетка услуг сразу после вступления ----------------------- */
.servicesPage {
  display: flex;
  flex-direction: column;
}
.servicesPage > .servicesPage__services {
  order: 1;
  margin-top: 28px;
}
.servicesPage > .servicesPage__adventages {
  order: 2;
}

/* --- 7. 404: быстрые выходы (строит pages4.js) ---------------------------- */
.m4-exits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.m4-exits a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid #AF3C0B;
  border-radius: 999px;
  background: #fff;
  color: #AF3C0B;
  font: 600 14px/1.2 "Zona Pro", Arial, sans-serif;
  text-decoration: none;
}
.m4-exits a:hover {
  background: #FFF3EC;
}

/* --- 8. Новости на главной: вся карточка — ссылка (там заголовок div.h6) --- */
.m3-news .single-smblog .smblog-content .h6 a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.m3-news .single-smblog .smblog-content .h6 a {
  transition: color var(--m3-fast, 160ms) var(--m3-ease, cubic-bezier(.2, .7, .2, 1));
}
@media (hover: hover) and (pointer: fine) {
  .m3-news .single-smblog:hover .smblog-content .h6 a {
    color: #E85326;
  }
}

/* --- 9. Цены: цифры одной ширины (разряды расставляет pages4.js) ---------- */
.m4-price {
  font-variant-numeric: tabular-nums;
}

/* Фокус поля поиска (производители, сертификаты). */
.m4-search input:focus-visible {
  outline: 2px solid #E85326;
  outline-offset: 2px;
}
