.category-card-layout {
  font-size: 13px;
  font-family: work-sans-regular, Arial, sans-serif;
  color: #45576E;
  background: transparent;
}

.category-card-chip-ic {
  font-size: 0.98em;
}

.category-card-search-ic {
  font-size: 1.23em;
}

.category-card-search-clear i {
  font-size: 0.92em;
}

.category-card-loadmore i {
  font-size: 0.96em;
}

.category-card-empty-ic {
  font-size: 2em;
  color: #93A4B8;
}

.category-card-layout .svg-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  vertical-align: middle;
}

.category-card-split {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  text-align: left;
}

.category-card-sidebar {
  display: block;
  flex: 0 0 260px;
  background: #ffffff;
  padding: 15px;
  border-radius: 12px;
  position: sticky;
  top: 130px;
}

.category-card-sidebar-label {
  font-family: poppins-semibold, Arial, sans-serif;
  font-size: 1.23em;
  color: #2E3D50;
  padding: 0 4px;
  margin-bottom: 18px;
}

.category-card-sidebar-toggle {
  display: none;
}

.category-card-sidebar-toggle-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.category-card-sidebar-toggle-group {
  flex: 0 0 auto;
  color: #64778F;
  white-space: nowrap;
}

.category-card-sidebar-panel {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0;
}

/* Grouped sidebar — only rendered when the model sets CategoryGroups. */
.category-card-side-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.category-card-side-group-label {
  font-family: poppins-semibold, Arial, sans-serif;
  font-size: 1.08em;
  color: #2E3D50;
  padding: 0 4px;
  margin: 14px 0 6px;
}

.category-card-side-group-items {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.category-card-side-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 10px;
  font-family: poppins-medium, Arial, sans-serif;
  font-size: 1em;
  color: #45576E;
  transition: background .14s ease, color .14s ease;
}

.category-card-side-item:hover {
  background: rgba(15, 42, 80, .045);
}

.category-card-side-glyph {
  flex: 0 0 auto;
  width: 20px;
  text-align: center;
  font-size: 1.21em;
  color: #074793;
}

