/* ══════════════════════════════════════════════════════════════
   Kopfzeile – Infoleiste, Menüleiste mit Aufklapp-Menüs, Suche, Handy-Menü.
   Auf ALLEN Seiten gleich: Die Startseite lädt diese Datei neben style.css, die
   Unterseiten bekommen Kopfzeile, diese Datei und js/kopf.js vom Server (lib/kopf.js).
   Farben und Schriften kommen vom Theme (lib/themes.js); die Werte hier sind nur
   die Rückfallebene („Pro Orange“).
   ══════════════════════════════════════════════════════════════ */
:root {
  --primary: #f69534; --primary-dark: #d4802d; --primary-text: #111111;
  --primary-ink: #a26222; --primary-mega: #f69534; --primary-auf-dunkel: #f69534;
  --nav-bg: var(--primary); --nav-text: var(--primary-text);
  --topbar-bg: #262626; --topbar-text: #ffffff;
  --mega-bg: #2b2b2b; --mega-text: #ffffff; --mega-muted: #b5b5b5;
  --surface: #ffffff; --text: #111111; --gray: #6b6b6b; --border: #e0e0e0; --bg-alt: #f2f2f2; --img-bg: #efefef; --dark: #000000;
  --radius-sm: 0px;
  --font-head: 'Saira Semi Condensed', 'Arial Narrow', Arial, sans-serif;
  --font-body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shadow-xl: 0 20px 48px rgba(0,0,0,.18);
  --header-h: 72px;
}
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
/* Gezeichnetes Bild statt Symbol (z.B. Stick): Maske in der Textfarbe, Größe wie das jeweilige Icon */
.ico-bild { display: inline-block; background: currentColor; -webkit-mask: var(--bild) center / contain no-repeat; mask: var(--bild) center / contain no-repeat; }
.ico { width: 1em; height: 1em; flex: none; display: inline-block; vertical-align: -.125em; }

/* Gleich auf jeder Seite – egal, welche Schrift, Zeilenhöhe oder Linkfarbe die Seite sonst hat */
.topbar, .header, .mobile-nav { font-family: var(--font-body); line-height: 1.4; -webkit-font-smoothing: antialiased; }
.topbar *, .header *, .mobile-nav * { box-sizing: border-box; }
.topbar a, .header a, .mobile-nav a { color: inherit; text-decoration: none; }
.topbar [hidden], .header [hidden], .mobile-nav [hidden], .topbar .hidden, .header .hidden { display: none !important; }
.header button, .mobile-nav button { font-family: inherit; }

