:root {
  --bg-page: #f5f7fb;
  --bg-card: #ffffff;
  --bg-pill: #f0f4ff;
  --border-soft: #e2e8f0;
  --txt-main: #111827;
  --txt-muted: #6b7280;
  --accent: #ef233c;
  --accent-soft: rgba(239, 35, 60, 0.07);
  --radius-lg: 18px;
  --radius-pill: 999px;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.08);
  --badge-high: #ef4444;
  --badge-med: #f59e0b;
  --badge-low: #10b981;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #ffffff 0, #f5f7fb 55%, #e5ecff 100%);
  color: var(--txt-main);
}

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

.hero {
  padding: 32px 16px 16px;
  text-align: center;
}

.logo-wrap {
  width: 96px;
  height: 96px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}
.logo-wrap img {
  max-width: 70%;
  max-height: 70%;
}

.hero h1 {
  margin: 4px 0;
  font-size: 1.8rem;
  letter-spacing: 0.03em;
}

.hero-sub {
  margin: 4px auto 16px;
  max-width: 520px;
  font-size: 0.92rem;
  color: var(--txt-muted);
}

.search-cta {
  display: inline-block;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 12px 24px rgba(239, 35, 60, 0.4);
}

.cats-section {
  padding: 0 16px 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.cats-section h2 {
  margin: 16px 0 4px;
  font-size: 1.2rem;
}

.cats-sub {
  margin: 0 0 18px;
  font-size: 0.9rem;
  color: var(--txt-muted);
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.cat-card {
  display: block;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 14px 12px;
  text-align: center;
  border: 1px solid var(--border-soft);
  text-decoration: none;
  color: var(--txt-main);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.cat-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.09);
}
.cat-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 6px;
  border-radius: 999px;
  background: var(--bg-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}
.cat-name {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 2px;
}
.cat-count {
  font-size: 0.78rem;
  color: var(--txt-muted);
}

.sub-header {
  padding: 16px 16px 8px;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.sub-header h1 {
  font-size: 1.4rem;
  margin: 0;
}
.back-link {
  text-decoration: none;
  color: var(--accent);
  font-size: 0.9rem;
  margin-right: auto;
}

.content {
  flex: 1;
  padding: 8px 16px 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.toolbar {
  margin: 8px 0 12px;
}
.toolbar input[type="search"] {
  width: 100%;
  max-width: 420px;
  padding: 10px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  font-size: 0.9rem;
  outline: none;
}
.toolbar input[type="search"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(239, 35, 60, 0.25);
}

.table-wrap {
  overflow-x: auto;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-soft);
}

.brands-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.brands-table th,
.brands-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
}
.brands-table th {
  text-align: left;
  background: #f9fafb;
  font-weight: 600;
  font-size: 0.8rem;
}
.brands-table tr:last-child td {
  border-bottom: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  color: #fff;
}
.badge-high { background: var(--badge-high); }
.badge-med  { background: var(--badge-med); }
.badge-low  { background: var(--badge-low); }

.footer {
  border-top: 1px solid #e5e7eb;
  padding: 12px 16px 16px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--txt-muted);
}

/* Responsive tweaks */
@media (min-width: 768px) {
  .hero {
    padding-top: 40px;
  }
  .hero h1 {
    font-size: 2rem;
  }
}