/* XXDOG B2B 站点样式 */
:root {
  --c-bg: #f7f8fa;
  --c-surface: #ffffff;
  --c-text: #1f2937;
  --c-text-soft: #4b5563;
  --c-primary: #b31b1b;
  --c-primary-dark: #8f1414;
  --c-border: #e5e7eb;
  --c-accent: #0f766e;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 6px 24px rgba(16, 24, 40, 0.10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.65;
  font-size: 16px;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- 头部 ---------- */
.site-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 68px;
  flex-wrap: wrap;
}
.brand {
  font-size: 22px;
  font-weight: 800;
  color: var(--c-text);
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; color: var(--c-primary); }
.main-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  flex: 1;
}
.nav-link {
  color: var(--c-text-soft);
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 500;
}
.nav-link:hover { color: var(--c-primary); background: #fef2f2; text-decoration: none; }
.nav-link.is-active { color: var(--c-primary); font-weight: 700; }
.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.lang-switch { display: flex; gap: 4px; }
.lang-link {
  font-size: 13px;
  color: var(--c-text-soft);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid transparent;
}
.lang-link:hover { border-color: var(--c-border); text-decoration: none; }
.lang-link.is-active {
  color: var(--c-primary);
  border-color: var(--c-primary);
  font-weight: 700;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-weight: 700;
  border: none;
  cursor: pointer;
  font-size: 15px;
  text-align: center;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--c-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--c-primary-dark); color: #fff; }
.btn-secondary {
  background: #fff;
  color: var(--c-primary);
  border: 2px solid var(--c-primary);
}
.btn-secondary:hover { background: var(--c-primary); color: #fff; }
.btn-block { display: block; width: 100%; }
.sec-more { text-align: center; margin-top: 28px; }

/* ---------- 主区域 ---------- */
.site-main { padding: 36px 0 64px; }
.page-h1 {
  font-size: 32px;
  line-height: 1.35;
  margin: 0 0 28px;
  max-width: 860px;
}
.sec-heading {
  font-size: 22px;
  margin: 36px 0 14px;
}
.sec-paragraph { margin: 12px 0; color: var(--c-text-soft); }

/* ---------- 卡片 ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  margin: 16px 0;
}
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card-title { margin: 0 0 8px; font-size: 17px; color: var(--c-primary); }
.card-text { margin: 0; color: var(--c-text-soft); font-size: 14.5px; }

/* ---------- 列表 ---------- */
.sec-list { list-style: none; padding: 0; margin: 16px 0; }
.list-item {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.list-item strong { color: var(--c-text); font-size: 16px; }
.list-item p { margin: 6px 0 0; color: var(--c-text-soft); font-size: 14.5px; }

/* ---------- 步骤 ---------- */
.sec-steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 16px 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.step {
  counter-increment: step;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  position: relative;
}
.step::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  font-weight: 800;
  margin-bottom: 10px;
}
.step-title { margin: 0 0 6px; font-size: 16px; }
.step-text { margin: 0; color: var(--c-text-soft); font-size: 14.5px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; margin: 16px 0; }
.sec-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--c-surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.sec-table th, .sec-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--c-border);
  text-align: left;
  font-size: 14.5px;
}
.sec-table th { background: #f3f4f6; font-weight: 700; }
.sec-table tr:last-child td { border-bottom: none; }

/* ---------- CTA ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark));
  color: #fff;
  border-radius: var(--radius);
  padding: 32px 28px;
  margin: 40px 0 8px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.cta-title { margin: 0 0 10px; font-size: 22px; }
.cta-text { margin: 0 0 18px; opacity: 0.92; }
.cta-band .btn-primary {
  background: #fff;
  color: var(--c-primary);
}
.cta-band .btn-primary:hover { background: #f3f4f6; color: var(--c-primary-dark); }

/* ---------- 表单 ---------- */
.inquiry-form {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 28px;
  margin: 20px 0 8px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-weight: 600; font-size: 14.5px; }
.form-row input, .form-row select, .form-row textarea {
  padding: 10px 12px;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--c-text);
  width: 100%;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: 2px solid var(--c-primary);
  outline-offset: 1px;
  border-color: var(--c-primary);
}
.form-msg { grid-column: 1 / -1; min-height: 20px; font-size: 14.5px; }
.form-msg.is-success { color: var(--c-accent); font-weight: 700; }
.form-msg.is-error { color: var(--c-primary); font-weight: 700; }

/* ---------- 页脚 ---------- */
.site-footer {
  background: #111827;
  color: #d1d5db;
  padding: 44px 0 20px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}
.footer-col .brand { color: #fff; font-size: 20px; }
.footer-col p { color: #9ca3af; font-size: 14px; margin: 8px 0; }
.footer-col a { color: #d1d5db; }
.footer-col h4 { color: #fff; margin: 0 0 12px; font-size: 15px; }
.footer-nav { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.footer-bottom {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid #374151;
  font-size: 13px;
  color: #9ca3af;
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  font-size: 13.5px;
  color: var(--c-text-soft);
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--c-text-soft); }
.breadcrumb a:hover { color: var(--c-primary); }
.breadcrumb .sep { color: #d1d5db; margin: 0 6px; }

/* ---------- 产品列表 ---------- */
.page-desc { color: var(--c-text-soft); margin: -12px 0 24px; }
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin: 16px 0 28px;
}
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  color: var(--c-text);
  transition: box-shadow 0.18s, transform 0.18s;
}
.product-card:hover {
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.product-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #f3f4f6;
  display: block;
}
.product-card-img-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 13px;
}
.product-card-body { padding: 12px 14px 16px; }
.product-card-title {
  margin: 0 0 6px;
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--c-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
}
.product-card:hover .product-card-title { color: var(--c-primary); }
.product-brand { margin: 0 0 4px; font-size: 12.5px; color: var(--c-text-soft); }
.product-price { margin: 0; font-size: 14px; font-weight: 700; color: var(--c-primary); }

/* ---------- 分页 ---------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 8px 0 32px;
}
.page-link {
  padding: 8px 16px;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background: var(--c-surface);
  color: var(--c-primary);
  font-weight: 600;
  font-size: 14px;
}
.page-link:hover { text-decoration: none; background: #fef2f2; }
.page-info { font-size: 14px; color: var(--c-text-soft); }

/* ---------- 产品详情 ---------- */
.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 40px;
}
.product-gallery { margin: 0; }
.product-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  background: #f3f4f6;
  display: block;
}
.product-gallery-empty {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
}
.product-info { min-width: 0; }
.product-info .page-h1 { margin-bottom: 10px; }
.product-price-lg { font-size: 22px; margin: 10px 0 18px; }
.moq-note { color: var(--c-text-soft); font-size: 14px; display: block; margin-bottom: 16px; }
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14.5px;
}
.spec-table th, .spec-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--c-border);
  text-align: left;
  vertical-align: top;
}
.spec-table th {
  width: 110px;
  background: #f9fafb;
  font-weight: 700;
  color: var(--c-text-soft);
}
.related-section { margin-top: 8px; }

/* ---------- 枢纽页卡片 ---------- */
.hub-card { display: block; }
.hub-card:hover { text-decoration: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 760px) {
  .header-inner { padding: 10px 0; }
  .main-nav { order: 3; width: 100%; }
  .header-actions { margin-left: auto; }
  .footer-grid { grid-template-columns: 1fr; }
  .page-h1 { font-size: 26px; }
  .inquiry-form { padding: 18px; }
}
