/* ===== CATALOG PAGE ===== */

    .cat-hero__title {
      font-size: 32px;
      font-weight: 900;
      color: var(--text);
      margin: 24px 0 0;
      line-height: 1.15;
    }

    .cat-hero__lead {
      max-width: 720px;
      font-size: 15px;
      line-height: 1.65;
      color: var(--text-secondary, #555);
      margin: 12px 0 28px;
      padding-left: 16px;
      border-left: 3px solid var(--color-primary, #1B93D4);
    }
    .cat-hero__lead p {
      margin: 0;
    }

    /* --- Category tabs --- */
    .cat-tabs-wrap {
      border-bottom: 1px solid var(--border);
      background: var(--white);
      position: relative;
    }
    .cat-tabs-wrap .abl-scroll-hint {
      display: none;
    }
    @media (max-width: 1024px) {
      .cat-tabs-wrap .abl-scroll-hint {
        display: flex;
        position: absolute;
        right: 0; top: 0; bottom: 1px;
        width: 56px;
        background: linear-gradient(to right, transparent, var(--white) 70%);
        align-items: center;
        justify-content: flex-end;
        padding-right: 12px;
        pointer-events: none;
        z-index: 2;
        animation: abl-hint-pulse 1.5s ease-in-out 3;
      }
      .cat-tabs-wrap .abl-scroll-hint svg {
        width: 20px; height: 20px; color: var(--blue); opacity: .7;
      }
      .cat-tabs-wrap.abl-scrolled .abl-scroll-hint { display: none; }
      @keyframes abl-hint-pulse {
        0%, 100% { opacity: 1; }
        50% { opacity: .3; }
      }
    }
    .cat-tabs {
      display: flex;
      gap: 0;
      overflow-x: auto;
      scrollbar-width: none;
      -ms-overflow-style: none;
    }
    .cat-tabs::-webkit-scrollbar { display: none; }
    .cat-tab {
      flex-shrink: 0;
      padding: 14px 20px;
      font-size: 14px;
      font-weight: 600;
      color: var(--text-muted);
      border-bottom: 3px solid transparent;
      cursor: pointer;
      transition: color .2s, border-color .2s;
      white-space: nowrap;
      background: none;
    }
    .cat-tab:hover { color: var(--blue); }
    .cat-tab--active {
      color: var(--blue);
      border-bottom-color: var(--blue);
    }
    .cat-tab__count {
      font-size: 12px;
      font-weight: 500;
      color: var(--text-light);
      margin-left: 4px;
    }

    /* --- Subcategory chips --- */
    .cat-subcats-wrap {
      background: var(--gray-bg);
      border-bottom: 1px solid var(--border);
      display: none;
    }
    .cat-subcats-wrap--visible {
      display: block;
    }
    .cat-subcats {
      display: flex;
      gap: 8px;
      padding: 10px 0;
      overflow-x: auto;
      scrollbar-width: none;
      -ms-overflow-style: none;
    }
    .cat-subcats::-webkit-scrollbar { display: none; }
    .cat-subcat {
      flex-shrink: 0;
      padding: 5px 14px;
      font-size: 13px;
      font-weight: 500;
      color: var(--text-muted);
      background: var(--white);
      border: 1px solid var(--border);
      border-radius: 20px;
      cursor: pointer;
      transition: border-color .15s, color .15s, background .15s;
      white-space: nowrap;
    }
    .cat-subcat:hover { border-color: var(--blue); color: var(--blue); }
    .cat-subcat--active { background: var(--blue); border-color: var(--blue); color: var(--white); }

    /* --- Main layout --- */
    .cat-layout {
      display: grid;
      grid-template-columns: 280px 1fr;
      gap: 28px;
      padding: 28px 0 60px;
      align-items: start;
    }

    /* --- Sidebar --- */
    .cat-sidebar {
      background: var(--white);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      overflow: hidden;
      position: sticky;
      top: 60px;
    }
    .cat-sidebar__title {
      font-size: 13px;
      font-weight: 800;
      color: var(--text);
      padding: 16px 20px;
      border-bottom: 1px solid var(--border);
      text-transform: uppercase;
      letter-spacing: .5px;
    }
    .filter-group {
      border-bottom: 1px solid var(--border);
    }
    .filter-group:last-child { border-bottom: none; }
    .filter-group__toggle {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
      padding: 14px 20px;
      font-size: 13px;
      font-weight: 700;
      color: var(--text);
      background: none;
      cursor: pointer;
      text-align: left;
      transition: background .15s;
    }
    .filter-group__toggle:hover { background: var(--gray-bg); }
    .filter-group__arrow {
      width: 16px;
      height: 16px;
      flex-shrink: 0;
      transition: transform .2s;
      color: var(--text-light);
    }
    .filter-group--open .filter-group__arrow {
      transform: rotate(180deg);
    }
    .filter-group__body {
      display: none;
      padding: 4px 20px 16px;
    }
    .filter-group--open .filter-group__body {
      display: block;
    }
    .filter-check {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 5px 0;
      cursor: pointer;
      font-size: 13px;
      color: var(--text);
      line-height: 1.4;
    }
    .filter-check input[type="checkbox"] {
      width: 16px;
      height: 16px;
      accent-color: var(--blue);
      cursor: pointer;
      flex-shrink: 0;
    }
    .filter-check__text {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      flex: 1;
      min-width: 0;
    }
    .filter-check__count {
      color: var(--text-light);
      font-size: 11px;
      font-weight: 600;
      font-variant-numeric: tabular-nums;
    }
    /* Сгруппированный фильтр по направлениям */
    .filter-subgroup { margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border, #e3e9f3); }
    .filter-subgroup:last-child { border-bottom: 0; margin-bottom: 0; }
    .filter-check--dir { font-weight: 700; color: var(--text, #071a3d); }
    .filter-check--child { padding-left: 24px; font-size: 12.5px; color: var(--text-muted, #5b6778); }
    .filter-check--child span { position: relative; }
    .filter-radio {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 5px 0;
      cursor: pointer;
      font-size: 13px;
      color: var(--text);
    }
    .filter-radio input[type="radio"] {
      width: 16px;
      height: 16px;
      accent-color: var(--blue);
      cursor: pointer;
      flex-shrink: 0;
    }
    .filter-range {
      padding: 4px 0;
    }
    .filter-range__inputs {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      margin-bottom: 10px;
    }
    .filter-range__input {
      width: 100%;
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 8px 10px;
      font-size: 13px;
      color: var(--text);
      font-family: inherit;
      outline: none;
      transition: border-color .2s;
    }
    .filter-range__input:focus { border-color: var(--blue); }
    .filter-range__label {
      font-size: 12px;
      color: var(--text-light);
      margin-bottom: 8px;
      display: block;
    }

    /* --- Toolbar --- */
    .cat-toolbar {
      display: flex;
      align-items: center;
      gap: 16px;
      margin-bottom: 16px;
      flex-wrap: wrap;
    }
    .cat-sort {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .cat-sort__label {
      font-size: 13px;
      color: var(--text-muted);
      white-space: nowrap;
    }
    .cat-sort__select {
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 8px 12px;
      font-size: 13px;
      font-family: inherit;
      color: var(--text);
      background: var(--white);
      cursor: pointer;
      outline: none;
      transition: border-color .2s;
    }
    .cat-sort__select:focus { border-color: var(--blue); }
    .cat-count {
      font-size: 13px;
      color: var(--text-muted);
      margin-left: auto;
    }

    /* --- Active filter tags --- */
    .cat-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 16px;
      min-height: 0;
    }
    .cat-tags:empty { display: none; }
    .filter-tag {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: #e8f4fd;
      color: var(--blue);
      border: 1px solid rgba(27,147,212,.25);
      border-radius: 50px;
      padding: 5px 12px 5px 14px;
      font-size: 13px;
      font-weight: 600;
    }
    .filter-tag__remove {
      background: none;
      border: none;
      color: var(--blue);
      cursor: pointer;
      padding: 0;
      display: flex;
      align-items: center;
      line-height: 1;
      font-size: 16px;
    }
    .filter-tag__remove:hover { color: var(--red); }
    .filter-tags-reset {
      display: inline-flex;
      align-items: center;
      font-size: 13px;
      color: var(--red);
      font-weight: 600;
      cursor: pointer;
      background: none;
      border: none;
      padding: 5px 0;
      text-decoration: underline;
      text-underline-offset: 2px;
    }

    /* --- Product grid --- */
    .cat-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 16px;
    }
    .prod-card {
      background: var(--white);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      overflow: hidden;
      display: flex;
      flex-direction: column;
      transition: box-shadow .2s, transform .2s;
    }
    .prod-card:hover {
      box-shadow: 0 6px 24px rgba(0,0,0,.1);
      transform: translateY(-2px);
    }
    .prod-card__img-wrap {
      position: relative;
      aspect-ratio: 4/3;
      background: var(--gray-bg);
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .prod-card__img-wrap img {
      width: 100%;
      height: 100%;
      object-fit: contain;
    }
    .prod-card__img-wrap svg.prod-card__placeholder {
      width: 80px;
      height: 80px;
      opacity: .7;
    }
    .prod-card__badge {
      position: absolute;
      top: 10px;
      left: 10px;
      font-size: 11px;
      font-weight: 700;
      padding: 4px 10px;
      border-radius: 50px;
      text-transform: uppercase;
      letter-spacing: .3px;
    }
    .prod-card__badge--new { background: var(--blue); color: #fff; }
    .prod-card__badge--order { background: var(--navy); color: #fff; }
    .prod-card__badge--popular { background: var(--red); color: #fff; }
    .prod-card__body {
      padding: 16px;
      flex: 1;
      display: flex;
      flex-direction: column;
    }
    .prod-card__sku {
      font-size: 11px;
      color: var(--text-light);
      margin-bottom: 6px;
    }
    .prod-card__title {
      font-size: 14px;
      font-weight: 700;
      color: var(--text);
      line-height: 1.4;
      margin-bottom: 12px;
      display: block;
      transition: color .2s;
    }
    .prod-card__title:hover { color: var(--blue); }
    .prod-card__params {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 5px;
      margin-bottom: 16px;
      flex: 1;
    }
    .prod-card__params li,
    .prod-card__param {
      font-size: 12px;
      color: var(--text-muted);
      line-height: 1.4;
      display: flex;
      align-items: baseline;
      gap: 6px;
      /* Характеристики бывают длинные («Центробежный, назад-наклонные лопатки») —
         держим карточки одной высоты, полный текст остаётся в title. */
      white-space: nowrap;
    }
    .prod-card__param-label { flex: none; }
    .prod-card__params li strong,
    .prod-card__param strong {
      color: var(--text);
      font-weight: 600;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      min-width: 0;
    }
    .prod-card__footer {
      margin-top: auto;
      padding-top: 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      border-top: 1px solid var(--border, #e8ecf0);
    }
    .prod-card__price {
      font-size: 15px;
      font-weight: 700;
      color: var(--text);
      white-space: nowrap;
    }
    /* Нет цены — вместо мёртвой надписи «Цена по запросу» даём кнопку запроса. */
    .prod-card__price-btn {
      padding: 0;
      border: 0;
      background: none;
      font-family: inherit;
      font-size: 15px;
      font-weight: 700;
      color: var(--blue);
      white-space: nowrap;
      cursor: pointer;
      text-decoration: underline;
      text-decoration-style: dashed;
      text-underline-offset: 4px;
      transition: color .2s;
    }
    .prod-card__price-btn:hover { color: var(--navy); }
    .prod-card__btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 10px 22px;
      font-size: 13px;
      font-weight: 700;
      border-radius: 8px;
      background: var(--blue);
      color: #fff;
      cursor: pointer;
      transition: background .2s;
      text-decoration: none;
      white-space: nowrap;
    }
    .prod-card__btn:hover { background: #1580be; }

    /* --- Empty state --- */
    .cat-empty {
      display: none;
      text-align: center;
      padding: 60px 20px;
      color: var(--text-muted);
      grid-column: 1 / -1;
    }
    .cat-empty__icon {
      font-size: 48px;
      margin-bottom: 16px;
      display: block;
    }
    .cat-empty h3 { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
    .cat-empty p { font-size: 14px; margin-bottom: 20px; line-height: 1.6; }

    /* --- Pagination --- */
    .cat-pagination {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      margin-top: 32px;
    }
    .cat-page-btn {
      min-width: 40px;
      height: 40px;
      display: flex;
      align-items: center;
      justify-content: center;
      border: 1px solid var(--border);
      border-radius: 8px;
      font-size: 14px;
      font-weight: 600;
      color: var(--text);
      background: var(--white);
      cursor: pointer;
      transition: border-color .2s, background .2s, color .2s;
    }
    .cat-page-btn:hover { border-color: var(--blue); color: var(--blue); }
    .cat-page-btn--active { background: var(--blue); border-color: var(--blue); color: #fff; }
    .cat-page-btn--arrow { font-size: 16px; }

    /* --- Catalog SEO layout with TOC --- */
    .cat-seo-section { padding: 48px 0 64px; }

    .cat-seo-layout {
      display: grid;
      grid-template-columns: 220px 1fr;
      gap: 40px;
      align-items: start;
    }
    /* Без оглавления (мало H2) — текст на всю ширину, без карточки-скролла */
    .cat-seo-layout--single { grid-template-columns: 1fr; }
    .cat-seo-layout--single .cat-seo-content__inner {
      max-height: none;
      overflow: visible;
      border: 0;
      padding: 0;
      background: transparent;
    }
    .cat-seo-layout--single .cat-seo-toggle { display: none; }

    /* --- TOC sidebar --- */
    .cat-seo-toc {
      position: sticky;
      top: 100px;
      max-height: calc(100vh - 120px);
      overflow-y: auto;
      padding-right: 8px;
    }
    .cat-seo-toc__title {
      font-size: 13px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--text-muted);
      margin-bottom: 12px;
      padding-left: 12px;
    }
    .cat-seo-toc__list {
      list-style: none;
      margin: 0;
      padding: 0;
    }
    .cat-seo-toc__list li {
      margin-bottom: 2px;
    }
    .cat-seo-toc__list a {
      display: block;
      padding: 6px 12px;
      font-size: 13px;
      line-height: 1.4;
      color: var(--text-muted);
      text-decoration: none;
      border-left: 2px solid transparent;
      border-radius: 0 6px 6px 0;
      transition: all 0.2s;
    }
    .cat-seo-toc__list a:hover {
      color: var(--blue);
      background: rgba(27, 147, 212, 0.06);
    }
    .cat-seo-toc__list a.active {
      color: var(--blue);
      border-left-color: var(--blue);
      font-weight: 600;
      background: rgba(27, 147, 212, 0.08);
    }

    /* --- SEO content styles --- */
    .cat-seo-content {
      min-width: 0;
      position: relative;
    }
    .cat-seo-content__inner {
      line-height: 1.75;
      font-size: 15px;
      color: var(--text-muted);
      max-height: 70vh;
      overflow-y: auto;
      padding-right: 16px;
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 32px 28px;
      background: #fff;
    }
    .cat-seo-content__inner::-webkit-scrollbar {
      width: 5px;
    }
    .cat-seo-content__inner::-webkit-scrollbar-track {
      background: transparent;
    }
    .cat-seo-content__inner::-webkit-scrollbar-thumb {
      background: var(--border);
      border-radius: 4px;
    }
    .cat-seo-content__inner::-webkit-scrollbar-thumb:hover {
      background: #aaa;
    }

    .cat-seo-content__inner h2 {
      color: var(--text);
      font-size: 22px;
      font-weight: 700;
      margin: 40px 0 16px;
      padding-top: 16px;
      scroll-margin-top: 100px;
    }
    .cat-seo-content__inner h2:first-child {
      margin-top: 0;
      padding-top: 0;
    }
    .cat-seo-content__inner h3 {
      color: var(--text);
      font-size: 17px;
      font-weight: 600;
      margin: 28px 0 12px;
    }
    .cat-seo-content__inner p {
      margin: 0 0 14px;
    }
    .cat-seo-content__inner ul,
    .cat-seo-content__inner ol {
      margin: 0 0 16px;
      padding-left: 24px;
    }
    .cat-seo-content__inner li {
      margin-bottom: 6px;
    }
    .cat-seo-content__inner strong {
      color: var(--text);
      font-weight: 600;
    }
    .cat-seo-content__inner blockquote {
      border-left: 3px solid var(--blue);
      margin: 24px 0;
      padding: 16px 20px;
      background: rgba(27, 147, 212, 0.04);
      border-radius: 0 8px 8px 0;
      font-style: italic;
      color: var(--text);
    }
    .cat-seo-content__inner table {
      width: 100%;
      border-collapse: collapse;
      margin: 20px 0;
      font-size: 14px;
    }
    .cat-seo-content__inner th,
    .cat-seo-content__inner td {
      border: 1px solid var(--border);
      padding: 10px 14px;
      text-align: left;
    }
    .cat-seo-content__inner th {
      background: var(--bg-light, #f7f8fa);
      font-weight: 600;
      color: var(--text);
    }
    .cat-seo-content__inner tr:nth-child(even) {
      background: var(--bg-light, #f7f8fa);
    }

    /* Toggle hidden — using scroll container instead */
    .cat-seo-toggle { display: none; }

    /* --- CTA links inside SEO text (styled as buttons) --- */
    .cat-seo-content__inner a[target="_blank"],
    .cat-seo-content__inner a.abl-seo-cta {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 10px 20px;
      margin: 8px 4px 8px 0;
      background: var(--blue);
      color: #fff;
      font-size: 14px;
      font-weight: 600;
      text-decoration: none;
      border-radius: 8px;
      transition: background 0.2s, transform 0.15s;
    }
    .cat-seo-content__inner a[target="_blank"]:hover,
    .cat-seo-content__inner a.abl-seo-cta:hover {
      background: var(--blue-dark, #1578b0);
      transform: translateY(-1px);
    }
    .cat-seo-content__inner a[target="_blank"][href*="docs.cntd.ru"],
    .cat-seo-content__inner a[target="_blank"][href*="/sotrudniki/"],
    .cat-seo-content__inner a[target="_blank"][href*="/contacts/"],
    .cat-seo-content__inner a[target="_blank"][href*="/privacy-policy/"] {
      background: none;
      color: var(--blue);
      padding: 0;
      margin: 0;
      font-weight: 400;
      display: inline;
      border-radius: 0;
      text-decoration: underline;
    }
    .cat-seo-content__inner a[target="_blank"][href*="docs.cntd.ru"]:hover,
    .cat-seo-content__inner a[target="_blank"][href*="/sotrudniki/"]:hover,
    .cat-seo-content__inner a[target="_blank"][href*="/contacts/"]:hover,
    .cat-seo-content__inner a[target="_blank"][href*="/privacy-policy/"]:hover {
      transform: none;
      color: var(--blue-dark, #1578b0);
    }

    /* --- Mobile: TOC hidden, full width --- */
    @media (max-width: 1024px) {
      .cat-seo-layout {
        grid-template-columns: 1fr;
        gap: 0;
      }
      .cat-seo-toc { display: none; }
    }
    @media (max-width: 640px) {
      .cat-seo-content__inner h2 { font-size: 19px; }
      .cat-seo-content__inner { font-size: 14px; max-height: 60vh; padding: 20px 16px; }
      .cat-seo-section { padding: 32px 0 40px; }
    }

    /* --- Table mobile scroll --- */
    @media (max-width: 768px) {
      .cat-seo-content__inner table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
      }
    }

    /* --- Mobile filter button --- */
    .mobile-filter-bar {
      display: none;
      position: sticky;
      top: 56px;
      z-index: 50;
      background: var(--white);
      border-bottom: 1px solid var(--border);
      padding: 10px 16px;
      gap: 10px;
    }
    .mobile-filter-btn {
      display: flex;
      align-items: center;
      gap: 8px;
      background: var(--navy);
      color: var(--white);
      border: none;
      border-radius: 8px;
      padding: 10px 18px;
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      transition: background .2s;
    }
    .mobile-filter-btn:hover { background: #162a48; }
    .mobile-filter-btn__count {
      background: var(--blue);
      border-radius: 50px;
      padding: 2px 8px;
      font-size: 12px;
      min-width: 20px;
      text-align: center;
    }

    /* --- Bottom sheet --- */
    .bs-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,.5);
      z-index: 200;
      opacity: 0;
      pointer-events: none;
      transition: opacity .3s;
    }
    .bs-overlay--open {
      opacity: 1;
      pointer-events: auto;
    }
    .bottom-sheet {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      background: var(--white);
      border-radius: 20px 20px 0 0;
      z-index: 201;
      max-height: 82vh;
      display: flex;
      flex-direction: column;
      transform: translateY(100%);
      transition: transform .3s cubic-bezier(.25,.8,.25,1);
    }
    .bottom-sheet--open { transform: translateY(0); }
    .bs-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16px 20px;
      border-bottom: 1px solid var(--border);
      flex-shrink: 0;
    }
    .bs-header__title { font-size: 16px; font-weight: 800; }
    .bs-header__close {
      background: none;
      border: none;
      font-size: 24px;
      cursor: pointer;
      color: var(--text-muted);
      line-height: 1;
      padding: 4px;
    }
    .bs-body {
      overflow-y: auto;
      flex: 1;
      padding: 0 0 16px;
    }
    .bs-footer {
      padding: 16px 20px;
      border-top: 1px solid var(--border);
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      flex-shrink: 0;
    }
    .bs-reset-btn {
      padding: 12px;
      border: 1px solid var(--border);
      border-radius: 10px;
      font-size: 14px;
      font-weight: 700;
      color: var(--text);
      background: var(--white);
      cursor: pointer;
    }
    .bs-apply-btn {
      padding: 12px;
      border: none;
      border-radius: 10px;
      font-size: 14px;
      font-weight: 700;
      color: var(--white);
      background: var(--blue);
      cursor: pointer;
      transition: background .2s;
    }
    .bs-apply-btn:hover { background: var(--blue-dark); }

    /* --- Modal --- */
    .modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,.55);
      z-index: 300;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 16px;
      opacity: 0;
      pointer-events: none;
      transition: opacity .25s;
    }
    .modal-overlay--open {
      opacity: 1;
      pointer-events: auto;
    }
    .modal {
      background: var(--white);
      border-radius: 20px;
      width: 100%;
      max-width: 520px;
      max-height: 90vh;
      overflow-y: auto;
      transform: translateY(16px) scale(.97);
      transition: transform .25s;
    }
    .modal-overlay--open .modal { transform: translateY(0) scale(1); }
    .modal__header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      padding: 24px 28px 0;
      gap: 12px;
    }
    .modal__title {
      font-size: 20px;
      font-weight: 800;
      color: var(--text);
      line-height: 1.3;
    }
    .modal__product {
      font-size: 13px;
      color: var(--blue);
      font-weight: 600;
      margin-top: 4px;
    }
    .modal__close {
      background: var(--gray-bg);
      border: none;
      border-radius: 50%;
      width: 36px;
      height: 36px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      flex-shrink: 0;
      font-size: 18px;
      color: var(--text-muted);
      transition: background .2s;
    }
    .modal__close:hover { background: var(--border); }
    .modal__body {
      padding: 20px 28px 28px;
    }
    .modal__divider {
      height: 1px;
      background: var(--border);
      margin: 16px 0 20px;
    }
    .mf-group {
      margin-bottom: 16px;
    }
    .mf-group label {
      display: block;
      font-size: 12px;
      font-weight: 700;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: .4px;
      margin-bottom: 7px;
    }
    .mf-group input,
    .mf-group textarea {
      width: 100%;
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 12px 14px;
      font-size: 15px;
      font-family: inherit;
      color: var(--text);
      outline: none;
      transition: border-color .2s;
    }
    .mf-group input:focus,
    .mf-group textarea:focus { border-color: var(--blue); }
    .mf-group input::placeholder,
    .mf-group textarea::placeholder { color: #bbb; }
    .mf-group textarea { resize: none; height: 88px; }
    .mf-group--error input,
    .mf-group--error textarea { border-color: var(--red); }
    .mf-error-msg {
      display: none;
      font-size: 12px;
      color: var(--red);
      margin-top: 5px;
    }
    .mf-group--error .mf-error-msg { display: block; }
    .mf-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
    }
    .mf-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      flex-wrap: wrap;
      margin-top: 20px;
    }
    .mf-agree {
      font-size: 12px;
      color: var(--text-light);
      line-height: 1.5;
      max-width: 280px;
    }
    .mf-agree a { color: var(--blue); text-decoration: underline; }
    .mf-submit {
      background: var(--red);
      color: var(--white);
      border: none;
      border-radius: 10px;
      padding: 14px 32px;
      font-size: 15px;
      font-weight: 700;
      cursor: pointer;
      transition: background .2s;
      min-height: 50px;
    }
    .mf-submit:hover { background: var(--red-dark); }
    .modal__success {
      display: none;
      text-align: center;
      padding: 40px 28px;
    }
    .modal__success-icon {
      width: 64px;
      height: 64px;
      background: #e6f9ee;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto 20px;
      font-size: 28px;
    }
    .modal__success-title {
      font-size: 22px;
      font-weight: 800;
      color: var(--text);
      margin-bottom: 10px;
    }
    .modal__success-text {
      font-size: 15px;
      color: var(--text-muted);
      line-height: 1.6;
      margin-bottom: 24px;
    }
    .modal__success-close {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 12px 36px;
      background: var(--blue);
      color: var(--white);
      border: none;
      border-radius: 10px;
      font-size: 15px;
      font-weight: 700;
      cursor: pointer;
      transition: background .2s;
    }
    .modal__success-close:hover { background: var(--blue-dark); }

    /* ===== MEGA MENU ===== */
    .main-nav { position: relative; }
    .mega-wrap {
      position: static; cursor: default;
      display: flex; align-items: center;
    }
    .mega-wrap > span {
      display: flex; align-items: center; gap: 6px; cursor: pointer;
      padding: 16px 20px; font-size: 14px; font-weight: 600; color: var(--white);
      white-space: nowrap; transition: background .2s; line-height: 1;
      user-select: none;
    }
    .mega-wrap:hover > span { background: rgba(0,0,0,.2); }
    .mega-menu {
      position: absolute; top: 100%; left: 0; right: 0;
      background: #fff; border-top: 3px solid var(--blue);
      box-shadow: 0 10px 36px rgba(0,0,0,.18); z-index: 300;
      display: none;
    }
    .mega-wrap:hover .mega-menu { display: block; }
    .mega-menu__inner {
      max-width: var(--container); margin: 0 auto; padding: 0 40px;
      display: flex; min-height: 320px;
    }
    .mega-cats {
      width: 250px; flex-shrink: 0;
      border-right: 1px solid var(--border);
      padding: 16px 0;
    }
    .mega-cat {
      display: flex; align-items: center; gap: 12px;
      padding: 12px 16px; margin: 2px 8px;
      font-size: 14px; font-weight: 600; color: var(--text);
      cursor: pointer; border-radius: 6px; transition: background .15s;
    }
    .mega-cat:hover { background: var(--gray-bg); }
    .mega-cat--active { background: var(--blue); color: #fff; }
    .mega-cat__ico { width: 26px; height: 26px; flex-shrink: 0; color: var(--blue); }
    .mega-cat--active .mega-cat__ico { color: #fff; }
    .mega-panels { flex: 1; padding: 0; }
    .mega-panel {
      display: none; padding: 24px 28px;
      columns: 2; column-gap: 36px;
    }
    .mega-panel--active { display: block; }
    .mega-group { break-inside: avoid; margin-bottom: 20px; }
    .mega-group__title {
      font-size: 13px; font-weight: 800; color: var(--text);
      padding-left: 10px; border-left: 3px solid var(--blue);
      margin-bottom: 8px; line-height: 1.4;
    }
    .mega-group a {
      display: block; font-size: 13px; color: var(--text);
      padding: 3px 0; text-decoration: underline;
    }
    .mega-group a:hover { color: var(--blue); }

    .cat-content { min-width: 0; }

    /* --- Sidebar close button --- */
    .cat-sidebar__close {
      display: none;
      position: absolute;
      top: 12px;
      right: 12px;
      width: 36px;
      height: 36px;
      border-radius: 50%;
      border: none;
      background: var(--gray-bg);
      font-size: 22px;
      line-height: 1;
      color: var(--text-muted);
      cursor: pointer;
      z-index: 2;
      align-items: center;
      justify-content: center;
      transition: background .2s;
    }
    .cat-sidebar__close:hover { background: var(--border); }

    /* --- Sidebar overlay --- */
    .cat-sidebar-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,.5);
      z-index: 249;
      opacity: 0;
      pointer-events: none;
      transition: opacity .3s;
    }
    .cat-sidebar-overlay--open {
      opacity: 1;
      pointer-events: auto;
    }

    /* --- Mobile sidebar open state --- */
    @media (max-width: 960px) {
      .cat-sidebar {
        position: relative;
      }
      .cat-sidebar--open {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 300px;
        max-width: 85vw;
        z-index: 250;
        overflow-y: auto;
        border-radius: 0;
        animation: abl-sidebar-slide .3s ease-out;
      }
      .cat-sidebar--open .cat-sidebar__close {
        display: flex;
      }
      .body--filters-open { overflow: hidden; }

      @keyframes abl-sidebar-slide {
        from { transform: translateX(-100%); }
        to { transform: translateX(0); }
      }
    }

    /* --- Responsive --- */
    @media (max-width: 1100px) {
      .cat-grid { grid-template-columns: repeat(2, 1fr); }
    }
    @media (max-width: 960px) {
      .cat-layout { grid-template-columns: 1fr; }
      .cat-sidebar { display: none; position: static; }
      .mobile-filter-bar { display: flex; }
      .cat-hero__title { font-size: 26px; }
    }
    @media (max-width: 640px) {
      .cat-grid { grid-template-columns: 1fr; }
      .cat-hero__title { font-size: 22px; }
      .site-main > .section--white .seo-text { padding: 24px 20px; }
      .cat-tabs-wrap .container { padding: 0 16px; }
      .mf-row { grid-template-columns: 1fr; }
      .mf-footer { flex-direction: column-reverse; align-items: stretch; }
      .mf-agree { max-width: none; }
      .cat-cards-grid { grid-template-columns: 1fr 1fr; }
    }

    /* Direction cards — styles moved to main.css (global, used on home + catalog) */

    /* ===== CATEGORY CARDS ===== */
    .cat-cards-section {
      padding: 24px 0 8px;
    }
    .cat-cards-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 16px;
    }
    .cat-card {
      background: var(--white);
      border: 1px solid var(--border);
      border-radius: 16px;
      overflow: hidden;
      text-decoration: none;
      color: var(--text);
      display: flex;
      flex-direction: column;
      transition: border-color .25s, box-shadow .25s, transform .25s;
    }
    .cat-card:hover {
      border-color: var(--blue);
      box-shadow: 0 12px 32px rgba(13,30,55,.14);
      transform: translateY(-3px);
    }

    /* Слот 16:9 — ровно пропорция плиток. Раньше он был 2:1 при разнобое
       исходников от 0.58 до 2.05, и object-fit: cover резал изделия по живому:
       у вертикальных агрегатов оставалась полоска из середины корпуса. */
    .cat-card__img {
      position: relative;
      aspect-ratio: 16 / 9;
      overflow: hidden;
      background: #dfe4ea;
      flex-shrink: 0;
    }
    .cat-card__img img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      transition: transform .5s cubic-bezier(.2,.6,.2,1);
    }
    .cat-card:hover .cat-card__img img {
      transform: scale(1.06);
    }
    /* Мягкое затемнение к низу кадра — плитка «садится» на подпись,
       а не выглядит наклейкой поверх белого. */
    .cat-card__img::after {
      content: '';
      position: absolute;
      inset: auto 0 0 0;
      height: 42%;
      background: linear-gradient(to bottom, rgba(13,30,55,0), rgba(13,30,55,.28));
      pointer-events: none;
    }
    .cat-card__placeholder {
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-muted);
      opacity: .3;
    }

    .cat-card__body {
      padding: 15px 17px 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      flex: 1;
    }
    .cat-card__name {
      font-size: 14.5px;
      font-weight: 700;
      line-height: 1.35;
      letter-spacing: -.1px;
      transition: color .2s;
    }
    .cat-card:hover .cat-card__name { color: var(--blue); }

    .cat-card__count {
      flex-shrink: 0;
      background: #eef3f9;
      color: #0d2c5b;
      font-size: 12px;
      font-weight: 800;
      min-width: 28px;
      height: 28px;
      padding: 0 8px;
      border-radius: 999px;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background .2s, color .2s;
    }
    .cat-card:hover .cat-card__count {
      background: var(--blue);
      color: #fff;
    }

    @media (max-width: 1024px) {
      .cat-cards-grid { grid-template-columns: repeat(3, 1fr); }
    }
    @media (max-width: 768px) {
      .cat-cards-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
      .cat-card__name { font-size: 13.5px; }
    }

    /* ===== PRODUCTION BANNER ===== */
    .cat-banner {
      padding: 0 0 24px;
    }
    .cat-banner__inner {
      display: flex;
      align-items: center;
      gap: 20px;
      background: linear-gradient(135deg, var(--navy) 0%, #1a3a5c 100%);
      color: var(--white);
      border-radius: var(--radius-lg);
      padding: 24px 32px;
    }
    .cat-banner__icon {
      flex-shrink: 0;
      color: var(--blue);
    }
    .cat-banner__text {
      flex: 1;
      font-size: 15px;
      line-height: 1.5;
    }
    .cat-banner__text strong {
      font-size: 16px;
    }
    .cat-banner__btn {
      flex-shrink: 0;
      white-space: nowrap;
    }
    @media (max-width: 768px) {
      .cat-banner__inner { flex-direction: column; text-align: center; padding: 20px; }
      .cat-banner__icon { display: none; }
    }

    /* ===== CATEGORY HERO DESCRIPTION ===== */
    .cat-hero__desc {
      max-width: 800px;
      margin-top: 12px;
      font-size: 15px;
      line-height: 1.6;
      color: var(--text-muted);
    }
    .cat-hero__desc p { margin: 0; }

    /* ===== RELATED SERVICES ===== */
    .abl-related-services {
      padding: 48px 0;
      background: var(--gray-bg);
    }
    .abl-related-services__title {
      font-size: 24px;
      font-weight: 700;
      margin: 0 0 24px;
    }
    .abl-related-services__grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
      gap: 16px;
    }
    .abl-related-services__card {
      display: flex;
      flex-direction: column;
      background: var(--white);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      overflow: hidden;
      text-decoration: none;
      color: var(--text);
      transition: border-color .2s, box-shadow .2s;
    }
    .abl-related-services__card:hover {
      border-color: var(--blue);
      box-shadow: 0 4px 16px rgba(27,147,212,.1);
    }
    .abl-related-services__card img {
      width: 100%;
      height: 140px;
      object-fit: cover;
    }
    .abl-related-services__name {
      padding: 14px 16px;
      font-size: 15px;
      font-weight: 600;
      line-height: 1.3;
    }
    @media (max-width: 768px) {
      .abl-related-services { padding: 32px 0; }
      .abl-related-services__grid { grid-template-columns: 1fr 1fr; gap: 12px; }
      .abl-related-services__card img { height: 100px; }
      .abl-related-services__name { padding: 10px 12px; font-size: 14px; }
    }
    /* ===== CUSTOM MANUFACTURING (Нестандартные изделия) ===== */
    .cm-section { padding: 48px 0; }
    .cm-section--gray { background: var(--gray-bg, #f2f4f7); }
    .cm-h2 { font-size: 28px; font-weight: 800; color: var(--text, #071a3d); line-height: 1.2; margin: 0 0 14px; }
    .cm-lead { font-size: 15.5px; color: var(--text-muted, #5b6778); line-height: 1.65; max-width: 760px; margin: 0 0 28px; }
    .cm-caps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
    .cm-cap { background: #fff; border: 1px solid var(--border, #e3e9f3); border-radius: 16px; padding: 24px 22px; transition: box-shadow .2s, transform .2s; }
    .cm-cap:hover { box-shadow: 0 12px 30px rgba(7,26,61,.08); transform: translateY(-2px); }
    .cm-cap__icon { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 14px; background: #eaf2fb; color: var(--blue, #1B93D4); margin-bottom: 16px; }
    .cm-cap__title { font-size: 16px; font-weight: 800; color: var(--text, #071a3d); margin: 0 0 8px; line-height: 1.3; }
    .cm-cap__text { font-size: 13.5px; color: var(--text-muted, #5b6778); line-height: 1.6; margin: 0; }

    .cm-prod { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
    .cm-prod__media img { width: 100%; height: 100%; max-height: 420px; object-fit: cover; border-radius: 18px; }
    .cm-tag { display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--blue, #1B93D4); background: #eaf2fb; padding: 6px 14px; border-radius: 999px; margin-bottom: 14px; }
    .cm-materials { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
    .cm-mat { display: flex; flex-direction: column; gap: 3px; background: #fff; border: 1px solid var(--border, #e3e9f3); border-radius: 12px; padding: 14px 16px; }
    .cm-mat__v { font-size: 14.5px; font-weight: 700; color: var(--text, #071a3d); }
    .cm-mat__s { font-size: 12.5px; color: var(--text-muted, #5b6778); }

    .cm-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
    .cm-step { position: relative; padding: 26px 22px 22px; background: #fff; border: 1px solid var(--border, #e3e9f3); border-radius: 16px; }
    .cm-step__n { font-size: 30px; font-weight: 900; color: #d5e3f5; line-height: 1; }
    .cm-step__t { font-size: 16px; font-weight: 800; color: var(--text, #071a3d); margin: 12px 0 8px; }
    .cm-step__d { font-size: 13px; color: var(--text-muted, #5b6778); line-height: 1.6; margin: 0; }

    @media (max-width: 900px) {
      .cm-caps, .cm-steps { grid-template-columns: 1fr 1fr; }
      .cm-prod { grid-template-columns: 1fr; }
    }
    @media (max-width: 560px) {
      .cm-caps, .cm-steps, .cm-materials { grid-template-columns: 1fr; }
    }

    /* ===== FAMILY MODEL GUIDE ===== */
    .catalog-family-guide {
      margin: 16px 0 34px;
    }
    .catalog-family-guide > .container {
      padding-top: 30px;
      padding-bottom: 28px;
      border: 1px solid #dbe5ed;
      border-radius: 22px;
      background: linear-gradient(145deg, #f8fbfd 0%, #eef7fb 100%);
      box-shadow: 0 18px 50px rgba(12, 47, 70, .07);
    }
    .catalog-family-guide__head {
      display: grid;
      grid-template-columns: minmax(0, 1.05fr) minmax(300px, .75fr);
      gap: 28px;
      align-items: end;
      padding: 0 28px 22px;
    }
    .catalog-family-guide__kicker {
      margin: 0 0 8px;
      color: #0874aa;
      font-size: 10px;
      font-weight: 850;
      letter-spacing: .14em;
      text-transform: uppercase;
    }
    .catalog-family-guide__head h2 {
      max-width: 680px;
      margin: 0;
      color: #092236;
      font-size: clamp(25px, 3vw, 38px);
      font-weight: 850;
      letter-spacing: -.035em;
      line-height: 1.12;
    }
    .catalog-family-guide__head > p {
      margin: 0;
      color: #506675;
      font-size: 13px;
      line-height: 1.65;
    }
    .catalog-family-guide__table-wrap {
      max-width: 100%;
      overflow-x: auto;
      border-top: 1px solid #dbe5ed;
      border-bottom: 1px solid #dbe5ed;
      background: #fff;
      scrollbar-color: #7cbddc #edf5f8;
      scrollbar-width: thin;
    }
    .catalog-family-guide__table-wrap:focus-visible {
      outline: 3px solid rgba(27, 147, 212, .45);
      outline-offset: 3px;
    }
    .catalog-family-guide__table {
      width: 100%;
      min-width: 760px;
      border-collapse: collapse;
    }
    .catalog-family-guide__table th,
    .catalog-family-guide__table td {
      padding: 14px 18px;
      border-bottom: 1px solid #e5edf2;
      color: #203a4c;
      font-size: 13px;
      line-height: 1.4;
      text-align: left;
      vertical-align: middle;
    }
    .catalog-family-guide__table thead th {
      color: #6a7e8d;
      background: #f7fafc;
      font-size: 9px;
      font-weight: 850;
      letter-spacing: .1em;
      text-transform: uppercase;
    }
    .catalog-family-guide__table tbody tr:last-child > * { border-bottom: 0; }
    .catalog-family-guide__table tbody tr:hover > * { background: #f7fbfd; }
    .catalog-family-guide__table tbody th { min-width: 230px; font-weight: 750; }
    .catalog-family-guide__table tbody th a { color: #0a6592; text-decoration: none; }
    .catalog-family-guide__table tbody th a:hover { color: #1598dc; }
    .catalog-family-guide__table tbody th span {
      display: block;
      max-width: 290px;
      margin-top: 3px;
      color: #7b8d99;
      font-size: 10px;
      font-weight: 550;
    }
    .catalog-family-guide__status {
      display: inline-flex;
      min-height: 30px;
      align-items: center;
      padding: 6px 10px;
      border: 1px solid #bedce9;
      border-radius: 999px;
      color: #176889;
      background: #ecf8fc;
      font-size: 10px;
      font-weight: 780;
      white-space: nowrap;
    }
    .catalog-family-guide__footer {
      display: flex;
      gap: 24px;
      align-items: center;
      justify-content: space-between;
      padding: 22px 28px 0;
    }
    .catalog-family-guide__footer p {
      max-width: 700px;
      margin: 0;
      color: #506675;
      font-size: 13px;
      line-height: 1.55;
    }
    .catalog-family-guide__footer strong { color: #15364b; }
    .catalog-family-guide__footer .btn { min-height: 46px; white-space: nowrap; }

    @media (max-width: 820px) {
      .catalog-family-guide > .container { padding-inline: 0; border-radius: 18px; }
      .catalog-family-guide__head { grid-template-columns: 1fr; padding-inline: 20px; }
      .catalog-family-guide__footer { align-items: stretch; flex-direction: column; padding-inline: 20px; }
      .catalog-family-guide__footer .btn { width: 100%; }
    }
    @media (max-width: 560px) {
      .catalog-family-guide { margin-top: 6px; }
      .catalog-family-guide > .container { padding-top: 24px; padding-bottom: 22px; }
      .catalog-family-guide__head h2 { font-size: 27px; }
      .catalog-family-guide__table th,
      .catalog-family-guide__table td { padding: 12px 14px; font-size: 12px; }
      .catalog-family-guide__table tbody th a {
        display: inline-flex;
        align-items: center;
        min-width: 44px;
        min-height: 44px;
      }
    }
