/* Noa & Dje theme -- ZOEK-OVERLAY
   Paneel schuift UIT ONDER de sticky header. De offset wordt door JS gemeten
   (getBoundingClientRect().bottom van .nd-header) en als --nd-header-bottom gezet.
   VERPLICHT: [hidden] -> display:none, anders vangt de onzichtbare overlay clicks af. */

.nd-search-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(61,46,39,.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
  z-index: 9998;
}
.nd-search-backdrop[hidden] { display: none !important; }
.nd-search-backdrop.is-open { opacity: 1; pointer-events: auto; }

.nd-search {
  position: fixed;
  left: 0; right: 0;
  top: var(--nd-header-bottom, 120px);
  background: var(--bg);
  border-bottom: 1px solid rgba(137,112,98,.14);
  box-shadow: 0 18px 40px rgba(137,112,98,.16);
  z-index: 10000;
  transform: translateY(-14px);
  opacity: 0;
  pointer-events: none;
  transition: transform .32s var(--ease), opacity .32s var(--ease);
  max-height: calc(100vh - var(--nd-header-bottom, 120px));
  overflow-y: auto;
}
.nd-search[hidden] { display: none !important; }
.nd-search.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }

.nd-search-inner { max-width: 820px; margin: 0 auto; padding: 2rem 4% 2.4rem; }
.nd-search-form { display: flex; align-items: center; gap: .8rem; border-bottom: 2px solid var(--rose); padding-bottom: .6rem; }
.nd-search-form svg { width: 20px; height: 20px; color: var(--rose); flex-shrink: 0; }
.nd-search-form input[type="search"] {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font-head);
  font-size: clamp(1.2rem, 3vw, 1.9rem);
  font-weight: 600;
  color: var(--text);
  padding: .3rem 0;
  border-radius: 0;
  -webkit-appearance: none;
}
.nd-search-form input[type="search"]:focus { outline: none; }
.nd-search-form input::placeholder { color: rgba(137,112,98,.5); }
.nd-search-form button[type="submit"] {
  font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #fff; background: var(--rose); padding: .6rem 1.2rem; border-radius: 0;
  transition: background .25s;
}
.nd-search-form button[type="submit"]:hover { background: var(--rose-dark); }
.nd-search-close { position: absolute; top: .8rem; right: 1.2rem; font-size: 1.6rem; line-height: 1; color: var(--brown); }
.nd-search-close:hover { color: var(--rose); }

.nd-search-hint { font-size: .74rem; color: var(--brown); margin-top: .8rem; letter-spacing: .04em; }
.nd-search-terms { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.nd-search-terms a {
  font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  border: 1.5px solid rgba(137,112,98,.2); padding: .4rem 1rem; color: var(--text);
  transition: all .25s var(--ease);
}
.nd-search-terms a:hover { background: var(--rose); border-color: var(--rose); color: #fff; }

/* live resultaten */
.nd-search-results { margin-top: 1.6rem; }
.nd-search-results:empty { display: none; }
.nd-search-res-item {
  display: grid; grid-template-columns: 62px 1fr auto; gap: 1rem; align-items: center;
  padding: .7rem 0; border-bottom: 1px solid rgba(137,112,98,.1);
}
.nd-search-res-item img { width: 62px; height: 76px; object-fit: cover; background: var(--cream); }
.nd-search-res-item h4 { font-family: var(--font-body); font-size: .88rem; font-weight: 600; }
.nd-search-res-item .cat { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--brown); }
.nd-search-res-item .price { font-family: var(--font-body); font-size: .9rem; font-weight: 700; color: var(--rose); }
.nd-search-res-item:hover h4 { color: var(--rose); }
.nd-search-none { font-size: .88rem; color: var(--brown); padding: 1rem 0; }
.nd-search-all { display: inline-block; margin-top: 1rem; }

/* header mag boven de backdrop blijven zolang de zoekbalk open staat */
body.nd-search-open .masthead { z-index: 10001; }

/* zoekresultaten-pagina */
.nd-search-page { max-width: var(--maxw); margin: 0 auto; padding: 3rem 4% 5rem; }
.nd-search-page .results-count { font-size: .82rem; color: var(--brown); margin-bottom: 1.6rem; }
