/* === Common Styles for Mixing Equipment Website === */
:root {
  --bg: #ffffff;
  --bg2: #f4f6f8;
  --ink: #1f2937;
  --muted: #6b7280;
  --rule: #e5e7eb;
  --accent: #2563eb;
  --accent2: #f59e0b;
  --dark: #111827;
  --dark2: #1f2937;
  --font: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
/* 锚点偏移，避免被固定导航栏遮挡 */
:target { scroll-margin-top: 80px; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }
section { padding: 4rem 0; }
.section-title {
  font-size: 2rem; font-weight: 700; text-align: center; margin-bottom: 0.5rem;
}
.section-subtitle {
  text-align: center; color: var(--muted); margin-bottom: 2.5rem; font-size: 1rem;
}

/* Header */
.site-header {
  background: var(--dark); color: #fff; position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.brand {
  font-size: 1.1rem; font-weight: 700; letter-spacing: 0.03em;
  display: flex; align-items: center; gap: 0.5rem;
  flex-shrink: 0;
  white-space: nowrap;
}
.brand .logo-icon {
  width: 30px; height: 30px; background: var(--accent); border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 0.8rem; color: #fff;
  flex-shrink: 0;
}
.main-nav { display: flex; gap: 1.2rem; font-size: 0.85rem; flex-shrink: 0; }
.main-nav a { opacity: 0.85; transition: opacity 0.2s; position: relative; color: #fff; }
.main-nav a:hover { opacity: 1; }
.main-nav a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px;
  background: var(--accent2); transition: width 0.3s;
}
.main-nav a:hover::after { width: 100%; }
.nav-cta {
  background: var(--accent2); color: var(--dark); padding: 0.4rem 1rem;
  border-radius: 4px; font-weight: 600; font-size: 0.9rem;
}

/* Dropdown Menu */
.nav-dropdown { position: relative; }
.nav-dropdown > a {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: #fff;
  opacity: 0.85;
  padding: 20px 0;
  margin: -20px 0;
}
.nav-dropdown > a:hover { opacity: 1; }
.nav-dropdown > a::after {
  content: none;
}
.nav-dropdown .dropdown-menu {
  display: none;
  position: absolute;
  top: 64px;
  left: 0;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.15);
  width: 200px;
  padding: 1.25rem 1.5rem;
  z-index: 1001;
  flex-direction: column;
  gap: 0.5rem;
}
.nav-dropdown .dropdown-menu.active { display: flex; }
.nav-dropdown .dropdown-menu::before {
  content: '';
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: #fff;
  border-left: 1px solid #e5e7eb;
  border-top: 1px solid #e5e7eb;
}
.dropdown-group { flex: 1; min-width: 0; }
.dropdown-group-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #1f2937;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid #1f2937;
}
.dropdown-item {
  display: block;
  width: 100%;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.85rem;
  color: #6b7280;
  transition: color 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dropdown-item:hover { color: #2563eb; }
/* Override main-nav link styles inside dropdown - must be after .main-nav a */
.main-nav .dropdown-menu a { color: #6b7280 !important; opacity: 1 !important; }
.main-nav .dropdown-menu a:hover { color: #2563eb !important; }
.main-nav .dropdown-menu a::after { display: none !important; }
.mobile-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }

/* Buttons */
.btn {
  display: inline-block; padding: 0.75rem 1.75rem; border-radius: 4px; font-weight: 600;
  font-size: 1rem; transition: transform 0.2s, box-shadow 0.2s; cursor: pointer; border: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(37,99,235,0.35); }
.btn-secondary { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.5); }
.btn-secondary:hover { border-color: #fff; }
.btn-warning { background: var(--accent2); color: var(--dark); }
.btn-warning:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(245,158,11,0.35); }
.btn-outline { background: transparent; color: var(--accent); border: 2px solid var(--accent); }
.btn-outline:hover { background: var(--accent); color: #fff; }

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark2) 100%);
  color: #fff; text-align: center; padding: 4rem 1.5rem;
}
.cta-section h2 { font-size: 2rem; margin-bottom: 1rem; }
.cta-section p { opacity: 0.85; max-width: 600px; margin: 0 auto 1.5rem; }
.cta-buttons { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

/* Footer */
.site-footer {
  background: var(--dark); color: rgba(255,255,255,0.7); font-size: 0.9rem;
}
.footer-top { padding: 3rem 0; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem;
}
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li a { color: rgba(255,255,255,0.7); }
.footer-col ul li a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1); padding: 1.5rem 0;
  display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem;
}

