/* Catalog page — extends exam-home design system */
body.catalog-page {
  /* keep exam-home background + tokens */
}

body.catalog-page .wrap,
body.catalog-page .max-w-6xl {
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
  max-width: 1180px;
}

body.catalog-page .max-w-6xl.mx-auto {
  padding-left: 0;
  padding-right: 0;
}

/* Finder panels */
body.catalog-page .finder-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.03));
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 20px 50px -36px rgba(0,0,0,0.85);
}

body.catalog-page .finder-stat {
  background: rgba(2, 6, 16, 0.4);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.85rem 0.7rem;
}
body.catalog-page .finder-stat b {
  display: block;
  font-size: 1.4rem;
  line-height: 1;
  color: #fff;
  letter-spacing: -0.03em;
}
body.catalog-page .finder-stat span {
  display: block;
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

/* Path cards */
body.catalog-page .path-card {
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.05rem 1.1rem;
  transition: transform 0.16s var(--ease), border-color 0.16s ease, background 0.16s ease;
  cursor: pointer;
}
body.catalog-page .path-card:hover {
  transform: translateY(-2px);
  border-color: rgba(244, 114, 22, 0.55);
  background: var(--surface-2);
}
body.catalog-page .path-card b {
  display: block;
  color: #f8fafc;
  font-size: 0.96rem;
  letter-spacing: -0.02em;
}
body.catalog-page .path-card span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
  margin-top: 0.4rem;
}

/* Mini chips / quick links */
body.catalog-page .mini-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 36px;
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  color: #dbe4f0;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 650;
  transition: all 0.15s ease;
  cursor: pointer;
  text-decoration: none;
}
body.catalog-page .mini-link:hover {
  color: #fff;
  border-color: rgba(244, 114, 22, 0.55);
  background: rgba(244, 114, 22, 0.12);
}

/* Search field */
body.catalog-page .field {
  width: 100%;
  background: rgba(2, 6, 16, 0.65);
  border: 1px solid var(--border-strong);
  color: #fff;
  border-radius: 12px;
  padding: 0.78rem 0.95rem;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
body.catalog-page .field:focus {
  border-color: rgba(244, 114, 22, 0.75);
  box-shadow: 0 0 0 3px rgba(244, 114, 22, 0.15);
}
body.catalog-page .field::placeholder { color: var(--faint); }

/* Category bar — NOT sticky (scrolls away so exam cards get full viewport) */
body.catalog-page #cat-filter {
  position: relative !important;
  top: auto !important;
  z-index: 1;
  border-bottom: 1px solid var(--border);
  background: rgba(6, 10, 18, 0.55);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}
body.catalog-page #cat-filter.is-stuck {
  box-shadow: none;
  border-bottom-color: var(--border);
}
body.catalog-page #cat-filter .cat-filter-inner {
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
  padding: 0.5rem 0 0.55rem;
}
body.catalog-page #cat-filter .cat-filter-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.3rem;
}
body.catalog-page #cat-filter .cat-filter-label strong {
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fdba74;
}
body.catalog-page #cat-filter .cat-filter-label span {
  font-size: 0.78rem;
  color: var(--muted);
}
body.catalog-page #cat-filter .cat-hint {
  display: none !important;
}

body.catalog-page .pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.4rem 0.72rem;
  border-radius: 999px;
  transition: all 0.15s ease;
  white-space: nowrap;
  user-select: none;
}
body.catalog-page .pill:hover {
  color: #fff;
  border-color: rgba(244, 114, 22, 0.45);
}
body.catalog-page .pill[aria-pressed="true"] {
  color: #fff;
  background: rgba(244, 114, 22, 0.18);
  border-color: rgba(244, 114, 22, 0.55);
  box-shadow: 0 0 0 1px rgba(244, 114, 22, 0.2);
}
body.catalog-page .pill .ct {
  font-size: 0.68rem;
  color: var(--faint);
  background: rgba(148, 163, 184, 0.14);
  padding: 0.02rem 0.38rem;
  border-radius: 999px;
}
body.catalog-page .pill[aria-pressed="true"] .ct {
  color: #ffedd5;
  background: rgba(244, 114, 22, 0.28);
}
body.catalog-page .pill-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
body.catalog-page .pill-row::-webkit-scrollbar { height: 4px; }
body.catalog-page .pill-row::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
}

/* Result cards */
body.catalog-page .card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: transform 0.16s var(--ease), border-color 0.16s ease, background 0.16s ease;
}
body.catalog-page .card:hover {
  transform: translateY(-2px);
  border-color: rgba(244, 114, 22, 0.5);
  background: var(--surface-2);
}
body.catalog-page .glass {
  background: rgba(255,255,255,0.035);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}
body.catalog-page .clear-btn {
  display: none;
  color: #ffedd5;
  border: 1px solid rgba(244, 114, 22, 0.4);
  background: rgba(244, 114, 22, 0.12);
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
}
body.catalog-page .clear-btn.show { display: inline-flex; }
body.catalog-page .category-more {
  color: #ffedd5;
  background: rgba(244, 114, 22, 0.1);
  border: 1px solid rgba(244, 114, 22, 0.28);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 650;
  width: 100%;
  transition: all 0.15s ease;
  display: block;
  text-align: center;
  text-decoration: none;
}
body.catalog-page .category-more:hover {
  color: #fff;
  border-color: rgba(244, 114, 22, 0.55);
  background: rgba(244, 114, 22, 0.16);
}
body.catalog-page .match-mark { color: #fdba74; }

/* Modal sheet */
body.catalog-page .sheet {
  background: #0b1220;
  border: 1px solid var(--border-strong);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.8);
}

/* Hero section breathing room under sticky header */
body.catalog-page > section.max-w-6xl:first-of-type,
body.catalog-page section.max-w-6xl.mx-auto.px-4.pt-8 {
  padding-top: 1.75rem;
}

/* Reduce Tailwind/pro topbar clashes */
body.catalog-page:has(.pro-topbar) > .site-header { display: none; }

/* Mobile nav: keep Catalog + Sign in visible */
@media (max-width: 720px) {
  body.catalog-page .header-nav a:not(.btn):not([aria-current="page"]) {
    display: none;
  }
  body.catalog-page .header-nav a[aria-current="page"] {
    display: inline-flex;
  }
}