/* ── Infoleiste ganz oben ── */
.topbar { background: var(--topbar-bg); color: var(--topbar-text); font-size: .8rem; font-weight: 600; letter-spacing: .03em; }
/* Über die volle Breite wie bei großen Controller-Shops: Links ganz links, Login ganz rechts */
.topbar-inner {
  padding: 0 16px; min-height: 42px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px;
}
.topbar-links { display: flex; align-items: center; justify-self: start; }
.topbar-links a { display: inline-flex; align-items: center; gap: 7px; padding: 4px 14px 4px 0; opacity: .88; transition: opacity .15s; white-space: nowrap; }
.topbar-links a::before { content: ''; width: 2px; height: 16px; background: var(--primary); margin-right: 4px; }
.topbar-links a:hover { opacity: 1; }
.topbar-links .ico { width: 16px; height: 16px; }
.topbar-mitte { position: relative; text-align: center; min-width: 0; padding: 10px 0; font-size: .92rem; font-weight: 700; letter-spacing: .01em; }
.topbar-mitte a { text-decoration: underline; text-underline-offset: 2px; }
.topbar-mitte .topbar-cta { margin-left: 16px; color: var(--primary-auf-dunkel); text-decoration: none; text-transform: uppercase; letter-spacing: .1em; font-size: .82rem; font-weight: 600; }
.topbar-mitte .topbar-cta:hover { text-decoration: underline; text-underline-offset: 3px; }
.topbar-rechts { justify-self: end; display: flex; align-items: center; }
.topbar-rechts > * { padding: 0 18px; }
.topbar-rechts > * + * { border-left: 1px solid color-mix(in srgb, currentColor 30%, transparent); }
.topbar-rechts > :last-child { padding-right: 4px; }
.topbar-login { text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; font-weight: 700; opacity: .92; }
.topbar-login:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.rating-badge { display: flex; align-items: center; gap: 6px; white-space: nowrap; color: inherit; }
.rating-badge .rating-stars { color: #f5b301; font-size: .82rem; letter-spacing: -1px; }
.rating-badge .rating-text { font-size: .76rem; }
.rating-badge .rating-text strong { font-weight: 800; }
.rating-badge #ratingCount { opacity: .7; }
@media (max-width: 1439px) {
  .topbar-links a span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .topbar-links a { padding-right: 10px; }
  .topbar-links .ico { width: 18px; height: 18px; }
}
@media (max-width: 860px) {
  .topbar-inner { grid-template-columns: minmax(0, 1fr); min-height: 36px; }
  .topbar-links, .topbar-rechts { display: none; }
  .topbar-mitte { font-size: .78rem; padding: 8px 0; }
  .topbar-mitte .topbar-cta { margin-left: 10px; font-size: .72rem; }
}

/* ── Kopfzeile ── */
.header { position: sticky; top: 0; z-index: 100; background: var(--nav-bg); color: var(--nav-text); }
.header-inner { padding: 0 28px 0 16px; height: var(--header-h); display: flex; align-items: center; gap: 12px; }
/* Ab Tablet-Breite: Logo links, Menü genau in der Mitte, Symbole rechts */
@media (min-width: 768px) {
  .header-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .header-inner .logo { justify-self: start; }
  .header-inner .nav { margin: 0; }
  .header-inner .header-actions { justify-self: end; margin-left: 0; }
}

.logo { display: flex; align-items: center; gap: 10px; color: inherit; flex: 0 0 auto; }
/* Das Logo-Zeichen übernimmt die Textfarbe der Leiste – passt so zu jedem Theme */
.logo-mark {
  display: block; width: 62px; height: 25px; background: currentColor; flex: none;
  -webkit-mask: url(/logo-cc-mark.svg) center / contain no-repeat; mask: url(/logo-cc-mark.svg) center / contain no-repeat;
}
.logo-img { display: none; }
.logo-img.custom { display: block; height: 48px; width: auto; max-width: 200px; object-fit: contain; }
#logoText[hidden] { display: none; }
.logo-name { font-family: var(--font-head); font-weight: 800; font-size: 1.32rem; line-height: .95; text-transform: uppercase; letter-spacing: .03em; display: block; }
.logo-sub { font-size: .64rem; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; opacity: .8; display: block; }

.nav { display: flex; align-items: stretch; height: 100%; margin: 0 auto; }
.nav-item { display: flex; }   /* bewusst ohne position: das Aufklapp-Menü ist so breit wie die Kopfzeile */
.nav-link {
  position: relative; display: flex; align-items: center; padding: 0 24px; height: 100%;
  font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; letter-spacing: .02em; text-transform: uppercase;
  color: inherit; white-space: nowrap; cursor: pointer;
}
/* Schraffierter Strich unter dem Menüpunkt */
.nav-link::after {
  content: ''; position: absolute; left: 24px; right: 24px; bottom: 15px; height: 6px;
  background: repeating-linear-gradient(-60deg, currentColor 0 2px, transparent 2px 5px);
  transform: scaleX(0); transform-origin: left; transition: transform .2s ease;
}
.nav-item:hover > .nav-link::after, .nav-item.offen > .nav-link::after, .nav-link:focus-visible::after, .nav-link.active::after { transform: scaleX(1); }

/* Aufklapp-Menü (Mega-Menü) */
.mega {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 5;
  background: var(--mega-bg); color: var(--mega-text); box-shadow: 0 24px 48px rgba(0,0,0,.28);
  visibility: hidden; opacity: 0; transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .2s;
}
.nav-item:hover > .mega, .nav-item:focus-within > .mega, .nav-item.offen > .mega {
  visibility: visible; opacity: 1; transform: none; transition-delay: 0s;
}
.nav-item.mega-zu > .mega { visibility: hidden; opacity: 0; }
.mega-inner { max-width: 1200px; margin: 0 auto; padding: 30px 24px 34px; display: flex; gap: 48px; align-items: flex-start; }
.mega-spalten { flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 26px 32px; }
.mega-spalte { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; min-width: 0; }
.mega-icon { width: 36px; height: 36px; color: var(--mega-text); margin-bottom: 6px; }
.mega-icon.breit { width: 58px; }
/* Gezeichnete Icons (Bild als Maske, Farbe = Textfarbe des Aufklapp-Menüs) */
.mega-bild { display: block; width: 64px; height: 52px; background: currentColor;   /* alle gleich groß (Bilder haben denselben Rahmen) */
  -webkit-mask: var(--bild) left center / contain no-repeat; mask: var(--bild) left center / contain no-repeat; }
.mega-titel { font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; letter-spacing: .02em; text-transform: uppercase; color: var(--mega-text); margin-bottom: 2px; }
.mega-spalte a:not(.mega-titel) {
  font-family: var(--font-head); font-weight: 500; font-size: 1rem; letter-spacing: .02em; text-transform: uppercase;
  color: var(--mega-muted); transition: color .15s; line-height: 1.25;
}
.mega-spalte a:hover { color: var(--primary-mega); }
.mega-spalte .mega-alle { margin-top: 4px; font-weight: 700 !important; color: var(--primary-mega) !important; }
.mega-promo {
  flex: 0 0 300px; position: relative; display: flex; flex-direction: column; gap: 12px; padding: 18px 0 0;
  border-top: 2px solid var(--mega-muted); color: var(--mega-text); isolation: isolate; overflow: hidden;
}
.mega-promo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--dark); }
.mega-promo-text { font-family: var(--font-head); font-weight: 600; font-size: 1.2rem; line-height: 1.2; }
.mega-mehr { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-head); font-weight: 700; font-size: 1.02rem; text-transform: uppercase; letter-spacing: .04em; color: var(--primary-mega); }
.mega-promo:hover .mega-mehr { text-decoration: underline; text-underline-offset: 4px; }

