/* Локальные правки и оверрайды поверх ассетов из вёрстки.
   Файлы в assets/css/ менять нельзя — все новые стили сюда. */

/* Табы: скрытая панель (используется в press, потенциально и в других секциях) */
[data-tab-pane].press__grid--hidden,
[data-tab-pane].reputation__pane--hidden { display: none; }

.reputation__more {
  margin-top: 30px;
  display: inline-flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: var(--purple);
}

.reputation__show-all {
  color: var(--purple);
  text-decoration: none;
}

.reputation__more:hover .reputation__show-all { text-decoration: underline; }

[data-ajax-form] input._invalid,
[data-ajax-form] textarea._invalid {
  border-color: #c0392b;
  box-shadow: 0 0 0 1px #c0392b;
}

[data-ajax-form] label._invalid {
  color: #c0392b;
}

/* ─────────────────────────────────────────
   BLOCK: subscribe-thanks-modal
   Модальное окно «Благодарим за подписку».
   Открыт/закрыт через модификатор --open
   (по образцу question-modal).
───────────────────────────────────────── */
.subscribe-thanks-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.subscribe-thanks-modal--open {
  display: block;
}

.subscribe-thanks-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
}

.subscribe-thanks-modal__window {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  background: #fff;
  padding: 56px 48px 40px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.20);
  overflow-y: auto;
}

.subscribe-thanks-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: 0;
  padding: 8px;
  cursor: pointer;
}

.subscribe-thanks-modal__close img {
  width: 16px;
  height: 16px;
  display: block;
}

/* ─────────────────────────────────────────
   BLOCK: cert-lightbox
   Полноэкранный просмотр изображений карточек репутации.
   Открыт/закрыт через модификатор --open (parallel с hidden).
───────────────────────────────────────── */
.cert-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
}
.cert-lightbox[hidden]     { display: none; }
.cert-lightbox--open       { display: block; }

.cert-lightbox__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  cursor: pointer;
}

.cert-lightbox__window {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}

.cert-lightbox__image {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  display: block;
  background: #fff;
  pointer-events: auto;
}

.cert-lightbox__caption {
  color: #fff;
  font-size: 14px;
  text-align: center;
  max-width: 90vw;
  padding: 0 16px;
  pointer-events: auto;
}

.cert-lightbox__close,
.cert-lightbox__prev,
.cert-lightbox__next {
  position: fixed;
  background: transparent;
  border: 0;
  color: #fff;
  cursor: pointer;
  padding: 8px 14px;
  font-size: 28px;
  line-height: 1;
}
.cert-lightbox__close { top: 16px;  right: 24px; font-size: 32px; }
.cert-lightbox__prev  { top: 50%;   left: 24px;  transform: translateY(-50%); }
.cert-lightbox__next  { top: 50%;   right: 24px; transform: translateY(-50%); }

/* ─────────────────────────────────────────
   BLOCK: question-modal extras
   Inline-ошибка под кнопкой и блок благодарности,
   подменяющий форму после успешной отправки.
───────────────────────────────────────── */
.question-modal__error {
  color: #c0392b;
  font-size: 14px;
  margin-top: 12px;
}

.question-modal__thanks {
  padding: 24px 0;
  text-align: center;
}

.question-modal__thanks-text {
  font-size: 18px;
  line-height: 1.4;
  margin: 0;
}

/* ─────────────────────────────────────────
   BLOCK: tender-modal extras
   Inline-ошибка под кнопкой и блок благодарности,
   подменяющий форму после успешной отправки.
───────────────────────────────────────── */
.tender-modal__error {
  color: #c0392b;
  font-size: 14px;
  margin-top: 12px;
}

.tender-modal__thanks {
  padding: 24px 0;
  text-align: center;
}

.tender-modal__thanks-text {
  font-size: 18px;
  line-height: 1.4;
  margin: 0;
}

/* assets/css задаёт display: flex для .tender-modal__image, что перекрывает
   стандартный [hidden] { display: none }. Возвращаем поведение. */
.tender-modal__image[hidden] {
  display: none;
}

