.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: #000;
  border-bottom: 1px solid #1f2937;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.container {
  width: min(100% - 2rem, 1320px);
  margin-inline: auto;
}

.header__bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 4rem;
}

.header__logo {
  height: 48px;
}

.header__search {
  flex: 1;
  max-width: 575px;
}

.search-field {
  position: relative;
  width: 100%;
}

.search-field__icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
}

.search-field__icon svg {
  width: 20px;
  height: 20px;
}

.search-field__input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 1px solid #374151;
  border-radius: 8px;
  background: #111827;
  color: white;
}

.search-field__input::placeholder {
  color: #9ca3af;
}

.header__right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-left: auto;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header__nav a,
.language-switcher__button,
.header__cart,
.header__profile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  font-size: 0.875rem;
  color: white;
  text-decoration: none;
  line-height: normal;
  transition: color 0.2s ease;
}

.header__nav a:hover,
.language-switcher__button:hover,
.header__cart:hover,
.header__profile:hover {
  color: #ff0098;
}

.header__login-form .header__login-remember {
  width: fit-content;

  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;

  cursor: pointer;
}

.header__login-form .header__login-remember input {
  width: 16px;
  height: 16px;
  padding: 0;
  margin: 0;

  flex-shrink: 0;

  accent-color: var(--color-accent);
  cursor: pointer;
}

.header__login-form .header__login-remember span {
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.2;
}

.language-switcher {
  position: relative;
}

.language-switcher__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 0.875rem;
  font-weight: 400;
  cursor: pointer;
  transform: none;
}

.language-switch-icon {
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
}

.language-switcher__current {
  display: inline-block;
  line-height: 1;
}

.language-switcher__menu {
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 0;
  min-width: 120px;
  display: none;
  padding: 0.35rem;
  background: #111827;
  border: 1px solid #374151;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.language-switcher.is-open .language-switcher__menu {
  display: block;
}

.language-switcher__menu button {
  display: block;
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 0;
  border-radius: 6px;
  background: none;
  color: white;
  font: inherit;
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
}

.language-switcher__menu button:hover {
  background: #1f2937;
  color: #ff0098;
}

.language-switcher__menu button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  color: #9ca3af;
}

.header__cart,
.header__profile {
  position: relative;
}

.header__cart-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
}

.header__profile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 20px;
  height: 20px;

  line-height: 0;
}

.header__profile-icon svg {
  display: block;

  width: 20px;
  height: 20px;

  flex-shrink: 0;

  fill: currentColor;
  color: currentColor;

  transform: translateY(-1px);
}

.header__cart-badge {
  position: absolute;
  top: -10px;
  right: -12px;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border-radius: 999px;
  background: #ff0099;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}

/* Login menu */
.header__login {
  position: relative;
}

.header__login-button {
  padding: 0;
  border: 0;
  background: none;
  color: white;
  cursor: pointer;
}

.header__login-menu {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;

  width: 260px;
  display: none;

  padding: 1rem;

  background: #111827;
  border: 1px solid #374151;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);

  color: white;
}

.header__login.is-open .header__login-menu {
  display: block;
}

.header__login-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.header__login-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;

  color: white;
  font-size: 0.875rem;
}

.header__login-form input {
  width: 100%;
  height: 38px;
  padding: 0 0.75rem;

  box-sizing: border-box;

  border: 1px solid #374151;
  border-radius: 6px;

  background: #1f2937;
  color: white;

  font: inherit;
  font-size: 0.875rem;
}

.header__login-form input:focus {
  outline: none;
  border-color: #ff0098;
}

.header__login-submit {
  margin-top: 0.5rem;

  width: 100%;
  height: 40px;

  border: 0;
  border-radius: 6px;

  background: #ff0098;
  color: white;

  font: inherit;
  font-size: 0.875rem;
  font-weight: 400;

  cursor: pointer;
}

.header__login-submit:hover {
  background: #e00087;
}

.header__login-form p {
  margin-top: 0.5rem;
  margin-bottom: 0rem;

  font: inherit;
  font-size: 0.875rem;
  font-weight: 400;

  text-align: center;
}

.header__login-form a {
  margin-bottom: 0.5rem;

  color: white;
  font-size: 0.875rem;
  text-align: center;
  text-decoration: underline;
}

.header__login-form a:hover {
  color: #ff0098;
}

/* Eingeloggt-Menü */

.header__customer-menu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.header__customer-menu .greeting-log {
  margin: 0 0 0.9rem 0.6rem;

  color: white;
  font-size: 0.875rem;
  font-weight: 400;
}

.header__customer-menu .username-log {
  display: block;
  margin: 0.25rem 0 0 0.6rem;

  color: white;
  font-size: 0.875rem;
  font-weight: 700;
}

.header__customer-menu a {
  padding: 0 0.75rem;

  display: flex;
  align-items: center;

  color: white;

  font-size: 0.875rem;
  text-decoration: none;
}

.header__customer-menu a:hover {
  color: #ff0098;
}

.header__logout-button {
  margin-top: 0.5rem;

  width: 100%;
  height: 40px;

  border: 0;
  border-radius: 6px;

  background: #ff0098;
  color: white;

  font: inherit;
  font-size: 0.875rem;
  font-weight: 400;

  cursor: pointer;
}

.header__logout-button:hover {
  background: #e00087;
}

