:root {
  --ink: #172033;
  --muted: #637083;
  --line: #dde3ea;
  --soft: #f5f7fa;
  --accent: #0071c5;
  --accent-dark: #0d334f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

a { color: inherit; }

.site-header {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.header-inner,
.page-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.header-inner {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand img {
  display: block;
  width: 190px;
  height: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.main-nav a {
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] { color: var(--accent); }

.page-shell { padding: 42px 0 70px; }

.breadcrumb {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

h1 {
  margin: 0 0 6px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.intro,
.result-count,
.empty { color: var(--muted); }

.intro { margin: 0; }

.catalog-search {
  width: min(360px, 100%);
}

.catalog-search input {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid #bbc5d0;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.catalog-search input:focus {
  outline: 3px solid rgba(30, 91, 133, .16);
  border-color: var(--accent);
}

.section-title {
  margin: 42px 0 18px;
  font-size: 22px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.category-card,
.product-card {
  display: flex;
  flex-direction: column;
  min-height: 134px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.category-card:hover,
.product-card:hover {
  border-color: #9eacb9;
  transform: translateY(-2px);
  box-shadow: 0 9px 24px rgba(23, 32, 51, .08);
}

.category-card strong,
.product-card strong {
  font-size: 17px;
  line-height: 1.35;
}

.category-card span,
.product-card span {
  margin-top: auto;
  padding-top: 16px;
  color: var(--muted);
  font-size: 13px;
}

.product-card { padding: 16px; border-radius: 12px; }

.product-card img {
  height: auto;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}

.product-card strong {
  margin-top: 12px;
  font-size: 14px;
}

.product-card em {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12.5px;
  font-style: normal;
}

.product-card span { display: none; }

.empty {
  padding: 30px;
  border: 1px dashed #b9c3ce;
  border-radius: 8px;
  background: var(--soft);
  text-align: center;
}

.site-footer {
  padding: 26px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

[hidden] { display: none !important; }

@media (max-width: 780px) {
  .header-inner { min-height: 78px; }
  .brand img { width: 158px; }
  .main-nav { gap: 14px; font-size: 12px; }
  .page-heading { align-items: stretch; flex-direction: column; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}

@media (max-width: 520px) {
  .header-inner,
  .page-shell { width: min(100% - 28px, 1180px); }
  .header-inner { align-items: flex-start; flex-direction: column; gap: 12px; padding: 16px 0; }
  .main-nav { width: 100%; justify-content: space-between; }
  .page-shell { padding-top: 30px; }
  .category-grid,
  .product-grid { grid-template-columns: 1fr; }
}
