/* ============================================
   全局样式 - 长晶JSCJ SEO站
   设计原则：清晰、专业、加载快速
   ============================================ */

/* CSS Reset & 基础 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-primary: #1d4ed8;       /* 主色：深蓝 */
  --color-primary-light: #3b82f6;
  --color-accent: #0ea5e9;        /* 强调色 */
  --color-text: #1f2937;
  --color-text-muted: #6b7280;
  --color-bg: #ffffff;
  --color-bg-alt: #f9fafb;
  --color-border: #e5e7eb;
  --color-link: #2563eb;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "Consolas", "Courier New", monospace;
  --radius: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --max-width: 1200px;
}

html { font-family: var(--font-sans); font-size: 16px; scroll-behavior: smooth; }
body { color: var(--color-text); background: var(--color-bg); line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-link); }
h1, h2, h3, h4, h5 { line-height: 1.3; font-weight: 700; }

/* ============ Layout ============ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ============ Header ============ */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 60px;
}
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-img {
  max-width: 160px;
  max-height: 40px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.logo-text {
  flex-direction: column;
  text-decoration: none;
}
.logo-brand {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.1;
}
.logo-sub {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
}
.main-nav {
  display: flex;
  gap: 1.5rem;
  flex: 1;
}
.main-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}
.btn-inquiry {
  background: var(--color-primary);
  color: #fff !important;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background 0.15s;
  flex-shrink: 0;
}
.btn-inquiry:hover { background: var(--color-primary-light); }

/* ============ Hero / Page Header ============ */
.page-hero {
  background:
    linear-gradient(135deg, rgba(15,29,61,0.88) 0%, rgba(30,58,138,0.84) 50%, rgba(29,78,216,0.80) 100%),
    url('/images/hero-bg.svg');
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  color: #fff;
  padding: 2.5rem 0 2rem;
}
.page-hero h1 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  margin-bottom: 0.5rem;
}
.page-hero .desc {
  font-size: 1rem;
  opacity: 0.85;
  max-width: 680px;
}

/* ============ 产品详情页 ============ */
.product-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  padding: 1.5rem 0 3rem;
}
@media (max-width: 768px) {
  .product-layout { grid-template-columns: 1fr; }
}

.product-main h1 {
  font-size: 1.75rem;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}
.product-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}
.badge-cat { background: #dbeafe; color: #1e40af; }
.badge-pkg { background: #d1fae5; color: #065f46; }
.badge-status { background: #ecfdf5; color: #065f46; }

.product-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.sidebar-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: var(--color-bg-alt);
}
.sidebar-card h3 {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.product-image {
  width: 100%;
  max-width: 200px;
  margin: 0 auto;
}
.btn-datasheet {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem;
  background: var(--color-primary);
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.15s;
}
.btn-datasheet:hover { background: var(--color-primary-light); }
.btn-inquiry-large {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem;
  background: #16a34a;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.15s;
}
.btn-inquiry-large:hover { background: #15803d; }

/* ============ SEO 内容区 ============ */
.seo-content {
  font-size: 0.975rem;
  line-height: 1.8;
  color: #374151;
  margin: 1.5rem 0;
}
.seo-content h2 { font-size: 1.15rem; margin: 1.25rem 0 0.5rem; }
.seo-content h3 { font-size: 1rem; margin: 1rem 0 0.4rem; }
.seo-content p { margin-bottom: 0.75rem; }
.seo-content ul { padding-left: 1.5rem; margin-bottom: 0.75rem; }

/* ============ FAQ 区块（GEO优化）============ */
.faq-section { margin: 2rem 0; }
.faq-section h2 { font-size: 1.15rem; margin-bottom: 1rem; }
.faq-item { margin-bottom: 1rem; border-left: 3px solid var(--color-primary); padding-left: 1rem; }
.faq-q { font-weight: 600; margin-bottom: 0.25rem; }
.faq-a { color: #374151; font-size: 0.9rem; }

/* ============ 列表页 ============ */
.product-list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 1rem 0;
}
.product-list-table th {
  background: #f3f4f6;
  padding: 0.6rem 0.75rem;
  text-align: left;
  border: 1px solid var(--color-border);
  font-weight: 600;
  white-space: nowrap;
}
.product-list-table td {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
}
.product-list-table tr:hover td { background: #eff6ff; }
.product-list-table a { font-weight: 600; }

/* ============ 分类卡片网格 ============ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}
.category-card {
  display: block;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  background: #fff;
}
.category-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.category-card h3 { font-size: 1rem; color: var(--color-primary); margin-bottom: 0.4rem; }
.category-card .count { font-size: 0.8rem; color: var(--color-text-muted); }
.category-card .desc { font-size: 0.85rem; color: #4b5563; margin-top: 0.5rem; }

/* ============ 筛选标签 ============ */
.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}
.filter-tag {
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 0.82rem;
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.15s, background 0.15s;
}
.filter-tag:hover, .filter-tag.active {
  border-color: var(--color-primary);
  background: #eff6ff;
  color: var(--color-primary);
}

/* ============ Footer ============ */
.site-footer {
  background: #1f2937;
  color: #d1d5db;
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-col h3, .footer-col h4 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}
.footer-col p { font-size: 0.85rem; line-height: 1.7; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.4rem; }
.footer-col ul a { color: #9ca3af; text-decoration: none; font-size: 0.85rem; }
.footer-col ul a:hover { color: #fff; }
.btn-footer-inquiry {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.5rem 1rem;
  background: var(--color-primary);
  color: #fff;
  border-radius: 6px;
  font-size: 0.85rem;
  text-decoration: none;
}
.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 1rem;
  text-align: center;
  font-size: 0.8rem;
  color: #6b7280;
}

/* ============ 响应式 ============ */
@media (max-width: 768px) {
  .main-nav { display: none; }
  .site-header .container { justify-content: space-between; }
}