/* Symbole rechts */
.header-actions { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav + .header-actions { margin-left: 0; }
.icon-btn {
  position: relative; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  background: none; border: none; color: inherit; cursor: pointer; border-radius: var(--radius-sm); transition: background .15s;
}
.icon-btn .ico { width: 24px; height: 24px; }
.icon-btn:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.cart-badge {
  position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
  background: var(--nav-text); color: var(--nav-bg); font-size: .66rem; font-weight: 800; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.mobile-menu-btn { display: none; }
@media (min-width: 861px) { .header-actions .konto-btn { display: none; } }   /* „Login“ steht dann oben in der Infoleiste */

/* Suche unter der Kopfzeile */
.suche {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 6;
  background: var(--surface); color: var(--text); box-shadow: 0 24px 48px rgba(0,0,0,.22); border-top: 1px solid var(--border);
}
.suche-inner { max-width: 860px; margin: 0 auto; padding: 18px 20px 22px; }
.suche-form { display: flex; align-items: center; gap: 12px; border-bottom: 2px solid var(--text); padding-bottom: 6px; }
.suche-form > .ico { width: 24px; height: 24px; color: var(--gray); }
.suche-form input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent; color: var(--text);
  font-family: var(--font-head); font-weight: 600; font-size: 1.4rem; padding: 6px 0;
}
.suche-form input::-webkit-search-cancel-button { -webkit-appearance: none; }
.suche-treffer { margin-top: 12px; display: grid; gap: 2px; max-height: min(60vh, 520px); overflow-y: auto; }
.treffer { display: flex; align-items: center; gap: 14px; padding: 8px; border-radius: var(--radius-sm); transition: background .12s; }
.treffer:hover, .treffer:focus-visible { background: var(--bg-alt); }
.treffer img { width: 54px; height: 54px; object-fit: cover; background: var(--img-bg); flex: none; border-radius: var(--radius-sm); }
.treffer-name { flex: 1; min-width: 0; font-weight: 600; line-height: 1.3; }
.treffer-name small { display: block; color: var(--gray); font-weight: 500; font-size: .8rem; }
.treffer-preis { font-weight: 700; white-space: nowrap; }
.treffer-alle { margin-top: 6px; justify-self: start; background: none; border: none; cursor: pointer; padding: 8px; display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-head); font-weight: 700; font-size: 1.02rem; text-transform: uppercase; letter-spacing: .04em; color: var(--primary-ink); }
.treffer-leer { color: var(--gray); padding: 10px 8px; }
.treffer-leer a { color: var(--primary-ink); font-weight: 600; text-decoration: underline; }

