/* header.css */

/* 0) Roboto importeren van Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

:root {
  --header-height-desktop: 138px;
  --header-height-tablet: 120px;
  --header-height-mobile: 102px;
}

/* ALGEMEEN */
/* 1) Header gebruikt overal Roboto */
.header, .header * {
  box-sizing: border-box;
}

.header {
  font-family: 'Roboto', sans-serif;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1050;
  background-color: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 26, 40, 0.08);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  min-height: var(--header-height-desktop);
}
@media (max-width: 1023px) {
  .header { min-height: var(--header-height-tablet); }
}
@media (max-width: 767px) {
  .header { min-height: var(--header-height-mobile); }
}

.header__mode {
  display: none;
}

/* 2) Avatar iets groter voor balans */
.header__user-avatar {
  width: 1.25em;
  height: 1.25em;
}

/* CONTAINERS & SPACING */
/* 4) Logo-tekst */
.header__logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  gap: 0.5rem;
}

.header__logo-picture {
  display: block;
  line-height: 0;
}

.header__logo-img {
  display: block;
  height: 40px;
  width: auto;
}

/* Reserveer scrollbarbreedte zodat de header niet springt */
body {
  overflow-y: scroll;
}

/* 5) Container rondom header-inhoud */
.header__container {
  max-width: 1240px;
  width: calc(100% - 32px);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
}

/* Reserve ruimte voor scrollbars zodat de header niet verspringt bij laden */
@supports (scrollbar-gutter: stable) {
  body {
    scrollbar-gutter: stable both-edges;
  }
}

/* 6) Top- en bottom-rij */
.header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 64px;
  padding: 0.75rem 0;
}

.header__bottom {
  border-top: 1px solid #e5e7eb;
}

/* 7) Zoekveld opsmukken */
.header__search {
  display: none;
}

@media (min-width: 768px) {
  .header__search {
    flex: 1 1 360px;
    max-width: 520px;
    margin: 0 2rem;
    display: flex;
    min-width: 0;
  }

  .header__search-inner {
    display: flex;
    align-items: center;
    flex: 1;
    background: #ffffff;
    border: 1px solid #d0d5dd;
    border-radius: 12px;
    padding: 0.5rem 0.5rem 0.5rem 2.5rem;
    position: relative;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }

  .header__search-inner:focus-within {
    border-color: #c8102e;
    box-shadow: 0 0 0 4px rgba(200,16,46,0.08);
  }

  .header__search-icon {
    position: absolute;
    left: 0.9rem;
    width: 1.1rem;
    height: 1.1rem;
    color: #94a3b8;
  }

  .header__search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    color: #0f1a28;
  }

  .header__search-input::placeholder {
    color: #9ca3af;
  }

  .header__search-input:focus {
    outline: none;
  }

  .header__search-btn {
    margin-left: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1rem;
    border-radius: 12px;
    border: none;
    background: #c8102e;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
  }

  .header__search-btn svg {
    width: 1.1rem;
    height: 1.1rem;
    color: #fff;
  }

  .header__search-btn:hover {
    background: #a10d25;
  }
}

/* ACTIEKNOPPEN (taal, verzoek, login/register, notificaties, avatar) */
.header__actions {
  display: none;
}

@media (min-width: 768px) {
  .header__actions {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex: 0 0 auto;
  }

  .header__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    padding: 0.5rem 1.1rem;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  }

  .header__button--ghost {
    color: #1f2a44;
    background: transparent;
  }

  .header__button--ghost:hover {
    background: #f4f4f5;
  }

  .header__button--outline {
    border: 1px solid #c8102e;
    color: #c8102e;
    background: transparent;
  }

  .header__button--outline:hover {
    background: #c8102e;
    color: #fff;
    box-shadow: 0 8px 18px rgba(200,16,46,0.16);
  }

  .header__button--primary {
    border: 1px solid #c8102e;
    background: #c8102e;
    color: #fff;
    box-shadow: 0 8px 18px rgba(200,16,46,0.25);
  }

  .header__button--primary:hover {
    background: #a10d25;
    border-color: #a10d25;
  }

  .header__mode {
    display: inline-flex;
    align-items: center;
    margin-left: 1.25rem;
  }

  .header__mode-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #f8fafc;
    padding: 6px 12px;
    cursor: pointer;
    font-weight: 600;
    transition: border-color 0.2s ease, background 0.2s ease;
  }

  .header__mode-word {
    font-size: 0.9rem;
    color: #2563eb;
    min-width: 80px;
    text-align: left;
  }

  .header__mode-btn.is-seller .header__mode-word {
    color: #047857;
  }

  .header__mode-switch {
    position: relative;
    width: 44px;
    height: 22px;
    border-radius: 999px;
    background: #d1d5db;
    transition: background 0.2s ease;
  }

  .header__mode-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
    transition: transform 0.2s ease;
  }

  .header__mode-btn.is-seller {
    border-color: #22c55e;
    background: #ecfdf5;
  }

  .header__mode-btn.is-seller .header__mode-switch {
    background: #22c55e;
  }

  .header__mode-btn.is-seller .header__mode-switch::after {
    transform: translateX(22px);
  }

  .header__mode-btn.is-buyer {
    border-color: #bfdbfe;
    background: #f0f9ff;
  }

  .header__mode-btn.is-buyer .header__mode-switch {
    background: #bfdbfe;
  }

  .header__mode-btn:focus-visible {
    outline: 2px solid rgba(37,99,235,0.45);
    outline-offset: 2px;
  }
}

