/* 曲蔻官网 - 头部导航样式 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --brand-green: #1B4332;
  --brand-red: #E53935;
  --text-primary: #333333;
  --text-subtitle: #444444;
  --text-desc: #999999;
  --bg-white: #FFFFFF;
  --bg-cream: #F7F5F0;
  --border-light: #E8E6E1;
}

body {
  font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg-white);
  color: var(--text-primary);
}

/* ===== 顶部辅助栏 ===== */
.top-bar {
  width: 100%;
  background: var(--bg-white);
  border-bottom: 1px solid #F0EDE8;
  font-size: 13px;
  color: var(--text-desc);
}

.top-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.shop-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.shop-link {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--text-desc);
  transition: color 0.2s;
}

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

.shop-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.shop-icon.tmall {
  background: var(--brand-red);
}

.shop-icon.jd {
  background: var(--brand-red);
}

.shop-divider {
  width: 1px;
  height: 14px;
  background: #DDD;
}

.top-icons {
  display: flex;
  align-items: center;
  gap: 20px;
}

.top-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-desc);
  transition: color 0.2s;
}

.top-icon-btn:hover {
  color: var(--brand-green);
}

.top-icon-btn svg {
  width: 18px;
  height: 18px;
}

/* ===== 主导航栏 ===== */
.main-nav {
  width: 100%;
  background: var(--bg-white);
  border-bottom: 1px solid #F0EDE8;
  position: relative;
  z-index: 100;
}

.main-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  height: 72px;
  position: relative;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 60px;
}

.logo-mark {
  width: 42px;
  height: 42px;
  background: var(--brand-green);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
}

.logo-mark-text {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1;
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-text-cn {
  font-size: 20px;
  font-weight: 700;
  color: var(--brand-green);
  letter-spacing: 2px;
  line-height: 1.2;
}

.logo-text-en {
  font-size: 11px;
  font-weight: 300;
  color: var(--brand-green);
  letter-spacing: 3px;
  line-height: 1;
  text-transform: uppercase;
}

/* 菜单 */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0;
  height: 100%;
  flex: 1;
}

.nav-item {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 22px;
  font-size: 16px;
  font-weight: 400;
  color: var(--text-primary);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 22px;
  right: 22px;
  height: 2px;
  background: var(--brand-green);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.nav-item:hover {
  color: var(--brand-green);
}

.nav-item:hover::after {
  transform: scaleX(1);
}

.nav-item.active {
  color: var(--brand-green);
  font-weight: 500;
}

.nav-item.active::after {
  transform: scaleX(1);
}

/* ===== 含下拉的菜单项 ===== */
.nav-item-wrap {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-item-wrap .nav-item {
  width: 100%;
  justify-content: center;
}

/* hover 时菜单项高亮 */
.nav-item-wrap:hover .nav-item {
  color: var(--brand-green);
}

.nav-item-wrap:hover .nav-item::after {
  transform: scaleX(1);
}

/* ===== 下拉菜单区域 ===== */
/* 下拉面板绝对定位，悬浮在内容上方 */
.dropdown-panel {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--bg-cream);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.25s ease;
  z-index: 99;
}

/* 当 .main-nav 内的 .nav-item-wrap 被 hover，或下拉面板自身被 hover 时展开 */
.main-nav:has(.nav-item-wrap:hover) .dropdown-panel,
.main-nav:has(.dropdown-panel:hover) .dropdown-panel {
  max-height: 200px;
  opacity: 1;
}

/* 下拉面板 hover 时，对应菜单项保持高亮 */
.main-nav:has(.dropdown-panel:hover) .nav-item-wrap .nav-item {
  color: var(--brand-green);
}

.main-nav:has(.dropdown-panel:hover) .nav-item-wrap .nav-item::after {
  transform: scaleX(1);
}

.dropdown-panel-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 24px 36px 106px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.dropdown-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.dropdown-column:hover {
  opacity: 0.7;
}

.dropdown-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-subtitle);
  line-height: 1.4;
}

.dropdown-desc {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-desc);
  line-height: 1.5;
}

/* ===== 页面主体占位 ===== */
.page-body {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
  text-align: center;
  color: var(--text-desc);
  font-size: 14px;
}
