/* ========================================
   货架源头工厂 - 企业官网公共样式
   极简商务 · 高级简约 · 年轻化商业风
   ======================================== */

/* ---------- CSS 变量 ---------- */
:root {
  /* 主色 */
  --primary: #1a2a4a;
  --primary-light: #2a3f6a;
  --primary-dark: #0f1a30;

  /* 辅助色 */
  --accent: #e8783a;
  --accent-hover: #d4682e;
  --accent-light: #fef0e8;

  /* 中性色 */
  --text: #2c2c2c;
  --text-secondary: #6b7280;
  --text-light: #9ca3af;
  --bg: #ffffff;
  --bg-gray: #f7f8fa;
  --bg-warm: #faf8f6;
  --border: #e5e7eb;
  --border-light: #f0f0f0;

  /* 阴影 */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.12);

  /* 圆角 */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;

  /* 间距 */
  --section-padding: 100px 0;
  --container-max: 1200px;
  --container-padding: 0 24px;

  /* 字体 */
  --font-cn: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;

  /* 过渡 */
  --transition: all 0.3s ease;
}

/* ---------- 重置 ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-cn);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

input, textarea, select {
  font-family: inherit;
  outline: none;
}

/* ---------- 工具类 ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--container-padding);
}

.section {
  padding: var(--section-padding);
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header .label {
  display: inline-block;
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.3;
  margin-bottom: 16px;
}

.section-header p {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.bg-gray {
  background: var(--bg-gray);
}

.bg-warm {
  background: var(--bg-warm);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  letter-spacing: 0.5px;
  gap: 8px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(232, 120, 58, 0.3);
}

.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-white {
  background: #fff;
  color: var(--primary);
}

.btn-white:hover {
  background: var(--bg-gray);
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ---------- 头部导航 ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.header.scrolled {
  border-bottom-color: var(--border-light);
  box-shadow: var(--shadow-sm);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}

.nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav a {
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
  position: relative;
  padding: 4px 0;
}

.nav a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

.nav a.active {
  color: var(--accent);
}

.header-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
}

.header-phone .phone-icon {
  width: 18px;
  height: 18px;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
  border-radius: 1px;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* 移动端导航 */
.mobile-nav {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  width: 100%;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  z-index: 999;
  padding: 16px 0;
}

.mobile-nav.active {
  display: block;
}

.mobile-nav a {
  display: block;
  padding: 14px 24px;
  font-size: 16px;
  color: var(--text);
  font-weight: 500;
  border-bottom: 1px solid var(--border-light);
}

.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--accent);
  background: var(--accent-light);
}

/* ---------- 底部 ---------- */
.footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.8);
  padding: 72px 0 0;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand h3 {
  font-size: 22px;
  color: #fff;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 24px;
  opacity: 0.75;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 14px;
  opacity: 0.85;
}

.footer-contact-item .icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  opacity: 0.6;
}

.footer h4 {
  font-size: 16px;
  color: #fff;
  font-weight: 600;
  margin-bottom: 20px;
}

.footer-links a {
  display: block;
  font-size: 14px;
  opacity: 0.75;
  padding: 4px 0;
}

.footer-links a:hover {
  opacity: 1;
  color: var(--accent);
}

.footer-qr {
  text-align: center;
}

.footer-qr .qr-placeholder {
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  font-size: 12px;
  opacity: 0.5;
}

.footer-qr p {
  font-size: 13px;
  opacity: 0.6;
}

.footer-bottom {
  padding: 24px 0;
  text-align: center;
  font-size: 13px;
  opacity: 0.5;
}

/* ---------- 咨询弹窗 ---------- */
.consult-popup {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1100;
}

.consult-trigger {
  width: 60px;
  height: 60px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(232, 120, 58, 0.4);
  cursor: pointer;
  transition: var(--transition);
}

.consult-trigger:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 28px rgba(232, 120, 58, 0.5);
}

.consult-trigger svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}

.consult-panel {
  position: absolute;
  bottom: 72px;
  right: 0;
  width: 340px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  display: none;
  animation: popupIn 0.3s ease;
}

.consult-panel.active {
  display: block;
}

@keyframes popupIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.consult-panel-header {
  background: var(--primary);
  padding: 20px 24px;
  color: #fff;
}

.consult-panel-header h4 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}

