.search-suggestions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: .9rem;
}

.suggestion-label {
  color: var(--ink-soft, #52655f);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.search-chip {
  background: rgba(255, 255, 255, .78);
  border: 1px solid var(--line, #d9ded9);
  border-radius: 999px;
  color: var(--green, #2d6856);
  font-size: .78rem;
  font-weight: 750;
  min-height: 36px;
  padding: .38rem .78rem;
  text-decoration: none;
}

.search-chip:hover,
.search-chip:focus-visible {
  background: #fff;
  border-color: var(--green, #2d6856);
}

.discovery-page-hero {
  padding-bottom: 4.25rem;
}

.discovery-page-hero h1 {
  overflow-wrap: anywhere;
}

.discovery-shell {
  margin: 0 auto;
  max-width: var(--content-width, 1440px);
  min-width: 0;
}

.discovery-form {
  background: #fff;
  border: 1px solid var(--line, #d9ded9);
  border-radius: 24px;
  box-shadow: 0 14px 40px rgba(31, 75, 63, .08);
  padding: clamp(1rem, 2vw, 1.5rem);
}

.discovery-query {
  margin-bottom: 1.2rem;
}

.discovery-query > label {
  display: block;
  font-size: .78rem;
  font-weight: 800;
  margin-bottom: .4rem;
}

.discovery-query > div {
  display: grid;
  gap: .65rem;
  grid-template-columns: minmax(0, 1fr) auto;
}

.discovery-query input,
.discovery-filter-panel input,
.discovery-filter-panel select {
  background: #fff;
  border: 1px solid #b8c5c0;
  border-radius: 12px;
  color: var(--ink, #173f35);
  min-height: 44px;
  padding: .65rem .75rem;
  width: 100%;
}

.discovery-query input {
  font-size: 1rem;
  padding-inline: 1rem;
}

.discovery-filter-panel {
  align-items: end;
  display: grid;
  gap: .85rem;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.discovery-filter-panel > label {
  display: grid;
  font-size: .72rem;
  font-weight: 800;
  gap: .32rem;
  min-width: 0;
}

.discovery-filter-panel fieldset {
  border: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .9rem;
  grid-column: 1 / -1;
  margin: .2rem 0 0;
  padding: .85rem 0 0;
}

.discovery-filter-panel legend {
  float: left;
  font-size: .72rem;
  font-weight: 850;
  margin-right: 1rem;
}

.discovery-filter-panel .check-filter {
  align-items: center;
  display: inline-flex;
  font-size: .78rem;
  font-weight: 700;
  gap: .4rem;
  min-height: 36px;
}

.discovery-filter-panel .check-filter input {
  accent-color: var(--green, #2d6856);
  min-height: 20px;
  width: 20px;
}

.mobile-filter-toggle {
  align-items: center;
  background: #fff;
  border: 1px solid var(--green, #2d6856);
  border-radius: 999px;
  color: var(--green, #2d6856);
  display: none;
  font-weight: 800;
  gap: .5rem;
  margin-bottom: .75rem;
  min-height: 44px;
  padding: .55rem 1rem;
}

.active-filter-bar,
.discovery-results-head {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.active-filter-bar {
  min-height: 52px;
  padding: .65rem 0;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.active-filter {
  background: #eef4ef;
  border: 1px solid #cbd8d2;
  border-radius: 999px;
  color: var(--ink, #173f35);
  font-size: .72rem;
  font-weight: 750;
  min-height: 36px;
  padding: .38rem .7rem;
}

.text-button {
  background: transparent;
  border: 0;
  color: var(--green, #2d6856);
  font-size: .78rem;
  font-weight: 800;
  min-height: 44px;
  padding: .4rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.discovery-results-head {
  border-bottom: 1px solid var(--line, #d9ded9);
  margin-bottom: 1.25rem;
  padding: .8rem 0 1rem;
}

.discovery-results-head h2 {
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  margin: 0;
}

.discovery-results-head output {
  color: var(--ink-soft, #52655f);
  flex: none;
  font-size: .84rem;
  font-weight: 800;
}

.discovery-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
}

.discovery-deal-card {
  max-width: 360px;
  min-width: 0;
  width: 100%;
}

.discovery-deal-card mark,
.search-popover mark {
  background: #e6ff9b;
  color: inherit;
  padding: 0 .08em;
}

.discovery-empty {
  margin-top: 1rem;
}

.category-introduction {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin: 0 auto 1.5rem;
  max-width: var(--content-width, 1440px);
}

.category-introduction p {
  margin: 0;
}

.category-deal-count {
  background: var(--lime, #d9ff78);
  border-radius: 999px;
  flex: none;
  font-size: .76rem;
  font-weight: 850;
  padding: .45rem .75rem;
}

.category-featured {
  align-items: center;
  background: linear-gradient(120deg, #173f35, #2d6856);
  border-radius: 28px;
  color: #fff;
  display: grid;
  gap: clamp(1.5rem, 4vw, 4rem);
  grid-template-columns: minmax(0, 1fr) minmax(260px, .75fr);
  margin: 0 auto 2rem;
  max-width: var(--content-width, 1440px);
  overflow: hidden;
  padding: clamp(1.3rem, 4vw, 3rem);
}

.category-featured h2 {
  font-size: clamp(1.8rem, 4vw, 3.4rem);
}

.category-featured p {
  color: #d5e3de;
}

.category-featured img,
.category-featured .featured-placeholder {
  background: #f8f7f2;
  border-radius: 20px;
  height: min(300px, 38vw);
  max-height: 300px;
  object-fit: contain;
  padding: 1rem;
  width: 100%;
}

.related-categories {
  border-top: 1px solid var(--line, #d9ded9);
  margin: 3rem auto 0;
  max-width: var(--content-width, 1440px);
  padding-top: 2rem;
}

.related-categories h2 {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
}

.related-categories > div,
.trending-category-list {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.related-categories a,
.trending-category-list a {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line, #d9ded9);
  border-radius: 16px;
  display: flex;
  justify-content: space-between;
  min-height: 64px;
  padding: .9rem 1rem;
  text-decoration: none;
}

.trending-category-list span {
  color: var(--ink-soft, #52655f);
  font-size: .75rem;
}

.back-to-results {
  display: inline-flex;
  font-size: .82rem;
  font-weight: 800;
  margin-bottom: 1rem;
  min-height: 44px;
  padding: .6rem 0;
}

.related-deals {
  margin: clamp(3rem, 7vw, 6rem) auto 0;
  max-width: var(--content-width, 1440px);
}

.related-deals .section-head p {
  max-width: 760px;
}

.recently-viewed[hidden],
.discovery-empty[hidden],
.recent-searches[hidden] {
  display: none !important;
}

@media (min-width: 1500px) {
  .discovery-filter-panel {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .discovery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .discovery-filter-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .mobile-filter-toggle {
    display: inline-flex;
  }

  .discovery-filter-panel {
    display: none;
    grid-template-columns: 1fr 1fr;
  }

  .filters-open .discovery-filter-panel {
    display: grid;
  }

  .discovery-query > div {
    grid-template-columns: 1fr;
  }

  .discovery-query .button {
    justify-self: start;
  }

  .category-introduction {
    align-items: flex-start;
    flex-direction: column;
  }

  .category-featured {
    grid-template-columns: 1fr;
  }

  .category-featured img,
  .category-featured .featured-placeholder {
    height: 230px;
  }

  .active-filter-bar,
  .discovery-results-head {
    align-items: flex-start;
  }

  .search-suggestions {
    align-items: flex-start;
  }
}

@media (max-width: 430px) {
  .discovery-filter-panel {
    grid-template-columns: 1fr;
  }

  .discovery-filter-panel fieldset {
    align-items: flex-start;
    flex-direction: column;
  }

  .discovery-results-head {
    flex-direction: column;
    gap: .35rem;
  }

  .discovery-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .discovery-deal-card {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .search-chip,
  .active-filter,
  .discovery-deal-card {
    scroll-behavior: auto;
    transition: none !important;
  }
}
