/* Total Trusted Add-ons catalog page - the "view all + filter" surface reached
   from the Market-Space stats bar. Matches the ClaudeSec figma: pale-mint plus-grid
   background, a centred title with All / Claude / Copilot source chips, a search box,
   a scrollable row of category chips, then add-ons grouped into type sections with a
   sticky right rail. Cards reuse .hr-card from plutonium.css, restyled here. */
.catalog-page {
  min-height: 100vh;
  background: #EEFFE8;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}

/* plus-mark grid, matching the Market-Space figma background */
.catalog-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='84' height='84' viewBox='0 0 84 84' xmlns='http://www.w3.org/2000/svg'%3E%3Cline x1='42' y1='30' x2='42' y2='54' stroke='%239FE384' stroke-width='1.2' stroke-linecap='round'/%3E%3Cline x1='30' y1='42' x2='54' y2='42' stroke='%239FE384' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: 84px 84px;
  pointer-events: none;
  z-index: 0;
}

.catalog-content {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 60px 80px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-sizing: border-box;
}

/* back pill, top-left */
.catalog-back {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid #000;
  border-radius: 100px;
  padding: 9px 18px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #000;
  text-decoration: none;
  box-shadow: 3px 3px 0 #000;
  transition: transform .12s ease, box-shadow .12s ease;
}
.catalog-back:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 #000; }

/* centred hero: title + source chips. Pulled up so it visually centres over the
   content while the back button floats at the left. */
.cat-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: -42px;
}
.catalog-title {
  margin: 0;
  font-family: 'Unbounded', 'Poppins', sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.15;
  letter-spacing: -.01em;
  color: #000;
  text-align: center;
}

/* All / Claude / Copilot source chips. In the figma each chip carries its brand
   colour at rest - All & Copilot are black, Claude is the signature yellow - and
   the active filter is called out with a black ring + hard shadow. */
