
/* ================================================
   MODERNER HEADER (fh-*) – fahnenmasten-shop.de
   ================================================ */

:root {
  --fh-navy:    #20325a;
  --fh-navy2:   #1a2b4a;
  --fh-red:     #ef4b4c;
  --fh-shadow:  0 4px 20px rgba(0,0,0,.13);
}

/* ---------- TOPBAR ---------- */
.fh-topbar {
  background: var(--fh-navy2);
  height: 34px;
  display: flex;
  align-items: center;
  font-size: 12px;
  color: rgba(255,255,255,.75);
}
.fh-topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.fh-topbar-left { display: flex; align-items: center; gap: 8px; }
.fh-topbar-left .fas { color: var(--fh-red); font-size: 10px; }
.fh-topbar-left a { color: rgba(255,255,255,.92); text-decoration: none; font-weight: 600; }
.fh-topbar-sep { color: rgba(255,255,255,.2); margin: 0 4px; }
.fh-topbar-right { display: flex; align-items: center; gap: 18px; }
.fh-topbar-right a {
  color: rgba(255,255,255,.65);
  text-decoration: none;
  font-size: 11.5px;
  transition: color .15s;
  display: flex;
  align-items: center;
  gap: 4px;
}
.fh-topbar-right a .fas { font-size: 10px; color: var(--fh-red); }
.fh-topbar-right a:hover { color: #fff; text-decoration: none; }
@media (max-width: 767px) { .fh-topbar { display: none; } }

/* ---------- MAIN HEADER ---------- */
.fh-header {
  background: #fff;
  border-bottom: 1px solid #e8eaed;
  padding: 14px 0;
}
.fh-header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Logo */
.fh-logo { flex-shrink: 0; }
.fh-logo a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.fh-logo a:hover { text-decoration: none; opacity: .88; }
.fh-logo img { width: 70px; height: auto; flex-shrink: 0; }
.fh-logo-text { display: flex; flex-direction: column; }
.fh-logo-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--fh-navy);
  line-height: 1.2;
  white-space: nowrap;
}
.fh-logo-title strong { color: var(--fh-red); }
.fh-logo-claim {
  font-size: 10.5px;
  color: #6b7280;
  margin-top: 3px;
  white-space: nowrap;
  letter-spacing: .01em;
}

/* Trust badges */
.fh-trust {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  justify-content: center;
}
.fh-trust-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #4b5563;
  white-space: nowrap;
}
.fh-trust-item .fas {
  color: var(--fh-red);
  font-size: 15px;
}

/* Desktop Actions */
.fh-actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.fh-action-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 11px;
  color: var(--fh-navy);
  text-decoration: none;
  font-size: 10.5px;
  font-weight: 500;
  border-radius: 8px;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.fh-action-link .fas,
