/* HIGOLD — каталог. Технический editorial, hairline-сетка, графит + брендовый синий. */

.cat-page { padding-bottom: var(--s7); }

.cat-hero {
  background: var(--ink);
  color: #fff;
  padding: var(--s6) 0 var(--s5);
  border-bottom: 1px solid var(--ink-line);
}
.cat-hero h1 {
  font-size: clamp(32px, 4.4vw, 54px);
  line-height: 1.06;
  letter-spacing: -.02em;
  margin: 18px 0 14px;
  max-width: 20ch;
}
.cat-hero h1 em { font-style: normal; color: var(--brass); }
.cat-hero p { color: var(--muted-dark); max-width: 62ch; margin: 0 0 26px; }
.cat-hero .label { color: var(--muted-dark); }
.cat-hero .label .num { color: var(--brass); }

.cat-stats {
  display: flex; flex-wrap: wrap; gap: 32px 48px;
  border-top: 1px solid var(--ink-line); padding-top: 22px;
}
.cat-stats div b { display: block; font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.cat-stats div span { color: var(--muted-dark); font-size: 13px; }

.cat-toolbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(244,245,247,.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.cat-toolbar .row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.cat-search {
  flex: 1 1 320px; min-width: 220px;
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); padding: 0 14px; height: 44px;
}
.cat-search input {
  border: 0; outline: 0; background: none; font: inherit; font-size: 15px; width: 100%; height: 100%;
}
.cat-search svg { flex: 0 0 auto; color: var(--muted); }
.cat-chip {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: var(--surface);
  padding: 10px 14px; cursor: pointer; font-size: 14px;
}
.cat-chip input { accent-color: var(--brand); }
.cat-btn {
  border: 1px solid var(--ink); background: var(--ink); color: #fff;
  padding: 12px 20px; cursor: pointer; font: inherit; font-size: 14px;
}
.cat-btn:hover { background: var(--brand); border-color: var(--brand); }

.cat-layout {
  display: grid; grid-template-columns: 288px minmax(0, 1fr);
  gap: var(--s4); padding-top: var(--s4);
}
.cat-tree {
  position: sticky; top: 84px; align-self: start;
  border: 1px solid var(--line); background: var(--surface);
  max-height: calc(100vh - 110px); overflow: auto;
}
.cat-tree h5 {
  margin: 0; padding: 14px 16px; font-size: 12px; letter-spacing: .14em;
  text-transform: uppercase; font-family: 'IBM Plex Mono', monospace; color: var(--muted);
  border-bottom: 1px solid var(--line); background: var(--paper);
  position: sticky; top: 0;
}
.cat-tree h5 span { color: var(--brass); }
.tree-sec { border-bottom: 1px solid var(--line); }
.tree-sec > button, .tree-coll > button {
  width: 100%; text-align: left; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 15px; padding: 12px 16px; display: block;
}
.tree-sec > button { font-weight: 600; }
.tree-coll > button { padding-left: 22px; color: var(--ink-2); font-size: 14px; }
.tree-coll.tb > button { color: var(--brand); font-weight: 600; }
.tree-sec > button:hover, .tree-coll > button:hover { background: var(--brand-soft); }
.tree-sec.open > button, .tree-coll.open > button { background: var(--brand-soft); color: var(--brand); }
.tree-series { list-style: none; margin: 0; padding: 0 0 10px; }
.tree-series button {
  width: 100%; text-align: left; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 13px; color: var(--muted); padding: 8px 16px 8px 34px;
  display: flex; justify-content: space-between; gap: 8px;
}
.tree-series button:hover { color: var(--brand); background: var(--brand-soft); }
.tree-series button.active { color: var(--brand); font-weight: 600; }
.tree-series button i { font-style: normal; font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--line-strong); }

.cat-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.cat-head h2 { font-size: clamp(24px, 2.6vw, 34px); letter-spacing: -.01em; margin: 8px 0 6px; }
.cat-head p { color: var(--muted); margin: 0; max-width: 70ch; }
.cat-collection-note {
  border-left: 2px solid var(--brass); padding: 4px 0 4px 14px; margin: 14px 0 20px;
  color: var(--ink-2); max-width: 78ch; font-size: 15px;
}
.cat-collection-note b { display: block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-family: 'IBM Plex Mono', monospace; color: var(--brass); margin-bottom: 4px; }

.cat-subchips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.cat-subchips button {
  border: 1px solid var(--line); background: var(--surface); padding: 7px 12px;
  font-size: 13px; cursor: pointer; font-family: inherit; color: var(--ink-2);
}
.cat-subchips button.active { background: var(--ink); border-color: var(--ink); color: #fff; }

.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 1180px) { .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cat-grid { grid-template-columns: 1fr; } }