.category-card-side-name {
  flex: 1;
  min-width: 0;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-card-side-count {
  font-family: poppins-semibold, Arial, sans-serif;
  font-size: .85em;
  color: #64778F;
  background: rgba(15, 42, 80, .055);
  border-radius: 999px;
  min-width: 26px;
  text-align: center;
  padding: 2px 6px;
}

.category-card-side-item.is-active {
  background: #e0f8ff;
  color: #2E3D50;
}

.category-card-side-item.is-active .category-card-side-name {
  font-family: poppins-bold, Arial, sans-serif;
}

.category-card-side-item.is-active .category-card-side-count {
  background: #2563B0;
  color: #ffffff;
}

/* Top bar — sticky search + filter row above the cards. */
.category-card-topbar {
  position: sticky;
  top: 115px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 12px;
  margin: 0 -26px;
  padding: 22px 26px 18px;
  border-radius: 24px 24px 0 0;
  background: #F7F9FC;
  border-bottom: 1px solid transparent;
  transition: border-color .18s ease;
}

.category-card-topbar.is-stuck {
  border-bottom-color: #E7ECF3;
}

.category-card-topbar .category-card-search {
  flex: 0 1 620px;
  width: 100%;
  min-width: 0;
}

/* Cards panel — the rounded surface the wall sits on. */
.category-card-main {
  flex: 1;
  min-width: 0;
  background: #F7F9FC;
  border: 1px solid #E4EAF2;
  border-radius: 24px;
  padding: 0 26px 30px;
}

/* Filter — pills on desktop, a dropdown below 900px. */
.category-card-filterbar {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.category-card-filter-dd {
  position: relative;
  flex: 0 0 auto;
}

.category-card-filter-menu {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
}

/* Search box. */
.category-card-search {
  position: relative;
  flex: 1 1 440px;
  display: flex;
  align-items: center;
}

.category-card-search-ic {
  position: absolute;
  left: 16px;
  color: #2563B0;
  pointer-events: none;
}

.category-card-search-input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 46px;
  font-family: work-sans-regular, Arial, sans-serif;
  font-size: 1.19em;
  color: #2E3D50;
  padding: 0 44px 0 46px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1px solid #A9C4E4;
  box-shadow: 0 1px 2px rgba(11, 27, 51, .05), 0 0 0 4px rgba(37, 99, 176, .06);
  transition: border-color .16s ease, box-shadow .16s ease;
}

.category-card-search-input::placeholder {
  color: #5B6E88;
}

.category-card-search-input:focus-visible {
  outline: none;
}

.category-card-search-clear {
  position: absolute;
  right: 9px;
  width: 28px;
  height: 28px;
  border: none;
  background: #F0F4F9;
  color: #64778F;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.category-card-search-clear:hover {
  background: #E6ECF3;
  color: #2E3D50;
}

.category-card-filter-toggle {
  box-sizing: border-box;
  display: none;
  align-items: center;
  gap: 9px;
  height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  background: #FFFFFF;
  color: #45576E;
  border: 1px solid #DCE3EC;
  box-shadow: 0 1px 2px rgba(11, 27, 51, .05);
  font-family: poppins-semibold, Arial, sans-serif;
  font-size: 1.08em;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}

.category-card-filter-toggle:hover {
  border-color: #C6D2E1;
  color: #2E3D50;
}

.category-card-filter-dd.is-open .category-card-filter-toggle {
  border-color: #2563B0;
  color: #2563B0;
}

.category-card-filter-toggle-ic {
  font-size: 1em;
}

.category-card-filter-caret {
  font-size: 0.85em;
  margin-left: 2px;
  transition: transform .16s ease;
}

.category-card-filter-dd.is-open .category-card-filter-caret {
  transform: rotate(180deg);
}

/* Filter pills. */
.category-card-chip {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  flex: 0 0 auto;
  white-space: nowrap;
  cursor: pointer;
  font-family: poppins-medium, Arial, sans-serif;
  font-size: 1.02em;
  color: #45576E;
  background: #FFFFFF;
  border: 1px solid #DCE3EC;
  border-radius: 999px;
  padding: 0 14px;
  box-shadow: 0 1px 2px rgba(11, 27, 51, .05);
  transition: background .14s ease, color .14s ease, border-color .14s ease;
}

.category-card-chip:hover {
  border-color: #C6D2E1;
  color: #2E3D50;
}

.category-card-chip.is-active {
  background: rgba(37, 99, 176, .1);
  color: #2563B0;
  border-color: rgba(37, 99, 176, .38);
  font-family: poppins-semibold, Arial, sans-serif;
}

.category-card-chip-ic {
  opacity: .9;
}

/* Sections — one per category, each with a divider heading. */
.category-card-sections {
  margin-top: 0;
  padding: 0;
}

.category-card-section {
  margin-bottom: 44px;
}

.category-card-section:last-child {
  margin-bottom: 0;
}

.category-card-section-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-block: 30px;
}

.category-card-section-head::before,
.category-card-section-head::after {
  content: "";
  height: 2px;
  width: 15%;
  background: #68686824;
}

.category-card-section-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.category-card-section-title {
  font-family: poppins-semibold, Arial, sans-serif !important;
  font-size: 1.3em;
  color: #2E3D50;
  margin: 0;
  white-space: nowrap;
  flex: 0 0 auto;
}

/* Card grid. */
.category-card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Load more. */
.category-card-loadmore-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 22px;
}

.category-card-loadmore-row a {
  text-decoration: none;
  cursor: pointer;
}

.category-card-loadmore {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: poppins-semibold, Arial, sans-serif;
  font-size: 1.04em;
  color: #2563B0;
  background: #FFFFFF;
  border: 1.5px solid #E6ECF3;
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
  transition: all .15s ease;
}

.category-card-loadmore:hover {
  border-color: #2563B0;
  background: #EFF5FD;
}

.category-card-loadmore-count {
  color: #93A4B8;
  font-family: poppins-medium, Arial, sans-serif;
}

/* Card. */
.category-card {
  display: flex;
  flex-direction: column;
  flex: 0 1 calc((100% - 24px) / 3);
  min-width: 0;
  background: #FFFFFF;
  border: 1px solid #E6ECF3;
  border-radius: 8px;
  box-shadow: 2px 2px 6px #0000001a;
  padding: 12px 20px 12px;
  transition: transform .3s ease, box-shadow .3s ease;
  position: relative;
  overflow: hidden;
}