.consult-panel-header p {
  font-size: 13px;
  opacity: 0.7;
}

.consult-panel-body {
  padding: 24px;
}

.consult-form .form-group {
  margin-bottom: 14px;
}

.consult-form .form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}

.consult-form .form-group input,
.consult-form .form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  transition: var(--transition);
}

.consult-form .form-group input:focus,
.consult-form .form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 120, 58, 0.1);
}

.consult-form .form-group textarea {
  height: 80px;
  resize: none;
}

.consult-form .btn {
  width: 100%;
  padding: 12px;
}

.consult-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 20px;
  cursor: pointer;
}

.consult-close:hover {
  color: #fff;
}

/* ---------- 返回顶部 ---------- */
.back-to-top {
  position: fixed;
  bottom: 96px;
  right: 32px;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 1050;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

/* ---------- 页面顶部占位 ---------- */
.page-top {
  padding-top: 72px;
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  padding: 20px 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb span {
  margin: 0 8px;
  opacity: 0.4;
}

/* ---------- 页面 Banner ---------- */
.page-banner {
  background: var(--primary);
  padding: 80px 0;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.page-banner::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: rgba(232, 120, 58, 0.08);
  border-radius: 50%;
}

.page-banner::after {
  content: "";
  position: absolute;
  bottom: -40%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 50%;
}

.page-banner h1 {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.page-banner p {
  font-size: 16px;
  opacity: 0.7;
  position: relative;
  z-index: 1;
}

/* ---------- 产品卡片 ---------- */
.product-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
  transition: var(--transition);
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: transparent;
}

.product-card .img-placeholder {
  width: 100%;
  height: 240px;
  background: var(--bg-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-light);
}

.product-card .info {
  padding: 20px 24px 24px;
}

.product-card .info .tag {
  display: inline-block;
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-light);
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 500;
  margin-bottom: 10px;
}

.product-card .info h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.product-card .info p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ---------- 数字统计 ---------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}

.stat-item .number {
  font-size: 48px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.1;
  margin-bottom: 8px;
}

.stat-item .number span {
  font-size: 24px;
  font-weight: 600;
}

.stat-item .desc {
  font-size: 15px;
  color: var(--text-secondary);
}

/* ---------- 数据项图标占位 ---------- */
.icon-box {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.icon-box.primary {
  background: rgba(26, 42, 74, 0.08);
  color: var(--primary);
}

.icon-box.accent {
  background: var(--accent-light);
  color: var(--accent);
}

/* ---------- 新闻卡片 ---------- */
.news-card {
  display: flex;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

.news-card:hover {
  /* subtle */
}

.news-card .date-box {
  flex-shrink: 0;
  width: 80px;
  text-align: center;
  padding-top: 4px;
}

.news-card .date-box .day {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.news-card .date-box .month {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 4px;
}

.news-card .content h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.5;
}

.news-card .content h3 a:hover {
  color: var(--accent);
}

.news-card .content p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card .content .tag-list {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.news-card .content .tag-list span {
  font-size: 12px;
  padding: 2px 8px;
  background: var(--bg-gray);
  color: var(--text-light);
  border-radius: 20px;
}

/* ---------- 分页 ---------- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  transition: var(--transition);
}

.pagination a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pagination span.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  :root {
    --section-padding: 72px 0;
  }

  .nav {
    display: none;
  }

  .header-phone {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .section-header h2 {
    font-size: 30px;
  }

  .page-banner h1 {
    font-size: 32px;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 56px 0;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .section-header h2 {
    font-size: 26px;
  }

  .section-header p {
    font-size: 14px;
  }

  .btn {
    padding: 12px 28px;
    font-size: 14px;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-qr {
    display: none;
  }

  .consult-panel {
    width: 300px;
    right: -8px;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .stat-item .number {
    font-size: 36px;
  }

  .page-banner {
    padding: 56px 0;
  }

  .page-banner h1 {
    font-size: 26px;
  }

  .news-card {
    flex-direction: column;
    gap: 12px;
  }

  .news-card .date-box {
    display: flex;
    gap: 8px;
    width: auto;
    align-items: baseline;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .consult-panel {
    width: calc(100vw - 32px);
    right: -12px;
  }

  .consult-popup {
    bottom: 16px;
    right: 16px;
  }

  .back-to-top {
    right: 16px;
    bottom: 84px;
  }
}