/* Floating Buttons */
.float-btns {
  position: fixed; right: 20px; bottom: 30px; z-index: 999;
  display: flex; flex-direction: column; gap: 10px;
}
.float-btn {
  width: 50px; height: 50px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.1rem; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: transform 0.2s;
}
.float-btn:hover { transform: scale(1.08); }
.float-btn.online { background: #07c160; font-size: 1.3rem; }
.float-btn.phone { background: var(--accent2); color: #fff; font-size: 1.5rem; display: flex; align-items: center; justify-content: center; }

/* WeChat QR Modal - 按钮旁浮窗效果 */
.wechat-modal-overlay {
  display: none;
  position: fixed;
  right: 80px;
  bottom: 90px;
  z-index: 10000;
}
.wechat-modal-overlay.active { display: block; }
.wechat-modal {
  background: #1a1a1a;
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  width: 220px;
  position: relative;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  animation: wechatModalIn 0.25s ease;
}
@keyframes wechatModalIn {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.wechat-modal .modal-title {
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.wechat-modal .qr-img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  margin-bottom: 0.75rem;
  box-sizing: border-box;
}
.wechat-modal .wechat-id {
  color: #999;
  font-size: 0.85rem;
}
.wechat-modal .wechat-id span {
  color: #07c160;
  font-weight: 600;
  font-size: 0.95rem;
}

/* Table wrap */
.table-wrap { overflow-x: auto; overflow-y: auto; max-height: 600px; }
.table-wrap table { min-width: 600px; width: 100%; border-collapse: collapse; }
.table-wrap th, .table-wrap td { padding: 0.75rem 1rem; border: 1px solid var(--rule); text-align: left; font-size: 0.9rem; }
.table-wrap th { background: var(--bg2); font-weight: 600; }
.table-wrap tr:nth-child(even) { background: var(--bg2); }

/* Breadcrumb */
.breadcrumb { font-size: 0.85rem; color: var(--muted); margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--accent); }
.breadcrumb a:hover { text-decoration: underline; }

/* Page Banner */
.page-banner {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark2) 100%);
  color: #fff; padding: 5rem 1.5rem; text-align: center;
}
.page-banner h1 { font-size: 2.25rem; margin-bottom: 0.5rem; }
.page-banner p { opacity: 0.85; max-width: 600px; margin: 0 auto; }

/* Responsive */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  /* === Base === */
  html { font-size: 15px; }
  .container { padding: 0 1rem; }
  section { padding: 2.5rem 0; }
  .section-title { font-size: 1.6rem; }
  .section-subtitle { font-size: 0.9rem; margin-bottom: 1.5rem; }

  /* === Header / Mobile Nav === */
  .brand { font-size: 0.95rem; }
  .brand span:last-child { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .main-nav { display: none; }
  .mobile-toggle { display: block; }
  /* Mobile nav overlay */
  .main-nav.nav-open {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--dark);
    padding: 0.5rem 1.5rem 1.5rem;
    gap: 0;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    z-index: 999;
  }
  .main-nav.nav-open > a,
  .main-nav.nav-open > .nav-dropdown > a {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 0.95rem;
    color: #fff;
    opacity: 0.9;
    margin: 0;
  }
  .main-nav.nav-open > a:last-child { border-bottom: none; }
  .main-nav.nav-open .nav-cta {
    display: inline-block;
    margin-top: 0.75rem;
    text-align: center;
    border-bottom: none;
    padding: 0.6rem 1rem;
  }

  /* === Mobile Dropdown === */
  .main-nav.nav-open .nav-dropdown .dropdown-menu {
    display: block !important;
    position: static;
    background: rgba(255,255,255,0.04);
    border: none;
    border-radius: 0;
    box-shadow: none;
    width: 100%;
    min-width: auto;
    padding: 0.25rem 0 0.25rem 1rem;
    margin: 0;
    flex-direction: column;
  }
  .main-nav.nav-open .nav-dropdown .dropdown-menu::before { display: none; }
  .main-nav.nav-open .nav-dropdown .dropdown-menu .dm-item {
    color: rgba(255,255,255,0.65);
    padding: 0.5rem 0;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }
  .main-nav.nav-open .nav-dropdown .dropdown-menu .dm-item:last-child { border-bottom: none; }
  .main-nav.nav-open .nav-dropdown .dropdown-menu .dm-item:hover {
    color: #fff;
    background: transparent;
  }
  .main-nav .dropdown-menu a { color: rgba(255,255,255,0.65) !important; }
  .main-nav .dropdown-menu a:hover { color: #fff !important; }

  /* === Footer === */
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
  .footer-top { padding: 2rem 0; }

  /* === Page Banner === */
  .page-banner { padding: 2.5rem 1rem; }
  .page-banner h1 { font-size: 1.6rem; }

  /* === Buttons === */
  .btn { padding: 0.6rem 1.25rem; font-size: 0.9rem; }

  /* === CTA === */
  .cta-section { padding: 2.5rem 1rem; }
  .cta-section h2 { font-size: 1.5rem; }

  /* === Floating Buttons === */
  .float-btns { right: 12px; bottom: 20px; gap: 8px; }
  .float-btn { width: 42px; height: 42px; font-size: 1rem; }
  .float-btn.phone { font-size: 1.3rem; }

  /* === WeChat Modal === */
  .wechat-modal-overlay { right: 60px; bottom: 75px; }
  .wechat-modal { width: 190px; padding: 1rem; }
  .wechat-modal .modal-title { font-size: 0.9rem; }

  /* === Table === */
  .table-wrap { max-height: 400px; }
  .table-wrap th, .table-wrap td { padding: 0.5rem 0.6rem; font-size: 0.8rem; }

  /* === Product Detail Pages === */
  .series-hero-grid { grid-template-columns: 1fr !important; gap: 1.5rem; }
  .series-hero { padding: 2rem 0; }
  .series-hero-text h1 { font-size: 1.5rem; }
  .product-actions { display: flex; flex-direction: column; gap: 0.75rem; }
  .product-actions .btn { width: 100%; text-align: center; }
  .info-block { margin-bottom: 1.25rem; }
  .info-block h3 { font-size: 1.05rem; }
  .spec-table th, .spec-table td { padding: 0.5rem 0.6rem; font-size: 0.8rem; }
}
