/* G8-centre — catalog (analizy) */

html.catalog-drilled #catalogCategories {
  display: none !important;
}

.catalog-hero {
  padding: 32px 0 24px;
  background: linear-gradient(180deg, var(--white) 0%, var(--page-bg) 100%);
  border-bottom: 1px solid var(--line);
}

.catalog-hero__inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.catalog-bc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.catalog-bc a {
  color: var(--blue);
  transition: color 0.2s var(--ease);
}

.catalog-bc a:hover {
  color: var(--blue-dark);
}

.catalog-bc__sep {
  color: var(--muted-light);
}

.catalog-bc__current {
  color: var(--ink);
  font-weight: 600;
}

.catalog-hero__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}

.catalog-hero__title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}


.catalog-search {
  flex: 0 1 420px;
  width: 100%;
  max-width: 420px;
  position: relative;
}

.catalog-search input {
  width: 100%;
  height: 48px;
  padding: 0 44px 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  font: inherit;
  color: var(--ink);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.catalog-search input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(69, 147, 255, 0.15);
}

.catalog-search__clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}

.catalog-search__clear:hover {
  background: var(--surface);
  color: var(--ink);
}

.catalog-section {
  padding: 8px 0 64px;
}

.catalog-cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.catalog-cats[hidden],
.catalog-cats.is-collapsed {
  display: none !important;
}

.catalog-cat {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  min-height: 140px;
  border-radius: var(--radius-md);
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  overflow: hidden;
}

.catalog-cat::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--blue);
}

.catalog-cat--blue::before { background: var(--blue); }
.catalog-cat--mint::before { background: var(--mint); }
.catalog-cat--coral::before { background: var(--coral); }
.catalog-cat--lilac::before { background: var(--lilac); }
.catalog-cat--amber::before { background: var(--amber); }

.catalog-cat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.catalog-cat h3 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  padding-right: 28px;
}

.catalog-cat p {
  font-size: 13px;
  color: var(--muted);
  margin-top: auto;
}

.catalog-cat__arrow {
  position: absolute;
  top: 24px;
  right: 20px;
  font-size: 18px;
  color: var(--muted-light);
  transition: transform 0.2s var(--ease);
}

.catalog-cat:hover .catalog-cat__arrow {
  transform: translateX(4px);
  color: var(--blue);
}

.catalog-sub {
  margin-bottom: 24px;
}

.catalog-sub__label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 12px;
}

.catalog-sub__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.catalog-sub__card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--white);
  border: 1px solid var(--line);
  transition: border-color 0.2s var(--ease);
}

.catalog-sub__card:hover {
  border-color: var(--blue);
}

.catalog-sub__card small {
  font-size: 12px;
  color: var(--muted);
}

.catalog-table-wrap {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.catalog-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.catalog-table thead {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.catalog-table th {
  padding: 14px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.catalog-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.catalog-table tbody tr:last-child td {
  border-bottom: none;
}

.catalog-table tbody tr:hover {
  background: var(--blue-tint);
}

.catalog-td-code {
  width: 100px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.catalog-td-name {
  font-weight: 500;
  line-height: 1.45;
}

.catalog-td-cat {
  width: 180px;
  font-size: 13px;
  color: var(--muted);
}

.catalog-td-price {
  width: 120px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--ink);
  text-align: right;
}

.catalog-table th:last-child {
  text-align: right;
}

.catalog-items-meta {
  padding: 12px 0 16px;
  font-size: 13px;
  color: var(--muted);
}

.catalog-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding-top: 24px;
}

.catalog-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink);
  transition: all 0.2s var(--ease);
}

.catalog-page:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.catalog-page--active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
  pointer-events: none;
}

.catalog-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
  font-size: 16px;
}

.nav a.is-active {
  color: var(--blue);
  font-weight: 600;
}

@media (max-width: 900px) {
  .catalog-table-wrap {
    overflow-x: auto;
  }

  .catalog-table {
    min-width: 640px;
  }

  .catalog-td-cat {
    display: none;
  }

  .catalog-table th.catalog-th-cat {
    display: none;
  }
}

@media (max-width: 720px) {
  .catalog-hero__head {
    flex-direction: column;
    align-items: stretch;
  }

  .catalog-search {
    flex: 1 1 auto;
    max-width: none;
  }
}

@media (max-width: 600px) {
  .catalog-hero {
    padding: 24px 0 16px;
  }

  .catalog-cats {
    grid-template-columns: 1fr;
  }
}