.cat-sources { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.cat-src {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1.5px solid transparent;
  border-radius: 100px;
  padding: 8px 18px;
  background: #000;
  font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 14px;
  color: #fff; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
/* keep the logo's natural aspect (the Copilot mark is wider than tall) instead of
   squishing it into a square */
.cat-src-logo { width: auto; height: 18px; flex: none; }
.cat-src:hover { transform: translateY(-1px); }
/* the SELECTED source chip turns yellow (whichever it is) with a black ring +
   hard drop-shadow; unselected chips stay the default black pill. */
.cat-src.is-active { background: #F8F872; color: #000; border-color: #000; box-shadow: 2.5px 2.5px 0 #000; }
.cat-src:not(.is-active) { filter: saturate(.92); opacity: .82; }
.cat-src:not(.is-active):hover { opacity: 1; }

/* search box (centred pill, ~360px) */
.catalog-search {
  align-self: flex-start;   /* left-aligned under the chips, matching Figma */
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 360px;
  height: 44px;
  padding: 0 18px;
  background: #fff;
  border: 1px solid #000;
  border-radius: 100px;
  box-shadow: 3px 3px 0 #000;
}
.catalog-search svg { flex: none; color: #57534E; }
.catalog-search-input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  font-family: 'Poppins', sans-serif; font-weight: 400; font-size: 13px; color: #1C1917;
}
.catalog-search-input::placeholder { color: #78716C; }

/* ---- category chip row --------------------------------------------------- */
.cat-chiprow-wrap { position: relative; }
.cat-chiprow {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  /* the scrollbar gutter is ALWAYS reserved (thin) so nothing shifts; the bar is
     just transparent until the row is hovered. */
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}
.cat-chiprow-wrap:hover .cat-chiprow { scrollbar-color: #8ECB6E transparent; }
.cat-chiprow::-webkit-scrollbar { height: 8px; }
.cat-chiprow::-webkit-scrollbar-thumb { background: transparent; border-radius: 8px; }
.cat-chiprow-wrap:hover .cat-chiprow::-webkit-scrollbar-thumb { background: #8ECB6E; }

.cat-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid #000;
  border-radius: 12px;
  padding: 11px 16px 11px 12px;
  box-shadow: 3px 3px 0 #000;
  cursor: pointer;
  text-align: left;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.cat-chip:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 #000; }
.cat-chip.is-active { background: #1f7a3d; border-color: #000; box-shadow: 3px 3px 0 #000; }
.cat-chip.is-active .cat-chip-label { color: #fff; }
.cat-chip.is-active .cat-chip-count { color: #d6f5e1; }

.cat-chip-tile {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 8px;
  font-size: 22px;
  line-height: 1;
}
.cat-chip-text { display: flex; flex-direction: column; gap: 1px; white-space: nowrap; }
.cat-chip-label { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 15px; color: #000; }
.cat-chip-count { font-family: 'Poppins', sans-serif; font-weight: 400; font-size: 13px; color: #78716C; }

/* ---- body: main sections + right rail ------------------------------------ */
.cat-body { display: flex; align-items: flex-start; gap: 28px; }
.cat-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 34px; }

.cat-section { scroll-margin-top: 96px; display: flex; flex-direction: column; gap: 16px; }
.cat-section-title {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: #000;
}

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

/* right rail: vertical type nav that jumps to each section */
.cat-rail { flex: 0 0 168px; align-self: stretch; position: relative; }
.cat-rail-nav {
  position: sticky; top: 100px;
  display: flex; flex-direction: column; gap: 26px;
  padding-left: 18px;
  border-left: 1px solid #BDE5AC;
}
.cat-rail-link {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 19px;
  color: #000;
  text-decoration: none;
  padding-left: 12px;
  margin-left: -19px;
  border-left: 4px solid transparent;
  line-height: 1.1;
  transition: color .12s ease, border-color .12s ease;
}
.cat-rail-link:hover { color: #1f7a3d; }
.cat-rail-link.is-active { color: #39BF97; border-left-color: #39BF97; }
.cat-rail-count { font-weight: 500; font-size: 12px; color: #78716C; font-variant-numeric: tabular-nums; }
.cat-rail-link.is-active .cat-rail-count { color: #39BF97; }

/* ---- load more ----------------------------------------------------------- */
.cat-loadmore-wrap { display: flex; justify-content: center; padding-top: 6px; }
.catalog-loadmore {
  background: #000; color: #fff;
  border: 1.5px solid #000; border-radius: 100px;
  padding: 11px 30px;
  font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 13px;
  text-transform: uppercase; letter-spacing: .04em;
  cursor: pointer;
  box-shadow: 4px 4px 0 rgba(0,0,0,.25);
  transition: transform .12s ease, box-shadow .12s ease;
}
.catalog-loadmore:hover { transform: translate(-1px,-1px); box-shadow: 5px 5px 0 rgba(0,0,0,.3); }

.catalog-empty {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  color: #1c1917;
  margin: 0;
  padding: 20px 0;
}

/* ---- card overrides (scoped) --------------------------------------------- */
/* .hr-card comes from plutonium.css; restyle to the figma catalog card without
   touching the shared file. Navy hard shadow, thin border, 12px radius. */
.catalog-page .hr-card {
  border: 1px solid #000;
  border-radius: 12px;
  padding: 16px;
  gap: 12px;
  box-shadow: 3px 3px 0 #10143A;
}
.catalog-page .hr-card:hover {
  transform: translate(-1px,-1px);
  box-shadow: 4px 4px 0 #10143A;
}
.catalog-page .hr-card-head { gap: 10px; align-items: flex-start; }
.catalog-page .hr-card-icon { width: 20px; height: 20px; border-radius: 5px; }
/* let long tool names wrap to two lines instead of being cut off mid-title */
.catalog-page .hr-card-name {
  font-size: 15px; line-height: 1.2;
  min-height: 2.4em; /* reserve 2 lines so descriptions align regardless of title length */
  white-space: normal; overflow: hidden;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
}
.catalog-page .hr-card-desc {
  font-size: 13.5px;
  color: #111013;
  -webkit-line-clamp: 2;
}
.catalog-page .hr-card-meta { gap: 6px; }
.catalog-page .hr-badge {
  padding: 4px 8px;
  background: #F5F5F4;
  font-size: 12px;
  color: #1C1917;
}

/* "Safe" trust pill - teal text on a pale-mint chip (figma custom green tag) */
.cat-safe-pill {
  flex: none;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px;
  background: #ECF8F5;
  border-radius: 4px;
  font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 13px; line-height: 1;
  color: #0D9488;
}
.cat-safe-pill svg { flex: none; }

/* "Read more" CTA */
.catalog-page .hr-card-cta {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 12.5px; color: #000;
}
.cat-readmore-arrow { flex: none; }

/* ---- responsive ---------------------------------------------------------- */
@media (max-width: 1180px) {
  .catalog-content { padding: 28px 32px 60px; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .cat-rail { display: none; }
}
@media (max-width: 680px) {
  .catalog-content { padding: 20px 16px 48px; gap: 18px; }
  .cat-hero { margin-top: 0; }
  .catalog-search { max-width: none; }
  .catalog-grid { grid-template-columns: 1fr; }
}
