/**
 * Header (templates/_partials/header.tpl) — utility bar, main row, mega menu bar.
 * Loaded last in <head> (stylesheets.tpl) and scoped to #header: it wins over the
 * theme's minified rules without !important where possible.
 * Static files are cached for a year: bump ?v= in stylesheets.tpl on every change.
 */

#header {
  --mh-navy: #0c193a;
  --mh-orange: #e65021;
  --mh-orange-dark: #cf4419;
  --mh-line: #eceff3;
  --mh-muted: #6b7383;
  background: #fff;
}

/* ------------------------------------------------------------------ */
/* HT / TTC switch (utility bar on desktop, contact row on phones)     */
/* ------------------------------------------------------------------ */
.mh-taxswitch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 2px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
}

.mh-taxswitch button {
  height: 22px;
  margin: 0;
  padding: 0 10px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 22px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.mh-taxswitch button:hover {
  color: #fff;
}

.mh-taxswitch button[aria-pressed='true'] {
  color: var(--mh-navy);
  background: #fff;
}

.mh-taxswitch button:focus-visible {
  outline: 2px solid var(--mh-orange);
  outline-offset: 1px;
}

/* Light variant (phones, on white) */
.mh-taxswitch--light {
  background: #eef0f4;
}

.mh-taxswitch--light button {
  color: var(--mh-muted);
}

.mh-taxswitch--light button:hover {
  color: var(--mh-navy);
}

.mh-taxswitch--light button[aria-pressed='true'] {
  color: #fff;
  background: var(--mh-navy);
}

/* ------------------------------------------------------------------ */
/* One price at a time, driven by the switch (html.mh-tax-incl = TTC). */
/* Listings (product miniatures) and the search panel; product pages    */
/* keep both prices. The home cards (mh-pcard) have their own rules.    */
/* ------------------------------------------------------------------ */
html:not(.mh-tax-incl) .product-miniature .gpPrice .pwt,
html:not(.mh-tax-incl) .algolia-product__price-incl {
  display: none !important;
}

html.mh-tax-incl .product-miniature .current-price-display .pwnt,
html.mh-tax-incl .product-miniature .gpPrice .price .regular,
html.mh-tax-incl .algolia-product__price-row {
  display: none !important;
}

/* The TTC line takes the place and the look of the HT price. */
html.mh-tax-incl .product-miniature .gpPrice .pwt {
  font-size: 20px;
  font-weight: 700;
  color: #e65021;
}

html.mh-tax-incl .product-miniature .gpPrice .pwt .inner {
  font-size: 14px;
  font-weight: 600;
  color: #444;
}

html.mh-tax-incl .algolia-product__price-incl {
  font-size: 16px;
  font-weight: 700;
  color: #0c193a;
}

@media (min-width: 992px) {
  /* ---------------------------------------------------------------- */
  /* 1. Utility bar                                                    */
  /* ---------------------------------------------------------------- */
  #header .header-nav {
    margin: 0;
    padding: 0 !important;
    background: var(--mh-navy);
  }

  #header .header-nav .header__container > .visible--desktop {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 38px;
  }

  #header .header-nav .small {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 22px;
    min-width: 0;
    margin: 0;
    overflow: hidden; /* never runs under the phone numbers */
    font-size: 12.5px;
  }

  .mh-usp {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.86);
  }

  .mh-usp svg {
    flex: 0 0 auto;
    width: 15px;
    height: 15px;
    color: #ff8a5c;
  }

  #header .header-nav__right {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0;
  }

  #header .header-nav .call_num {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0;
  }

  #header .header-nav .call_num a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.86);
    text-decoration: none;
  }

  #header .header-nav .call_num a:hover {
    color: #fff;
  }

  #header .header-nav .call_num svg {
    width: 16px;
    height: 11px;
    margin: 0;
    border-radius: 2px;
  }

  #header .header-nav .lang_c {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 0 0 0 18px;
    border-left: 1px solid rgba(255, 255, 255, 0.18);
  }

  #header .header-nav .lang_c a {
    margin: 0;
    padding: 3px 7px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    border: 0;
    border-radius: 4px;
  }

  #header .header-nav .lang_c a::before,
  #header .header-nav .lang_c a::after {
    content: none;
  }

  #header .header-nav .lang_c a:hover {
    color: #fff;
  }

  #header .header-nav .lang_c a.is-current {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
  }

  #header .header-nav .mh-taxswitch {
    margin-left: 0;
  }

  .mh-nav-sep {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.18);
  }

  /* ---------------------------------------------------------------- */
  /* 2. Main row: logo, search, actions                                */
  /* ---------------------------------------------------------------- */
  #header .header-top {
    display: flex;
    align-items: center;
    gap: 32px;
    height: 88px;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  #header .header-top .h_logo {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    margin: 0; /* the theme pulls the logo up by 22px */
  }

  #header .header-top .h_logo svg {
    width: 148px;
    height: auto;
  }

  #header .header__search--algolia {
    flex: 1 1 auto;
    padding: 0 !important;
  }

  #header .algolia-search {
    max-width: 720px;
    margin: 0;
  }

  #header .algolia-search .aa-Form,
  #header .algolia-search__fallback {
    height: 48px;
    background: #f4f5f8;
    border: 1px solid #f4f5f8;
    border-radius: 12px;
    box-shadow: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  }

  #header .algolia-search .aa-Form:hover {
    border-color: #e1e5ec;
  }

  #header .algolia-search .aa-Form:focus-within {
    background: #fff;
    border-color: rgba(230, 80, 33, 0.55);
    box-shadow: 0 0 0 4px rgba(230, 80, 33, 0.1);
  }

  #header .algolia-search .aa-Input {
    font-size: 14.5px;
    color: var(--mh-navy);
    background: transparent;
  }

  #header .header__right {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
  }

  /* Ghost actions: SAV, account */
  #header .header__right .mh-hbtn,
  #header .header__right .user-info a,
  #header .header__right .user-info .qcd {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    height: 46px;
    margin: 0;
    padding: 0 14px;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
    color: var(--mh-navy);
    background: transparent;
    border: 0;
    border-radius: 12px;
    box-shadow: none;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
  }

  #header .header__right .mh-hbtn:hover,
  #header .header__right .user-info a:hover,
  #header .header__right .user-info .qcd:hover {
    color: var(--mh-navy);
    background: #f4f5f8;
  }

  #header .header__right .mh-hbtn svg,
  #header .header__right .user-info a svg,
  #header .header__right .user-info .qcd svg {
    width: 22px;
    height: 22px;
  }

  #header .header__right .user-info a svg path,
  #header .header__right .user-info .qcd svg path {
    fill: currentColor;
  }

  #header .header__right .user-info a > span,
  #header .header__right .user-info .qcd > span {
    display: inline-flex;
    align-items: center;
  }

  #header .header__right .user-info,
  #header .header__right .blockcart {
    margin: 0;
    padding: 0;
  }

  /* Cart: the only filled action */
  #header .header__right .blockcart .shopping-cart a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    width: auto;
    height: 46px;
    margin: 0 0 0 6px;
    padding: 0 18px 0 16px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
    color: #fff;
    background: var(--mh-orange);
    border: 0;
    border-radius: 12px;
    text-decoration: none;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
  }

  #header .header__right .blockcart .shopping-cart a:hover {
    background: var(--mh-orange-dark);
    box-shadow: 0 8px 18px rgba(230, 80, 33, 0.25);
  }

  #header .header__right .blockcart .shopping-cart a svg {
    width: 22px;
    height: 22px;
  }

  #header .header__right .blockcart .shopping-cart a svg path {
    fill: currentColor;
  }

  #header .header__right .blockcart .shopping-cart a > span {
    display: inline-flex;
    align-items: center;
  }

  #header .header__right .blockcart .blockcart__count {
    min-width: 0;
    margin: 0;
    padding: 0;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: transparent;
  }

  #header .header__right .blockcart .blockcart__count:empty {
    display: none;
  }

  /* ---------------------------------------------------------------- */
  /* 3. Mega menu bar                                                  */
  /* ---------------------------------------------------------------- */
  #header #kmm {
    background: #fff;
    border-top: 1px solid var(--mh-line);
    border-bottom: 1px solid var(--mh-line);
    box-shadow: 0 6px 16px -14px rgba(12, 25, 58, 0.35);
  }

  #header #kmm .kmm-f,
  #header #kmm .kmm-n {
    background: transparent;
  }

  #header #kmm .kmm-l {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    height: 54px;
  }

  #header #kmm .kmm-l > li {
    display: flex;
    align-items: stretch;
    background: transparent;
  }

  #header #kmm .kmm-l > li > a.kmel {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
    min-height: 0 !important; /* theme: 82px */
    padding: 0 10px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.035em;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--mh-navy);
    background: transparent;
    transition: color 0.15s ease;
  }

  #header #kmm .kmm-l > li > a.kmel::after {
    content: '';
    position: absolute;
    right: 10px;
    bottom: -1px;
    left: 10px;
    height: 2px;
    background: var(--mh-orange);
    border-radius: 2px 2px 0 0;
    transform: scaleX(0);
    transition: transform 0.2s ease;
  }

  #header #kmm .kmm-l > li:hover > a.kmel {
    color: var(--mh-orange);
  }

  #header #kmm .kmm-l > li:hover > a.kmel::after {
    transform: scaleX(1);
  }

  /* Dropdown panels: the theme places them 82px down (old bar height). */
  #header #kmm .kmm-l > li > .kmm-me {
    top: 100% !important;
    border-top: 1px solid var(--mh-line);
    box-shadow: 0 24px 40px -24px rgba(12, 25, 58, 0.25);
  }

  /* SOLDES: an accent pill instead of a full-height orange block */
  #header #kmm .kmm-l > li:last-child {
    align-items: center;
    background: transparent !important;
  }

  #header #kmm .kmm-l > li:last-child > a.kmel {
    height: 32px !important; /* the theme forces the menu height on this entry */
    padding: 0 14px;
    color: #fff;
    background: var(--mh-orange) !important;
    border-radius: 999px;
  }

  #header #kmm .kmm-l > li:last-child > a.kmel::after {
    display: none;
  }

  #header #kmm .kmm-l > li:last-child:hover > a.kmel {
    color: #fff;
    background: var(--mh-orange-dark) !important;
  }
}