.category-card-layout[data-no-loadmore="1"] .category-card {
  content-visibility: auto;
  contain-intrinsic-size: auto 168px;
}

.category-card:hover {
  transform: translateY(-2px);
}

@keyframes category-card-reveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.category-card.is-revealing {
  animation: category-card-reveal .34s cubic-bezier(.22, .61, .36, 1) both;
}

.category-card.is-revealing:hover {
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .category-card.is-revealing {
    animation: none;
  }
}

/* Badge — a subtle pill above the title (the card's first child). */
.category-card-badge {
  align-self: flex-start;
  margin-bottom: 7px;
  padding: 2px 7px 3px;
  border-radius: 14px;
  background: #EEF3F9;
  border: 1px solid #dcecff;
  font-family: poppins-medium, Arial, sans-serif;
  font-size: 0.70em;
  line-height: 1.45;
  color: #4A5D75;
  white-space: nowrap;
}

/* Card title. */
.category-card-title {
  color: #005595;
  font-family: 'poppins-semibold';
  font-size: 1.2em;
  margin-bottom: 8px;
  letter-spacing: 0.25px;
}

.category-card-title h2,
.category-card-title h3,
.category-card-title h4 {
  font-family: inherit !important;
}

/* Card description + the read-more toggle. */
.category-card-desc {
  color: #64778F;
  font-size: 1.05em;
  line-height: 1.6em;
}

.category-card-dwrap .category-card-desc p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.category-card.is-open .category-card-desc p {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
}

.category-card-more {
  visibility: hidden;
  width: fit-content;
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  line-height: 1.6em;
  color: #3d679b;
  text-decoration: underline;
  cursor: pointer;
}

.category-card-dwrap.is-clamped .category-card-more {
  visibility: visible;
}

.category-card-more:hover {
  color: #1B4C8A;
}

/* Action row and its buttons. */
.category-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  flex-wrap: wrap;
  padding-top: 5px;
}

.category-card-actions>a {
  display: inline-flex;
  flex: 0 0 auto;
  text-decoration: none;
}

.category-card-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  font-family: poppins-semibold, Arial, sans-serif;
  font-size: .9em;
  color: #616161;
  background: none;
  padding: 4px 7px;
  border: 1.5px solid transparent;
  border-radius: 3px;
  box-shadow: none;
  cursor: pointer;
  transition: all .15s ease;
  text-decoration: none;
}

.category-card-button i {
  font-size: 1.2em;
}

.category-card-button:hover {
  color: #2563B0;
  background: #F5F8FC;
}

.category-card-button:active {
  transform: scale(.99);
}

.category-card-button.is-busy {
  opacity: .6;
  pointer-events: none;
}

.category-card-button.ok {
  color: #383838;
}

.category-card-button-lbl {
  white-space: nowrap;
}

/* Empty state. */
.category-card-empty {
  text-align: center;
  padding: 70px 20px;
  color: #93A4B8;
  background: #FFFFFF;
  border: 1px dashed #DCE3EC;
  border-radius: 16px;
}

.category-card-empty-text {
  font-size: 1.23em;
  margin: 14px 0 20px;
  color: #64778F;
}

.category-card-clear-all {
  background: #FFFFFF;
  color: #45576E;
  border: 1.5px solid #E6ECF3;
  box-shadow: 0 1px 2px rgba(20, 34, 61, .06), 0 1px 3px rgba(20, 34, 61, .05);
  border-radius: 6px;
  padding: 11px 20px;
  font-family: poppins-semibold, Arial, sans-serif;
  cursor: pointer;
  width: fit-content;
  margin: auto;
}

.category-card-clear-all:hover {
  border-color: #2563B0;
  color: #2563B0;
}

.category-card.is-hidden {
  display: none !important;
}

.category-card-section[hidden],
.category-card-sections[hidden],
.category-card-grid[hidden],
.category-card-side-item[hidden],
.category-card-loadmore-row[hidden],
.category-card-empty[hidden],
.category-card-search-clear[hidden] {
  display: none;
}

/* ---- Responsive ---- */
@media (max-width: 1240px) {
  .category-card {
    flex-basis: calc((100% - 12px) / 2);
  }
}

@media (min-width: 1025px) and (max-width: 1240px) {
  .category-card-filter-menu {
    gap: 6px;
  }

  .category-card-chip {
    font-size: .95em;
  }

  .category-card-chip-ic {
    display: none;
  }
}

