/* 响应式工具类 */
.hidden--md {
  display: none;
}

.visible--md {
  display: block;
}
/* 头部样式 */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: #ffffff;
  /* box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); */
  transition: all 0.3s ease;
}

.header__top {
  padding: 0.5rem 0;
  display: none;
}

.header__contact {
  text-align: right;
  font-size: 0.875rem;
  font-size: max(0.875rem, 14px);
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 6.25rem;
}

.header__icon {
  width: 24px;
  height: 24px;
  display: inline-block;
  margin-right: 0.5rem;
}

.header__phone {
  color: #111827;
  margin-right: 2.5rem;
}

.header__social {
  width: 16px;
  height: 16px;
  display: inline-block;
  margin: 0 0.75rem;
}

.header__social.xhs {
  width: 22px;
}

.header__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6.25rem;
  height: 5rem;
}

.header__actions {
  display: flex;
  height: 2.5rem;
  margin-left: 1rem;
}

.header__logo {
  padding: 0.4rem 0;
  cursor: pointer;
}

.header__logo img {
  width: 11.75rem;
  height: 3.75rem;
  margin-right: 1.5rem;
}

.header__menu-toggle {
  background: none;
  border: none;
  color: #374151;
  cursor: pointer;
  font-size: 1.25rem;
}

.header__menu-toggle img {
  width: 2.5rem;
  height: 2.5rem;
}

/* 导航菜单样式 */
.nav {
  align-self: end;
}
.nav__list {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

.nav__link {
  color: #111827;
  text-decoration: none;
  font-size: 1rem;
  font-size: max(1rem, 14px);
  white-space: nowrap;
  transition: color 0.2s ease;
  position: relative;
  padding-bottom: 1.25rem;
  display: flex;
}

.nav__link:hover {
  color: var(--color-primary);
}

.nav__link--active {
  color: var(--color-primary);
}

.nav__link--active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-primary);
}

.nav__item .nav__link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  transition: width 0.3s ease;
}

.nav__item:hover .nav__link::after {
  width: 100%;
}

.nav__item--has-dropdown {
  position: relative;
}

.nav__dropdown {
  position: absolute;
  left: -12.25rem;
  top: 100%;
  margin-top: 0.375rem;
  width: 49.25rem;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.nav__dropdown--visible {
  opacity: 1;
  visibility: visible;
}

.nav__dropdown-header {
  color: var(--Grey-60, rgba(98, 98, 98, 1));
  font-family: OPPO Sans 4;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.1875rem;
  letter-spacing: 0px;
  text-align: left;
  display: flex;
  margin-top: 2rem;
  margin-left: 2.5rem;
  margin-right: 2.5rem;
  padding-bottom: 1.3125rem;
  border-bottom: 1px solid rgba(241, 242, 246, 1);
  cursor: pointer;
  text-decoration: none;
}

.nav__dropdown-header-arrow {
  margin-left: 0.5rem;
}

.nav__dropdown-content {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 5.5rem;
  padding: 2.5rem;
  padding-top: 2rem;
  white-space: nowrap;
}

.nav__dropdown-column {
  flex: 1;
  min-width: 0;
}

.nav__dropdown-title {
  font-weight: 700;
  color: #000;
  margin-bottom: 18px;
  font-size: 18px;
}

.nav__dropdown-list {
  list-style: none;
}

.nav__dropdown-link {
  text-decoration: none;
  display: block;
  transition: color 0.2s ease;
  font-size: 16px;
  color: var(--Grey-30, rgba(51, 51, 51, 1));
  font-family: OPPO Sans 4;
  font-weight: 400;
  line-height: 19px;
  letter-spacing: 0px;
  text-align: left;
  margin-bottom: 12px;
}

.nav__dropdown-link:hover {
  color: var(--color-primary);
}

/* 搜索框样式 */
.search {
  position: relative;
  margin-right: 1rem;
}

.search__input {
  padding: 0.25rem 0.75rem;
  width: 14.8125rem;
  height: 2.5rem;
  padding-right: 2rem;
  font-size: 0.875rem;
  font-size: max(0.875rem, 14px);
  border-radius: 0.375rem;
  outline: none;
  border: none;
  background-color: #f9f9f9;
  transform: translateY(1px);
}

.search__input:focus {
  box-shadow: 0 0 0 1px var(--color-primary);
  border-color: var(--color-primary);
}

.search__button {
  position: absolute;
  right: 0.4rem;
  top: 54%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
}

.search__button:hover {
  color: var(--color-primary);
}

.search__button img {
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 0.25rem;
}

/* 移动端菜单 */
.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: #ffffff;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  padding: 1rem 1.5rem;
  z-index: 50;
  display: none;
}

.mobile-menu--open {
  display: block;
}

.mobile-menu__content {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.mobile-menu__link {
  color: #111827;
  text-decoration: none;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f1f2f6;
  transition: color 0.2s ease;
  font-size: 14px;
}
/* 二级菜单容器（默认隐藏） */
.sub-nav {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  display: none;
}
/* 二级菜单项样式 */
.sub-nav-item {
  font-size: 14px;
  padding: 10px 0;
  color: #666;
  border-bottom: 1px solid #f1f2f6;
}
.mobile-menu__link:hover {
  color: var(--color-primary);
}
.sub-nav-item:hover {
  color: var(--color-primary);
}
.mobile-menu__actions {
  padding-top: 1rem;
  margin-top: 0.5rem;
}

.mobile-menu__button {
  padding: 0.8rem 1.5rem;
  font-size: 0.875rem;
  font-size: max(0.875rem, 14px);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.625rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  font-size: 14px;
  white-space: nowrap;
}

.button--primary {
  background-color: var(--color-primary);
  color: #ffffff;
}

.button--primary:hover {
  background-color: rgba(204, 0, 0, 0.9);
}

.contact__button {
  padding: 0 1rem 0 1.25rem;
  font-size: 0.875rem;
  font-size: max(0.875rem, 14px);
}
.contact__button img {
  margin-left: 2rem;
}

@media (max-width: 1310px) {
  .header__content {
    padding: 0 1.5rem;
    padding-left: 6.25rem;
  }
  .header__contact {
    padding: 0 1.5rem;
  }
}

@media (max-width: 1200px) {
  .contact__button {
    display: none;
  }
  .header__actions {
    display: none !important;
  }
}

/* 媒体查询 - 移动端 */
@media (max-width: 450px) {
  .header__content {
    padding-left: 2rem;
  }
}

/* 媒体查询 - 桌面设备 */
@media (min-width: 1024px) {
  .header__logo {
    padding: 0.75rem 0;
  }
  .header__top {
    display: block;
  }
  .visible--md {
    display: none;
  }
  .hidden--md {
    display: flex;
  }

  /* 导航链接字体 */
  .nav__link {
    font-size: 1rem;
    font-size: max(1rem, 16px);
  }
}

/* 大型桌面设备 */
@media (min-width: 1536px) {
  .search {
    display: block;
  }
}
