/* Final header/dropdown/mobile overrides for HuntBee theme. */

/* Desktop utility dropdown anchoring. */
.hb-theme #top.hb-utility-bar .hb-account-dropdown {
  position: relative !important;
  display: inline-flex !important;
}

.hb-theme #top.hb-utility-bar .hb-account-dropdown > .dropdown-menu {
  position: absolute !important;
  top: calc(100% + 1px) !important;
  right: 0 !important;
  left: auto !important;
  min-width: 170px !important;
  margin: 0 !important;
  z-index: 1300 !important;
}

.hb-theme #top.hb-utility-bar #form-currency,
.hb-theme #top.hb-utility-bar #form-currency .btn-group {
  position: relative !important;
}

.hb-theme #top.hb-utility-bar #form-currency .dropdown-menu {
  position: absolute !important;
  top: calc(100% + 1px) !important;
  left: 0 !important;
  right: auto !important;
  margin: 0 !important;
  z-index: 1300 !important;
}

/* Mobile drawer preferences. */
.hb-theme #offcanvas-menu .hb-mobile-preferences {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 8px !important;
  padding: 12px 14px !important;
  overflow: visible !important;
  background: #faf8f3 !important;
  border-bottom: 1px solid #e6e2d8 !important;
}

.hb-theme #offcanvas-menu .hb-mobile-preferences > *,
.hb-theme #offcanvas-menu .hb-mobile-preferences .pull-left,
.hb-theme #offcanvas-menu .hb-mobile-preferences #form-currency,
.hb-theme #offcanvas-menu .hb-mobile-preferences #form-language {
  position: relative !important;
  display: block !important;
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
}

.hb-theme #offcanvas-menu .hb-mobile-preferences #form-currency .btn-group,
.hb-theme #offcanvas-menu .hb-mobile-preferences #form-language .btn-group {
  position: relative !important;
  display: block !important;
  width: 100% !important;
}

.hb-theme #offcanvas-menu .hb-mobile-preferences .btn-link,
.hb-theme #offcanvas-menu .hb-mobile-preferences > a {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
  min-height: 38px !important;
  margin: 0 !important;
  padding: 8px 10px !important;
  border: 1px solid #e2ddd2 !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: #2d3742 !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  text-align: left !important;
  box-shadow: none !important;
}

.hb-theme #offcanvas-menu .hb-mobile-preferences .dropdown-menu {
  position: absolute !important;
  top: calc(100% + 3px) !important;
  left: 0 !important;
  right: auto !important;
  width: 190px !important;
  min-width: 190px !important;
  margin: 0 !important;
  padding: 6px 0 !important;
  border: 1px solid #e6e2d8 !important;
  border-radius: 7px !important;
  background: #fff !important;
  box-shadow: 0 10px 28px rgba(17,24,32,.14) !important;
  z-index: 1600 !important;
}

.hb-theme #offcanvas-menu .hb-mobile-preferences .dropdown-menu .btn-link {
  min-height: 0 !important;
  padding: 8px 12px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

/* Mobile customer links: compact, left aligned and visually consistent. */
.hb-theme #offcanvas-menu .hb-mobile-account-links,
.hb-theme #offcanvas-menu #top-links-menu-container {
  margin: 0 !important;
  padding: 8px 14px !important;
  list-style: none !important;
  background: #f2f1ed !important;
  border-bottom: 1px solid #ddd9cf !important;
}

.hb-theme #offcanvas-menu .hb-mobile-account-links > li,
.hb-theme #offcanvas-menu #top-links-menu-container > li {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.hb-theme #offcanvas-menu .hb-mobile-account-links > li + li,
.hb-theme #offcanvas-menu #top-links-menu-container > li + li {
  border-top: 1px solid #d7d3ca !important;
}

.hb-theme #offcanvas-menu .hb-mobile-account-links > li > a,
.hb-theme #offcanvas-menu #top-links-menu-container > li > a {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 11px !important;
  min-height: 49px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 10px 34px 10px 8px !important;
  color: #111820 !important;
  background: transparent !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  text-align: left !important;
}

.hb-theme #offcanvas-menu .hb-mobile-account-links > li > a > i:first-child,
.hb-theme #offcanvas-menu #top-links-menu-container > li > a > i:first-child {
  flex: 0 0 18px !important;
  width: 18px !important;
  margin: 0 !important;
  color: #0d1826 !important;
  font-size: 13px !important;
  text-align: center !important;
}