@media (max-width: 1024px) {
  .category-card-filter-toggle {
    display: inline-flex;
  }

  .category-card-filter-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 40;
    min-width: 230px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px;
    background: #FFFFFF;
    border: 1px solid #E6ECF3;
    border-radius: 8px;
    box-shadow: 0 18px 44px rgba(20, 34, 61, .12), 0 6px 16px rgba(20, 34, 61, .07);
  }

  .category-card-filter-dd.is-open .category-card-filter-menu {
    display: flex;
  }

  .category-card-chip {
    width: 100%;
    height: auto;
    padding: 9px 12px;
    border-radius: 6px;
    background: none;
    border: 1.5px solid transparent;
    box-shadow: none;
    white-space: normal;
    font-size: 1.02em;
  }

  .category-card-chip:hover {
    background: #F5F8FC;
    border-color: transparent;
  }

  .category-card-chip.is-active {
    background: rgba(37, 99, 176, .12);
    border-color: rgba(37, 99, 176, .22);
  }
}

@media (max-width: 900px) {
  .category-card-split {
    display: block;
  }

  .category-card-sidebar {
    position: fixed;
    top: 119px;
    left: 0;
    width: 25%;
    height: 52px;
    z-index: 60;
    padding: 0;
    margin: 0;
    border-radius: 0;
    background: #FFFFFF;
    border-bottom: 1px solid #E6ECF3;
  }

  .category-card-sidebar-inner {
    position: static;
    height: 100%;
    padding: 0;
  }

  .category-card-sidebar-label {
    display: none;
  }

  .category-card-sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
    height: 100%;
    padding: 0 12px;
    cursor: pointer;
    background: none;
    border: none;
    font-family: poppins-semibold, Arial, sans-serif;
    font-size: 1.02em;
    color: #2E3D50;
  }

  .category-card-sidebar-toggle-lbl {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .category-card-sidebar-caret {
    flex: 0 0 auto;
    color: #64778F;
    transition: transform .16s ease;
  }

  .category-card-sidebar.is-open .category-card-sidebar-caret {
    transform: rotate(180deg);
  }

  .category-card-sidebar-panel {
    position: absolute;
    left: 0;
    top: 100%;
    font-size: 0.8em;
    width: min(80vw, 224px);
    z-index: 20;
    display: none;
    flex-direction: column;
    gap: 2px;
    max-height: 70vh;
    overflow: auto;
    padding: 8px;
    background: #FFFFFF;
    border: 1px solid #E6ECF3;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 18px 44px rgba(20, 34, 61, .12), 0 6px 16px rgba(20, 34, 61, .07);
  }

  .category-card-sidebar.is-open .category-card-sidebar-panel {
    display: flex;
  }

  .category-card-side-item {
    width: 100%;
  }

  .category-card-side-item.is-active {
    background: rgba(37, 99, 176, .08);
  }

  .category-card-topbar {
    position: fixed;
    top: 119px;
    left: 25%;
    right: 0;
    height: 52px;
    z-index: 50;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 8px;
    margin: 0;
    padding: 0 10px;
    border-radius: 0;
    background: #FFFFFF;
    border-bottom: 1px solid #E6ECF3;
  }

  .category-card-topbar.is-stuck {
    background: #FFFFFF;
    box-shadow: none;
  }

  .category-card-topbar .category-card-search {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
  }

  .category-card-search-input {
    height: 36px;
    padding: 0 30px 0 34px;
    font-size: 1em;
    border-radius: 999px;
  }

  .category-card-search-ic {
    left: 12px;
    font-size: 1.08em;
  }

  .category-card-filter-toggle {
    height: 36px;
    padding: 0 11px;
  }

  .category-card-filter-toggle-lbl,
  .category-card-filter-caret {
    display: none;
  }

  .category-card-main {
    padding: 0;
    border: 0;
    border-radius: 0;
  }

  .category-card-sections {
    margin-top: 0;
    padding: 20px 0 40px;
  }

  .category-card-grid {
    padding: 0 10px;
  }
}

@media (max-width: 698px) {
  .category-card-sidebar,
  .category-card-topbar {
    top: 89px;
  }
}

@media (max-width: 700px) {
  .category-card {
    flex-basis: 100%;
  }
}