.header__login-form .header__forgot-password {
  align-self: flex-end;

  margin: -0.1rem 0 0.15rem;

  color: #d1d5db;
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.2;
  text-align: right;
  text-decoration: none;
}

.header__login-form .header__forgot-password:hover {
  color: var(--color-accent, #ff0098);
  text-decoration: underline;
}

.header__login-form .header__forgot-password:focus-visible {
  outline: 2px solid var(--color-accent, #ff0098);
  outline-offset: 3px;
  border-radius: 2px;
}

.header__menu-button {
  display: none;

  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;

  align-items: center;
  justify-content: center;

  border: 0;
  border-radius: 8px;

  background: transparent;
  color: #ffffff;

  cursor: pointer;

  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.header__menu-button:hover {
  background: #111827;
  color: #ff0098;
}

.header__menu-button:focus-visible {
  outline: 2px solid #ff0098;
  outline-offset: 2px;
}

.header__menu-icon {
  position: relative;

  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;

  width: 24px;
  height: 24px;
}

.header__menu-icon span {
  display: block;

  width: 24px;
  height: 2px;

  border-radius: 999px;

  background: currentColor;

  transform-origin: center;

  transition:
    transform 0.25s ease,
    opacity 0.2s ease;
}

/* Burger wird beim Öffnen zum X */

.header__menu-button[aria-expanded="true"]
  .header__menu-icon
  span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.header__menu-button[aria-expanded="true"]
  .header__menu-icon
  span:nth-child(2) {
  opacity: 0;
}

.header__menu-button[aria-expanded="true"]
  .header__menu-icon
  span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}



/* Responsive mobile menu */

.header__mobile-menu,
.header__mobile-quick-actions {
  display: none;
}

@media (max-width: 768px) {
  .site-header {
    z-index: 100;
  }

  .header__bar {
    position: relative;
    z-index: 2;

    display: flex;
    align-items: center;
    justify-content: space-between;

    width: min(
      calc(100% - 2 * var(--content-padding)),
      var(--content-max-width)
    );
    margin-inline: auto;

    height: 4rem;
    gap: 0.5rem;
  }
  .header__logo {
    display: block;
    height: 40px;
  }
  
  .header__search--desktop,
  .header__search--mobile,
  .header__right {
    display: none;
  }
  
  .header__mobile-controls,
  .header__mobile-quick-actions {
    display: none;
  }

  .header__cart-badge--mobile {
    top: 0;
    right: 0;
  }

}

  @media (max-width: 768px) {

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

    .header__logo-link {
      margin-right: auto;
    }

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

    .header__mobile-quick-actions {
      display: flex;
      align-items: center;
      gap: 0.35rem;
    }

    .header__mobile-quick-action {
      position: relative;

      display: inline-flex;
      align-items: center;
      justify-content: center;

      width: 42px;
      height: 42px;
      flex-shrink: 0;

      color: #ffffff;
      text-decoration: none;
    }

    .header__mobile-quick-action svg {
      width: 22px;
      height: 22px;
      fill: currentColor;
    }

    .header__menu-button {
      display: inline-flex !important;
      flex-shrink: 0;
      margin: 0;
    }
  }

  /* Aufklappbare Navigation */

  .header__mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;

    display: block;

    max-height: 0;
    overflow: hidden;

    visibility: hidden;
    opacity: 0;

    background: #000000;
    border-bottom: 1px solid #1f2937;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);

    transform: translateY(-10px);

    transition:
      max-height 0.35s ease,
      opacity 0.25s ease,
      transform 0.25s ease,
      visibility 0.25s ease;
  }

  .site-header.is-mobile-menu-open .header__mobile-menu {
    max-height: calc(100dvh - 4rem);
    overflow-y: auto;

    visibility: visible;
    opacity: 1;

    transform: translateY(0);
  }

  .header__mobile-nav {
    display: flex;
    flex-direction: column;

    width: min(100% - 2rem, 1200px);
    margin-inline: auto;
    padding: 1rem 0;
  }

  .header__mobile-nav a {
    display: flex;
    align-items: center;

    min-height: 52px;
    padding: 0.75rem 0.5rem;

    border-bottom: 1px solid #1f2937;

    color: #ffffff;

    font-size: 1rem;
    font-weight: 400;
    text-decoration: none;

    transition:
      color 0.2s ease,
      padding-left 0.2s ease;
  }

  .header__mobile-nav a:hover,
  .header__mobile-nav a:focus-visible {
    padding-left: 0.9rem;
    color: #ff0098;
  }


/* Mobiler Sprachumschalter */

.language-switcher--mobile {
  width: min(100% - 2rem, 1200px);
  margin: 0 auto;
  padding: 0 0 1rem;
}

.language-switcher--mobile > .language-switcher__button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;

  width: 100%;
  min-height: 30px;
  padding: 0.75rem 0.5rem;

  color: #ffffff;

  font: inherit;
  font-size: 1rem;
  font-weight: 400;
  text-align: left;

  cursor: pointer;

}

.language-switcher--mobile .language-switch-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;

  fill: currentColor;
}

.language-switcher--mobile .language-switcher__current {
  display: inline-block;
}


/* Smaller screen */ 
@media (max-width: 360px) {
  .header__bar {
    gap: 0.35rem;
  }

  .header__mobile-quick-actions {
    gap: 0.25rem;
  }

  .header__mobile-quick-action {
    width: 38px;
    height: 38px;
  }

  .header__mobile-quick-action svg {
    width: 20px;
    height: 20px;
  }
}