/* Catalog, collection and search pages share a compact page rhythm. */
:is(.browse-catalog, .browse-collection) .catalog-intro,
.store-search-page .ss-main {
  padding-top: 24px;
}

:is(.browse-catalog, .browse-collection) .catalog-intro {
  padding-bottom: 16px;
}

:is(.browse-catalog, .browse-collection) .catalog-intro h1,
.store-search-page .ss-heading h1 {
  margin: 0 0 8px;
  font-size: clamp(36px, 5vw, 40px);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.12;
  text-align: left;
  overflow-wrap: anywhere;
}

:is(.browse-catalog, .browse-collection) .catalog-intro > p:not(.kicker):not(.breadcrumb),
.store-search-page .ss-heading > p {
  max-width: 60ch;
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.5;
}

:is(.browse-catalog, .browse-collection) .catalog-intro :is(.breadcrumb, .kicker) {
  margin: 0 0 8px;
}

:is(.browse-catalog, .browse-collection) .catalog-intro .breadcrumb {
  font-size: 12px !important;
  color: #52625b !important;
}

:is(.browse-catalog, .browse-collection) :is(.catalog-reference, .browse-reference) {
  padding: 0;
  border: 0;
}

:is(.browse-catalog, .browse-collection) :is(.catalog-reference, .browse-reference) > summary {
  align-content: center;
  width: fit-content;
  min-height: 40px;
  font-size: 14px;
  font-weight: 650;
  color: #295342;
}

.browse-catalog .catalog-reference .sort-method {
  margin-top: 8px;
}

:is(.browse-catalog, .browse-collection) .catalog-browser {
  padding-top: 0;
}

:is(.browse-catalog, .browse-collection) .catalog-search-row {
  margin-bottom: 10px;
}

:is(.browse-catalog, .browse-collection) .catalog-controls label {
  min-width: 0;
  font-size: 13px;
}

:is(.browse-catalog, .browse-collection) .catalog-controls :is(input, select) {
  min-width: 0;
  min-height: 44px;
  margin-top: 4px;
}

:is(.browse-catalog, .browse-collection) .catalog-filter-panel > summary span {
  font-size: 12px;
}

:is(.browse-catalog, .browse-collection) .catalog-results-heading {
  margin: 0 0 12px;
  padding: 0 0 8px;
}

:is(.browse-catalog, .browse-collection) #catalog-count {
  margin: 0;
  font-size: 13px;
  color: #52625b;
}

.browse-collection:not(.streamlined-catalog) main .new-section + .new-section {
  padding-top: 18px;
}

.browse-collection main > section:not(.catalog-intro) > h2 {
  margin-bottom: 8px;
}

:is(.browse-catalog, .browse-collection) .catalog-photo,
.store-search-page .ss-media {
  aspect-ratio: 4 / 3;
  background: #edf0eb;
}

.store-search-page .ss-media {
  height: auto;
}

:is(.browse-catalog, .browse-collection) .catalog-photo img,
.store-search-page .ss-media img {
  width: 88%;
  height: 88%;
  object-fit: contain;
}

:is(.browse-catalog, .browse-collection) .catalog-photo > span,
.store-search-page .ss-badge {
  inset: 8px auto auto 8px;
  max-width: calc(100% - 16px);
  padding: 4px 6px;
  color: #284338;
  background: #fff;
  font-size: 11px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: .02em;
}

:is(.browse-catalog, .browse-collection) .catalog-card-copy {
  padding-top: 12px;
}

:is(.browse-catalog, .browse-collection) .catalog-card-copy > small,
.store-search-page .ss-card-copy > small {
  font-size: 12px;
}

