/* ═══════════════════════════════════════════════════════════════════
   КАТАЛОГ: меню-дропдаун, кнопка «Смотреть все», страница категории,
   фильтр, FAQ, характеристики товара
   ═══════════════════════════════════════════════════════════════════ */

/* ── Меню: выпадающий список категорий (десктоп) ── */
.nav-dd { position: relative; }
.nav-dd__toggle { display: inline-flex !important; align-items: center; gap: 5px; }
.nav-dd__toggle .bi { font-size: 10px; transition: transform var(--transition); }
.nav-dd:hover .nav-dd__toggle .bi, .nav-dd:focus-within .nav-dd__toggle .bi { transform: rotate(180deg); }
.nav-dd__menu {
  position: absolute; top: 100%; left: -8px; min-width: 300px; padding: 8px; margin-top: 8px;
  background: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .18s, transform .18s, visibility .18s; z-index: 1030;
}
.nav-dd__menu::before { content: ''; position: absolute; left: 0; right: 0; top: -12px; height: 12px; } /* мостик для hover */
.nav-dd:hover .nav-dd__menu, .nav-dd:focus-within .nav-dd__menu { opacity: 1; visibility: visible; transform: none; }
.nav-menu .nav-dd__menu a.nav-dd__item {
  display: flex; flex-direction: column; gap: 1px; padding: 9px 12px; border-radius: 8px;
  color: var(--navy); font-size: 13.5px; font-weight: 700; letter-spacing: 0;
}
.nav-menu .nav-dd__menu a.nav-dd__item small { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.nav-menu .nav-dd__menu a.nav-dd__item:hover { background: var(--gray-light); color: var(--red); }
.nav-menu .nav-dd__menu a.nav-dd__all {
  display: flex; align-items: center; justify-content: space-between; margin-top: 4px; padding: 10px 12px;
  border-top: 1px solid var(--gray-mid); border-radius: 0 0 8px 8px; color: var(--red); font-size: 13px; font-weight: 800;
}
.nav-menu .nav-dd__menu a.nav-dd__all:hover { background: var(--red-light); color: var(--red-dark); }

/* Мобильное меню: подкатегории */
.mob-menu__nav li.mob-menu__sub a { padding-left: 36px !important; font-size: 13.5px !important; font-weight: 500 !important; color: rgba(255,255,255,.65) !important; }
.mob-menu__nav li.mob-menu__sub { border-bottom-color: rgba(255,255,255,.04); }

/* Футер: подкатегории */
.ft3-nav-link--sub { padding-left: 22px; font-size: 92%; opacity: .8; }

/* ── Главная: заголовок-ссылка и кнопка «Смотреть все» ── */
.section-title__link { color: inherit; transition: color var(--transition); }
.section-title__link:hover { color: var(--red); }
.btn-catalog-all {
  display: inline-flex; align-items: center; gap: 18px; padding: 14px 18px 14px 28px;
  border: 2px solid var(--navy); border-radius: var(--radius-md); color: var(--navy); background: #fff;
  text-align: left; transition: var(--transition);
}
.btn-catalog-all__text { display: flex; flex-direction: column; line-height: 1.25; }
.btn-catalog-all__label { font-size: 15px; font-weight: 800; letter-spacing: .2px; }
.btn-catalog-all__cat { font-size: 12px; font-weight: 600; color: var(--muted); transition: color var(--transition); }
.btn-catalog-all .bi {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--red); color: #fff; font-size: 18px; transition: transform var(--transition);
}
.btn-catalog-all:hover { background: var(--navy); color: #fff; box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn-catalog-all:hover .btn-catalog-all__cat { color: rgba(255,255,255,.65); }
.btn-catalog-all:hover .bi { transform: translateX(3px); }
.terminals-section .btn-catalog-all { background: transparent; border-color: rgba(255,255,255,.35); color: #fff; }
.terminals-section .btn-catalog-all__cat { color: rgba(255,255,255,.55); }
.terminals-section .btn-catalog-all:hover { background: #fff; color: var(--navy); }
.terminals-section .btn-catalog-all:hover .btn-catalog-all__cat { color: var(--muted); }

/* ── Страница каталога ── */
.catalog-page { background: linear-gradient(#f7f8fb, #fff 420px); }
.catalog-head { margin-bottom: 28px; max-width: 860px; }
.catalog-head__title { font-size: clamp(24px, 3.4vw, 38px); font-weight: 900; color: var(--navy); letter-spacing: -.5px; line-height: 1.12; margin: 0 0 10px; }
.catalog-head__intro { font-size: 15.5px; color: #4b5563; line-height: 1.6; margin: 0; }

/* Плитки категорий (/catalog) */
.cat-tile {
  position: relative; display: flex; flex-direction: column; height: 100%; overflow: hidden;
  background: #fff; border: 1px solid var(--gray-mid); border-radius: var(--radius-lg); transition: var(--transition);
}
.cat-tile:hover { border-color: transparent; box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.cat-tile__img { aspect-ratio: 16 / 10; background: var(--gray-light); display: grid; place-items: center; overflow: hidden; }
.cat-tile__img img { width: 100%; height: 100%; object-fit: contain; padding: 14px; transition: transform .4s; }
.cat-tile:hover .cat-tile__img img { transform: scale(1.04); }
.cat-tile__body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.cat-tile__name { font-size: 19px; font-weight: 800; color: var(--navy); margin: 0 0 6px; }
.cat-tile__desc { font-size: 13.5px; color: var(--muted); line-height: 1.5; margin: 0 0 14px; }
.cat-tile__meta { margin-top: auto; display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--muted); font-weight: 600; }
.cat-tile__price { color: var(--red); font-weight: 800; font-size: 15px; }
.cat-tile__arrow {
  position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; background: #fff; color: var(--red); box-shadow: var(--shadow-sm); transition: var(--transition);
}
.cat-tile:hover .cat-tile__arrow { background: var(--red); color: #fff; }

/* ── Фильтр ── */
.catalog-filter {
  position: sticky; top: 92px; background: #fff; border: 1px solid var(--gray-mid); border-radius: var(--radius-md);
  padding: 6px 18px 18px; max-height: calc(100vh - 110px); overflow-y: auto; scrollbar-width: thin;
}
.catalog-filter__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 0 6px; font-size: 16px; font-weight: 900; color: var(--navy); }
.catalog-filter__close { border: 0; background: var(--gray-light); width: 36px; height: 36px; border-radius: 50%; }
.cf-group { border-bottom: 1px solid var(--gray-mid); }
.cf-group:last-of-type { border-bottom: 0; }
.cf-group__title {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  padding: 13px 0; font-size: 13.5px; font-weight: 800; color: var(--navy); user-select: none;
}
.cf-group__title::-webkit-details-marker { display: none; }
.cf-group__title::after { content: '\F282'; font-family: 'bootstrap-icons'; font-size: 11px; color: var(--muted); transition: transform var(--transition); }
.cf-group[open] > .cf-group__title::after { transform: rotate(180deg); }
.cf-group__body { padding: 0 0 14px; }
.cf-group__hint { margin-top: 8px; font-size: 11.5px; color: var(--muted); line-height: 1.4; }

.cf-check { display: flex; align-items: center; gap: 10px; padding: 5px 0; cursor: pointer; font-size: 13.5px; color: var(--text); }
.cf-check input { position: absolute; opacity: 0; pointer-events: none; }
.cf-check__box {
  flex: 0 0 18px; height: 18px; border: 2px solid #cbd2dc; border-radius: 5px; background: #fff;
  display: grid; place-items: center; transition: var(--transition);
}
.cf-check__box::after { content: ''; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.cf-check input:checked + .cf-check__box { background: var(--red); border-color: var(--red); }
.cf-check input:checked + .cf-check__box::after { opacity: 1; }
.cf-check input:focus-visible + .cf-check__box { box-shadow: 0 0 0 3px rgba(218,42,52,.2); }
.cf-check:hover .cf-check__box { border-color: var(--red); }
.cf-check__label { flex: 1; line-height: 1.3; }
.cf-check__count { font-size: 11.5px; font-weight: 700; color: var(--muted); background: var(--gray-light); border-radius: 20px; padding: 1px 8px; }
.cf-check.is-disabled { opacity: .4; cursor: default; }
.cf-check.is-disabled:hover .cf-check__box { border-color: #cbd2dc; }

.cf-range { display: flex; align-items: center; gap: 8px; }
.cf-range__input {
  width: 100%; min-width: 0; padding: 9px 10px; font-size: 13.5px; border: 1.5px solid var(--gray-mid); border-radius: 8px;
  font-family: inherit; -moz-appearance: textfield;
}
.cf-range__input::-webkit-outer-spin-button, .cf-range__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cf-range__input:focus { outline: 0; border-color: var(--red); box-shadow: 0 0 0 3px rgba(218,42,52,.1); }
.cf-range__sep { color: var(--muted); }
.cf-actions { padding-top: 14px; }
.cf-reset { display: block; text-align: center; margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--muted); }
.cf-reset:hover { color: var(--red); }
.cf-empty { font-size: 13px; color: var(--muted); padding: 10px 0 0; }
/* С JS фильтр применяется сразу — кнопка нужна только в мобильной шторке */
@media (min-width: 992px) { .js-on .cf-submit { display: none; } }

/* Тулбар */
.catalog-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.catalog-toolbar__count { font-size: 14px; font-weight: 700; color: var(--muted); }
.catalog-toolbar__sort { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin: 0; }
.catalog-toolbar__sort .form-select { width: auto; font-weight: 600; border-radius: 8px; }

.cf-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.cf-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 8px 6px 12px; border-radius: 30px;
  background: var(--navy); color: #fff; font-size: 12.5px; font-weight: 600; transition: var(--transition);
}
.cf-chip:hover { background: var(--red); color: #fff; }
.cf-chip--reset { background: transparent; color: var(--muted); border: 1px solid var(--gray-mid); padding-right: 12px; }
.cf-chip--reset:hover { background: transparent; color: var(--red); border-color: var(--red); }

.catalog-results { transition: opacity .2s; min-height: 200px; }
.catalog-results.is-loading { opacity: .45; pointer-events: none; }
.catalog-results .product-card__name { font-size: 17px; }
.catalog-empty { text-align: center; padding: 56px 20px; background: #fff; border: 1px dashed #cbd2dc; border-radius: var(--radius-md); }
.catalog-empty .bi { font-size: 38px; color: #cbd2dc; }
.catalog-empty p { margin: 10px 0 16px; font-weight: 600; }

/* Мобильный фильтр — шторка */
.cf-toggle {
  display: inline-flex; align-items: center; gap: 8px; width: 100%; justify-content: center; padding: 12px;
  border: 1.5px solid var(--navy); border-radius: 10px; background: #fff; color: var(--navy); font-weight: 800; font-size: 14px;
}
.cf-toggle__badge { background: var(--red); color: #fff; border-radius: 20px; padding: 0 8px; font-size: 12px; }
@media (max-width: 991.98px) {
  .catalog-filter {
    position: fixed; top: 0; bottom: 0; left: 0; width: min(360px, 88vw); max-height: none; z-index: 1060;
    border-radius: 0 var(--radius-md) var(--radius-md) 0; border: 0; transform: translateX(-105%); transition: transform .28s cubic-bezier(.4,0,.2,1);
    padding-bottom: 24px;
  }
  .cf-backdrop { position: fixed; inset: 0; background: rgba(11,18,32,.5); z-index: 1055; opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
  body.cf-open { overflow: hidden; }
  body.cf-open .catalog-filter { transform: none; box-shadow: var(--shadow-lg); }
  body.cf-open .cf-backdrop { opacity: 1; visibility: visible; }
  .cf-actions { position: sticky; bottom: -24px; background: #fff; padding-bottom: 12px; }
}

/* ── SEO-текст, FAQ, другие категории ── */
.catalog-seo { background: #fff; border: 1px solid var(--gray-mid); border-radius: var(--radius-lg); padding: clamp(22px, 4vw, 40px); }
.catalog-seo h2 { font-size: clamp(20px, 2.6vw, 28px); font-weight: 900; color: var(--navy); margin: 0 0 14px; }
.catalog-seo h3 { font-size: 18px; font-weight: 800; color: var(--navy); margin: 24px 0 10px; }
.catalog-seo p, .catalog-seo li { font-size: 15px; line-height: 1.7; color: #374151; }
.catalog-seo ul { padding-left: 20px; }
.catalog-seo li { margin-bottom: 6px; }
.catalog-seo a { color: var(--red); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.catalog-seo__body > *:last-child { margin-bottom: 0; }

.catalog-faq__title, .catalog-other__title { font-size: clamp(20px, 2.6vw, 28px); font-weight: 900; color: var(--navy); margin-bottom: 18px; }
.catalog-faq__list { display: grid; gap: 10px; }
.faq-item { background: #fff; border: 1px solid var(--gray-mid); border-radius: var(--radius-md); transition: border-color var(--transition), box-shadow var(--transition); }
.faq-item[open] { border-color: transparent; box-shadow: var(--shadow-md); }
.faq-item__q {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 22px; font-size: 15.5px; font-weight: 800; color: var(--navy);
}
.faq-item__q::-webkit-details-marker { display: none; }
.faq-item__q::after {
  content: '+'; flex: 0 0 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gray-light); color: var(--red); font-size: 20px; font-weight: 600; transition: transform var(--transition), background var(--transition);
}
.faq-item[open] .faq-item__q::after { transform: rotate(45deg); background: var(--red-light); }
.faq-item__a { padding: 0 22px 20px; font-size: 14.5px; line-height: 1.7; color: #4b5563; }
.faq-item__a a { color: var(--red); }

.catalog-other__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.catalog-other__item {
  display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; background: #fff; border: 1px solid var(--gray-mid);
  border-radius: var(--radius-md); font-weight: 800; color: var(--navy); transition: var(--transition);
}
.catalog-other__item small { font-weight: 600; color: var(--muted); font-size: 12.5px; }
.catalog-other__item:hover { border-color: var(--red); color: var(--red); transform: translateY(-2px); }

/* ── Страница товара: характеристики ── */
.prod-chars { margin: 0; max-width: 760px; }
.prod-chars__row { display: flex; gap: 16px; padding: 11px 0; border-bottom: 1px dashed var(--gray-mid); font-size: 14.5px; }
.prod-chars__row dt { flex: 0 0 45%; font-weight: 600; color: var(--muted); }
.prod-chars__row dd { margin: 0; font-weight: 700; color: var(--navy); }
a.product-category-label:hover { color: var(--red-dark); text-decoration: underline; }