.fh-action-link .fa-solid { font-size: 18px; color: var(--fh-navy); transition: color .15s; }
.fh-action-link:hover { background: #f3f4f6; color: var(--fh-red); text-decoration: none; }
.fh-action-link:hover .fas,
.fh-action-link:hover .fa-solid { color: var(--fh-red); }
.fh-action-logout .fas { color: #9ca3af; }

/* Cart button */
.fh-cart-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--fh-red);
  color: #fff !important;
  text-decoration: none !important;
  padding: 10px 18px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  position: relative;
  transition: background .15s, transform .1s, box-shadow .15s;
  margin-left: 6px;
  box-shadow: 0 2px 8px rgba(239,75,76,.3);
}
.fh-cart-btn .fas { color: #fff; font-size: 16px; }
.fh-cart-btn:hover {
  background: #d63e3f;
  color: #fff !important;
  text-decoration: none !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(239,75,76,.4);
}
.fh-cart-badge {
  position: absolute;
  top: -7px; right: -7px;
  background: var(--fh-navy);
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  min-width: 19px;
  height: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid #fff;
}

/* Mobile actions */
.fh-mobile-actions { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.fh-mobile-cart { position: relative; color: var(--fh-navy); font-size: 22px; text-decoration: none; }
.fh-mobile-cart .fas { color: var(--fh-navy); }
.fh-mobile-cart .fh-cart-badge { top: -9px; right: -11px; }

/* Hamburger */
.fh-hamburger {
  background: none; border: none; cursor: pointer;
  padding: 4px; display: flex; flex-direction: column;
  gap: 5px; width: 30px;
}
.fh-hamburger span {
  display: block; height: 2px;
  background: var(--fh-navy);
  border-radius: 2px;
  transition: transform .28s, opacity .28s;
}
.fh-hamburger.fh-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.fh-hamburger.fh-open span:nth-child(2) { opacity: 0; }
.fh-hamburger.fh-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile search row */
.fh-mobile-search { padding: 8px 0 4px; }
.fh-search-form {
  display: flex;
  border: 1.5px solid #d1d5db;
  border-radius: 9px;
  overflow: hidden;
  background: #f9fafb;
  transition: border-color .2s, box-shadow .2s;
}
.fh-search-form:focus-within {
  border-color: var(--fh-navy);
  box-shadow: 0 0 0 3px rgba(32,50,90,.07);
  background: #fff;
}
.fh-search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 14px;
  font-size: 14px;
  color: #111;
  outline: none;
}
.fh-search-input::placeholder { color: #1f2937; }
.fh-search-btn {
  border: none;
  background: var(--fh-navy);
  color: #fff;
  padding: 0 18px;
  cursor: pointer;
  font-size: 14px;
  transition: background .15s;
}
.fh-search-btn .fas,
.fh-search-btn .fa-solid { color: #fff !important; }
.fh-search-btn:hover { background: #2d4578; }

/* ---------- NAVIGATION ---------- */
.fh-nav {
  background: #fff;
  border-bottom: 2px solid var(--fh-red);
  position: relative;
  z-index: 200;
  will-change: transform;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
.fh-nav.fh-sticky {
  position: fixed;
  top: 0; left: 0; right: 0;
  box-shadow: var(--fh-shadow);
}
@media (min-width: 992px) {
  .fh-nav.fh-sticky { animation: fhSlideDown .2s ease; }
}
@keyframes fhSlideDown {
  from { transform: translateY(-100%); }
  to   { transform: translateY(0); }
}
@media (max-width: 991px) {
  /* Kein sticky auf Mobile — Header bleibt immer oben erreichbar */
  .fh-nav.fh-sticky {
    position: relative !important;
    box-shadow: none !important;
    animation: none !important;
  }
}

/* Nav inner: nav items left, search right */
.fh-nav-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Desktop nav list — LEFT aligned */
.fh-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
}
.fh-nav-item { position: relative; display: flex; align-items: stretch; }
.fh-nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 13px;
  height: 46px;
  color: var(--fh-navy);
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s, background .15s;
  position: relative;
}
.fh-nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 50%; right: 50%;
  height: 2px;
  background: var(--fh-red);
  transition: left .2s, right .2s;
}
.fh-nav-link:hover::after,
.fh-nav-item:hover > .fh-nav-link::after { left: 0; right: 0; }

.fh-nav-icon { font-size: 10px; opacity: .5; }
.fh-nav-link .fas,
.fh-nav-link .fa-solid { color: var(--fh-navy); transition: color .15s; }
.fh-nav-link:hover,
.fh-nav-item:hover > .fh-nav-link {
  color: var(--fh-red);
  background: #fef2f2;
  text-decoration: none;
}
.fh-nav-link:hover .fas,
.fh-nav-item:hover > .fh-nav-link .fas { color: var(--fh-red); }

.fh-nav-home { padding: 0 13px; }
.fh-nav-home .fa-solid { font-size: 14px; color: var(--fh-navy); }
.fh-nav-home:hover .fa-solid { color: var(--fh-red); }

.fh-chevron { font-size: 8px; opacity: .5; transition: transform .2s; }
.fh-has-dropdown:hover .fh-chevron { transform: rotate(180deg); }

/* ---------- DROPDOWN ---------- */
.fh-dropdown {
  position: absolute;
  top: calc(100% + 3px); left: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0 10px 10px 10px;
  box-shadow: 0 10px 32px rgba(0,0,0,.14);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .18s, transform .18s;
  z-index: 400;
}
.fh-has-dropdown:hover .fh-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.fh-dropdown-inner { padding: 8px 0; }
.fh-dropdown-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 18px;
  color: #374151;
  font-size: 13px;
  text-decoration: none;
  transition: background .12s, color .12s;
}
.fh-dropdown-item .fas { font-size: 12px; color: #9ca3af; transition: color .12s; width: 14px; flex-shrink: 0; }
.fh-dropdown-item:hover { background: #f3f4f6; color: var(--fh-red); text-decoration: none; }
.fh-dropdown-item:hover .fas { color: var(--fh-red); }
.fh-dropdown-highlight {
  color: #92400e;
  font-weight: 700;
  background: #fffbeb;
}
.fh-dropdown-highlight .fas { color: #f59e0b; }
.fh-dropdown-highlight:hover { background: #fef3c7; color: #78350f; }
.fh-dropdown-highlight:hover .fas { color: #f59e0b; }
.fh-dropdown-divider { height: 1px; background: #f0f0f0; margin: 6px 0; }
.fh-dropdown-header {
  padding: 8px 18px 4px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #9ca3af;
  font-weight: 700;
}

/* Wide two-column dropdown */
.fh-dropdown-wide {
  min-width: 520px;
  left: 0;
}
.fh-dropdown-cols {
  display: flex;
  gap: 0;
}
.fh-dropdown-col {
  flex: 1;
}
.fh-dropdown-col:first-child {
  border-right: 1px solid #f0f0f0;
}

/* ---------- NAV SEARCH (RIGHT) ---------- */
.fh-nav-search {
  display: flex;
  align-items: center;
  margin-left: auto;
  padding: 6px 0;
  flex-shrink: 0;
}
.fh-nav-search-form {
  display: flex;
  border: 1.5px solid #b0b8c4;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.fh-nav-search-form:focus-within {
  border-color: var(--fh-navy);
  box-shadow: 0 0 0 3px rgba(32,50,90,.07);
}
.fh-nav-search-icon { display: none; }
.fh-nav-search-input {
  border: none;
  background: transparent;
  outline: none;
  color: #111;
  font-size: 13px;
  padding: 8px 13px;
  width: 260px;
}
.fh-nav-search-input::placeholder { color: #1f2937; }
.fh-nav-search-btn {
  border: none;
  background: var(--fh-navy);
  color: #fff;
  padding: 0 15px;
  cursor: pointer;
  font-size: 14px;
  transition: background .15s;
  display: flex;
  align-items: center;
}
.fh-nav-search-btn .fas,
.fh-nav-search-btn .fa-solid { color: #fff !important; }
.fh-nav-search-btn:hover { background: #2d4578; }

/* ---------- MOBILE NAV — Inline stacked ---------- */
.fh-mobile-overlay { display: none; }

.fh-mobile-nav {
  display: none;
  background: #fff;
  border-top: 2px solid var(--fh-red);
  box-shadow: 0 8px 24px rgba(0,0,0,.10);
}
.fh-mobile-nav.fh-open { display: block; }

/* Search inside mobile nav */
.fh-mob-search {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
}

/* Nav list */
.fh-mobile-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  width: 100%;
}
.fh-mobile-nav-list > li {
  flex: 0 0 100% !important;
  max-width: 100% !important;
  width: 100% !important;
  float: none !important;
}

.fh-mobile-nav-list > li > a,
.fh-mob-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  color: var(--fh-navy);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-bottom: 1px solid #f3f4f6;
  width: 100%;
  background: none;
  cursor: pointer;
  justify-content: space-between;
  transition: background .12s, color .12s;
}
.fh-mob-toggle span { display: flex; align-items: center; gap: 12px; }
.fh-mobile-nav-list > li > a .fas,
.fh-mob-toggle > span > .fas {
  color: var(--fh-red);
  font-size: 14px;
  width: 18px;
  flex-shrink: 0;
}
.fh-mob-toggle .fa-chevron-down {
  color: #9ca3af;
  font-size: 11px;
  transition: transform .22s;
}
.fh-mobile-nav-list > li > a:hover,
.fh-mob-toggle:hover {
  background: #fef2f2;
  color: var(--fh-red);
  text-decoration: none;
}
.fh-mobile-nav-list > li > a:hover .fas { color: var(--fh-red); }

/* Sub menu */
.fh-mob-sub {
  list-style: none;
  padding: 0;
  margin: 0;
  display: none !important;
  background: #f9fafb;
  width: 100%;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
}
.fh-mob-has-sub.fh-mob-active .fh-mob-sub {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  width: 100%;
}
.fh-mob-has-sub.fh-mob-active .fa-chevron-down { transform: rotate(180deg); }

.fh-mob-sub > li {
  flex: 0 0 100% !important;
  max-width: 100% !important;
  width: 100% !important;
  float: none !important;
}
.fh-mob-sub li a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: #374151;
  padding: 12px 16px 12px 46px;
  border-bottom: 1px solid #f0f0f0;
  text-decoration: none;
  font-weight: 500;
  transition: background .12s, color .12s;
}
.fh-mob-sub li a .fas { color: #9ca3af; font-size: 12px; width: 14px; flex-shrink: 0; }
.fh-mob-sub li a:hover { background: #fef2f2; color: var(--fh-red); text-decoration: none; }
.fh-mob-sub li a:hover .fas { color: var(--fh-red); }

/* Close bar */
.fh-mob-closebar {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--fh-navy);
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.fh-mob-closebar span {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(255,255,255,.6);
}
.fh-mob-closebtn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.12);
  border: none;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s;
}
.fh-mob-closebtn:hover { background: rgba(255,255,255,.22); }

/* Account buttons row */
.fh-mob-account {
  display: flex !important;
  gap: 8px;
  padding: 14px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}
.fh-mob-acc-btn {
  flex: 1;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
  transition: opacity .15s;
}
.fh-mob-acc-btn:hover { opacity: .88; text-decoration: none !important; }
.fh-mob-acc-primary {
  background: var(--fh-navy);
  color: #fff !important;
}
.fh-mob-acc-secondary {
  background: #fff;
  color: var(--fh-navy) !important;
  border: 1.5px solid #d1d5db;
}

/* Section label */
.fh-mob-divider { height: 5px; background: #f3f4f6; border: none; margin: 0; }
.fh-mob-section-label {
  padding: 10px 16px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #9ca3af;
}

/* Cart badge in mobile header */
.fh-mobile-cart { position: relative; color: var(--fh-navy); font-size: 22px; text-decoration: none; }
.fh-mobile-cart .fas { color: var(--fh-navy); }
.fh-mobile-cart .fh-cart-badge { top: -9px; right: -11px; }

/* Desktop: Container-Padding im Header entfernen → bündig mit Content */
@media (min-width: 992px) {
  .fh-topbar > .container,
  .fh-header > .container,
  .fh-nav > .container {
    padding-left: 0;
    padding-right: 0;
  }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1199px) {
  .fh-nav-link { padding: 0 11px; font-size: 11.5px; }
  .fh-nav-search-form.fh-nav-search-open .fh-nav-search-input { width: 160px; }
}
@media (max-width: 991px) {
  .fh-logo-claim { display: none; }
  .fh-logo-title { font-size: 15px; }
}
@media (max-width: 991px) {
  .fh-header { padding: 12px 0; }
  .fh-nav { margin-bottom: 16px; }
}
@media (max-width: 767px) {
  .fh-header { padding: 12px 0; }
  .fh-logo img { width: 52px; }
  .fh-header > .container,
  .fh-topbar > .container,
  .fh-nav > .container { padding-left: 14px; padding-right: 14px; }
}