:is(.browse-catalog, .browse-collection) .catalog-card-copy h3,
.store-search-page .ss-card h2 {
  font-size: 16px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

:is(.browse-catalog, .browse-collection) .catalog-card-copy > p,
.store-search-page .ss-desc {
  font-size: 14px;
  line-height: 1.5;
}

:is(.browse-catalog, .browse-collection) .catalog-card-copy :is(.msrp-line, .quote-only),
.store-search-page .ss-price small {
  font-size: 12px;
}

:is(.browse-catalog, .browse-collection) .catalog-card-copy .card-action,
.store-search-page .ss-card-actions {
  font-size: 14px;
  overflow-wrap: anywhere;
}

.store-search-page .ss-main {
  max-width: 1440px;
  padding-inline: 5vw;
}

.store-search-page .ss-heading {
  max-width: none;
  margin: 0 0 14px;
  text-align: left;
}

.store-search-page .ss-search {
  margin: 0 0 18px;
}

.store-search-page .ss-search input {
  min-height: 48px;
  font-size: 16px;
}

.store-search-page .ss-filter-accordion {
  padding: 0;
}

.store-search-page .ss-filter-accordion > summary {
  min-height: 44px;
}

.store-search-page .ss-filter-body fieldset,
.store-search-page .ss-price-inputs label {
  min-width: 0;
}

.store-search-page .ss-filter-body :is(select, input:not([type="radio"])),
.store-search-page .ss-tools select {
  min-height: 44px;
  font-size: 16px;
}

.store-search-page :is(.ss-reset, .ss-view button, .ss-pages button) {
  min-width: 44px;
  min-height: 44px;
}

.store-search-page .ss-chips:empty {
  display: none;
}

.store-search-page .ss-chips button {
  min-height: 36px;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.store-search-page .ss-grid.is-list .ss-media {
  align-self: start;
  width: 190px;
  min-height: 0;
}

.store-search-page .ss-pages {
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  :is(.browse-catalog, .browse-collection) .catalog-intro,
  .store-search-page .ss-main {
    padding: 16px 16px 8px;
  }

  :is(.browse-catalog, .browse-collection) .catalog-filter-panel {
    margin-bottom: 10px;
  }

  :is(.browse-catalog, .browse-collection) .catalog-filter-panel > summary {
    min-height: 44px;
    padding: 12px;
  }

  :is(.browse-catalog, .browse-collection) .catalog-filter-panel > summary span {
    display: inline;
    margin: 0 0 0 8px;
  }

  :is(.browse-catalog, .browse-collection) .catalog-search-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    padding: 8px 10px;
  }

  :is(.browse-catalog, .browse-collection) .catalog-search-row :is(input, select) {
    padding-inline: 8px;
  }

  .store-search-page .ss-main {
    padding-bottom: 88px;
  }

  .store-search-page .ss-layout {
    display: block;
  }

  .store-search-page .ss-sidebar {
    position: static;
    margin-bottom: 12px;
  }

  .store-search-page .ss-toolbar {
    display: block;
    margin-bottom: 12px;
  }

  .store-search-page .ss-tools {
    flex-flow: row wrap;
    align-items: end;
    justify-content: space-between;
    margin-top: 8px;
  }

  .store-search-page .ss-tools label {
    display: grid;
    gap: 4px;
    flex: 1 1 155px;
  }

  .store-search-page .ss-tools select {
    width: 100%;
    max-width: none;
    margin-left: 0;
  }

  .store-search-page .ss-grid.is-list .ss-media {
    width: clamp(100px, 30vw, 155px);
  }
}

@media (max-width: 360px) {
  :is(.browse-catalog, .browse-collection) .catalog-search-row {
    grid-template-columns: 1fr;
  }
}

.store-search-page .ss-media:focus-visible,
.store-search-page .ss-view button:focus-visible {
  outline-offset: -3px;
}

.store-search-page .ss-card-copy > small {
  text-transform: none;
}

.market-shop-links,
.market-needs {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .85rem;
}

.market-shop-links {
  margin: .75rem 0;
}

.market-shop-links a,
.market-needs a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: #285340;
  font-size: .875rem;
  font-weight: 650;
  text-decoration-thickness: .075em;
  text-underline-offset: .2em;
}

.market-shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.market-shop-card {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  align-items: flex-start;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid #d8e1d8;
  border-radius: .5rem;
  background: #f7f9f6;
}

.market-shop-card h2 {
  margin: 0;
  font-size: 1.35rem;
}

.market-shop-card .outline-button {
  margin-top: auto;
}

.demand-page .demand-intro {
  max-width: min(100%, 1120px);
}

.demand-page .market-section {
  margin-top: 2rem;
}

.demand-page .market-section .research-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  margin: .85rem 0 0;
}

.demand-page .research-card {
  border-radius: .5rem;
}

.demand-page .research-card h3 {
  margin: 0 0 .65rem;
  font-size: 1.2rem;
}

.demand-page .market-sources {
  padding-inline-start: 1.2rem;
  margin: .75rem 0;
  font-size: .875rem;
}

.demand-page .market-needs {
  border-top: 1px solid #d8e1d8;
}

.browse-catalog .catalog-refinements label {
  font-size: .875rem;
}

.browse-catalog .catalog-filter-panel:has(#catalog-buyer) .catalog-refinements {
  gap: .85rem;
}

@media (max-width: 768px) {
  .browse-catalog .catalog-filter-panel:has(#catalog-buyer) .catalog-refinements {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
