/* Sorting, price range, paging and list view on the brand catalogue. */
.catalogue-display { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 6px; }
.catalogue-display label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.catalogue-display select { min-height: 44px; }

.catalogue-view { display: inline-flex; }
.catalogue-view button,
.catalogue-pagination button {
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  color: var(--fm-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  background: transparent;
  border: 1px solid var(--fm-ink);
  border-radius: 0;
  cursor: pointer;
}
.catalogue-view button + button { margin-left: -1px; }
.catalogue-view button[aria-pressed="true"],
.catalogue-pagination button[aria-current="page"] { color: #fff9ef; background: #171616; }

.catalogue-pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 28px; }
.catalogue-pagination[hidden] { display: none; }
.catalogue-pagination button:disabled { opacity: .4; cursor: default; }

/* Clears the sticky header when a page change scrolls back to the first product. */
.fs-view:has(.catalogue-filters) .fs-grid { scroll-margin-top: 96px; }

body .fs-pageheading:has(.catalogue-filters) + .fs-grid.is-list { grid-template-columns: minmax(0, 1fr); gap: 14px; }
body .fs-grid.is-list .fs-card { flex-direction: row; align-items: stretch; gap: 16px; }
body .fs-grid.is-list .fs-card-image { flex: 0 0 clamp(104px, 18vw, 180px); aspect-ratio: 1; }
body .fs-grid.is-list .fs-card-image img { width: 100%; height: 100%; }
body .fs-grid.is-list .fs-card-body { flex: 1; min-width: 0; justify-content: center; }

@media (min-width: 900px) {
  body .fs-pageheading:has(.catalogue-filters) > #catalogue-count { align-self: center; }
  body .fs-pageheading:has(.catalogue-filters) > .catalogue-display { grid-column: 2; grid-row: 3; justify-self: end; margin: 0; }
}

@media (max-width: 600px) {
  /* Availability takes the last row on its own so the two price boxes stay side by side. */
  .catalogue-filters label:last-child { grid-column: 1 / -1; }
  .catalogue-display { justify-content: space-between; }
  .catalogue-display select { font-size: 16px; }
}

@media (min-width: 601px) and (max-width: 899px) {
  /* Two even rows of four, so the price range stays together. */
  .catalogue-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 12px; }
  .catalogue-filters :is(input, select) { width: 100%; min-width: 0; }
}