.cat-card {
  background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column; transition: border-color .15s ease, transform .15s ease;
  border-radius: 14px; overflow: hidden;
}
.cat-card:hover { box-shadow: 0 10px 26px rgba(16, 24, 32, .12); }
.cat-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.cat-photo { aspect-ratio: 1/1; background: var(--paper); border-bottom: 1px solid var(--line); overflow: hidden; position: relative; display: flex; align-items: center; justify-content: center; }
.cat-photo img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; padding: 10px; }
.cat-photo .noimg {
  height: 100%; display: flex; align-items: center; justify-content: center;
  color: var(--line-strong); font-family: 'IBM Plex Mono', monospace; font-size: 26px; letter-spacing: .08em;
}
.cat-badge {
  position: absolute; top: 10px; left: 10px; background: var(--ink); color: #fff;
  font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; padding: 4px 8px;
}
.cat-badge.tb { background: var(--brand); }
.cat-badge.rev { background: #8A5A20; left: auto; right: 10px; }
.cat-badge.ord { background: #5A6472; left: auto; right: 10px; }
.cat-badge.tb + .cat-badge.ord, .cat-badge.tb + .cat-badge.rev { top: 40px; }
.cat-body { padding: 14px 15px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.cat-art { font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: .1em; color: var(--brass); }
.cat-name { font-size: 14px; font-weight: 600; line-height: 1.35; margin: 0; }
.cat-specs { margin: 0; font-size: 12.5px; color: var(--muted); display: grid; gap: 3px; }
.cat-specs div { display: flex; gap: 8px; }
.cat-specs dt { flex: 0 0 92px; color: var(--line-strong); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding-top: 2px; }
.cat-specs dd { margin: 0; color: var(--ink-2); }
.cat-note { font-size: 12px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 9px; }
.cat-foot { margin-top: auto; display: flex; gap: 8px; align-items: center; }
.cat-foot a {
  flex: 1; text-align: center; border: 1px solid var(--ink); padding: 9px 10px;
  font-size: 13px; transition: .15s ease;
}
.cat-price { font-family: 'IBM Plex Mono', monospace; font-size: 14px; color: var(--ink); white-space: nowrap; }
.cat-price + a { flex: 0 0 auto; }
.cat-foot a:hover { background: var(--ink); color: #fff; }
.cat-empty { padding: 60px 0; text-align: center; color: var(--muted); }

.cat-footpage { margin-top: var(--s4); border-top: 1px solid var(--line); padding-top: var(--s3); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.cat-footpage .mono { color: var(--muted); }

@media (max-width: 980px) {
  .cat-layout { grid-template-columns: 1fr; }
  .cat-tree { position: static; max-height: none; }
  .cat-hero { padding: var(--s5) 0 var(--s4); }
}

.cat-note {
  margin: 18px 0 26px;
  padding: 14px 18px;
  border-left: 3px solid var(--gold, #c9a227);
  background: rgba(201, 162, 39, .08);
  font-size: 15px;
  line-height: 1.5;
  max-width: 760px;
}
.cat-note b { color: #c9a227; }

.cat-note-sla { border-left-color: #3d7a6a; background: rgba(61, 122, 106, .10); }
.cat-note-sla b { color: #4f9c88; }

/* группы Tourbillon: карточка с таблицей вариантов */
.cat-card-group { grid-column: span 2; }
.cat-card:not(.cat-card-group) { grid-column: span 1; }
.cat-card-group .cat-photo { aspect-ratio: 4/3; }
.cat-card-group .cat-name { font-size: 16px; }
.cat-tablewrap { overflow-x: auto; margin: 2px 0 4px; }
.cat-variants { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.cat-variants th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--line-strong); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.cat-variants td { padding: 7px 8px; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: top; }
.cat-variants tr:last-child td { border-bottom: 0; }
.cat-variants a { color: var(--brand); font-weight: 600; }
.cat-variants a:hover { text-decoration: underline; }
@media (max-width: 720px) { .cat-card-group { grid-column: span 1; } }

.cat-serieschips { padding-bottom: 4px; }
.cat-serieschips .cat-chiplabel { font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); align-self: center; margin-right: 4px; }
.cat-serieschips button i { font-style: normal; opacity: .55; margin-left: 5px; }

/* Длинные размеры не должны вылезать за карточку */
.cat-specs dd { flex: 1 1 auto; min-width: 0; overflow-wrap: break-word; word-break: normal; }
.cat-specs dt { flex: 0 0 84px; }
.cat-foot { flex-wrap: wrap; }
.cat-foot a { white-space: nowrap; }

.cat-price-none { color: #8a93a3; font-style: italic; }
.cat-avail { font-style: normal; font-size: 12px; color: #2f7d55; margin-left: 6px; }
.cat-avail::before { content: '· '; color: #98a1b0; }
.cat-variants td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Адаптив каталога ---------- */
@media (max-width: 980px) {
  .cat-toolbar { position: static; }
  .cat-toolbar .row { gap: 10px; }
  .cat-search { flex: 1 1 100%; }
}
@media (max-width: 720px) {
  .cat-layout { gap: 22px; }
  .cat-tree { max-height: 320px; overflow-y: auto; }
  .cat-hero h1 { max-width: none; }
  .cat-body { padding: 12px 13px 14px; }
  .cat-specs dt { flex: 0 0 76px; }
}