@media (max-width: 1180px) {
  .header__mode {
    display: none;
  }
}

@media (min-width: 768px) and (max-width: 1080px) {
  .header__actions {
    gap: 0.65rem;
  }

  .header__search {
    margin: 0 1rem;
    max-width: 420px;
  }
}

@media (min-width: 768px) and (max-width: 940px) {
  .header__search {
    margin: 0 0.5rem;
    max-width: 360px;
  }

  .header__button {
    padding: 0.45rem 0.9rem;
  }
}

/* TAAL KEUZEMENU */
.header__lang {
  position: relative;
}

.header__lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 0.65rem;
  font-size: 0.9rem;
  background: #f9fafb;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  color: #1f2937;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.header__lang-btn:hover {
  background: #f1f5f9;
}

/* GEBRUIKERSAVATAR + DROPDOWN */
.header__user {
  position: relative;
}

.header__user-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.header__user-status {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 2px solid #fff;
  background: #3b82f6;
}

.header__user-status.seller {
  background: #22c55e;
}

/* DROPDOWN MENU STANDAARD VERBORGEN */
.header__dropdown-list {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  min-width: 160px;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1001;
}

/* ZICHTBAAR MAKEN NA CLICK */
.header__dropdown-list.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ITEMS IN DROPDOWN */
.header__dropdown-item {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: #374151;
  text-decoration: none;
}

.header__dropdown-item-icon {
  width: 18px;
  height: 18px;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.header__dropdown-mode {
  padding: 0.6rem 1rem 0.5rem;
}

.header__dropdown-mode-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header__dropdown-mode-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: #1f2937;
}

.header__dropdown-mode-title.is-seller {
  color: #047857;
}

.header__dropdown-mode-title.is-buyer {
  color: #2563eb;
}

.header__dropdown-mode-sub {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  color: #6b7280;
}

.header__mode-mini {
  width: 42px;
  height: 22px;
  border-radius: 999px;
  border: none;
  background: #d1d5db;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}

.header__mode-mini.is-buyer {
  background: #bfdbfe;
}

.header__mode-mini-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  transition: transform 0.2s ease;
}

.header__mode-mini.is-seller {
  background: #22c55e;
}

.header__mode-mini.is-seller .header__mode-mini-thumb {
  transform: translateX(20px);
}

.header__dropdown-sep {
  height: 1px;
  background: #e5e7eb;
  margin: 0.3rem 0 0.4rem;
}

.header__dropdown-item:hover,
.header__dropdown-item:focus {
  background-color: #f9fafb;
}

/* BOTTOM NAVIGATIE */
.header__nav {
  display: none;
}

@media (min-width: 768px) {
  .header__nav {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    padding: 12px 0 14px;
    min-height: 52px;
    border-top: 1px solid #e5e7eb;
    margin-top: 0;
  }

  .header__nav-link {
    font-size: 0.95rem;
    color: #475569;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
    position: relative;
  }

  .header__nav-link:hover,
  .header__nav-link:focus {
    color: #c8102e;
  }

  .header__nav-link.is-active {
    color: #c8102e;
  }

  .header__nav-link.is-active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 3px;
    background: #c8102e;
    border-radius: 999px;
  }
}

/* BODY PADDING ZODAT CONTENT ONDER HEADER BEGINT */
body {
  padding-top: 120px;
}

/* RESPONSIVE: verberg desktop-only elementen op small screens */
@media (max-width: 767px) {
  .header__search {
    display: none;
  }
}

/* OPTIONEEL: notitie-badge (als je notificatie-btn gebruikt) */
.notification-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
}

.notification-btn .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: #ef4444;
  color: #ffffff;
  font-size: 0.75rem;
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
}


.header__lang-chevron {
  width: 0.8rem;
  height: 0.8rem;
  color: #9ca3af;
}

@media (min-width: 1024px) {
  
}

.header__lang-btn svg {
  width: 1.05rem;
  height: 1.05rem;
}

.header__icon-button {
  display: inline-flex;
  width: 2.6rem;
  height: 2.6rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f9fafb;
  border: 1px solid transparent;
  color: #c8102e;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  position: relative;
}

