.cat { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

.cat-head {
  width: 100%; max-width: 1200px; margin: 0 auto;
  padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.cat-logo img { height: 56px; width: auto; }

.cat-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(120deg, var(--navy-900) 0%, var(--navy-700) 62%, var(--royal) 100%);
  clip-path: polygon(0 0, 100% 0, 100% 82%, 0 100%);
  padding: 56px 24px 104px;
  color: var(--on-dark);
}
.cat-hero__flag {
  position: absolute; right: -40px; top: 0; bottom: 0; width: 320px;
  background: repeating-conic-gradient(rgba(255,255,255,0.07) 0 25%, transparent 0 50%) 0 0 / 40px 40px;
  transform: skewX(var(--skew-speed));
}
.cat-hero__inner { position: relative; max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.cat-hero__stripe { width: 120px; height: 8px; border-radius: 2px; background: linear-gradient(90deg, var(--signal-orange), var(--signal-red)); transform: skewX(var(--skew-speed)); }
.cat-hero h1 {
  margin: 0; max-width: 820px;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(32px, 5vw, 60px); line-height: 1; letter-spacing: -0.02em;
}
.cat-hero p { margin: 0; max-width: 620px; font-size: 18px; line-height: 1.5; opacity: 0.92; }

.cat-main {
  position: relative; width: 100%; max-width: 1200px;
  margin: -36px auto 0; padding: 0 24px 64px;
  display: flex; flex-direction: column; gap: 40px;
}
.cat-block { display: flex; flex-direction: column; gap: 16px; }
.cat-block h2.wordmark { margin: 0; }

.cat-series { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.series-btn {
  text-align: left; cursor: pointer;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 20px 24px; min-height: 104px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 12px;
  box-shadow: 0 2px 6px rgba(3, 28, 69, 0.06);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.series-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(3, 28, 69, 0.12); }
.series-btn[aria-pressed="true"] { border: 2px solid var(--gp-orange); padding: 19px 23px; box-shadow: 0 8px 20px rgba(3, 28, 69, 0.18); }
.series-btn__name { font-family: var(--font-display); font-size: 22px; font-weight: 700; line-height: 1.1; color: var(--navy-900); }
.series-btn__count { font-size: 13px; font-weight: 600; color: var(--ink-muted); }

.cat-kits-title { margin: 0; font-family: var(--font-display); font-size: 24px; font-weight: 700; line-height: 1.15; color: var(--navy-900); }
.cat-kits { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }

.kit-card {
  text-decoration: none; color: inherit;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s;
}
.kit-card:hover { color: inherit; transform: translateY(-4px); box-shadow: 0 18px 40px rgba(3, 28, 69, 0.18); }
.kit-card__cover { background: var(--ice); aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; padding: 20px; overflow: hidden; }
.kit-card__cover img {
  width: 100%; height: auto; background: var(--paper);
  box-shadow: 0 10px 24px rgba(3, 28, 69, 0.22), 2px 2px 0 #fff, 4px 4px 0 var(--line);
  transition: transform .5s cubic-bezier(.2,.8,.2,1);
}
.kit-card:hover .kit-card__cover img { transform: scale(1.04) rotate(-1deg); }
.kit-card__body { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 6px; }
.kit-card__series { font-size: 13px; font-weight: 600; color: var(--ink-muted); }
.kit-card__title { font-size: 18px; font-weight: 800; line-height: 1.25; color: var(--ink); }
.kit-card__size { font-family: var(--font-display); font-size: 30px; font-weight: 800; line-height: 1; color: var(--navy-900); }
.kit-card__row { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kit-card__meta { font-size: 13px; font-weight: 600; color: var(--ink-muted); }
.kit-card__cta { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; color: var(--gp-orange-text); white-space: nowrap; }
.kit-card__cta .icon { width: 20px; height: 20px; }

.cat-empty {
  border: 2px dashed var(--line-strong); border-radius: var(--radius-md); background: var(--ice);
  padding: 48px 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
}
.cat-empty strong { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--navy-900); }
.cat-empty span { font-size: 16px; color: var(--ink-muted); max-width: 420px; }

.cat-foot { margin-top: auto; border-top: 1px solid #e3ebf5; padding: 24px; text-align: center; font-size: 13px; font-weight: 600; color: var(--ink-muted); }

@media (max-width: 600px) {
  /* на телефоне шапка в две строки по центру: логотип, под ним магазины */
  .cat-head { padding: 12px 16px; justify-content: center; }
  .cat-logo img { height: 44px; margin: 0 auto; }
  .cat-head .wordmark { display: none; }
  .cat-hero { padding: 36px 16px 80px; }
  .cat-hero p { font-size: 16px; }
  .cat-main { padding: 0 16px 48px; gap: 32px; }
  .cat-series { grid-template-columns: 1fr; gap: 10px; }
  .series-btn { min-height: 0; flex-direction: row; align-items: center; padding: 16px 20px; }
  .series-btn[aria-pressed="true"] { padding: 15px 19px; }
  .series-btn__name { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .kit-card, .kit-card__cover img, .series-btn { transition: none; }
}

/* ---------- ссылки на магазины в шапке ---------- */
.cat-head__aside { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: flex-end; }
.shop-links { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.shop-link {
  display: inline-flex; align-items: center; justify-content: center;
  height: 34px; padding: 0 13px; border-radius: var(--radius-full);
  background: var(--ice); border: 1px solid var(--line); color: var(--navy-900); text-decoration: none;
  font-size: 13px; font-weight: 800; line-height: 1; white-space: nowrap;
  transition: background-color .15s, border-color .15s, transform .15s;
}
.shop-link:hover { background: var(--paper); border-color: var(--gp-orange); color: var(--navy-900); transform: translateY(-1px); }
.shop-link img { height: 18px; width: auto; display: block; }
/* выделенный магазин (флаг accent в content/catalog.json) */
.shop-link--accent {
  background: var(--grad-signal); border-color: transparent; color: var(--on-dark);
  box-shadow: 0 2px 8px rgba(250, 71, 4, 0.28);
}
.shop-link--accent:hover { background: var(--grad-signal); border-color: transparent; color: var(--on-dark); filter: brightness(1.07); }

/* ---------- правовая строка ---------- */
.cat-foot { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cat-foot__line { margin: 0; }
.cat-legal { margin: 0; max-width: 760px; font-size: 12px; font-weight: 500; line-height: 1.5; color: var(--ink-muted); opacity: .85; }

@media (max-width: 600px) {
  .cat-head__aside { width: 100%; justify-content: center; gap: 10px; }
  .shop-links { gap: 6px; justify-content: center; }
  .shop-link { height: 30px; padding: 0 11px; font-size: 12px; }
  .cat-legal { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { .shop-link { transition: none; } }