/* 1200-1365px: two arguments are enough next to the phone numbers */
@media (min-width: 1200px) and (max-width: 1365.98px) {
  #header .header-nav .small .mh-usp:nth-child(n + 3) {
    display: none;
  }
}

/* 992-1199px: ten menu entries in a 960px container */
@media (min-width: 992px) and (max-width: 1199.98px) {
  #header .header-nav .small .mh-usp:nth-child(n + 2) {
    display: none;
  }

  #header .header-top {
    gap: 20px;
  }

  #header .header__right .mh-hbtn,
  #header .header__right .user-info a,
  #header .header__right .user-info .qcd {
    padding: 0 10px;
  }

  #header .header__right .mh-hbtn .mh-hbtn__label {
    display: none;
  }

  #header #kmm .kmm-l > li > a.kmel {
    padding: 0 6px;
    font-size: 11.5px;
    letter-spacing: 0.02em;
  }
}

/* ------------------------------------------------------------------ */
/* Mega menu panels (desktop). The module nests Bootstrap rows/cols     */
/* with fixed widths (col-2, col-12…), which left big gaps and very     */
/* tall panels. The wrappers are flattened (display: contents) and the */
/* groups flow into balanced columns.                                  */
/* ------------------------------------------------------------------ */
.kmm-head {
  display: none;
}