/* ── Menü am Handy (Schublade) ── */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 400; opacity: 0; pointer-events: none; transition: opacity .25s; }
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
.mobile-nav {
  position: fixed; top: 0; left: 0; bottom: 0; width: min(88vw, 360px); z-index: 401;
  background: var(--surface); color: var(--text); display: flex; flex-direction: column; box-shadow: var(--shadow-xl);
  transform: translateX(-100%); visibility: hidden; transition: transform .28s ease, visibility 0s linear .28s;
}
.mobile-nav.open { transform: none; visibility: visible; transition-delay: 0s; }
.drawer-kopf { display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 10px 0 20px; background: var(--nav-bg); color: var(--nav-text); flex: none; }
.drawer-titel { font-family: var(--font-head); font-weight: 800; font-size: 1.3rem; letter-spacing: .05em; text-transform: uppercase; }
.drawer-inhalt { flex: 1; overflow-y: auto; }
.drawer-gruppe summary, .drawer-link {
  display: flex; align-items: center; justify-content: space-between; padding: 15px 20px; cursor: pointer; list-style: none;
  font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; letter-spacing: .03em; text-transform: uppercase;
  border-bottom: 1px solid var(--border); color: var(--text);
}
.drawer-gruppe summary::-webkit-details-marker { display: none; }
.drawer-gruppe summary::after { content: ''; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin: -5px 4px 0 0; transition: transform .2s; }
.drawer-gruppe[open] summary::after { transform: rotate(-135deg); margin-top: 5px; }
.drawer-links { display: flex; flex-direction: column; padding: 6px 0 10px; background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.drawer-links a { padding: 10px 28px; font-size: 1rem; color: var(--text); }
.drawer-links a:hover { color: var(--primary-ink); }
.drawer-fuss { border-top: 1px solid var(--border); padding: 10px 20px 22px; display: grid; gap: 2px; flex: none; }
.drawer-fuss a { display: flex; align-items: center; gap: 10px; padding: 9px 0; font-weight: 600; }
.drawer-fuss .ico { width: 20px; height: 20px; }

@media (max-width: 1280px) { .nav-link { padding: 0 16px; font-size: 1.15rem; } .nav-link::after { left: 16px; right: 16px; } .mega-promo { flex-basis: 240px; } }
@media (max-width: 1023px) {
  .header-inner { padding: 0 14px; gap: 8px; }
  .nav-link { padding: 0 10px; font-size: 1rem; }
  .nav-link::after { left: 10px; right: 10px; bottom: 18px; height: 5px; }
  .logo-mark { width: 52px; height: 21px; }
  .logo-name { font-size: 1.08rem; }
  .logo-sub { font-size: .56rem; letter-spacing: .18em; }
  .icon-btn { width: 40px; height: 40px; }
  .mega-promo { display: none; }
}
@media (max-width: 767px) {
  .nav { display: none; }
  .mobile-menu-btn { display: inline-flex; margin-left: -8px; }
  :root { --header-h: 62px; }
  /* Handy: ☰ links, Logo genau in der Mitte, Symbole rechts – gleich breite Außenspalten */
  .header-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .header-inner .mobile-menu-btn { justify-self: start; }
  .header-inner .logo { justify-self: center; }
  .header-actions { justify-self: end; margin-left: 0; }
}
@media (max-width: 420px) {
  .header-inner { padding: 0 12px; gap: 6px; }
  .logo-mark { width: 50px; height: 20px; }
  .logo-name { font-size: 1.12rem; }
  .logo-sub { font-size: .56rem; letter-spacing: .18em; }
  .icon-btn { width: 40px; height: 40px; }
  .header-actions .konto-btn { display: none; }
}

