/* Gemeinsamer Header-Teil fuer index.html + sortiment.html (UI-Review Thanh
   29.09.2026). Wird NACH dem seiteneigenen CSS geladen, damit diese Regeln
   gewinnen (gleiche Spezifitaet, Reihenfolge entscheidet). */

/* Logo nie zusammendruecken (war auf 390px und 480–640px 0 px breit). */
.nav .brand { flex-shrink: 0; }
.wa-link-header-text span { white-space: nowrap; }

/* Kunden-Hinweis im Header (UI-Review Thanh 29.09.): Portal ist token-basiert,
   es gibt kein Login-Formular — deshalb Label „Khách hàng / Kunden“ als Link-
   Optik (kein Kasten, der wie ein Eingabefeld wirkt) und ein Panel mit
   WhatsApp-Aktion. Handy: volle Breite unter dem Header (vorher ragte das
   Popover links aus dem Bild). Schliessen: ✕, Tipp ausserhalb, Esc. */
.kunden-login { position: relative; }
.kunden-login summary {
  list-style: none; cursor: pointer; color: var(--sea-deep); font-size: .82rem; font-weight: 700;
  padding: 8px 6px; border-radius: 8px; min-height: 44px; min-width: 44px;
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
}
.kunden-login summary::-webkit-details-marker { display: none; }
.kunden-login summary svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.kunden-login summary:hover .kl-label, .kunden-login[open] .kl-label { text-decoration: underline; text-underline-offset: 3px; }
.kunden-login summary:focus-visible { outline: 3px solid var(--sea); outline-offset: 2px; }
.kunden-login-pop {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 70; width: 290px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px 16px; box-shadow: 0 14px 34px rgba(10,48,58,.22);
}
.kl-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.kl-head b { color: var(--sea-deep); font-size: .95rem; }
.kl-close {
  width: 44px; height: 44px; margin: -10px -12px -10px 0; border: 0; background: transparent; border-radius: 10px;
  color: var(--muted); font-size: 1.3rem; line-height: 1; cursor: pointer; flex-shrink: 0;
}
.kl-close:hover { color: var(--sea-deep); background: var(--line); }
.kl-close:focus-visible { outline: 3px solid var(--sea); outline-offset: 1px; }
.kunden-login-pop p { font-size: .88rem; color: var(--muted); margin-bottom: 12px; line-height: 1.45; }
.kl-lost { font-size: .8rem; font-weight: 700; color: var(--ink, #1c2b33); margin-bottom: 6px; }
.kunden-login-pop .kl-wa {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 46px;
  background: var(--wa-green); color: #fff; font-weight: 800; font-size: .92rem; border-radius: 999px;
  text-decoration: none; white-space: nowrap; padding: 0 16px;
}
.kunden-login-pop .kl-wa:hover { box-shadow: 0 6px 18px rgba(37,211,102,.4); }
.kunden-login-pop .kl-wa:focus-visible { outline: 3px solid var(--sea-deep); outline-offset: 2px; }
.kunden-login-pop .kl-wa svg { width: 18px; height: 18px; fill: #fff; flex-shrink: 0; }
@media (max-width: 640px) {
  /* header hat backdrop-filter -> ist Containing Block fuer fixed:
     Panel spannt die volle Header-Breite (16px Rand), direkt darunter. */
  .kunden-login-pop { position: fixed; top: calc(100% + 6px); left: 16px; right: 16px; width: auto; }
}
/* Muss NACH den Grundregeln stehen (gleiche Spezifitaet, Reihenfolge gewinnt). */
@media (max-width: 479px) {
  /* Wie index.html: schmalerer Rand + Firmenname neben dem Logo aus — auf
     /sortiment blieben sonst rechts nur ~4px Rand (390px). */
  .nav { padding: 8px 14px; gap: 8px; }
  .nav .brand > span { display: none; }
  .nav-right { gap: 6px; }
  .kunden-login summary { padding: 8px 3px; gap: 4px; font-size: .78rem; }
}
/* Sehr schmale Handys (360px): Nummer im Header weglassen, WhatsApp-Icon als
   44px-Ziel bleibt — Nummer steht in der Callbar unten und im Kunden-Panel. */
@media (max-width: 379px) {
  .wa-link-header .wa-link-header-text { display: none; }
  .wa-link-header { min-width: 44px; min-height: 44px; justify-content: center; }
  .wa-link-header svg { width: 24px; height: 24px; }
}

/* Bis 860px ist die .callbar unten sichtbar (s. .callbar) — dort kein zweiter
   Anruf-Button im Header; zwischen 480 und 860px lief der Header sonst ueber. */
@media (max-width: 860px) {
  .nav .btn-call { display: none; }
}
