/* 现代美观的头部和底部样式 */
* { box-sizing: border-box; }

/* 强制清除缓存和重置下拉菜单样式 */
.site-header .main-nav .dropdown-menu,
.site-header .main-nav .dropdown-content,
.site-header .main-nav .dropdown-section,
.site-header .main-nav .dropdown-section h4,
.site-header .main-nav .dropdown-section ul,
.site-header .main-nav .dropdown-section ul li,
.site-header .main-nav .dropdown-section ul li a {
  all: unset;
  box-sizing: border-box;
}

:root {
  --primary-color: #e60012;
  --secondary-color: #2c3e50;
  --accent-color: #3498db;
  --text-primary: #2c3e50;
  --text-secondary: #7f8c8d;
  --text-light: #95a5a6;
  --bg-white: #ffffff;
  --bg-light: #f8f9fa;
  --border-color: #ecf0f1;
  --shadow-light: 0 2px 10px rgba(0,0,0,0.08);
  --shadow-medium: 0 4px 20px rgba(0,0,0,0.12);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-white);
  box-shadow: var(--shadow-light);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: var(--transition);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 顶部信息栏 */
.header-top {
  background: linear-gradient(135deg, var(--secondary-color), #34495e);
  color: white;
  padding: 8px 0;
  font-size: 13px;
}

.top-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.welcome-text {
  font-weight: 500;
}

.top-links {
  display: flex;
  gap: 20px;
}

.top-link {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  transition: var(--transition);
  font-weight: 500;
}

.top-link:hover {
  color: white;
  transform: translateY(-1px);
}

/* 主头部 */
.header-main {
  padding: 12px 0;
  background: var(--bg-white);
}

.header-main .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

/* LOGO区域 */
.logo-section {
  flex-shrink: 0;
}

.logo-link {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
}

.logo-link:hover {
  transform: translateY(-2px);
}

.logo {
  display: flex;
  align-items: baseline;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
}

.logo-ga {
  color: var(--primary-color);
}

.logo-qm {
  color: var(--secondary-color);
}

.logo-reg {
  font-size: 16px;
  color: var(--primary-color);
  margin-left: 2px;
}

.logo-tagline {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.tagline-main {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.tagline-sub {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* 主导航 */
.main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 40px;
  flex-wrap: nowrap;
}

.nav-item {
  position: relative;
  flex-shrink: 0;
}

.nav-link {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  padding: 12px 0;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  position: relative;
  white-space: nowrap;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition);
}

.nav-link:hover::after {
  width: 100%;
}

.dropdown-icon {
  transition: var(--transition);
}

.dropdown:hover .dropdown-icon {
  transform: rotate(180deg);
}

/* 下拉菜单 - 使用更具体的选择器提高优先级 */
.site-header .main-nav .dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-white);
  border-radius: 12px;
  box-shadow: var(--shadow-medium);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  min-width: 320px;
  padding: 20px;
  margin-top: 10px;
  z-index: 1001;
  border: 1px solid rgba(0,0,0,0.05);
}

.site-header .main-nav .dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.site-header .main-nav .dropdown-content {
  display: flex;
  gap: 30px;
  width: 100%;
  align-items: flex-start;
}

.site-header .main-nav .dropdown-section {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.site-header .main-nav .dropdown-section h4 {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0;
  line-height: 1.2;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.site-header .main-nav .dropdown-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
}

.site-header .main-nav .dropdown-section ul li {
  margin-bottom: 8px;
  padding: 0;
}

.site-header .main-nav .dropdown-section ul li:last-child {
  margin-bottom: 0;
}

.site-header .main-nav .dropdown-section ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  display: block;
  padding: 6px 0;
  margin: 0;
  line-height: 1.4;
  white-space: nowrap;
  position: relative;
}

.site-header .main-nav .dropdown-section ul li a:hover {
  color: var(--primary-color);
  transform: translateX(4px);
}

.site-header .main-nav .dropdown-section ul li a::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition);
}

.site-header .main-nav .dropdown-section ul li a:hover::before {
  width: 4px;
}

/* 右侧操作区 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.action-btn {
  background: none;
  border: none;
  padding: 10px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.action-btn:hover {
  color: var(--primary-color);
  background: rgba(230, 0, 18, 0.05);
  transform: translateY(-2px);
}

.action-btn svg {
  width: 20px;
  height: 20px;
}

.cart-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--primary-color);
  color: white;
  font-size: 11px;
  font-weight: 700;
  border-radius: 50%;
  padding: 2px 6px;
  min-width: 18px;
  text-align: center;
  line-height: 1;
}

/* 用户下拉菜单 */
.user-dropdown {
  position: relative;
}

.user-dropdown .action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
}

.avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.avatar-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
}

.user-dropdown-menu {
  right: 0;
  left: auto;
  transform: none;
  min-width: 200px;
  padding: 12px 0;
}

.user-dropdown:hover .user-dropdown-menu {
  transform: translateY(0);
}

.user-dropdown-menu .dropdown-content {
  flex-direction: column;
  gap: 0;
}

.user-dropdown-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.user-dropdown-menu ul li {
  margin: 0;
}

.user-dropdown-menu ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
}

.user-dropdown-menu ul li a:hover {
  color: var(--primary-color);
  background: rgba(230, 0, 18, 0.05);
  transform: none;
}

.user-dropdown-menu ul li.divider {
  height: 1px;
  background: var(--border-color);
  margin: 8px 0;
}

.user-dropdown-menu ul li a i {
  width: 16px;
  text-align: center;
}

/* 为悬浮头部添加内容偏移 */
body {
  padding-top: 100px;
  background: var(--bg-light);
}

