.header {
  --header-column-gap: 8px;
  --color-text: var(--color-header-text);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  background-color: rgb(var(--color-header-background));
  color: rgb(var(--color-header-text));
}

.header__container {
  display: grid;
  column-gap: 8px;
  align-items: center;
}

.header__logo {
  grid-area: logo;
  margin: 0.8rem 0;
}

.header__logo img {
  width: var(--header-logo-pc-width);
  height: auto;
}

.header__menu {
  grid-area: menu;
}

.header__menu .list-start {
  justify-content: start;
}

.header__menu-list {
  display: flex;
  justify-content: center;
}

.header__menu-list-item {
  padding: 0 1rem;
}

.header__menu-list-item-has-submenu {
  position: static;
}

.header__menu-list-item-has-submenu:hover .header__inline-submenus {
  visibility: visible;
  pointer-events: inherit;
  opacity: 1;
  transition: all 0.25s cubic-bezier(0.104, 0.204, 0.492, 1);
}

.header__menu-list-item-has-submenu:hover::before {
  content: attr(data-item-title);
  position: absolute;
  height: 100%;
  top: 0;
  margin-left: -30px;
  padding-left: 30px;
  padding-right: 30px;
  opacity: 0;
}

.header__inline-submenus {
  display: flex;
  position: absolute;
  top: 100%;
  left: 0;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  background-color: rgba(var(--color-header-background));
  width: 100%;
  z-index: 10;
  border-top: 1px solid rgb(var(--color-entry-line));
  box-shadow: 0 10px 15px #0000001a;
  max-height: 760px;
  min-height: 280px;
  overflow: auto;
}

.header__tools {
  grid-area: tools;
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 1rem;
}

.header__tools .header_tools_item {
  color: var(--button-background-color);
  line-height: 1;
}

.header__tools-mobile {
  grid-area: tools;
  display: flex;
  align-items: center;
  justify-content: start;
  gap: 1rem;
}

.header__tools svg {
  cursor: pointer;
}

.header_left-line {
  grid-template:
    "logo . tools" auto
    "menu menu menu" auto
    / auto 1fr auto;
}

.header_left-left {
  grid-template: "logo menu tools" auto / auto 1fr auto;
}

.header_left-left .header__logo {
  margin-right: 0.75rem;
}

.header_middle-left {
  grid-template: "menu logo tools" auto / 1fr auto 1fr;
}

.header_middle-line {
  grid-template:
    ". logo tools" auto
    "menu menu menu" auto
    / 1fr auto 1fr;
}

.header_left-center {
  grid-template: "logo menu tools" auto / auto 1fr auto;
}

.header_left-center .header__logo {
  margin-right: 0.75rem;
}

.header_left-center .header__menu-list {
  justify-content: center;
}

.header__inline-nav--has-divider::before {
  position: absolute;
  content: "";
  width: 100%;
  left: 0;
  border-top: 1px solid rgb(var(--color-entry-line));
}

.normal_href {
  cursor: inherit;
  text-decoration: none !important;
}

.header-inline-menus__link {
  --padding-inline: 0px;
  --padding-block: 0.75rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: var(--padding-block) var(--padding-inline);
}

.menus__link {
  position: relative;
  display: inline-block;
  text-decoration: none;
  color: rgb(var(--color-text));
  opacity: 1;
  transition: opacity 0.2s;
  cursor: pointer;
}

.menus__link:hover::after {
  transform: scale(1);
}

.menus__link::after {
  content: "";
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  will-change: transform;
  height: 1px;
  transform: scaleX(0);
  transform-origin: left center;
  background: rgb(var(--color-text));
  transition: all 0.25s cubic-bezier(0.104, 0.204, 0.492, 1);
}

.header-inline-menus__link:hover::after,
.header-inline-menus__link:focus::after {
  transform: scale(1);
}

.megamenu__list {
  padding: 40px;
  display: grid;
  gap: 20px;
  list-style: none;
  margin: 0;
  flex: 1;
  grid-auto-columns: minmax(100px, 280px);
  grid-auto-flow: column;
}

.megamenu-list__submenu {
  padding: 0;
}
.megamenu-submenu__item + .megamenu-submenu__item {
  margin-top: 8px;
}

.megamenu-list__item-title {
  display: inline-block;
  margin-bottom: 10px;
}

/* 移动端页头样式 */
header-layout-mobile[open] {
  display: flex;
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
}
header-layout-mobile > div {
  position: relative;
  padding: 86px 0px 20px;
}
header-layout-mobile .header-layout-mobile__back {
  padding: 16px;
}