/* В состоянии благодарности заголовок выравниваем по центру,
   чтобы он лёг по той же оси, что и текст благодарности. */
.tender-modal--success .tender-modal__title {
  text-align: center;
}

/* ─────────────────────────────────────────
   BLOCK: catalog-menu (overrides)
   Панельная структура для переключения подкатегорий
   при наведении на тип в левой колонке.
───────────────────────────────────────── */

/* Панель — невидимая обёртка над .col--center и .col--right.
   display: contents — чтобы дочерние колонки участвовали в grid
   родителя .catalog-menu__inner (380px 1fr 1fr). */
.catalog-menu__panel {
  display: none;
}
.catalog-menu__panel--active {
  display: contents;
}

/* Стрелка-индикатор показывается только у активного типа */
.catalog-menu__category:not(.catalog-menu__category--active) .catalog-menu__category-arrow {
  display: none;
}

/* ─────────────────────────────────────────
   BLOCK: city-modal active city
   Подсвечивает текущий выбранный город в попапе выбора города.
───────────────────────────────────────── */
.city-modal__city-item--active .city-modal__city-name {
  font-weight: 600;
}

/* ─────────────────────────────────────────
   BLOCK: footer__contacts-worktime
   Строка «режим работы», добавлена рядом с телефонами в футере
   (паритет с bitrix/templates/scopula/footer.php при LOCATIONS_ENABLED=Y).
───────────────────────────────────────── */
.footer__contacts-worktime {
  margin-top: 4px;
}

/* ─────────────────────────────────────────
   BLOCK: header counters & favorite state
   Бэйджи с количеством товаров в корзине/избранном на иконках в шапке
   плюс активное состояние «сердечка» на карточке товара.
───────────────────────────────────────── */
.header__icon-btn {
  position: relative;
}

.header__icon-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #57159E;
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  font-weight: 600;
  text-align: center;
  pointer-events: none;
}

.header__icon-badge[hidden] {
  display: none;
}

.product-card__fav--active path {
  fill: #57159E;
  stroke: #57159E;
}

[data-add-to-basket]._loading,
[data-toggle-favorite]._loading {
  opacity: 0.6;
  pointer-events: none;
}

/* BLOCK: search suggestions — скрываем выпадающие подсказки, когда
   поиск ничего не нашёл (бэкенд вернул total=0).
   В assets/css/header.css есть правило
   `.search-box--typing .search-box__suggestions { display: block; }`,
   которое надо перебить. */
.search-box--no-suggestions .search-box__suggestions {
  display: none;
}

/* BLOCK: search history — скрываем выпадашку, когда история пуста.
   Перебивает `.search-box--active .search-box__dropdown { display: block; }`
   из assets/css/header.css (одинаковая специфичность — побеждает порядок
   подключения, backend.css грузится последним). */
.search-box--no-history .search-box__dropdown {
  display: none;
}

/* ─────────────────────────────────────────
   BLOCK: mobile-menu catalog (drill-down)
   Меню каталога в мобильном меню: уровень 1 виден по умолчанию,
   при клике по пункту с детьми обёртка получает .is-drilled
   (корневой список скрывается), а соответствующая .--sub-панель
   получает .is-active и показывает родителя как заголовок + его детей.
   Контейнер .mobile-menu__catalog-view уже задаёт padding/flex
   из assets/css/mobile-menu.css.
───────────────────────────────────────── */
.mobile-menu__catalog-level--root {
  display: flex;
  flex-direction: column;
}

.mobile-menu__catalog-level--sub {
  display: none;
  flex-direction: column;
}

.mobile-menu__catalog-tree.is-drilled .mobile-menu__catalog-level--root {
  display: none;
}

.mobile-menu__catalog-level--sub.is-active {
  display: flex;
}

/* ─────────────────────────────────────────
   BLOCK: page horizontal-overflow guard
   На узких экранах несколько position: fixed элементов
   (.float-btn с `right: 12px`, сторонний .piarme_cookie-notice)
   расширяют body.scrollWidth до viewport + ~20px и появляется
   горизонтальный скролл / лишняя пустая область справа от вёрстки.
   Клипуем по горизонтали — fixed-элементы всё равно якорятся
   к viewport, никаких визуальных потерь.
───────────────────────────────────────── */
html,
body {
  overflow-x: hidden;
}

