:root {
  --bg: #0a0b10;
  --panel: rgba(255,255,255,0.06);
  --stroke: rgba(255,255,255,0.12);
  --text: #f3f4f6;
  --muted: rgba(243,244,246,0.72);
  --gold: #d6b36b;
  --radius: 18px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 16px 56px;
}

/* ===== Topbar ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: linear-gradient(to bottom, rgba(10,11,16,0.92), rgba(10,11,16,0.60));
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  max-width: 1280px;
  margin: 0 auto;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 220px;
}

.mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(214,179,107,0.35);
  color: var(--gold);
  font-weight: 900;
}

.brand-title {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-title strong { font-weight: 900; font-size: 18px; }
.brand-title span { font-size: 12px; color: var(--muted); letter-spacing: .12em; }

.nav {
  display: flex;
  gap: 18px;
  align-items: center;
  color: var(--muted);
}
.nav a {
  color: var(--muted);
  text-decoration: none;
}
.nav a:hover { color: var(--text); }

/* ===== Page header ===== */
.page-card {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: calc(var(--radius) + 6px);
  padding: 22px;
}

.h1 {
  font-size: 40px;
  font-weight: 900;
  margin: 0 0 6px;
}
.lead {
  color: var(--muted);
  margin: 0 0 16px;
  line-height: 1.6;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.select, .btn, .input {
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: transparent;
  color: var(--text);
  padding: 0 14px;
}

.select {
  min-width: 200px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(243,244,246,0.55) 50%),
    linear-gradient(135deg, rgba(243,244,246,0.55) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 13px) calc(50% - 2px);
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.input { min-width: 220px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.btn.primary {
  border-color: rgba(214,179,107,0.55);
  color: var(--gold);
}
.btn.primary:hover {
  border-color: rgba(214,179,107,0.85);
}

/* ===== Catalog grid (главное) ===== */
.catalog-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
  align-items: stretch;
}

/* Карточка не растягивает контент криво на широких экранах */
.catalog-item {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 22px;
  padding: 16px;
  overflow: hidden;
}

.thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(243,244,246,0.55);
  font-weight: 600;
}

.meta {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding-top: 12px;
  min-height: 140px;
}

.cat {
  color: rgba(243,244,246,0.60);
  text-transform: lowercase;
  letter-spacing: .04em;
  margin-bottom: 6px;
}

.item-title {
  font-size: 24px;
  font-weight: 900;
  margin: 0 0 8px;
  line-height: 1.1;
}

.price {
  color: var(--gold);
  font-weight: 900;
  font-size: 26px;
  margin: 0 0 10px;
}

.desc {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.actions {
  margin-top: auto;
  padding-top: 14px;
}

/* Кнопка в карточке — не ломается на широкой странице */
.actions .btn {
  width: 100%;
}

/* ===== Responsive ===== */
@media (min-width: 1400px) {
  .catalog-grid {
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  }
}

@media (max-width: 720px) {
  .h1 { font-size: 34px; }
  .controls { gap: 10px; }
  .select, .btn, .input { width: 100%; }
}

@media (max-width: 520px) {
  .container { padding: 18px 12px 44px; }
  .catalog-grid { grid-template-columns: 1fr; }
}