@charset "UTF-8";

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #ffffff;
  height: 80px;
  z-index: 9999;
}

.header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6vw;
  height: 100%;
}

.header-logo {
  width: 283.87px;
  height: 34px;
}

.nav-wrap {
  display: flex;
  align-items: center;
}

.nav-item {
  width: auto;
  min-width: 80px;
  padding: 0 22px;
  height: 80px;
  line-height: 80px;
  text-align: center;
  font-size: 16px;
  font-family: PingFangSC-Regular, PingFang SC;
  font-weight: 400;
  position: relative;
}

.first-item {
  width: 8.34vw;
  height: 5.56vh;
  background: #002FA7;
  border-radius: 10px;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  font-weight: 500 !important;
  color: rgba(255, 255, 255, 1);
}

.first-item-icon {
  margin-left: 10px;
  width: 16px;
  height: 16px;
}

.nav-item a {
  color: #565656;
}

.first-drop-down {
  width: 162px;
  height: 100px;
  background: #ffffff;
  border-radius: 0px 0px 10px 10px;
  position: absolute;
  left: 0;
  bottom: -100px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  font-size: 14px;
  font-family: PingFangSC-Regular, PingFang SC;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.65);
}

.first-drop-down a {
  color: rgba(0, 0, 0, 0.65);
}

.first-drop-down a:hover {
  color: #002fa7 !important;
}

.nav-active a {
  color: #111111 !important;
}

.icon-t {
  display: none;
}

.banner-wrap {
  margin-top: 80px;
}

.banner-wrap>img {
  width: 100%;
  object-fit: contain;
}

/* ========== Desktop Nav Dropdowns ========== */
.nav-item {
  cursor: pointer;
}

.nav-item>a {
  display: inline-block;
  width: 100%;
  height: 100%;
}

/* 有子菜单的父级箭头图标 */
.nav-dropdown-arrow {
  display: inline-block;
  margin-left: 5px;
  font-size: 12px;
  color: inherit;
  vertical-align: middle;
  transition: transform 0.25s ease;
}

.nav-item.open .nav-dropdown-arrow {
  transform: rotate(180deg);
}

.nav-dropdown {
  position: absolute;
  top: 80px;
  left: 100%;
  transform: translateX(-50%) translateY(10px);
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-radius: 0 0 8px 8px;
  padding: 24px;
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 9998;
  text-align: left;
  line-height: 1.4;
}

.nav-item.open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* 靠右侧的父级：浮窗右对齐，避免超出屏幕右侧 */
.nav-item-edge .nav-dropdown {
  left: auto;
  right: 0;
  transform: translateY(10px);
}

.nav-item-edge.open .nav-dropdown {
  transform: translateY(0);
}

.nav-dropdown-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.nav-dropdown-title {
  font-size: 16px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.85);
}

.nav-dropdown-desc {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.45);
  margin-top: 4px;
}

.nav-dropdown-more {
  font-size: 13px;
  color: #002FA7;
  white-space: nowrap;
  text-decoration: none;
}

.nav-dropdown-more:hover {
  color: #001f7a;
}

/* 痘肌百科 - 4列网格 */
.nav-dropdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  width: 640px;
}

.nav-dropdown-grid-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid #f0f0f0;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.nav-dropdown-grid-item:hover {
  border-color: #002FA7;
  background: #f7f9ff;
}

.nav-dropdown-grid-text {
  display: flex;
  flex-direction: column;
}

.nav-dropdown-grid-name {
  font-size: 14px;
  color: rgba(0, 0, 0, 0.85);
  font-weight: 500;
}

.nav-dropdown-grid-sub {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.45);
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nav-dropdown-grid-item i {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.25);
}

/* 我该怎么护理 - 文章列表 */
.nav-dropdown-list {
  width: 500px;
}

.nav-dropdown-list-item {
  display: block;
  padding: 10px 0;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.65);
  border-bottom: 1px dashed #f0f0f0;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-dropdown-list-item:last-child {
  border-bottom: none;
}

.nav-dropdown-list-item:hover {
  color: #002FA7;
}

/* 找产品 - 多列系列 */
.nav-dropdown-columns {
  display: flex;
  gap: 40px;
  width: 660px;
}

.nav-dropdown-column {
  flex: 1;
}

