/* Restore the original overlay header at page top. */
header {
  position: absolute;
  top: auto;
  z-index: 1000;
  margin: 0;
  background: transparent;
  box-shadow: none;
  transition: background-color .2s ease, box-shadow .2s ease;
}

/* The floating desktop bar only takes over after the hero/header has scrolled away. */
header.is-scrolled {
  position: fixed;
  top: 0;
  z-index: 1100;
  height: 90px;
  margin: 0;
  background: #fff;
  box-shadow: 0 8px 22px rgba(18, 34, 48, .12);
}

header.is-scrolled .topbox {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
}

header.is-scrolled .logo {
  position: static;
  display: block;
  flex: 0 0 180px;
  width: 180px;
  height: auto;
  margin: 0;
}

header.is-scrolled .logo img {
  position: static;
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 60px;
  object-fit: contain;
  transform: none;
}

header.is-scrolled .top_nav {
  order: 2;
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  height: auto;
  margin: 0;
  float: none;
  background: none;
}

header.is-scrolled .top_nav .flexnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: auto;
  margin: 0;
  overflow: visible;
}

header.is-scrolled .top_nav .flexnav > li {
  position: relative;
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  float: none;
}

header.is-scrolled .top_nav .flexnav li::before {
  display: none;
}

header.is-scrolled .top_nav .flexnav > li > a {
  display: block;
  width: 100%;
  height: auto;
  min-height: 48px;
  margin: 0;
  padding: 14px 20px 14px 7px;
  color: #34424b;
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
  text-align: center;
  white-space: nowrap;
}

header.is-scrolled .top_nav .flexnav > li.active > a,
header.is-scrolled .top_nav .flexnav > li > a:hover,
header.is-scrolled .top_nav .flexnav > li > a:focus-visible {
  color: #92775b;
}

header.is-scrolled .top_tel {
  order: 3;
  display: flex;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  margin: 0;
  align-items: center;
}

header.is-scrolled .top_tel img {
  display: block;
  width: 30px;
  height: 30px;
  margin: 0;
  object-fit: contain;
}

header.is-scrolled .top_tel p {
  top: calc(100% + 10px);
  right: 0;
  height: auto;
  padding: 9px 16px;
  border: 0;
  border-radius: 8px;
  background: #92775b;
  color: #fff;
  font-size: 16px;
  line-height: 1.4;
  white-space: nowrap;
}

header.is-scrolled .top_search_icon {
  order: 4;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  float: none;
  background-position: center;
  background-size: contain;
  background-color: transparent;
  cursor: pointer;
  font-size: 0;
}

header .top_search_icon {
  padding: 0;
  border: 0;
  background-color: transparent;
  cursor: pointer;
  font-size: 0;
  transition: none;
}

header.is-scrolled .menu-button {
  display: none;
}

header.is-scrolled .top_nav .flexnav li.has-submenu {
  position: relative;
}

header .nav-submenu-toggle {
  position: absolute;
  top: 50%;
  right: 2px;
  z-index: 3;
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #92775b;
  cursor: pointer;
  font: inherit;
}

header .nav-submenu-toggle::after {
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: translateY(-2px) rotate(45deg);
  transition: transform .18s ease;
}

header .nav-submenu-toggle[aria-expanded="true"]::after {
  transform: translateY(2px) rotate(225deg);
}

header .nav-submenu-toggle:hover,
header .nav-submenu-toggle:focus-visible {
  background: #f4f0eb;
  outline: none;
}

header .flexnav li.has-submenu > .item-with-ul {
  position: absolute;
  top: 100%;
  left: 50%;
  z-index: 1001;
  display: none;
  width: 260px;
  max-width: calc(100vw - 24px);
  height: auto;
  margin: 0;
  padding: 10px;
  transform: translateX(-50%);
  overflow: visible;
  border: 1px solid #eee9e3;
  border-top: 3px solid #92775b;
  border-radius: 0 0 10px 10px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(28, 39, 47, .16);
}

header .flexnav li.has-submenu.is-open > .item-with-ul {
  display: block;
}

header .flexnav .item-with-ul a {
  display: block;
  width: 100%;
  height: auto;
  min-height: 44px;
  margin: 0;
  padding: 11px 14px;
  border: 0;
  border-bottom: 1px solid #f0ede9;
  border-radius: 6px;
  background: transparent;
  color: #43505a;
  font-size: 15px;
  line-height: 1.5;
  text-align: left;
  white-space: normal;
}

header .flexnav .item-with-ul a:last-child {
  border-bottom: 0;
}

header .flexnav .item-with-ul a:hover,
header .flexnav .item-with-ul a:focus-visible {
  background: #f7f4f0;
  color: #92775b;
  outline: none;
}

header .flexnav .item-with-ul a em {
  display: none;
}

header .menu-button:focus-visible {
  outline: 2px solid #92775b;
  outline-offset: 3px;
}

.search_wrap {
  z-index: 1300;
}

.search_close {
  padding: 0;
  border: 0;
  background-color: transparent;
  cursor: pointer;
}

.search_close:focus-visible,
header .top_search_icon:focus-visible {
  outline: 2px solid #92775b;
  outline-offset: 3px;
}

@media screen and (min-width: 1080px) and (max-width: 1366px) {
  header { top: 0; }

  header.is-scrolled .topbox {
    gap: 10px;
  }

  header.is-scrolled .logo {
    flex-basis: 160px;
    width: 160px;
  }

  header.is-scrolled .top_nav .flexnav > li > a {
    padding-right: 16px;
    padding-left: 4px;
    font-size: 15px;
  }

  header.is-scrolled .top_tel {
    flex-basis: 26px;
    width: 26px;
  }

  header.is-scrolled .top_tel img {
    width: 26px;
    height: 26px;
  }
}

