/* =====================================================
   HEADER LAYOUT – COMPLETE STABLE VERSION
   ===================================================== */

.header-top {
  display: flex;
  align-items: flex-start;
}

.header-brand a {
  white-space: nowrap;
}

.header-brand img {
  max-height: 110px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
}

/* =====================================================
   DESKTOP (≥ 992px)
   ===================================================== */

@media (min-width: 992px) {

  .header .container {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
  }

  .header-top {
    justify-content: space-between;
    align-items: center;
  }

  .header-brand {
    flex: 0 0 25%;
  }

.header-actions {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 2rem;
}
  /* ===== Suche ===== */

  .header-search {
    display: flex;
    align-items: center;
  }

  .header-search form {
    display: flex;
    align-items: center;
    width: 400px;
    max-width: 100%;
    gap: 6px;
  }

  /* Drupal Wrapper neutralisieren */

  .header-search .js-form-item,
  .header-search .form-actions,
  .header-search .js-form-wrapper,
  .header-search .mb-3 {
    margin: 0 !important;
    margin-bottom: 0 !important;
    display: flex;
    align-items: center;
  }

  .header-search input[type="search"] {
    height: 38px;
    width: 220px;
  }

  .header-search input[type="submit"] {
    height: 38px;
    width: auto;
  }

  /* ===== Hauptmenü ===== */

  #mainMenu {
    display: block !important;
  }

  #mainMenu > nav > ul,
  #mainMenu > ul {
    display: flex !important;
    flex-direction: row;
    gap: 2rem;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
  }
}

/* =====================================================
   WARENKORB & ACCOUNT-MENÜ
   ===================================================== */

#block-jekeramik-warenkorb,
#block-jekeramik-account-menu {
  display: flex;
  align-items: center;
  min-height: 38px;
}

#block-jekeramik-account-menu ul {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

#block-jekeramik-account-menu .nav-link {
  display: flex;
  align-items: center;
  padding: 0;
  line-height: 1;
  text-decoration: none;
}

#block-jekeramik-warenkorb .cart-block--link__expand {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
  text-decoration: none;
}

#block-jekeramik-warenkorb .cart-block--summary__icon img {
  height: 18px;
  width: auto;
  display: block;
}

/* =====================================================
   MOBILE (< 992px)
   ===================================================== */

@media (max-width: 991px) {

  .header-top {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .header-actions {
    order: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
  }

  .navbar-toggler {
    order: 2;
    display: block;
    border: none;
    background: transparent;
    padding: 0;
  }

  .header-brand {
    order: 3;
    width: 100%;
    text-align: center;
    margin-top: 10px;
  }

  .header-search {
    display: none;
  }
}

/* =====================================================
   UTILITIES
   ===================================================== */

.navbar-toggler-icon {
  width: 24px;
  height: 24px;
  display: block;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='black' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

body {
  overflow-x: hidden;
}

#mainMenu .nav-link.active {
  border-bottom: 2px solid #007bff;
}
