#header button,
#header a,
.header-banner button {
  outline-offset: 3px;
}

#header button:focus-visible,
#header a:focus-visible,
.header-banner button:focus-visible {
  outline: 2px solid #005fcc !important;
  box-shadow: 0 0 0 2px #fff !important;
}

#header [hidden],
.header-banner [hidden] {
  display: none !important;
}

#header #search_widget .searchtoggle:not([hidden]) {
  display: block !important;
}

.language-dropdown-button,
.tm_userinfotitle,
.search_button,
.desktop-submenu-toggle,
.dropdown-toggle-mobile,
#mobile-menu-toggle {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.tm_userinfotitle,
.search_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  box-shadow: none;
}

.tm_userinfotitle .user_bg {
  flex: 0 0 22px;
  float: none;
  margin: 0;
}

#header #_desktop_user_info .tm_userinfotitle .user_bg {
  transform: none !important;
}

#header .header-nav .right-nav {
  display: flex;
  align-items: center;
  min-height: 44px;
}

#header .header-nav .language-dropdown {
  align-self: center;
  float: none;
  margin-top: 0;
  margin-bottom: 0;
}

#header .header-nav .language-dropdown-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  line-height: 1;
}

#header .header-nav .language-dropdown-button img {
  display: block;
  flex: 0 0 auto;
  margin: 0;
}

.language-dropdown { position: relative; }
.language-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  z-index: 1001;
  width: max-content;
  min-width: 132px;
  max-width: calc(100vw - 16px);
  padding: 4px 0;
  overflow: visible;
  background: #fff;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

.language-dropdown-menu.is-open {
  display: block !important;
}

#header .language-dropdown:hover > .language-dropdown-menu[hidden] {
  display: none !important;
}

.language-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  white-space: nowrap;
  box-sizing: border-box;
}

.language-dropdown-menu .language-name {
  display: inline-block;
  overflow: visible;
  white-space: nowrap;
}

#_desktop_top_menu .menu-item:focus-within > .submenu,
#_desktop_top_menu .menu-item-ayuda:focus-within > .submenu,
#_desktop_top_menu .submenu.is-open { display: block !important; }

#_desktop_top_menu > .main-menu > li {
  position: relative;
}

#_desktop_top_menu > .main-menu > li > .submenu {
  top: 100%;
  right: auto;
  left: 0;
  width: max-content;
  min-width: 0;
  max-width: calc(100vw - 32px);
  height: auto;
  margin: 0;
  padding: 18px 20px;
  overflow: visible;
  box-sizing: border-box;
}

#_desktop_top_menu > .main-menu > li:first-child > .submenu {
  grid-template-columns: repeat(3, minmax(190px, 1fr));
  column-gap: 28px;
  width: 700px;
}

#_desktop_top_menu > .main-menu > li:first-child > .submenu.is-open,
#_desktop_top_menu > .main-menu > li:first-child:focus-within > .submenu,
#_desktop_top_menu > .main-menu > li:first-child:hover > .submenu {
  display: grid !important;
}

#_desktop_top_menu > .main-menu > li:first-child > .submenu > .submenu-group {
  float: none;
  width: auto;
  min-width: 0;
  margin: 0;
}

#_desktop_top_menu > .main-menu > .menuComplementos > .submenu,
#_desktop_top_menu > .main-menu > .menu-item-ayuda > .submenu {
  width: 310px;
}

#_desktop_top_menu > .main-menu > li > .submenu a {
  white-space: normal;
}

#header #_desktop_top_menu > .main-menu > li > .submenu,
#header #_desktop_top_menu > .main-menu > li > .submenu ul,
#header #_desktop_top_menu > .main-menu > li > .submenu li,
#header #_desktop_top_menu > .main-menu > li > .submenu a {
  text-align: center !important;
}

#header #_desktop_top_menu > .main-menu > li > .submenu li {
  margin: 0 !important;
  padding: 0 !important;
}

#header #_desktop_top_menu > .main-menu > li > .submenu li + li {
  margin-top: 7px !important;
}

#header #_desktop_top_menu > .main-menu > li > .submenu a {
  display: block;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.4 !important;
}

