/* Solotech zoekbalk met directe resultaten (zoeken.js). Alles onder header .st-zoek / .st-zoek-knop. */
header .st-zoek,
header .st-zoek-knop,
.st-zoek-scherm {
  --z-ink: #1d2b36;
  --z-text: #4b5661;
  --z-muted: #5b6770;
  --z-line: #e3e8ec;
  --z-soft: #f4f7f9;
  --z-blue: #00a2dc;
  --z-blue-dark: #007aa8;
  --z-blue-text: #006d96;
  --z-blue-soft: #e8f6fc;
  --z-ease: cubic-bezier(0.23, 1, 0.32, 1);
  font-family: "Roboto", Arial, sans-serif;
}

/* ---------- het veld ---------- */
header .st-zoek { position: relative; display: none; margin: 0; }
header .st-zoek-label,
header .st-zoek-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
header .st-zoek-veld {
  position: relative;
  display: flex;
  align-items: center;
  height: 48px;
  border: 1.5px solid #cfd8de;
  border-radius: 999px;
  background: #fff;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
header .st-zoek-veld:hover { border-color: #aebcc6; }
header .st-zoek-veld:focus-within { border-color: var(--z-blue-dark); box-shadow: 0 0 0 4px rgba(0, 162, 220, .16); }
header .st-zoek-ico { display: grid; place-items: center; flex: none; width: 44px; padding-left: 4px; color: var(--z-muted); }
header .st-zoek input[type=search] {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 4px 0 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: 400 16px/1.2 "Roboto", Arial, sans-serif;
  color: var(--z-ink);
  -webkit-appearance: none;
  appearance: none;
}
header .st-zoek input[type=search]::placeholder { color: #7d8891; opacity: 1; }
header .st-zoek input[type=search]::-webkit-search-cancel-button { display: none; }
header .st-zoek-wis {
  display: grid; place-items: center; flex: none;
  width: 36px; height: 36px; margin-right: 2px; padding: 0;
  border: 0; border-radius: 50%; background: none; color: var(--z-muted); cursor: pointer;
}
header .st-zoek-wis[hidden] { display: none; }
header .st-zoek-wis:hover { background: var(--z-soft); color: var(--z-ink); }
header .st-zoek-go {
  flex: none;
  height: 38px;
  margin-right: 4px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--z-blue-dark);
  font: 500 15px/1 "Roboto", Arial, sans-serif;
  color: #fff;
  cursor: pointer;
  transition: background-color 150ms ease, transform 160ms var(--z-ease);
}
header .st-zoek-go:hover { background: #00668e; }
header .st-zoek-go:active { transform: scale(.97); }
header .st-zoek :is(button, a):focus-visible { outline: 3px solid var(--z-blue-text); outline-offset: 2px; }
header .st-zoek-dicht { display: none; }

/* ---------- knop (vergrootglas) op kleinere schermen ---------- */
header .st-zoek-knop {
  display: grid;
  place-items: center;
  flex: none;
  align-self: center;
  width: 46px;
  height: 46px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--z-line);
  border-radius: 50%;
  background: #fff;
  color: var(--z-ink);
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, transform 160ms var(--z-ease);
}
header .st-zoek-knop:hover { border-color: #b9dff0; background: var(--z-blue-soft); color: var(--z-blue-text); }
header .st-zoek-knop:active { transform: scale(.97); }
header .st-zoek-knop:focus-visible { outline: 3px solid var(--z-blue-text); outline-offset: 2px; }
header .st-zoek-knop[aria-expanded=true] { border-color: var(--z-blue-dark); background: var(--z-blue-soft); color: var(--z-blue-text); }
header .st-zoek-knop ~ .navbar-toggler { margin-left: 10px !important; }
@media (min-width: 992px) {
  header .st-zoek-knop { order: 5; margin-left: 10px; }
}

/* zoekbalk opengeklapt onder de header (onder 1280px) */
@media (max-width: 1279.98px) {
  header.st-zoek-open .st-zoek {
    display: flex;
    align-items: center;
    gap: 8px;
    position: absolute;
    top: 100%;
    left: calc(-1 * var(--bs-gutter-x, .75rem));
    right: 0;
    z-index: 2;
    padding: 10px 16px 12px;
    border-top: 1px solid var(--z-line);
    background: #fff;
    box-shadow: 0 14px 24px -18px rgba(14, 27, 36, .35);
  }
  header.st-zoek-open .st-zoek-veld { flex: 1; min-width: 0; }
  header.st-zoek-open .st-zoek-dicht {
    display: grid; place-items: center; flex: none;
    width: 44px; height: 44px; padding: 0;
    border: 0; border-radius: 50%; background: none; color: var(--z-ink); cursor: pointer;
  }
  header.st-zoek-open .st-zoek-dicht:hover { background: var(--z-soft); }
  header .st-zoek-paneel { left: 16px; right: 16px; top: calc(100% + 4px); }
  @media (prefers-reduced-motion: no-preference) {
    header.st-zoek-open .st-zoek { animation: st-zoek-in 200ms var(--z-ease); }
  }
}
@keyframes st-zoek-in { from { opacity: 0; transform: translateY(-6px); } }

/* altijd zichtbaar in de header vanaf 1280px */
@media (min-width: 1280px) {
  header .st-zoek-knop { display: none; }
  header .st-zoek { display: block; flex: 1 1 auto; min-width: 240px; max-width: 460px; margin: 0 8px 0 20px; }
  header nav.navbar > .navbar-brand { flex: none; }
  header nav.navbar > .navbar-brand img { width: 220px !important; height: auto; }
  header nav.navbar > .offcanvas { flex: 0 0 auto !important; width: auto !important; margin-left: auto; }
  header .st-zoek-paneel { left: 0; width: min(640px, calc(100vw - 48px)); }
}
@media (min-width: 1500px) {
  header nav.navbar > .navbar-brand img { width: 260px !important; }
}

/* ---------- paneel met suggesties ---------- */
header .st-zoek-paneel {
  position: absolute;
  top: calc(100% + 8px);
  z-index: 3;
  max-height: min(70vh, 640px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
  border: 1px solid var(--z-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 48px -20px rgba(14, 27, 36, .35);
  text-align: left;
  line-height: 1.4;
}
header .st-zoek-paneel[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  header .st-zoek-paneel:not([hidden]) {
    transition: opacity 160ms var(--z-ease), transform 160ms var(--z-ease);
    @starting-style { opacity: 0; transform: translateY(-4px); }
  }
}
header .st-zoek-kop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 8px 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--z-muted);
}
header .st-zoek-recent-wis {
  padding: 2px 6px; border: 0; border-radius: 6px; background: none;
  font: 400 13px/1.4 "Roboto", Arial, sans-serif; color: var(--z-blue-text); cursor: pointer;
}
header .st-zoek-recent-wis:hover { text-decoration: underline; text-underline-offset: 3px; }

/* recent gezocht */
header .st-zoek-term {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 10px;
  font-size: 15px; color: var(--z-ink) !important; text-decoration: none !important;
}
header .st-zoek-term svg { flex: none; color: var(--z-muted); }

/* categorieën als chips */
header .st-zoek-cats { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 6px 8px; }
header .st-zoek-cats--rij { padding-top: 6px; border-bottom: 1px solid var(--z-line); margin-bottom: 4px; padding-bottom: 10px; }
header .st-zoek-cat {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 5px 12px 5px 6px;
  border: 1px solid var(--z-line); border-radius: 999px; background: #fff;
  font-size: 14px; font-weight: 500; color: var(--z-ink) !important; text-decoration: none !important;
  transition: border-color 150ms ease, background-color 150ms ease;
}
header .st-zoek-cat:not(:has(img)) { padding-left: 12px; }
header .st-zoek-cat img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--z-soft); }
header .st-zoek-cat small { font-size: 12px; font-weight: 400; color: var(--z-muted); }

/* producten */
header .st-zoek-producten { margin: 0; padding: 0; list-style: none; }
header .st-zoek-producten li { margin: 0; }
header .st-zoek-prod {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 8px 10px;
  border-radius: 12px;
  color: var(--z-ink) !important;
  text-decoration: none !important;
}
header .st-zoek-foto {
  display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 10px; background: #fff;
  border: 1px solid var(--z-line); overflow: hidden;
}
header .st-zoek-foto img { width: 100%; height: 100%; object-fit: contain; }
header .st-zoek-tekst { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
header .st-zoek-naam {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 15px; font-weight: 400; color: var(--z-ink);
}
header .st-zoek-naam mark { padding: 0; background: none; font-weight: 700; color: var(--z-ink); }
header .st-zoek-sub { font-size: 13px; color: var(--z-muted); }
header .st-zoek-sub .is-uit { color: #b4232a; }
header .st-zoek-prijs { display: flex; flex-direction: column; align-items: flex-end; font-size: 16px; font-weight: 700; color: var(--z-ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
header .st-zoek-prijs small { font-size: 12px; font-weight: 400; color: var(--z-muted); }
header .st-zoek-prijs.is-leeg { font-size: 13px; font-weight: 400; color: var(--z-muted); }

/* alle resultaten */
header .st-zoek-alles {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 6px; padding: 12px 14px;
  border-radius: 12px; background: var(--z-blue-soft);
  font-size: 15px; color: var(--z-blue-text) !important; text-decoration: none !important;
}
header .st-zoek-alles b { font-weight: 700; }
header .st-zoek-alles svg { flex: none; transition: transform 160ms var(--z-ease); }
header .st-zoek-btw { font-size: 12px; font-weight: 400; }
/* "alle resultaten" blijft onderin zichtbaar, ook als de lijst scrolt */
header .st-zoek-alles { position: sticky; bottom: 0; box-shadow: 0 -10px 12px -2px #fff; }

/* niets gevonden */
header .st-zoek-niks { padding: 10px 10px 4px; font-size: 15px; color: var(--z-text); }
header .st-zoek-niks p { margin: 0 0 8px; }
header .st-zoek-niks b { color: var(--z-ink); }
header .st-zoek-niks a { color: var(--z-blue-text) !important; font-weight: 500; }

/* actieve optie (pijltjestoetsen) en hover */
header .st-zoek-paneel .is-actief { background: var(--z-soft); outline: 2px solid var(--z-blue-dark); outline-offset: -2px; }
header .st-zoek-cat.is-actief, header .st-zoek-alles.is-actief { background: var(--z-blue-soft); }
@media (hover: hover) and (pointer: fine) {
  header .st-zoek-term:hover, header .st-zoek-prod:hover { background: var(--z-soft); }
  header .st-zoek-cat:hover { border-color: #b9dff0; background: var(--z-blue-soft); }
  header .st-zoek-alles:hover svg { transform: translateX(3px); }
  header .st-zoek-prod:hover .st-zoek-naam { color: var(--z-blue-text); }
}

/* pagina iets dimmen zolang het paneel open is */
.st-zoek-scherm {
  position: fixed; inset: 0; z-index: 1029;
  background: rgba(14, 27, 36, .32);
  opacity: 0; visibility: hidden;
  transition: opacity 180ms ease, visibility 0s 180ms;
}
html.st-zoek-scherm-aan .st-zoek-scherm { opacity: 1; visibility: visible; transition: opacity 180ms ease; }

/* telefoon: logo, zoeken, menu en winkelwagen op één regel */
@media (max-width: 991.98px) {
  header nav.navbar { flex-wrap: nowrap; }
  header nav.navbar > .navbar-brand { flex: 0 1 auto; min-width: 0; margin-right: 8px; }
  header nav.navbar > .navbar-brand img { max-width: 100%; }
}
@media (max-width: 575.98px) {
  header nav.navbar > .navbar-brand img { width: 180px !important; }
  header .st-zoek-knop ~ .navbar-toggler { margin-left: 8px !important; }
  header nav.navbar > .btn-cart { margin-left: 8px !important; }
}
@media (max-width: 389.98px) {
  header nav.navbar > .navbar-brand img { width: 150px !important; }
}
@media (max-width: 575.98px) {
  header .st-zoek-go { display: none; }
  header.st-zoek-open .st-zoek { padding: 8px 12px 10px; }
  header .st-zoek-paneel { left: 0; right: 0; top: 100%; max-height: calc(100dvh - 190px); border-radius: 0 0 16px 16px; border-left: 0; border-right: 0; }
  header .st-zoek-prod { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; padding: 8px 6px; }
  header .st-zoek-foto { width: 48px; height: 48px; }
  header .st-zoek-prijs { font-size: 15px; }
  header .st-zoek-knop { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  header .st-zoek-veld, header .st-zoek-go, header .st-zoek-knop, header .st-zoek-alles svg, .st-zoek-scherm { transition: none; }
}

/* zolang de suggesties open zijn: koopbalk onderin en chatknoppen even weg, zodat ze niets afdekken */
html.st-zoek-scherm-aan :is(.st-buybar, .wa-icon, #launcher-frame, #freshworks-container, #fc_frame) {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