@media (min-width: 992px) {
  #header #kmm .kmm-l > li > .kmm-me {
    padding: 0 !important;
    color: var(--mh-navy);
    background: #fff;
    border-radius: 0 0 18px 18px;
    overflow: hidden;
  }

  #header #kmm .kmm-me .kmm-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 0 32px;
    padding: 20px 0 16px;
    border-bottom: 1px solid var(--mh-line);
  }

  #header #kmm .kmm-head__title {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--mh-navy);
  }

  #header #kmm .kmm-me .kmm-head__all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--mh-orange);
    background: none;
    border: 0;
    cursor: pointer;
    text-decoration: none;
  }

  #header #kmm .kmm-me .kmm-head__all:hover {
    color: var(--mh-orange-dark);
  }

  #header #kmm .kmm-me .kmm-head__all svg {
    width: 16px;
    height: 16px;
    transition: transform 0.15s ease;
  }

  #header #kmm .kmm-me .kmm-head__all:hover svg {
    transform: translateX(3px);
  }

  /* Scroll area + columns */
  #header #kmm .kmm-me > .container {
    max-width: none;
    max-height: min(64vh, 560px);
    margin: 0;
    padding: 22px 32px 10px;
    overflow-y: auto;
    scrollbar-width: thin;
  }

  #header #kmm .kmm-me > .container > .row {
    display: block;
    margin: 0;
    columns: 190px 5;
    column-gap: 40px;
  }

  #header #kmm .kmm-me > .container > .row [class*='col-lg-']:not(.link-list),
  #header #kmm .kmm-me > .container > .row .container,
  #header #kmm .kmm-me > .container > .row .row {
    display: contents;
  }

  #header #kmm .kmm-me .link-list {
    display: block !important;
    width: auto;
    max-width: none;
    flex: none;
    margin: 0 0 22px !important;
    padding: 0 !important;
    border: 0 !important;
    break-inside: avoid;
  }

  /* Group title */
  #header #kmm .kmm-me .link-list > a,
  #header #kmm .kmm-me .link-list > button {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0 !important;
    text-align: left;
    background: none;
    border: 0;
    cursor: pointer;
    text-decoration: none;
  }

  #header #kmm .kmm-me .link-list .title {
    margin: 0 0 6px;
    padding: 0 !important;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700 !important;
    line-height: 1.35;
    letter-spacing: 0;
    text-transform: none;
    color: var(--mh-navy);
    transition: color 0.15s ease;
  }

  #header #kmm .kmm-me .link-list > a:hover .title,
  #header #kmm .kmm-me .link-list > button:hover .title {
    color: var(--mh-orange);
  }

  /* Links */
  #header #kmm .kmm-me .link-list ul {
    margin: 0;
    padding: 0 !important;
    list-style: none;
  }

  #header #kmm .kmm-me .link-list li {
    margin: 0;
    padding: 0;
    white-space: normal;
  }

  #header #kmm .kmm-n > .kmm-l > li > .kmm-me .link-list li a,
  #header #kmm .kmm-n > .kmm-l > li > .kmm-me .link-list li button.kl,
  #header #kmm .kmm-n > .kmm-l > li > .kmm-me .link-list li span.kl {
    display: block;
    width: 100%;
    margin: 0;
    padding: 3px 0;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.45;
    text-align: left;
    color: #5b6475;
    background: none;
    border: 0;
    transition: color 0.15s ease;
  }

  #header #kmm .kmm-n > .kmm-l > li > .kmm-me .link-list li a::before,
  #header #kmm .kmm-n > .kmm-l > li > .kmm-me .link-list li button.kl::before,
  #header #kmm .kmm-n > .kmm-l > li > .kmm-me .link-list li span.kl::before {
    content: none;
    display: none;
  }

  #header #kmm .kmm-n > .kmm-l > li > .kmm-me .link-list li a:hover,
  #header #kmm .kmm-n > .kmm-l > li > .kmm-me .link-list li button.kl:hover,
  #header #kmm .kmm-n > .kmm-l > li > .kmm-me .link-list li span.kl:hover {
    color: var(--mh-orange);
  }
}