.header__icon-button svg {
  width: 1.2rem;
  height: 1.2rem;
}

.header__icon-button:hover {
  background: #f1f5f9;
  border-color: rgba(200, 16, 46, 0.2);
}

.header__icon-button:active {
  transform: translateY(1px);
}

.header__icon-button.is-active {
  background: rgba(200, 16, 46, 0.1);
  border-color: rgba(200, 16, 46, 0.3);
}

.badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #c8102e;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  display: none;
}

.header__icon-button.has-badge .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.header__lang-btn svg + span,
.header__lang-btn .header__lang-chevron {
  display: none;
}

@media (min-width: 768px) {
  .header__lang-btn {
    padding: 0.45rem 0.55rem;
  }
}

.header__button-icon {
  width: 1rem;
  height: 1rem;
  margin-right: 6px;
}

.header__mobile {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.header__mobile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #334155;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.header__mobile-btn:hover {
  background: #f3f4f6;
  color: #c8102e;
}

.header__mobile-btn svg {
  width: 1.1rem;
  height: 1.1rem;
}

body.mobile-menu-open {
  overflow: hidden;
}

body.kc-mobile-nav-visible {
  padding-bottom: 86px;
}

.header__mobile-menu {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1050;
}

.header__mobile-menu.open {
  display: block;
}

.header__mobile-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(2px);
}

.header__mobile-menu-panel {
  position: absolute;
  inset: 0;
  background: #ffffff;
  padding: 18px 20px 32px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.header__mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 1.2rem;
}

.header__mobile-menu-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.header__mobile-menu-logo img {
  height: 34px;
  display: block;
}

.header__mobile-menu-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.header__mobile-menu-icon {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: #1f2937;
}

.header__mobile-menu-icon svg {
  width: 22px;
  height: 22px;
}

.header__mobile-menu-section {
  margin-bottom: 28px;
}

@media (min-width: 768px) {
  .header__mobile {
    display: none;
  }

  .header__mobile-menu {
    display: none !important;
  }
}

.header__mobile-menu-mode {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 24px;
}

.header__mobile-menu-mode-title {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  color: #1f2937;
}

.header__mobile-menu-mode-title.is-seller { color: #047857; }
.header__mobile-menu-mode-title.is-buyer { color: #2563eb; }

.header__mobile-menu-mode-sub {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: #6b7280;
}

.header__mobile-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.header__mobile-menu-list a {
  text-decoration: none;
  color: #1f2937;
  font-size: 1.05rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.header__mobile-menu-list a.is-active {
  color: #c8102e;
}

.header__mobile-menu-list-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #eef2f7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  font-size: 1rem;
}

.header__mobile-menu-list-icon svg {
  width: 18px;
  height: 18px;
}

.header__mobile-menu-section-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 10px;
}

.header__mobile-menu-lang {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.header__mobile-menu-lang li + li {
  margin-top: 4px;
}

.header__mobile-menu-lang a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.95rem;
  color: #1f2937;
}

.header__mobile-menu-lang a.is-active {
  background: rgba(200, 16, 46, 0.08);
  color: #c8102e;
  font-weight: 600;
}

.header__mobile-menu-lang a .check {
  font-size: 0.85rem;
  color: #c8102e;
}

.kc-mobile-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.12);
  z-index: 1020;
  padding: 8px 12px calc(env(safe-area-inset-bottom, 0) + 8px);
  display: none;
}
body.kc-mobile-nav-visible .kc-mobile-nav {
  display: block;
}

.kc-mobile-nav__inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 6px;
}

.kc-mobile-nav__item {
  text-decoration: none;
  color: #636b75;
  font-size: 0.82rem;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1 1 0;
  padding: 4px 6px;
}

.kc-mobile-nav__item.is-active {
  color: #c8102e;
}

.kc-mobile-nav__item--primary {
  color: #c8102e;
  font-weight: 600;
}

.kc-mobile-nav__icon {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  color: inherit;
  font-size: 1.1rem;
  line-height: 1;
}

.kc-mobile-nav__icon i {
  font-size: 1.1rem;
  line-height: 1;
}

.kc-mobile-nav__icon--bubble {
  background: rgba(200, 16, 46, 0.12);
  color: #c8102e;
}

.kc-mobile-nav__item--primary .kc-mobile-nav__icon {
  background: rgba(200, 16, 46, 0.15);
  color: #c8102e;
}

.kc-mobile-nav__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  padding: 0 4px;
}

.kc-mobile-nav__status {
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 2px solid #fff;
}

.kc-mobile-nav__status--seller {
  background: #22c55e;
}

.kc-mobile-nav__status--buyer {
  background: #2563eb;
}

.kc-mobile-nav__label {
  display: block;
}
