/* =========================
   Header component
========================= */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 20;
}

/* Outer shell */
.header__shell {
  max-width: var(--container);
  margin: 0 auto;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between; /* desktop: logo links, nav rechts */
  gap: 16px;
}

/* Logo */
.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  flex: 0 0 auto;
}

.brand__logo {
  height: 80px;
  max-height: 80px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* =========================
   Desktop navigation
========================= */

.nav {
  display: flex;
  align-items: center;
}

/* Desktop nav layout */
.nav--desktop {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

/* Container voor categorie-links */
.nav__links {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Links */
.nav__link {
  text-decoration: none;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 10px;

  /* ✅ token-driven menu pill */
  background: var(--nav-pill-bg);
  border: 1px solid var(--border);

  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
}

.nav__link:hover {
  background: var(--nav-pill-hover-bg);
  border-color: var(--border);
  text-decoration: none; /* voorkomt underline in menu */
}

/* =========================
   Search bar (desktop)
========================= */

.nav__search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}

.nav__search input[type="search"] {
  width: 220px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;

  /* ✅ token-driven search input */
  border: 1px solid var(--search-border);
  background: var(--search-bg);
  color: var(--search-text);

  font-size: 14px;
  outline: none;
}

.nav__search input[type="search"]::placeholder {
  color: var(--muted);
}

.nav__search input[type="search"]:focus {
  border-color: var(--text);
}

.nav__search button {
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;

  /* ✅ token-driven primary button */
  background: var(--search-btn-bg);
  color: var(--search-btn-text);
  border: 1px solid var(--search-btn-bg);

  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.nav__search button:hover {
  background: var(--search-btn-hover-bg);
  border-color: var(--search-btn-hover-bg);
}

/* =========================
   Burger (mobile)
========================= */

/* ✅ Desktop/default: burger UIT */
.burger {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  align-items: center;
  justify-content: center;
  flex-direction: column; /* streepjes onder elkaar */
  gap: 5px;
  padding: 0;
}

.burger:hover {
  background: var(--surface);
}

.burger__bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
}

/* =========================
   Drawer (mobile menu) – over alles heen
========================= */

.drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999; /* boven header */
}

.drawer.is-open {
  display: block;
}

.drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.drawer__panel {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: min(320px, 88vw);
  background: var(--bg);
  border-right: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.drawer__title {
  font-weight: 800;
  letter-spacing: -0.01em;
}

.drawer__close {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 16px;
  line-height: 1;
}

.drawer__close:hover {
  background: var(--surface);
}

/* Mobile nav */
.nav--mobile {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav__link--mobile {
  padding: 12px;
  border: 1px solid var(--border);
  background: var(--nav-pill-bg);
  border-radius: 12px;
  font-weight: 700;
}

.nav__link--mobile:hover {
  background: var(--nav-pill-hover-bg);
}

/* ✅ Als drawer open is: verberg logo (optioneel, voorkomt overlap) */
.site-header.drawer-open .brand {
  opacity: 0;
  pointer-events: none;
}

/* =========================
   Responsive
========================= */

@media (max-width: 860px) {
  /* shell: burger links, logo gecentreerd */
  .header__shell {
    position: relative;
    justify-content: flex-start;
  }

  .nav--desktop {
    display: none;
  }

  .nav__search {
    display: none;
  }

  /* ✅ Mobile: burger AAN */
  .burger {
    display: flex;
    flex: 0 0 auto;
    z-index: 2;
  }

  /* ✅ Center logo */
  .brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
  }

  .brand__logo {
    height: 52px;
    max-height: 52px;
  }
}