/* ── SEARCH OVERLAY ── */
#search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28,18,8,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9998;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 20px 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
#search-overlay.open {
  opacity: 1;
  pointer-events: all;
}
#search-panel {
  background: #faf8f3;
  border-radius: 16px;
  width: 100%;
  max-width: 580px;
  box-shadow: 0 24px 64px rgba(28,18,8,0.22);
  overflow: hidden;
  transform: translateY(-10px);
  transition: transform 0.2s;
}
#search-overlay.open #search-panel {
  transform: translateY(0);
}

/* input row */
#search-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid #e4d9c8;
}
#search-icon-svg { color: #6b5f4e; flex-shrink: 0; }
#search-input {
  flex: 1;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 1rem;
  color: #1c1208;
  background: none;
  border: none;
  outline: none;
}
#search-input::placeholder { color: rgba(28,18,8,0.35); }
#search-kbd {
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(28,18,8,0.3);
  background: rgba(28,18,8,0.07);
  padding: 2px 7px;
  border-radius: 5px;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}
#search-close {
  background: none;
  border: none;
  color: #6b5f4e;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: color 0.2s;
}
#search-close:hover { color: #1c1208; }

/* results */
#search-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 8px 0;
}
.search-hint {
  padding: 18px 20px;
  font-size: 0.87rem;
  color: #6b5f4e;
  font-family: 'DM Sans', system-ui, sans-serif;
}
.search-result {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 20px;
  text-decoration: none;
  color: inherit;
  border-left: 3px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}
.search-result:hover,
.search-result.active {
  background: #fff8e1;
  border-left-color: #ffc62a;
}
.search-result-cat {
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b5f4e;
  font-family: 'DM Sans', system-ui, sans-serif;
}
.search-result-title {
  font-size: 0.95rem;
  color: #1c1208;
  font-weight: 600;
  line-height: 1.3;
  font-family: 'DM Sans', system-ui, sans-serif;
}
.search-result-excerpt {
  font-size: 0.82rem;
  color: #6b5f4e;
  line-height: 1.5;
  font-family: 'DM Sans', system-ui, sans-serif;
}

/* nav button */
.nav-search-btn {
  background: none;
  border: none;
  color: rgba(28,18,8,0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.nav-search-btn:hover { color: #1c1208; }

@media (max-width: 640px) {
  #search-overlay { padding: 60px 16px 16px; }
  #search-kbd { display: none; }
}