/* Footer - 保持原来的样式 */
.site-footer {
  background: #fff;
  border-top: 1px solid #eee;
  padding: 48px 0 0 0;
  position: relative;
  font-family: 'Lato', Arial, sans-serif;
}

.footer-main {
  padding-bottom: 24px;
}

.footer-main .container {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
}

.footer-col {
  flex: 1 1 200px;
  min-width: 180px;
}

.footer-col h4 {
  font-size: 18px;
  color: #222;
  margin-bottom: 16px;
  font-weight: bold;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul li a {
  color: #666;
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: #e60012;
}

.footer-social {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

.social-fb { background-image: url('data:image/svg+xml;utf8,<svg fill="%233b5998" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M22 12c0-5.52-4.48-10-10-10S2 6.48 2 12c0 5 3.66 9.13 8.44 9.88v-6.99h-2.54v-2.89h2.54V9.41c0-2.5 1.49-3.89 3.77-3.89 1.09 0 2.23.2 2.23.2v2.45h-1.26c-1.24 0-1.63.77-1.63 1.56v1.87h2.78l-.44 2.89h-2.34v6.99C18.34 21.13 22 17 22 12z"/></svg>'); }
.social-li { background-image: url('data:image/svg+xml;utf8,<svg fill="%230072b1" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M19 0h-14c-2.76 0-5 2.24-5 5v14c0 2.76 2.24 5 5 5h14c2.76 0 5-2.24 5-5v-14c0-2.76-2.24-5-5-5zm-11 19h-3v-9h3v9zm-1.5-10.29c-.97 0-1.75-.79-1.75-1.75s.78-1.75 1.75-1.75 1.75.79 1.75 1.75-.78 1.75-1.75 1.75zm13.5 10.29h-3v-4.5c0-1.08-.02-2.47-1.5-2.47-1.5 0-1.73 1.17-1.73 2.39v4.58h-3v-9h2.89v1.23h.04c.4-.75 1.37-1.54 2.82-1.54 3.01 0 3.57 1.98 3.57 4.56v4.75z"/></svg>'); }
.social-yt { background-image: url('data:image/svg+xml;utf8,<svg fill="%23ff0000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M21.8 8.001s-.2-1.4-.8-2c-.7-.8-1.5-.8-1.9-.9C16.1 5 12 5 12 5h-.1s-4.1 0-7.1.1c-.4.1-1.2.1-1.9.9-.6.6-.8 2-.8 2S2 9.6 2 11.2v1.6c0 1.6.2 3.2.2 3.2s.2 1.4.8 2c.7.8 1.7.8 2.1.9 1.5.1 6.9.1 6.9.1s4.1 0 7.1-.1c.4-.1 1.2-.1 1.9-.9.6-.6.8-2 .8-2s.2-1.6.2-3.2v-1.6c0-1.6-.2-3.2-.2-3.2zM9.8 15.1V8.9l6.2 3.1-6.2 3.1z"/></svg>'); }
.footer-social .icon {
  width: 32px;
  height: 32px;
  background-size: 24px 24px;
  border-radius: 50%;
  background-color: #f5f5f5;
  transition: background 0.2s;
}

.footer-social .icon:hover {
  background-color: #e60012;
}

.footer-copyright {
  font-size: 14px;
  color: #888;
  margin-top: 12px;
}

.back-to-top {
  position: fixed;
  right: 32px;
  bottom: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e60012;
  color: #fff;
  font-size: 28px;
  border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 100;
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
}

/* 响应式 */
@media (max-width: 900px) {
  .header-main .container { flex-direction: row; align-items: center; gap: 8px; justify-content: space-between; }
  .header-actions { margin-left: auto; }
  .header-main { padding: 8px 0; }
  .logo-section { display:flex; align-items:center; gap:8px; }
  .logo-link { display:inline-flex !important; }
  .logo { font-size: 24px; letter-spacing: -0.5px; }
  .logo-reg { font-size: 10px; }
  .logo-tagline { display: none; }
  .mobile-menu-btn { margin-right: 8px; }
  body { padding-top: 120px; }
  
  .main-nav {
    justify-content: flex-start;
    width: 100%;
  }
  
  .nav-list {
    flex-direction: column;
    gap: 0;
    width: 100%;
    flex-wrap: wrap;
  }
  
  .site-header .main-nav .dropdown-menu {
    position: static;
    transform: none;
    box-shadow: none;
    border-radius: 0;
    margin-top: 0;
    padding: 10px 0;
    min-width: auto;
    width: 100%;
  }
  
  .site-header .main-nav .dropdown-content {
    flex-direction: column;
    gap: 20px;
    width: 100%;
  }
  
  .site-header .main-nav .dropdown-section {
    width: 100%;
  }
  
  .site-header .main-nav .dropdown-section h4 {
    font-size: 16px;
    margin-bottom: 8px;
  }
  
  .site-header .main-nav .dropdown-section ul li a {
    font-size: 15px;
    padding: 8px 0;
  }
  
  body {
    padding-top: 160px;
  }
  
  .top-info {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  
  .footer-main .container {
    gap: 0;
  }
  
  .user-name {
    display: none;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  .logo { font-size: 26px; }
  .header-main { padding: 8px 0; }
  
  .site-header .main-nav .dropdown-menu {
    padding: 8px 0;
  }
  
  .site-header .main-nav .dropdown-content {
    gap: 16px;
  }
  
  .site-header .main-nav .dropdown-section h4 {
    font-size: 15px;
  }
  
  .site-header .main-nav .dropdown-section ul li a {
    font-size: 14px;
    padding: 6px 0;
  }
  
  .header-actions {
    gap: 12px;
  }
  
  .action-btn {
    padding: 8px;
  }
  
  .action-btn svg {
    width: 18px;
    height: 18px;
  }
} 