@media screen and (max-width: 1079px) {
  header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 70px;
    margin: 0;
    background: #fff;
    box-shadow: 0 1px 0 rgba(18, 34, 48, .08);
  }

  header .topbox {
    display: flex;
    width: 94%;
    height: 70px;
    margin: 0 auto;
    align-items: center;
    gap: 8px;
  }

  header .logo {
    position: static;
    display: block;
    flex: 0 1 auto;
    width: clamp(120px, 40vw, 180px);
    min-width: 0;
    height: auto;
    margin: 0;
  }

  header .logo img {
    position: static;
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: 50px;
    object-fit: contain;
    transform: none;
  }

  header .top_tel {
    display: none;
  }

  header .top_search_icon {
    order: 2;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    margin: 0 0 0 auto;
    padding: 0;
    border: 0;
    float: none;
    background-position: center;
    background-size: 28px 28px;
    background-color: transparent;
    cursor: pointer;
    font-size: 0;
  }

  header .top_nav {
    order: 3;
    position: relative;
    display: flex;
    flex: 0 0 44px;
    width: 44px;
    height: 70px;
    margin: 0;
    float: none;
    align-items: center;
    justify-content: center;
    background: none;
  }

  header .menu-button {
    position: relative;
    z-index: 1002;
    display: block;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    transform: none;
    border: 0;
    border-radius: 9px;
    background: #f4f0eb;
    color: transparent;
    cursor: pointer;
    font-size: 0;
  }

  header .menu-button::before,
  header .menu-button::after {
    position: absolute;
    top: 14px;
    right: 10px;
    width: 24px;
    height: 2px;
    border: 0;
    background: #34424b;
    content: "";
    transition: transform .2s ease, top .2s ease;
  }

  header .menu-button::after {
    top: 30px;
    box-shadow: 0 -8px 0 #34424b;
  }

  header .menu-button.cur::before {
    top: 21px;
    transform: rotate(45deg);
  }

  header .menu-button.cur::after {
    top: 21px;
    transform: rotate(-45deg);
    box-shadow: none;
  }

  header .top_nav .flexnav {
    position: fixed;
    top: 70px;
    right: 0;
    left: 0;
    z-index: 1001;
    display: block;
    width: 100%;
    height: 0;
    max-height: calc(100vh - 70px);
    max-height: calc(100dvh - 70px);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    box-shadow: 0 12px 20px rgba(28, 39, 47, .12);
    visibility: hidden;
    pointer-events: none;
    transition: height .24s ease, visibility .24s ease;
  }

  header .top_nav .flexnav.show {
    height: calc(100vh - 70px);
    height: calc(100dvh - 70px);
    padding: 10px 0 24px;
    border-top: 1px solid #eee9e3;
    visibility: visible;
    pointer-events: auto;
  }

  header .top_nav .flexnav > li,
  header .top_nav .flexnav > li.has-submenu {
    position: relative;
    display: block;
    width: 100%;
    margin: 0;
    border-bottom: 1px solid #eee9e3;
    float: none;
  }

  header .top_nav .flexnav > li::before {
    display: none;
  }

  header .top_nav .flexnav > li > a {
    width: 100%;
    min-height: 58px;
    height: auto;
    margin: 0;
    padding: 16px 72px 16px 6%;
    color: #34424b;
    font-size: 16px;
    font-weight: 600;
    line-height: 26px;
    text-align: left;
  }

  header .top_nav .flexnav > li.active > a,
  header .top_nav .flexnav > li > a:hover,
  header .top_nav .flexnav > li > a:focus-visible {
    color: #92775b;
  }

  header .nav-submenu-toggle {
    top: 7px;
    right: 5%;
    width: 44px;
    height: 44px;
    transform: none;
  }

  header .flexnav li.has-submenu > .item-with-ul {
    position: static;
    display: none;
    width: 100%;
    min-width: 0;
    max-width: none;
    height: auto;
    padding: 0 5% 10px 8%;
    transform: none;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  header .flexnav li.has-submenu.is-open > .item-with-ul {
    display: block;
  }

  header .flexnav .item-with-ul a {
    min-height: 46px;
    padding: 11px 14px;
    border: 0;
    border-radius: 6px;
    background: #f7f5f2;
  }

  header .flexnav .item-with-ul a + a {
    margin-top: 5px;
  }

  body.nav-menu-open {
    overflow: hidden;
  }
}

/* Keep each desktop label and its separate toggle together without overlapping. */
@media screen and (min-width: 1080px) {
  header .top_nav .flexnav > li.has-submenu {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  header:not(.is-scrolled) .top_nav .flexnav > li.has-submenu > a,
  header.is-scrolled .top_nav .flexnav > li.has-submenu > a {
    flex: 0 1 auto;
    width: auto;
    padding-right: 0;
    padding-left: 0;
  }

  header .top_nav .flexnav > li.has-submenu > .nav-submenu-toggle {
    position: static;
    flex: 0 0 24px;
    width: 24px;
    height: 30px;
    margin-left: 8px;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  header,
  header .menu-button::before,
  header .menu-button::after,
  header .top_nav .flexnav,
  header .nav-submenu-toggle::after {
    transition-duration: .01ms !important;
  }
}
