/* 16px prevents focus-triggered viewport zoom while keeping pinch zoom available. */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select,
textarea {
  font-size: 16px !important;
}

#result-price {
  font-size: inherit !important;
}

.marketplace-results {
  padding: 48px 0 80px;
  /* The root already reserves the sticky navigation via scroll-padding-top. */
  scroll-margin-top: 0;
  container: marketplace-results / inline-size;
}

.marketplace-results[hidden] {
  display: none;
}

.marketplace-head {
  margin-bottom: 30px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.hero-copy .speed-headline,
.marketplace-head h2 {
  max-width: none;
  font-size: clamp(38px, 10.5vw, 54px);
  line-height: .98;
  letter-spacing: -2.8px;
}

.marketplace-head h2 { margin: 10px 0 0; }

@media (min-width: 1000px) {
  .hero-copy .speed-headline,
  .marketplace-head h2 {
    font-size: clamp(48px, 5.2vw, 76px);
    letter-spacing: -.04em;
  }
}

.marketplace-result-count {
  margin: 0;
  color: #687a71;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.marketplace-pagination {
  min-height: 42px;
  margin: 18px 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.marketplace-pagination[hidden] {
  display: none;
}

.marketplace-pagination a {
  min-width: 38px;
  height: 38px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5c7;
  border-radius: 999px;
  background: #fffef9;
  color: #174d3d;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.marketplace-pagination a[aria-current="page"] {
  border-color: #174d3d;
  background: #174d3d;
  color: #fff;
}

.marketplace-pagination a:focus-visible {
  outline: 3px solid #9dce5a;
  outline-offset: 2px;
}

.marketplace-filters {
  width: 100%;
  margin-bottom: 24px;
  padding: 22px;
  border: 1px solid #d4dccd;
  border-radius: 22px;
  background: #fffef9;
}

.marketplace-filter-toggle {
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  cursor: default;
}

.marketplace-filter-toggle::-webkit-details-marker {
  display: none;
}

.marketplace-filter-toggle > span {
  font-size: 22px;
  font-weight: 850;
}

.marketplace-result-toolbar,
.marketplace-filter-grid {
  margin: 0;
}

.marketplace-result-toolbar label,
.marketplace-filter-grid label {
  display: grid;
  gap: 7px;
  color: #123f33;
  font-size: 12px;
  font-weight: 850;
}

.marketplace-result-toolbar select,
.marketplace-filter-grid input,
.marketplace-filter-grid select {
  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 0 15px;
  border: 1px solid #cbd5c7;
  border-radius: 14px;
  background: #fff;
  color: #123f33;
  font: inherit;
}

.marketplace-filter-grid {
  display: grid;
  align-items: end;
  gap: 8px;
}

.marketplace-filter-actions {
  height: 52px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.marketplace-filter-actions button {
  min-height: 52px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  background: #205947;
  color: #fff;
  font-weight: 850;
  white-space: nowrap;
}

.marketplace-filter-actions button:last-child {
  background: #edf1e7;
  color: #123f33;
}

.marketplace-results-layout {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.marketplace-ad-slot {
  position: sticky;
  top: 102px;
  min-width: 0;
}

.marketplace-ad-label {
  width: max-content;
  margin: 8px 0 0 10px;
  padding: 5px 9px;
  display: block;
  border: 1px solid #d4dccd;
  border-radius: 999px;
  color: #687a71;
  background: #fffef9;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.marketplace-ad-slot picture,
.marketplace-ad-slot img {
  width: 100%;
  display: block;
}

.marketplace-ad-slot img {
  height: auto;
  aspect-ratio: 1 / 2;
  overflow: hidden;
  border: 1px solid #d4dccd;
  border-radius: 24px;
  background: #fffef9;
  object-fit: cover;
}

.marketplace-listing-grid {
  width: 100%;
  margin: 0;
  display: grid;
  gap: 12px;
}

.marketplace-listing-card {
  min-height: 190px;
  padding: 13px;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 22px;
  border: 1px solid #d4dccd;
  border-radius: 20px;
  background: #fffef9;
  transition: transform .15s, border-color .15s;
}

.marketplace-listing-card:hover {
  transform: translateY(-2px);
  border-color: #9ab68b;
}

.marketplace-listing-image {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: 14px;
  background: #e4e8dd;
}

.marketplace-listing-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.marketplace-listing-image span {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #173d31d9;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.marketplace-listing-copy {
  min-width: 0;
  padding: 9px 0;
}

.marketplace-listing-copy h3 {
  margin: 0 0 8px;
  font-size: 23px;
  letter-spacing: -.025em;
}

.marketplace-listing-copy > p {
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  color: #566b62;
  line-height: 1.5;
}

.marketplace-listing-footer {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.marketplace-listing-footer > strong {
  font-size: 23px;
  line-height: 1;
  white-space: nowrap;
}

.marketplace-listing-footer > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.marketplace-listing-footer span {
  padding: 6px 9px;
  border-radius: 999px;
  background: #edf2e6;
  font-size: 11px;
  font-weight: 800;
}

.marketplace-listing-age {
  padding: 0;
  color: #687a71;
  font-size: 11px;
  font-weight: 650;
}

.marketplace-empty {
  padding: 70px 25px;
  text-align: center;
  border: 1px dashed #bfcbbb;
  border-radius: 24px;
  background: #ffffff80;
}

.marketplace-empty h3 {
  margin: 0 0 10px;
  font-size: 30px;
}

.marketplace-empty p {
  margin: 0;
  color: #687a71;
  line-height: 1.6;
}

@media (max-width: 1050px) {
  .marketplace-listing-card {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .marketplace-filters:not([open]) {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .marketplace-filters:not([open]) .marketplace-filter-toggle {
    margin-bottom: 0;
  }

  .marketplace-filter-toggle {
    cursor: pointer;
  }

  .marketplace-filter-toggle::after {
    content: "−";
    font-size: 24px;
    font-weight: 500;
    line-height: 1;
  }

  .marketplace-filters:not([open]) .marketplace-filter-toggle::after {
    content: "+";
  }
}

@container marketplace-results (max-width: 879px) {
  .marketplace-results-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .marketplace-ad-slot {
    display: none;
  }
}

@media (max-width: 700px) {
  .marketplace-results {
    padding-top: 36px;
  }

  .marketplace-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .marketplace-result-count {
    white-space: normal;
  }

  .marketplace-listing-card {
    min-height: 150px;
  }

  .marketplace-listing-copy h3 {
    margin-top: 8px;
    font-size: 18px;
  }

  .marketplace-listing-footer > strong {
    font-size: 19px;
  }
}
