/* ==========================================================================
   Catalog Page Controls, Toolbar Panel & Active Filter Chips
   ========================================================================== */

.catalog-panel {
  background: #ffffff;
  border: 1px solid #d6e0d4;
  border-radius: 20px;
  padding: 20px 22px;
  margin-bottom: 1.5rem;
  box-shadow: 0 12px 28px -12px rgba(22, 38, 25, 0.1), 0 1px 3px rgba(22, 38, 25, 0.04);
}

.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) minmax(11rem, 0.36fr) minmax(12.5rem, 0.42fr);
  gap: 1rem;
  align-items: end;
}

.catalog-control {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  color: #3a4e3f;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.catalog-control:focus-within > span:first-child {
  color: #1f5c35;
}

.catalog-panel .search-field input {
  background: #f7faf6;
  border-color: #d1ddd0;
}

.catalog-panel .search-field input:focus {
  background: #ffffff;
  border-color: #317447;
}

.catalog-panel .custom-select.is-light {
  background: #f7faf6;
}

.catalog-panel .custom-select.is-light:hover {
  background: #ffffff;
}

#catalog-tabs .task-tabs {
  margin-bottom: 1.2rem;
}

.catalog-results-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  min-height: 3.25rem;
  border-top: 1px solid #d4ddd2;
  padding-top: 0.45rem;
  margin-bottom: 0.9rem;
}

.catalog-results-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.catalog-results-heading .result-count {
  margin: 0;
  color: #4f6253;
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.active-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 10px 4px 12px;
  border-radius: 999px;
  border: 1px solid #bfd3c1;
  background: #e6f2e7;
  color: #1c4429;
  font-size: 0.78rem;
  font-weight: 600;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.active-filter-chip:hover {
  background: #d4e9d6;
  border-color: #8cb592;
}

.active-filter-chip svg {
  width: 13px;
  height: 13px;
}

.catalog-reset {
  min-height: 44px;
  padding: 0.5rem 0;
  border: 0;
  background: transparent;
  color: #255537;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: #8ba893;
  text-underline-offset: 0.25rem;
  transition: color 0.18s ease;
}

.catalog-reset:hover {
  color: #153822;
}

@media (max-width: 760px) {
  .catalog-panel {
    padding: 16px;
    border-radius: 18px;
  }

  .catalog-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem 0.65rem;
  }

  .catalog-search-control {
    grid-column: 1 / -1;
  }

  .catalog-control .custom-select {
    padding: 0 12px;
    font-size: 0.875rem;
  }
}

@media (max-width: 390px) {
  .catalog-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Each subject has a distinct printed pattern across its catalogue cover. */
.product-grid .product-card {
  --card-gutter: clamp(17px, 1.55vw, 24px);
  padding: 0 var(--card-gutter) var(--card-gutter);
}
.product-card::before { display: none; }
.service-cover {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 98px;
  margin: 0 calc(-1 * var(--card-gutter)) 1.15rem;
  padding: 14px var(--card-gutter);
  gap: .75rem;
  background: var(--brand-bg, #e6efe6);
  border-bottom: 1px solid rgb(40 64 43 / 10%);
}
.service-cover::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  inset: 0 -20% 0 30%;
  background: repeating-radial-gradient(ellipse at 72% 190%, transparent 0 10px, rgb(43 71 56 / 24%) 10.5px 11.2px, transparent 11.7px 15px);
  mask-image: linear-gradient(90deg, transparent, black 54%);
}
.service-cover[data-field="code"]::before {
  background: repeating-linear-gradient(132deg, transparent 0 9px, rgb(63 56 98 / 25%) 9.4px 10.2px, transparent 10.6px 15px);
}
.service-cover[data-field="create"]::before {
  background: repeating-radial-gradient(ellipse at 72% 6%, transparent 0 4px, rgb(104 68 102 / 23%) 4.5px 5.3px, transparent 5.8px 12px);
}
.service-cover[data-field="work"]::before {
  background: radial-gradient(ellipse, rgb(54 81 59 / 32%) 0 1.2px, transparent 1.6px) 0 0 / 8px 8px;
}
.service-cover .service-logo {
  width: 51px;
  height: 51px;
  flex: none;
  background: rgb(255 255 255 / 78%);
  border: 1px solid rgb(90 110 94 / 16%);
  border-radius: 15px;
}
.service-cover .service-logo img { width: 30px; height: 30px; }
.cover-category {
  flex: 1;
  max-width: 13em;
  color: #35483b;
  font-size: .85rem;
  line-height: 1.35;
  font-weight: 650;
}
.service-cover .heart { flex: none; margin-inline-start: auto; background: #fffffff2; border-color: #687c6e45; }
.service-cover .heart[aria-pressed="true"] { color: #23583b; background: #e7f6e8; border-color: #688b72; }
.product-grid .card-desc { min-height: 2.8em; }
@media (max-width: 600px) {
  .service-cover { min-height: 82px; }
  .product-grid .card-desc { min-height: 0; }
}