.product-card__image {
  height: 220px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .product-card__image {
    height: 180px;
  }
}

.catalog-product-card__image {
  height: 220px;
  flex-shrink: 0;
}

.catalog-product-card__image a,
.product-card__image a {
  display: block;
  height: 100%;
}

@media (max-width: 959px) {
  .catalog-product-card__image {
    height: 150px;
  }
}

@media (min-width: 960px) {
  .article-card__image {
    height: 220px;
  }
}

.header__subnav-link--accent {
  color: var(--purple);
  font-weight: 600;
}

.nav-arrows--hidden { display: none; }

.products__pane { display: none; }
.products__pane--active { display: block; }

.hero__slider {
  flex: 0 0 auto;
  width: 650px;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
.hero__track {
  display: flex;
  gap: 80px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.hero__track::-webkit-scrollbar { display: none; }
.hero__track .hero__product-card {
  width: 100%;
  scroll-snap-align: start;
}

@media (max-width: 1280px) {
  .hero__slider { width: 50%; }
}

@media (max-width: 959px) {
  .hero__slider { width: 100%; order: 2; }
}

@media (min-width: 960px) {
  .clients__grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .clients__grid::-webkit-scrollbar { display: none; }
  .clients__grid > .client-item {
    flex: 0 0 calc(100% / 6);
    max-width: calc(100% / 6);
    flex-shrink: 0;
    scroll-snap-align: start;
  }
}

.footer__bottom {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 20px;
}
.footer__ratings-wrap { display: flex; flex-direction: column; gap: 10px; }
.footer__ratings { padding: 0; gap: 20px; }
.footer__payments { margin-left: auto; }

@media (max-width: 959px) {
  .footer__bottom { flex-direction: column; align-items: flex-start; gap: 24px; padding: 20px 15px 80px; }
  .footer__copyright { order: 0; }
  .footer__payments { margin-left: 0; width: 100%; }
}

a.save-contact-modal__btn { display: block; text-align: center; text-decoration: none; }

@media (max-width: 959px) {
  .save-contact-modal__window {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
}

.cat-subsections {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 60px;
  padding: 40px 0 45px;
  border-bottom: 1px solid #ECECEC;
}

.cat-subsections__count {
  margin-left: 2px;
  font-size: 13px;
  color: #9A9A9A;
}

@media (max-width: 959px) {
  .cat-subsections { grid-template-columns: 1fr; column-gap: 0; row-gap: 16px; padding: 24px 0 28px; }
  .cat-seo { padding: 20px 0 10px; margin-top: 40px; }
}

.cat-page { margin-top: 0; }

.cat-seo__list--plain { list-style: none; padding-left: 0; }

.cat-seo__inner :where(h1:not([class*="cat-seo"]), h2:not([class*="cat-seo"])) {
  font-size: 32px;
  font-weight: 400;
  color: var(--black);
  margin: 36px 0 14px;
}

.cat-seo__inner :where(h3:not([class*="cat-seo"]), h4:not([class*="cat-seo"])) {
  font-size: 20px;
  font-weight: 500;
  color: var(--black);
  margin: 24px 0 10px;
}

.cat-seo__inner :where(h1, h2, h3, h4):not([class*="cat-seo"]):first-child,
.cat-seo__more-text > :first-child {
  margin-top: 0;
}

.cat-seo__inner :where(p:not([class*="cat-seo"])) {
  font-size: 16px;
  color: var(--gray-dark);
  line-height: 1.75;
  margin-bottom: 12px;
}

.cat-seo__inner :where(ul:not([class]), ol:not([class])) {
  font-size: 16px;
  color: var(--gray-dark);
  line-height: 1.75;
  padding-left: 18px;
  margin-bottom: 12px;
}

.cat-seo__inner :where(ul:not([class])) { list-style: disc; }

.cat-seo__inner :where(ol:not([class])) { list-style: decimal; }

.cat-seo__inner :where(a:not([class*="cat-seo"])) {
  color: var(--purple);
  text-decoration: underline;
}

.cat-seo__inner b,
.cat-seo__inner strong {
  color: var(--black);
  font-weight: 600;
}

.cat-seo__inner img {
  max-width: 100%;
  height: auto;
}

.cat-seo .zag1,
.cat-seo .zag2 {
  font-size: 20px;
  font-weight: 500;
  color: var(--black);
  margin: 24px 0 10px;
}

.cat-seo__inner [style] {
  font-family: inherit !important;
  text-align: inherit !important;
}

.cat-seo__inner [style]:not(a) {
  color: inherit !important;
}

.cat-seo .text-mb { margin-bottom: 45px; }

.cat-seo .row1ps { display: flex; }

.cat-seo .row1ps2 {
  display: flex;
  margin-left: 9%;
}

.cat-seo .row1ps_item { padding: 0 8px; }

.cat-seo .otstup { justify-content: normal; }

.cat-seo .wi80 { width: 41%; }

.cat-seo .fo5 {
  width: 50%;
  padding: 0 16px;
  margin: 20px 0;
}

.cat-seo .primary__pic {
  text-align: center;
  width: 100%;
  margin-bottom: 5px;
}

.cat-seo .primary__pc {
  text-align: center;
  margin: 57px 0 47px;
  line-height: 1.5;
  font-size: 16px;
  width: 80%;
  display: inline-block;
  padding: 11px;
  background-color: var(--purple-btn);
  color: #fff;
}

.cat-seo .primary__pc p,
.cat-seo .primary__pc b,
.cat-seo .primary__pc strong {
  color: #fff;
}

.cat-seo .primary__pc a,
.cat-seo .white-link,
.cat-seo .licd {
  color: #fff;
  text-decoration: underline;
}

.cat-seo .link-h:hover { cursor: pointer; }

.cat-seo .hifu-list {
  display: flex;
  align-items: center;
}

.cat-seo .hifu-list--mb { margin-bottom: 60px; }

.cat-seo .hifu-list__item-img {
  flex-basis: 5%;
  padding-right: 15px;
}

.cat-seo .hifu-list__item-text--hifu { flex-basis: 95%; }

.cat-seo .hifu-list__item-text ul {
  columns: 2;
  column-gap: 30px;
  list-style: disc;
  padding-left: 18px;
  color: var(--gray-dark);
  line-height: 1.75;
}

.cat-seo .feature-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  padding-left: 0;
}

.cat-seo .feature-list--mt { margin-top: 30px; }

.cat-seo .feature-list__item {
  flex-basis: 40%;
  padding: 0 15px;
  text-align: center;
}

.cat-seo .feature-list__title { font-weight: 700; }

.cat-seo .zakaz-list {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  list-style: none;
  padding-left: 0;
}

.cat-seo .zakaz-list__item {
  flex-basis: 40%;
  display: flex;
}

.cat-seo .zakaz-list__img-wrapper {
  flex-basis: 13%;
  padding-right: 15px;
  padding-top: 15px;
}

.cat-seo .zakaz-list__text { flex-basis: 87%; }

.cat-seo .zakaz-list__text p:first-child { font-weight: 700; }

@media (max-width: 959px) {
  .cat-seo__inner :where(h1:not([class*="cat-seo"]), h2:not([class*="cat-seo"])) { font-size: 24px; }
}

@media (max-width: 965px) {
  .cat-seo .row1ps {
    display: block;
    text-align: center;
  }
  .cat-seo .wi80,
  .cat-seo .fo5 {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .cat-seo .hifu-list__item-img { display: none; }
  .cat-seo .hifu-list__item-text ul {
    columns: 1;
    column-gap: 0;
  }
  .cat-seo .feature-list { flex-direction: column; }
  .cat-seo .feature-list__item { margin-bottom: 15px; }
  .cat-seo .zakaz-list { flex-direction: column; }
  .cat-seo .zakaz-list__img-wrapper { padding-right: 0; }
}

@media (max-width: 425px) {
  .cat-seo .zakaz-list__item {
    flex-direction: column;
    text-align: center;
  }
}

.breadcrumbs span.breadcrumbs__link:hover { color: #909090; }

.mobile-menu__quick-btn { display: none; }

.cat-filters__reset {
  text-decoration: none;
}

.cat-filters__check-label--disabled {
  opacity: .45;
  cursor: default;
}

.cat-filters._loading,
.cat-more__btn._loading,
.cat-results._loading {
  opacity: .5;
  pointer-events: none;
}

.cat-sort__item {
  display: block;
  text-decoration: none;
}

.cat-pagination__btn {
  text-decoration: none;
}

.cat-pagination__btn--active {
  color: var(--purple);
  font-weight: 700;
}

.cat-pagination__btn--dots {
  pointer-events: none;
}

.catalog-product-card {
  position: relative;
}

.cat-also__grid {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.cat-also__grid::-webkit-scrollbar { display: none; }
.cat-also__grid > .catalog-product-card {
  flex: 0 0 255px;
  height: auto;
  scroll-snap-align: start;
}

@media (max-width: 1499px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}

@media (max-width: 1175px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 959px) {
  .cat-filters__toggle-left { display: flex; align-items: center; gap: 10px; }
  .cat-filters { margin-top: 20px; }
  .cat-filters__body { padding-top: 16px; }
  .cat-layout { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .cat-toolbar { margin-bottom: 30px; }
}

@media (max-width: 865px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 601px) {
  .cat-grid { grid-template-columns: 1fr; }
}

.cat-empty {
  padding: 40px 0;
  font-size: 16px;
  color: var(--gray-text);
}

.cat-layout > .cat-results:only-child { grid-column: 1 / -1; }

/* Скролл-фиксация шапки включена (SCP-746) — в layout/src/css/header.css
   строка display закомментирована, не принимать при синке. */
body.scrolled header { display: block; }

/* Иконки шапки при скролле на мобилке (SCP-745) — в layout отсутствует. */
@media (max-width: 959px) {
  body.scrolled .header__icons {
    position: absolute;
    right: 15px;
    top: 38px;
  }
}
body.scrolled .logo__tagline, body.scrolled .header__inner nav{
	display:none;
}
/* SCP-722: в layout 22px. */
.category-card__title { font-size: 20px; }

/* В layout-страницах <body class="scrolled"> захардкожен, и hero там
   компенсирует всегда-фиксированную шапку (250/180/145px). На проде
   .scrolled вешается custom.js только при скролле — возвращаем отступы. */
.hero { padding-top: 110px; }

@media (max-width: 1280px) {
  .hero { padding-top: 32px; }
}

@media (max-width: 959px) {
  .hero { padding-top: 40px; }
}

/* SCP-722: скорректировал размер чёрной кнопки в хеадер. в layout 4px. */
.top-bar__btn {
  padding: 4px 18px;
}
.top-bar__btn--filled {
  padding: 5px 18px;
}

@media (max-width: 959px) {
    .breadcrumbs .breadcrumbs__crumb { display: none; }
    .breadcrumbs .breadcrumbs__crumb--back { display: inline; }
}

.product-card__price-old {
  color: #F33456;
  font-weight: 600;
}

.product-card__sale,
.product-card__price_line {
  align-items: baseline;
  flex-wrap: nowrap;
  gap: 10px;
}

.product-card__sale > div,
.product-card__price_line > div {
  white-space: nowrap;
}

@media (max-width: 959px) {
  .product-card__sale .product-card__price,
  .product-card__price_line .product-card__price {
    margin-bottom: 0;
  }

  .product-card__sale,
  .product-card__price_line {
    margin-bottom: 20px;
  }
}

.catalog-category-page-header__title {
  font-size: 30px;
}

.product-card__image,
.catalog-product-card__image {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-card__badges {
  position: static;
  max-width: none;
  flex-shrink: 0;
}

.catalog-product-card__image a,
.product-card__image a {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}