.hb-theme #offcanvas-menu .hb-mobile-account-links .offcanvas-caret,
.hb-theme #offcanvas-menu #top-links-menu-container .offcanvas-caret {
  position: absolute !important;
  top: 50% !important;
  right: 8px !important;
  transform: translateY(-50%) !important;
  margin: 0 !important;
}

/* Expanded account submenu: keep secondary links compact and aligned. */
.hb-theme #offcanvas-menu .hb-mobile-account-links .offcanvas-dropdown-menu,
.hb-theme #offcanvas-menu #top-links-menu-container .offcanvas-dropdown-menu {
  margin: 0 !important;
  border-top: 1px solid #e2ded5 !important;
  background: #faf9f5 !important;
}

.hb-theme #offcanvas-menu .hb-mobile-account-links .offcanvas-dropdown-inner,
.hb-theme #offcanvas-menu #top-links-menu-container .offcanvas-dropdown-inner {
  padding: 6px 8px 8px !important;
  background: #faf9f5 !important;
}

.hb-theme #offcanvas-menu .hb-mobile-account-links .offcanvas-dropdown-inner > ul,
.hb-theme #offcanvas-menu #top-links-menu-container .offcanvas-dropdown-inner > ul {
  margin: 0 !important;
  padding: 0 !important;
}

.hb-theme #offcanvas-menu .hb-mobile-account-links .offcanvas-dropdown-inner > ul > li,
.hb-theme #offcanvas-menu #top-links-menu-container .offcanvas-dropdown-inner > ul > li {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.hb-theme #offcanvas-menu .hb-mobile-account-links .offcanvas-dropdown-inner > ul > li + li,
.hb-theme #offcanvas-menu #top-links-menu-container .offcanvas-dropdown-inner > ul > li + li {
  margin-top: 2px !important;
}

.hb-theme #offcanvas-menu .hb-mobile-account-links .offcanvas-dropdown-inner > ul > li > a,
.hb-theme #offcanvas-menu #top-links-menu-container .offcanvas-dropdown-inner > ul > li > a {
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  width: 100% !important;
  min-height: 38px !important;
  margin: 0 !important;
  padding: 8px 10px !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: #4f5b65 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
}

.hb-theme #offcanvas-menu .hb-mobile-account-links .offcanvas-dropdown-inner > ul > li > a:hover,
.hb-theme #offcanvas-menu .hb-mobile-account-links .offcanvas-dropdown-inner > ul > li > a:focus,
.hb-theme #offcanvas-menu #top-links-menu-container .offcanvas-dropdown-inner > ul > li > a:hover,
.hb-theme #offcanvas-menu #top-links-menu-container .offcanvas-dropdown-inner > ul > li > a:focus {
  background: #fff !important;
  color: #111820 !important;
}

.hb-theme #offcanvas-menu .hb-mobile-account-links .offcanvas-dropdown-inner > ul > li > a > i,
.hb-theme #offcanvas-menu #top-links-menu-container .offcanvas-dropdown-inner > ul > li > a > i {
  flex: 0 0 14px !important;
  width: 14px !important;
  margin: 0 !important;
  color: #9aa2a8 !important;
  font-size: 12px !important;
  line-height: 1 !important;
  text-align: center !important;
}

/* Main mobile navigation. */
.hb-theme #offcanvas-menu .hb-mobile-nav {
  margin: 0 !important;
  padding: 8px 14px 16px !important;
  background: #fff !important;
}

.hb-theme #offcanvas-menu .hb-mobile-nav > li {
  margin: 0 !important;
  border-bottom: 1px solid #ebe7df !important;
}

.hb-theme #offcanvas-menu .hb-mobile-nav > li > a {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 48px !important;
  width: 100% !important;
  padding: 10px 8px !important;
  color: #111820 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  background: transparent !important;
  text-align: left !important;
}

.hb-theme #offcanvas-menu .hb-mobile-nav .offcanvas-caret {
  position: static !important;
  flex: 0 0 auto !important;
  margin-left: 12px !important;
}

@media (max-width: 420px) {
  .hb-theme #offcanvas-menu .hb-mobile-preferences {
    grid-template-columns: 1fr 1fr !important;
  }
}