header-layout-mobile .header-layout-mobile__back svg {
  width: 30px;
  height: 30px;
}
header-layout-mobile {
  visibility: hidden;
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  /* background-color: white; */
  transform: translateX(-100%);
  transition: all 0.3s;
  z-index: 20;
}
header-layout-mobile > div {
  width: 70%;
  height: 100vh;
  background-color: #f9f9f9;
}
.mobile-click-box-main {
  display: none;
}
.mobile-product-list-main {
  text-align: center;
  display: grid;
  padding: 20px;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}
.header-layout-mobile-main {
  height: 100%;
  overflow: auto;
}
.gm-active > .mobile-click-box-main {
  display: block;
}
.gm-active[data-item="1"] > .mobile-click-box-header {
  background-color: #749fc2;
  --color-text: 255, 255, 255, 1;
}
.gm-active > .mobile-click-box-header {
  background-color: #d9d9d9;
}
.gm-active > .mobile-click-box-header .icon-shangjiantou1 {
  display: none;
}
.icon-shangjiantou1 {
  transform: rotate(180deg);
}
.icon-shangjiantou2 {
  display: none;
}
.gm-active > .mobile-click-box-header .icon-shangjiantou2 {
  display: block;
}
.mobile-click-box-header {
  font-size: 16px;
  font-weight: 600;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  transition: all 0.3s ease;
}
.header-layout-mobile-title {
  padding: 8px 20px;
  position: absolute;
  top: 38px;
}
.menu_content_item_product_card {
  position: relative;
  width: 100%;
  padding-top: 140%;
}
.menu_content_item_product_card img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* 移动端菜单icon样式 */
.header__tools-mobile {
  grid-area: tools;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 22px;
  height: 22px;
  transition: all 0.3s;
  left: 20px;
  justify-content: center;
  position: absolute;
  z-index: 21;
}
.header__tools-mobile > div {
  display: block;
  width: 20px;
  height: 2px;
  background: #333;
  position: absolute;
  left: 50%;
  margin-left: -10px;
  top: 50%;
  transition: 0.8s;
}
.header__tools-mobile .nav1 {
  margin-top: -1px;
}
.header__tools-mobile .nav2 {
  margin-top: -8px;
}
.header__tools-mobile .nav3 {
  margin-top: 6px;
}
.navh {
  left: 60%;
}
.navh .nav1 {
  margin-top: -1px;
  transform: rotate(45deg);
}
.navh .nav2 {
  transform: rotate(-45deg);
  width: 10px;
  margin-left: -1px;
  margin-top: -5px;
}
.navh .nav3 {
  transform: rotate(-45deg);
  width: 9px;
  margin-top: 3px;
  margin-left: -8px;
}

/* PC端最大宽度设置 */
@media (min-width: 960px) {
  .header__container {
    max-width: inherit;
  }
}

@media (max-width: 959px) {
  .header__logo img {
    width: var(--header-logo-mobile-width);
    height: auto;
  }

  .header_left-line,
  .header_middle-left,
  .header_middle-line,
  .header_left-left,
  .header_left-center {
    grid-template: "tools logo menu" auto / 1fr auto 1fr;
  }
  
  /* 移动端重置最大宽度 */
  .header__container {
    max-width: 100% !important;
  }
}

/* static_menus */

.header__menu-list-item-has-submenu:hover .header__inline-static_menus {
  display: block;
}

.header__inline-static_menus {
  content: attr(data-item-title);
  position: absolute;
  height: 100%;
  top: 0;
  padding-left: 30px;
  padding-right: 30px;
  display: none;
  cursor: pointer;
  z-index: -1;
}

.header__inline-static_menus .static_menus-container {
  position: relative;
  height: 100%;
}

.header__inline-static_menus .megamenu__list {
  position: absolute;
  top: 100%;
  margin-left: -30px;
  background: white;
  z-index: 3;
  display: flex;
  flex-direction: column;
  box-shadow: "0 8px 10px rgb(0 0 0 / 5%)";
}

.header__inline-static_menus .megamenu__list {
  gap: 10px;
}

.header__inline-static_menus .megamenu__list {
  padding: 10px 0;
  white-space: nowrap;
}

.header__inline-static_menus .megamenu-list__item {
  padding-left: 15px;
  padding-right: 15px;
}

/* sticky */
section:has(header-layout[data-sticky-type="always"]) {
  position: sticky;
  z-index: 1000;
  top: 0;
  border-bottom: 1px solid rgb(var(--color-entry-line));
}

.header_conact-social .list-social {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header_conact-social svg {
  width: 28px;
  height: 28px;
  vertical-align: middle;
  transition: all 0.3s;
}

.header_conact-social svg:hover {
  transform: scale(1.1);
}