.nav-dropdown-column-title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.85);
  margin-bottom: 12px;
}

.nav-dropdown-column-item {
  display: block;
  padding: 8px 0;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.65);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-dropdown-column-item:hover {
  color: #002FA7;
}

/* ========== Mobile Menu - Slide-in Panel ========== */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  cursor: pointer;
  gap: 5px;
  flex-shrink: 0;
}

.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(0, 0, 0, 0.85);
  transition: all 0.3s ease;
  border-radius: 1px;
}

/* 遮罩层 */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* 侧滑面板 */
.mobile-nav-panel {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 350px;
  max-width: 80vw;
  height: 100%;
  background: #ffffff;
  z-index: 10001;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  padding: 0;
}

.mobile-nav-panel.open {
  transform: translateX(0);
}

/* 关闭按钮 */
.mobile-nav-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 36px;
  height: 36px;
  font-size: 28px;
  line-height: 36px;
  text-align: center;
  color: rgba(0, 0, 0, 0.65);
  cursor: pointer;
  transition: color 0.2s ease;
  z-index: 2;
}

.mobile-nav-close:hover {
  color: rgba(0, 0, 0, 0.85);
}

/* 菜单项 */
.mobile-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  font-size: 16px;
  color: rgba(0, 0, 0, 0.85);
  border-bottom: 1px solid #f5f5f5;
  cursor: pointer;
  transition: background 0.2s ease;
  text-decoration: none;
}

.mobile-nav-item:hover {
  background: #fafafa;
}

.mobile-nav-item.active {
  color: #002FA7;
  font-weight: 600;
}

/* 下拉箭头 */
.mobile-dropdown-arrow {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.45);
  transition: transform 0.3s ease;
}

/* 子菜单 */
.mobile-nav-sub {
  max-height: 0;
  overflow: hidden;
  overflow-y: auto;
  transition: max-height 0.35s ease;
  background: #fafafa;
}

.mobile-nav-sub.open {
  max-height: 1000px;
}

.mobile-nav-sub-item {
  display: block;
  padding: 14px 24px 14px 40px;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.65);
  border-bottom: 1px solid #f0f0f0;
  transition: color 0.2s ease;
  text-decoration: none;
}

.mobile-nav-sub-item:hover {
  color: #002FA7;
}

.mobile-nav-sub-item:last-child {
  border-bottom: none;
}

/* 移动端子菜单分组标题 */
.mobile-nav-sub-group {
  padding: 12px 24px 6px 40px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.45);
}

/* 移动端查看更多 */
.mobile-nav-sub-more {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 14px 24px 14px 40px;
  font-size: 14px;
  color: #002FA7;
  border-bottom: 1px solid #f0f0f0;
  text-decoration: none;
}

.mobile-nav-sub-more i {
  font-size: 12px;
}

/* 文章名省略 */
.mobile-nav-sub-article {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========== Responsive ========== */
/* ========== Tablet (769px ~ 1024px) ========== */
@media (min-width: 769px) and (max-width: 1024px) {
  .header-wrap {
    padding: 0 20px;
  }

  .header-logo {
    width: 250px;
  }

  .nav-item {
    width: auto;
    min-width: 64px;
    padding: 0 12px;
    font-size: 14px;
    margin: 0;
  }

  .nav-dropdown {
    padding: 18px;
  }

  .nav-dropdown-grid {
    width: 520px;
    grid-template-columns: repeat(3, 1fr);
  }

  .nav-dropdown-columns {
    width: 560px;
    gap: 24px;
  }

  .nav-dropdown-list {
    width: 240px;
  }
}

/* ========== Mobile (≤768px) ========== */
@media (max-width: 768px) {
  .nav-wrap {
    display: none !important;
  }

  .mobile-menu-btn {
    display: flex !important;
  }

  .mobile-nav-overlay,
  .mobile-nav-panel {
    display: block;
  }

  .header-wrap {
    padding: 0 16px;
  }

  .header-logo {
    width: 250px;
    height: 34px;
  }

  header {
    height: 60px;
  }

  body {
    padding-top: 60px;
  }
}

@media (max-width: 480px) {
  .header-logo {
    width: 170px;
    height: 25px;
  }

  header {
    height: 50px;
  }

  body {
    padding-top: 50px;
  }

  .mobile-nav-panel {
    width: 300px;
  }
}