/* mirror_flow:p6_ai_generated */
@charset "utf-8";

/* 全局变量与设计令牌 */
:root {
  --color-primary: #1a5276;
  --color-primary-light: #2e86c1;
  --color-accent: #e67e22;
  --color-accent-hover: #d35400;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-text: #2c3e50;
  --color-text-soft: #5d6d7e;
  --color-border: #dfe6e9;
  --color-footer-bg: #1e272e;
  --color-footer-text: #bdc3c7;
  --radius-sm: 4px;
  --radius-md: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --font-sans: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --max-width: 1200px;
  --header-height: 70px;
}

/* 全局重置与现代基线 */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: var(--color-primary);
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-primary-light);
}

ul, ol {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* === 页头 === */
.site-header {
  background: var(--color-surface);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  height: 45px;
  width: auto;
}

.logo-text {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-primary);
  white-space: nowrap;
}

/* 主导航 */
.main-nav ul {
  display: flex;
  gap: 28px;
  align-items: center;
}

.main-nav a {
  font-weight: 500;
  color: var(--color-text);
  padding: 8px 0;
  position: relative;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.25s ease;
}

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

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

/* 移动菜单按钮 */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--color-text);
  padding: 4px;
}

/* === 主要内容区域 === */
.site-main {
  flex: 1;
  padding: 40px 0;
}

/* 文章详情页布局 */
.article-detail {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
  align-items: start;
}

/* 侧边栏 */
.sidebar {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: 24px;
  position: sticky;
  top: calc(var(--header-height) + 20px);
}

.sidebar h3 {
  font-size: 1.1rem;
  color: var(--color-primary);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-border);
}

.sidebar-nav li {
  margin-bottom: 6px;
}

.sidebar-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--color-text-soft);
  font-size: 0.95rem;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: var(--color-primary);
  color: #fff;
}

/* 内容区域 */
.article-content {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: 32px;
}

.article-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 12px;
  line-height: 1.3;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.9rem;
  color: var(--color-text-soft);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.article-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text);
}

.article-body p {
  margin-bottom: 16px;
}

.article-body img {
  border-radius: var(--radius-sm);
  margin: 16px auto;
}

/* 产品网格（用于列表页） */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.product-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.product-card .card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: var(--color-primary);
}

.product-card p {
  font-size: 0.9rem;
  color: var(--color-text-soft);
  margin-bottom: 12px;
  flex: 1;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--color-accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  align-self: flex-start;
}

.btn:hover {
  background: var(--color-accent-hover);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
}

/* 通用板块标题 */
.section-title {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 40px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--color-accent);
  margin: 12px auto 0;
}

/* 联系我们信息条 */
.contact-info {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  margin: 24px 0;
  padding: 20px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
}

.contact-info .info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

/* === 页脚 === */
.site-footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: 40px 0 20px;
  margin-top: auto;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
}

.footer-col h4 {
  color: #fff;
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.footer-col p,
.footer-col li {
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  margin-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 0.85rem;
}

/* === 响应式布局 === */
@media (max-width: 992px) {
  .article-detail {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    order: 2;
  }

  .article-content {
    order: 1;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-surface);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    padding: 16px 0;
  }

  .main-nav.open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .main-nav a {
    display: block;
    padding: 12px 24px;
    border-bottom: 1px solid var(--color-border);
  }

  .main-nav a::after {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .article-content {
    padding: 20px;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .header-inner {
    gap: 10px;
  }

  .logo img {
    height: 36px;
  }

  .logo-text {
    font-size: 1rem;
  }
}