#header #_desktop_top_menu .submenu[hidden] {
  display: none !important;
}

@media (min-width: 992px) {
  #header #_desktop_top_menu {
    top: -35.5px;
  }

  #header #_desktop_cart .blockcart.cart-preview .blockcart-header > a.cart {
    top: -9.5px;
  }

  #header .header-nav .right-nav {
    align-items: center;
    height: 44px;
    min-height: 44px;
    margin-top: 0;
    transform: none;
  }

  #header .header-nav .right-nav #_desktop_user_info {
    display: flex;
    align-items: center;
    height: 44px;
    margin: 0;
  }

  #header .header-nav .right-nav .language-dropdown-desktop {
    display: flex;
    align-items: center;
    height: 44px;
    margin: 0;
  }
}

.desktop-submenu-toggle,
.dropdown-toggle-mobile { min-width: 44px; min-height: 44px; }

.header-shipping-message {
  display: block;
  width: 100%;
  text-align: center;
}

#header .cart-products-count {
  background: #595959;
  color: #fff;
}

#header #_desktop_cart .blockcart.cart-preview .blockcart-header > a.cart,
#header #_mobile_cart .blockcart.cart-preview .blockcart-header > a.cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px;
  min-height: 44px;
  background: url('/img/cms/carrito2.svg') center / 22px 22px no-repeat !important;
  transform: none !important;
}

@media (max-width: 991px) {
  #header .header-nav .innerhead {
    position: relative;
    min-height: 44px;
  }

  #header .header-nav .mobile-header-tools {
    position: absolute;
    top: 3px !important;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    height: 44px;
    margin: 0;
    pointer-events: none;
  }

  #header .header-nav .mobile-header-tools > .language-dropdown-mobile,
  #header .header-nav .mobile-header-tools > #_mobile_user_info,
  #header .header-nav .mobile-header-tools > #search_widget,
  #header .header-nav .mobile-header-tools > #_mobile_cart {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    margin: 0 !important;
    float: none !important;
    pointer-events: auto;
  }

  #header .header-nav .mobile-header-tools > #_mobile_cart,
  #header .header-nav #_mobile_cart #_desktop_cart,
  #header .header-nav #_mobile_cart .blockcart {
    position: static !important;
  }

  #header .header-nav #_mobile_cart .cart_block {
    position: fixed !important;
    right: auto !important;
    left: 50% !important;
    width: min(300px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    transform: translateX(-50%) !important;
  }

  #header .header-nav .mobile-header-tools > #search_widget {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #header .header-nav .mobile-header-tools > #search_widget {
    position: relative !important;
    top: 0 !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    float: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    transform: none !important;
  }

  #header .header-nav .mobile-header-tools > #search_widget > .search_button {
    position: absolute !important;
    top: 0 !important;
    right: auto !important;
    bottom: auto !important;
    left: 0 !important;
    float: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
  }

  #header .header-nav .mobile-header-tools > #search_widget > .search_button .search_bg {
    position: static !important;
    float: none !important;
    margin: 0 !important;
    transform: none !important;
  }

  #search_widget {
    padding: 0;
    margin-top: 12px;
  }

  #header .header-nav #_mobile_user_info .tm_userinfotitle,
  #header .header-nav #_mobile_cart .cart-preview,
  #header .header-nav #_mobile_cart .cart {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
  }

  #header #_mobile_user_info .tm_userinfotitle .user_bg,
  #header #_mobile_cart .cart {
    transform: none !important;
    top: auto !important;
  }

  #mobile-menu-toggle { min-width: 44px; min-height: 44px; }
  #mobile-menu.is-open { display: block !important; }
  #mobile-menu ul[hidden] { display: none !important; }

  #header #mobile-menu .dropdown-toggle-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0;
    line-height: 1;
    text-align: center;
  }

  #header #mobile-menu .mobile-menu-item > .dropdown-toggle-mobile {
    top: 2px;
  }

  #header #mobile-menu .mobile-submenu-group > .dropdown-toggle-mobile {
    top: 7px;
  }

  #header #mobile-menu .mobile-submenu.is-open,
  #header #mobile-menu .mobile-submenu-items.is-open {
    display: block !important;
  }
}
