.catalog-filter-layout.catalog-controls {
  display: grid;
  grid-template-columns: minmax(200px, 0.7fr) minmax(0, 1fr);
  gap: 0 16px;
}

.catalog-filter-layout .catalog-lookup {
  display: flex;
  min-width: 0;
}

.catalog-facet-panel {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px 12px;
  min-width: 0;
}

.catalog-facet-panel .material-field {
  flex: 0 1 184px;
  max-width: 100%;
}

.catalog-disclosure {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 46px;
  padding: 0 11px;
  border: 1px solid var(--line-control);
  border-radius: 3px;
  background: var(--surface-field);
  color: var(--accent-dark);
  font-size: .87rem;
  font-weight: 650;
}

.catalog-disclosure[aria-expanded="true"],
.catalog-disclosure:has(.catalog-filter-count:not([hidden])) {
  border-color: var(--line-selected);
  background: var(--surface-selected);
}

.catalog-filter-count {
  white-space: nowrap;
}

.catalog-filter-chevron {
  width: 7px;
  height: 7px;
  margin-inline-start: 2px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.catalog-disclosure[aria-expanded="true"] .catalog-filter-chevron {
  transform: translateY(2px) rotate(225deg);
}

.catalog-reset {
  justify-self: start;
  grid-column: 1 / -1;
  min-height: 44px;
  padding: 0;
  border: 0;
  background-color: transparent;
  font-size: .87rem;
  text-align: start;
}

@media (max-width: 760px) {
  .catalog-filter-layout.catalog-controls {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 9px;
  }

  .catalog-filter-layout .catalog-lookup {
    gap: 7px;
  }

  .catalog-filter-layout .search-field {
    padding-inline: 9px;
  }

  .catalog-filter-layout .search-field input {
    min-width: 0;
  }

  .catalog-disclosure {
    flex: 0 1 auto;
    max-width: 47%;
    padding-inline: 9px;
    overflow-wrap: anywhere;
  }

  .catalog-filter-chevron {
    flex-shrink: 0;
  }

  .catalog-facet-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding-block: 2px;
  }

  .catalog-facet-panel .catalog-filters {
    order: initial;
  }
}

@media (max-width: 640px) {
  #collection {
    padding-block: 24px 48px;
  }

  #collection .section-heading {
    gap: 8px;
    margin-block-end: 16px;
  }

  #collection .section-heading h1 {
    font-size: clamp(2.5rem, 9vw, 3.6rem);
  }

  #collection .section-heading > p {
    font-size: 1rem;
  }

  #compare-models th a {
    min-height: 44px;
  }

  #compare-models {
    margin-block-end: 12px;
  }

  .catalog-filter-layout.catalog-controls {
    row-gap: 8px;
    padding-block-start: 0;
    border-block-start: 0;
  }

  .catalog-filter-layout .search-field,
  .catalog-disclosure,
  .catalog-facet-panel select {
    min-height: 48px;
  }

  .catalog-filter-layout .search-field input {
    min-height: 46px;
  }

  .catalog-filter-layout .search-field input,
  .catalog-facet-panel select {
    font-size: 1rem;
  }

  .catalog-disclosure {
    padding-block: 5px;
    line-height: 1.3;
    hyphens: auto;
  }

  .catalog-facet-panel {
    padding-block: 2px 10px;
    border-block-end: 1px solid var(--line);
  }

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

  .catalog-facet-panel .catalog-filters button {
    min-width: 0;
    padding: 4px 6px;
    line-height: 1.25;
    overflow-wrap: anywhere;
    hyphens: auto;
  }

  .catalog-count {
    margin-block: 8px 11px;
  }

  #product-grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 26px;
  }

  #product-grid .product-open {
    display: flex;
    flex-direction: column;
  }

  #product-grid .product-image {
    aspect-ratio: 3 / 2;
  }

  #product-grid .product-meta {
    order: -1;
    min-height: 0;
    padding-block: 0 10px;
  }

  #product-grid .product-title {
    font-size: clamp(1.7rem, 6vw, 2.25rem);
    line-height: 1.12;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-decoration-color: var(--brand-gold-muted);
    text-underline-offset: .15em;
    overflow-wrap: anywhere;
  }

  #product-grid .card-specs {
    grid-row: 3;
    margin-block-start: 12px;
  }

  #product-grid .card-specs > div {
    padding-block: 7px;
  }

  #product-grid .product-actions {
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 8px;
    margin-block-start: 10px;
  }

  #product-grid .product-actions .button {
    min-height: 48px;
    padding-inline: 8px;
    text-align: center;
    overflow-wrap: anywhere;
    hyphens: auto;
  }
}
