/* === DESIGN TOKENS === */
:root {
  --bg-1: #eef3fc;
  --bg-2: #dde7f8;
  --brand: #2563eb;
  --brand-deep: #1d4ed8;
  --brand-soft: #e8efff;
  --brand-softer: #f3f6fe;
  --ink: #0f1c3f;
  --ink-2: #25304f;
  --muted: #6b7591;
  --line: #e6eaf4;
  --line-2: #eef1f8;
  --card: #ffffff;
  --crown: #f59e0b;
  --check: #10b981;
  --star: #8b5cf6;
  --r-card: 14px;
  --r-pill: 999px;
  --r-input: 10px;
}

/* === BASE === */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* === .topbar (search bar card) === */
.topbar {
  background: var(--card);
  border-radius: 16px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: 0 1px 0 rgba(15,28,63,0.04), 0 8px 24px -16px rgba(15,28,63,0.18);
}

/* === .search (input container in topbar) === */
.search {
  flex: 0 0 460px;
  display: flex;
  align-items: center;
  background: var(--brand-softer);
  border: 1px solid var(--line);
  border-radius: var(--r-input);
  padding: 0 4px 0 14px;
  height: 44px;
  transition: border-color .15s, background .15s;
}
.search:focus-within { border-color: var(--brand); background: #fff; }
.search svg { color: var(--muted); flex-shrink: 0; }
.search .search-input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 14px; color: var(--ink);
  padding: 0 12px; min-width: 0;
}
.search .search-input::placeholder { color: var(--muted); }
.search .go {
  background: var(--brand); color: #fff; border: 0;
  border-radius: 8px; width: 36px; height: 36px;
  padding: 0; box-shadow: none;
  display: grid; place-items: center; cursor: pointer;
  transition: background .15s;
  flex-shrink: 0;
}
.search .go:hover { background: var(--brand-deep); }
.search .go svg { color: #fff; }
.search .go::before { display: none; }

/* === .cats (category nav in topbar) === */
.cats {
  display: flex; align-items: center; gap: 4px;
  overflow-x: auto; scrollbar-width: none;
  flex: 1; min-width: 0;
}
.cats::-webkit-scrollbar { display: none; }
.cats .category-nav { display: flex; align-items: center; gap: 4px; }
.cats .category-nav a, .cats .cat {
  flex: 0 0 auto; padding: 8px 14px;
  border-radius: var(--r-pill); font-size: 13px; font-weight: 600;
  color: var(--ink-2); cursor: pointer; white-space: nowrap;
  text-decoration: none; transition: background .15s, color .15s;
}
.cats .category-nav a:hover, .cats .cat:hover { background: var(--brand-softer); }
.cats .category-nav a.active, .cats .cat.is-active {
  background: var(--brand); color: #fff;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .topbar { gap: 12px; padding: 12px; flex-wrap: wrap; }
  .search { flex: 1 1 100%; }
  .cats { flex: 1 1 100%; }
}

@media (max-width: 768px) {
  .topbar { border-radius: 14px; padding: 10px; gap: 10px; }
  .search { flex: 1 1 100%; height: 42px; padding-left: 12px; }
  .search .search-input { font-size: 16px; padding: 0 8px; }
  .cats { margin: 0 -10px; padding: 0 10px 2px; }
  .cats .category-nav a, .cats .cat { padding: 7px 12px; font-size: 12px; }
}
