/* DealAdler 5.1 — focused UX, discoverability and performance polish. */
:root {
  --da-focus-ring: 0 0 0 4px rgba(255, 153, 0, .18);
  --da-control-shadow: 0 8px 24px rgba(17, 24, 32, .08);
}

html { scrollbar-gutter: stable; }
body { overflow-x: clip; }

/* Search: real, keyboard-accessible suggestions without a framework. */
.da-search { z-index: 930; }
.da-search input { padding-right: 46px; }
.da-search__clear {
  position: absolute;
  right: 6px;
  top: 50%;
  z-index: 2;
  width: 32px;
  min-height: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--da-muted);
}
.da-search__clear:hover { background: #e9edf1; color: var(--da-ink); }
.da-search__clear .da-icon { width: 16px; height: 16px; }
.da-search-suggestions {
  position: absolute;
  z-index: 960;
  top: calc(100% + 9px);
  left: 0;
  right: 0;
  max-height: min(66vh, 560px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 9px;
  border: 1px solid #d7dde3;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 26px 72px rgba(17, 24, 32, .22);
}
.da-search-suggestions__group { display: grid; gap: 2px; }
.da-search-suggestions__group + .da-search-suggestions__group {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--da-line-soft);
}
.da-search-suggestions__group > span {
  padding: 5px 9px 4px;
  color: var(--da-muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.da-search-suggestion {
  min-width: 0;
  min-height: 52px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border-radius: 10px;
  color: var(--da-ink);
  text-decoration: none;
}
.da-search-suggestion:hover,
.da-search-suggestion.is-active,
.da-search-suggestion[aria-selected="true"] { background: #f2f4f6; }
.da-search-suggestion__icon,
.da-search-suggestion__thumb {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--da-line-soft);
  border-radius: 9px;
  background: #f7f8fa;
  color: var(--da-primary-strong);
}
.da-search-suggestion__icon .da-icon { width: 17px; height: 17px; }
.da-search-suggestion__thumb img {
  width: 100%;
  height: 100%;
  padding: 3px;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.da-search-suggestion > span:last-child { min-width: 0; }
.da-search-suggestion strong,
.da-search-suggestion small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.da-search-suggestion strong { font-size: 13px; line-height: 1.35; }
.da-search-suggestion small { margin-top: 2px; color: var(--da-muted); font-size: 11px; }
.da-search-all {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 0 12px;
  border-top: 1px solid var(--da-line-soft);
  color: var(--da-primary-strong);
  text-align: center;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 850;
}
.da-search-empty { padding: 16px 12px; color: var(--da-muted); text-align: center; font-size: 12.5px; }

/* Hero hierarchy and trust cues. */
.home-hero { overflow: clip; }
.home-hero__inner { align-items: center; }
.home-hero__copy { min-width: 0; }
.home-hero__eyebrow { max-width: fit-content; line-height: 1.35; }
.home-hero__proofs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 17px;
  color: #cbd3db;
  font-size: 12px;
  font-weight: 650;
}
.home-hero__proofs span { display: inline-flex; align-items: center; gap: 6px; }
.home-hero__proofs .da-icon { width: 14px; height: 14px; color: #61d39a; }
.home-hero__stats {
  padding-top: 23px;
  border-top: 1px solid rgba(255, 255, 255, .12);
}
.home-hero__stats div { min-width: 0; }
.home-hero__stats span { max-width: 150px; line-height: 1.35; }
.featured-deal { isolation: isolate; }
.featured-deal__content { align-items: center; }
.featured-deal__image img { object-fit: contain; mix-blend-mode: multiply; }

/* Filters: immediately understandable state and easy removal. */
.da-filter-count {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  margin-left: 2px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--da-primary);
  color: var(--da-ink);
  font-size: 10px;
  font-weight: 900;
}
.da-active-filters {
  margin: 0 0 15px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px 12px;
  padding: 10px 12px;
  border: 1px solid var(--da-line);
  border-radius: 12px;
  background: #fff;
}
.da-active-filters > span {
  color: var(--da-muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.da-active-filters > div { min-width: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.da-active-filter {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid #d8dde3;
  border-radius: 999px;
  background: #f7f8fa;
  color: #323b46;
  font-size: 11px;
  font-weight: 750;
}
.da-active-filter:hover { border-color: #aeb6bf; background: #fff; }
.da-active-filter::after { content: "×"; color: var(--da-muted); font-size: 14px; line-height: 1; }
.da-active-filters > button {
  min-height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--da-primary-strong);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}
.da-active-filters > button:hover { background: var(--da-primary-soft); }

.category-filter__search { padding: 14px 16px 2px; }
.category-filter__search > label {
  display: block;
  margin-bottom: 6px;
  color: var(--da-muted);
  font-size: 10.5px;
  font-weight: 850;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.category-filter__search > div { position: relative; }
.category-filter__search .da-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: var(--da-muted);
  pointer-events: none;
}
.category-filter__search input {
  width: 100%;
  height: 42px;
  min-height: 42px;
  padding: 0 11px 0 36px;
  border: 1px solid var(--da-line);
  border-radius: 10px;
  background: #f8f9fa;
  color: var(--da-ink);
  outline: 0;
  font-size: 13px;
}
.category-filter__search input:focus { border-color: #abb3bc; background: #fff; box-shadow: var(--da-focus-ring); }
.da-active-filters--category { margin-top: 12px; }

/* Disabled integrations become useful, not dead ends. */
.da-service-fallback {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 11px;
  background: rgba(255, 255, 255, .065);
}
.da-service-fallback strong { display: block; color: inherit; font-size: 13px; line-height: 1.35; }
.da-service-fallback p { margin: 5px 0 0; color: inherit; opacity: .78; font-size: 11.5px; line-height: 1.5; }
.da-service-fallback__actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.da-service-fallback__actions a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 9px;
  color: #fff;
  text-decoration: none;
  font-size: 11.5px;
  font-weight: 800;
}
.da-service-fallback__actions a:first-child { border-color: var(--da-primary); background: var(--da-primary); color: var(--da-ink); }
form.is-unavailable > :not(.da-form-status):not(.da-service-fallback):not(.da-service-message) { display: none !important; }
form.is-unavailable .da-form-status { margin-top: 0; }
.contact-form .da-service-fallback,
.price-alert-form .da-service-fallback,
form[data-api-form="price-alert"] .da-service-fallback,
form[data-api-form="contact"] .da-service-fallback {
  border-color: var(--da-line);
  background: #f7f8fa;
  color: var(--da-ink);
}
.contact-form .da-service-fallback__actions a,
.price-alert-form .da-service-fallback__actions a,
form[data-api-form="price-alert"] .da-service-fallback__actions a,
form[data-api-form="contact"] .da-service-fallback__actions a { border-color: var(--da-line); color: var(--da-ink); }

/* Card readability and interaction polish. */
.deal-tile__title a:focus-visible { border-radius: 4px; }
.deal-tile__saving { min-height: 1.5em; }
.deal-tile__actions > a { text-align: center; }
.deal-tile__price { flex-wrap: wrap; }
.deal-tile__old { white-space: nowrap; }
.product-grid[aria-busy="true"],
.category-grid[aria-busy="true"] { opacity: .72; }

/* Prevent sticky header from visually swallowing anchored headings. */
:target { scroll-margin-top: 150px; }

@media (max-width: 920px) {
  .da-search-suggestions { max-height: min(58vh, 500px); }
  .home-hero__inner { align-items: stretch; }
  .home-hero__copy { max-width: 740px; }
}

@media (max-width: 720px) {
  :target { scroll-margin-top: 166px; }
  .da-search-suggestions {
    left: -1px;
    right: -1px;
    top: calc(100% + 7px);
    max-height: min(54vh, 440px);
    border-radius: 12px;
  }
  .da-search-suggestion { min-height: 49px; }
  .da-search-suggestions__group > span { position: sticky; top: -9px; z-index: 1; background: #fff; }
  .home-hero__inner { padding-top: 34px; }
  .home-hero__eyebrow { max-width: 100%; }
  .home-hero__proofs { gap: 8px 12px; font-size: 11.5px; }
  .home-hero__stats { margin-top: 22px; padding-top: 18px; }
  .home-hero__stats span { font-size: 10px; }
  .da-active-filters { grid-template-columns: 1fr auto; align-items: start; }
  .da-active-filters > span { grid-column: 1; }
  .da-active-filters > div { grid-column: 1 / -1; grid-row: 2; }
  .da-active-filters > button { grid-column: 2; grid-row: 1; }
  .category-filter__search { padding-inline: 14px; }
}

@media (max-width: 520px) {
  .home-hero__inner { padding-top: 28px; }
  .home-hero h1 { font-size: clamp(34px, 10.7vw, 46px); line-height: 1.02; }
  .home-hero__copy > p { margin-top: 17px; line-height: 1.58; }
  .home-hero__proofs { display: grid; grid-template-columns: 1fr; }
  .home-hero__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .featured-deal__top { align-items: flex-start; gap: 7px; }
  .featured-deal__top span:last-child { text-align: right; }
  .da-active-filters { margin-inline: 0; }
  .da-active-filter { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .da-search-suggestions { scroll-behavior: auto; }
}
