/* Шапка раздела каталога над списком (шаблон product/category_top.twig, данные PortitCatLanding::top), 28.11.2026 */

.portit-cattop {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 28px;
  margin: 0 0 14px;
  padding: 16px 20px;
  border: 1px solid #e6e9ee;
  border-radius: 12px;
  background: #fff;
}

.portit-cattop-main {
  min-width: 0;
}

.portit-cattop-h1 {
  margin: 0;
  color: #1a2430;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.01em;
}

.portit-cattop-lead {
  max-width: 760px;
  margin: 6px 0 0;
  color: #5b6773;
  font-size: 14px;
  line-height: 1.5;
}

.portit-cattop-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin: 11px 0 0;
  padding: 0;
  list-style: none;
}

.portit-cattop-facts li {
  padding: 5px 11px;
  border-radius: 8px;
  background: var(--portit-heading-bg, #f1f5f5);
  color: #5b6773;
  font-size: 12.5px;
  line-height: 1.3;
  white-space: nowrap;
}

.portit-cattop-facts b {
  color: #1a2430;
  font-weight: 700;
}

.portit-cattop-acts {
  display: grid;
  justify-items: stretch;
  gap: 7px;
  min-width: 232px;
}

.portit-cattop-kp {
  height: 42px;
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  background: var(--portit-accent, #f23534);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}

.portit-cattop-kp:hover {
  background: #d92c2b;
}

.portit-cattop-list {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 16px;
  border: 1px solid #d5dde4;
  border-radius: 10px;
  background: #fff;
  color: var(--portit-top, #4f5f6f);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .15s, color .15s;
}

.portit-cattop-list:hover {
  border-color: var(--portit-accent, #f23534);
  color: var(--portit-accent, #f23534);
}

.portit-cattop-hint {
  color: #8a94a0;
  font-size: 11.5px;
  text-align: center;
}

/* страница с фильтром или не первая: одна строка */
.portit-cattop.is-compact {
  padding: 12px 16px;
}

.portit-cattop.is-compact .portit-cattop-h1 {
  font-size: 20px;
}

.portit-cattop.is-compact .portit-cattop-acts {
  grid-auto-flow: column;
  min-width: 0;
}

.portit-cattop.is-compact .portit-cattop-kp,
.portit-cattop.is-compact .portit-cattop-list {
  height: 36px;
}

/* заголовок раздела в нижнем блоке — уже не H1 */
.portit-cat-hero p.cat-header {
  margin-bottom: 0;
}

@media (max-width: 767.98px) {
  .portit-cattop,
  .portit-cattop.is-compact {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .portit-cattop-h1 {
    font-size: 20px;
  }

  .portit-cattop-acts,
  .portit-cattop.is-compact .portit-cattop-acts {
    grid-auto-flow: row;
    grid-template-columns: 1fr 1fr;
    min-width: 0;
  }

  .portit-cattop-hint {
    grid-column: 1 / -1;
    text-align: left;
  }

  .portit-cattop-list {
    padding: 0 8px;
    font-size: 12.5px;
  }
}
