/* ===== 基础 ===== */
:root {
  --primary: #123a6b;
  --primary-dark: #0c2a4f;
  --accent: #1f6fb2;
  --bg: #ffffff;
  --bg-alt: #f3f6fa;
  --text: #23303d;
  --muted: #5f7183;
  --line: #e2e9f1;
  --card: #ffffff;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(18, 58, 107, 0.10);
  --maxw: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 860px; }

a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; display: block; }

/* ===== 按钮 ===== */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .2s ease;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.center { text-align: center; }
.mt { margin-top: 24px; }

/* ===== 顶部导航 ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--primary-dark);
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.brand-mark { font-size: 22px; color: #7db8e8; }
.brand-text { font-weight: 800; letter-spacing: .5px; line-height: 1.1; }
.brand-text small { display: block; font-size: 11px; font-weight: 500; color: #b9d2e8; letter-spacing: 1px; }
.nav { display: flex; gap: 6px; }
.nav a {
  color: #dce8f3; padding: 10px 16px; border-radius: 8px; font-size: 15px; font-weight: 500;
}
.nav a:hover, .nav a.active { color: #fff; background: rgba(255,255,255,.12); }
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 26px; cursor: pointer; }

/* ===== 视图切换 ===== */
.view { display: none; }
.view.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ===== Hero ===== */
.hero {
  position: relative; overflow: hidden;
  background:
    linear-gradient(135deg, rgba(12,42,79,.93) 0%, rgba(18,58,107,.85) 52%, rgba(31,111,178,.74) 100%),
    var(--hero-bg, none) center / cover no-repeat,
    linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, var(--accent) 100%);
  color: #fff; padding: 76px 0;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px; pointer-events: none;
}
.hero .hero-grid { position: relative; display: grid; grid-template-columns: 1.08fr .92fr; gap: 36px; align-items: center; }
.hero-welcome { letter-spacing: 2px; font-size: 14px; color: #b9d2e8; margin-bottom: 12px; }
.hero-title { font-size: 38px; line-height: 1.18; font-weight: 800; margin-bottom: 16px; }
.hero-sub { font-size: 17px; color: #dce8f3; margin-bottom: 26px; max-width: 440px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.35); }
.btn-ghost:hover { background: rgba(255,255,255,.22); }
.hero-stats { list-style: none; display: flex; gap: 28px; flex-wrap: wrap; }
.hero-stats li { font-size: 14px; color: #cfe0ee; }
.hero-stats strong { display: block; font-size: 22px; font-weight: 800; color: #fff; }

/* Hero 右侧视觉 */
.hero-right { display: flex; justify-content: center; }
.hero-visual { position: relative; width: 100%; max-width: 360px; aspect-ratio: 1/1; }
.hv-ring { position: absolute; inset: 8%; border: 1px dashed rgba(255,255,255,.25); border-radius: 50%; }
.hv-chip {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 58%; aspect-ratio: 1/1; border-radius: 18px;
  background: linear-gradient(160deg, #1b4f86, #0d2f57);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 24px 50px rgba(0,0,0,.35);
  display: flex; align-items: center; justify-content: center;
}
.hv-chip-core {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
  border-radius: 12px; padding: 14px 20px; font-weight: 800; letter-spacing: 1px; font-size: 18px;
}
.hv-chip-pin { position: absolute; width: 12%; height: 6px; background: rgba(255,255,255,.35); border-radius: 3px; }
.hv-chip-pin:nth-child(1) { top: 18%; left: -12%; }
.hv-chip-pin:nth-child(2) { top: 18%; right: -12%; }
.hv-chip-pin:nth-child(3) { bottom: 18%; left: -12%; }
.hv-chip-pin:nth-child(4) { bottom: 18%; right: -12%; }
.hv-card {
  position: absolute; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(6px); border-radius: 12px; padding: 10px 16px; font-size: 14px; font-weight: 600;
}
.hv-card-a { top: 6%; left: 0; }
.hv-card-b { bottom: 10%; right: 0; }
.hv-card-c { bottom: 2%; left: 6%; }

/* ===== 区块 ===== */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { font-size: 28px; font-weight: 800; color: var(--primary-dark); margin-bottom: 12px; text-align: center; }
.section-lead { text-align: center; color: var(--muted); max-width: 680px; margin: 0 auto 36px; }
.sub-title { color: var(--primary); margin: 20px 0 10px; }
.lead { font-size: 16px; margin: 12px 0 20px; }

/* ===== 卡片网格 ===== */
.card-grid { display: grid; gap: 24px; }
.card-grid.four { grid-template-columns: repeat(4, 1fr); }
.card-grid.three { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); }
.card h3 { font-size: 18px; color: var(--primary-dark); margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 14.5px; }
.card .card-img { width: 70px; height: 70px; object-fit: cover; border-radius: 10px; margin-bottom: 16px; }

/* ===== 品牌墙 ===== */
.brand-wall { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; align-items: center; }
.brand-wall .bw-item {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 22px 14px; display: flex; align-items: center; justify-content: center; height: 96px;
}
.brand-wall img { max-height: 54px; max-width: 100%; object-fit: contain; }

/* ===== 品牌详情网格 ===== */
.brand-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.brand-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.brand-card .bc-head { height: 130px; display: flex; align-items: center; justify-content: center; background: var(--bg-alt); padding: 20px; }
.brand-card .bc-head img { max-height: 70px; max-width: 100%; object-fit: contain; }
.brand-card .bc-body { padding: 22px; }
.brand-card .bc-body h3 { font-size: 18px; color: var(--primary-dark); margin-bottom: 4px; }
.brand-card .bc-cat { font-size: 12.5px; color: var(--accent); font-weight: 600; letter-spacing: .5px; margin-bottom: 10px; }
.brand-card .bc-body p { font-size: 14px; color: var(--muted); }

/* ===== 列表 ===== */
.check-list { list-style: none; margin: 12px 0 20px; }
.check-list li { padding: 8px 0 8px 30px; position: relative; color: var(--text); }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.about-block { margin: 26px 0; }
.tag-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.tag { background: var(--bg-alt); color: var(--primary); border: 1px solid var(--line); padding: 6px 14px; border-radius: 20px; font-size: 13.5px; }

/* ===== 库存表 ===== */
.toolbar { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin: 24px 0; }
.toolbar input[type="text"] {
  flex: 1; min-width: 220px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; font-size: 15px;
}
.toolbar select { padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 15px; background: #fff; }
.inv-count { color: var(--muted); font-size: 14px; white-space: nowrap; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.inv-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.inv-table th, .inv-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.inv-table th { background: var(--primary-dark); color: #fff; font-weight: 600; white-space: nowrap; }
.inv-table tbody tr:hover { background: var(--bg-alt); }
.inv-table .part { font-weight: 600; color: var(--primary-dark); }
.inv-table .qty { white-space: nowrap; }
.rfq-link { color: var(--accent); font-weight: 600; white-space: nowrap; }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.pager button {
  border: 1px solid var(--line); background: #fff; padding: 8px 13px; border-radius: 8px; cursor: pointer; font-size: 14px;
}
.pager button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pager button:disabled { opacity: .4; cursor: default; }

/* ===== 联系 ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 36px; margin-top: 24px; }
.contact-info { background: var(--bg-alt); border-radius: var(--radius); padding: 28px; }
.contact-info h3 { color: var(--primary-dark); margin-bottom: 16px; }
.contact-info p { margin-bottom: 12px; color: var(--text); }
.contact-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.contact-form h3 { color: var(--primary-dark); margin-bottom: 18px; }
.contact-form label { display: block; margin-bottom: 14px; font-size: 14px; font-weight: 600; color: var(--text); }
.contact-form input, .contact-form textarea {
  width: 100%; margin-top: 6px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 15px; font-family: inherit;
}
.form-note { margin-top: 12px; font-size: 13.5px; color: var(--muted); }

/* ===== 页脚 ===== */
.site-footer { background: var(--primary-dark); color: #cfe0ee; margin-top: 40px; }
.footer-wrap { display: flex; justify-content: space-between; gap: 24px; padding: 36px 24px; flex-wrap: wrap; }
.footer-brand { font-weight: 800; color: #fff; font-size: 18px; }
.footer-sub { font-size: 13.5px; color: #9dbcd6; margin-top: 6px; max-width: 380px; }
.footer-nav { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.footer-nav a { color: #cfe0ee; font-size: 14px; }
.footer-nav a:hover { color: #fff; }
.footer-copy { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 24px; font-size: 13px; color: #9dbcd6; }

/* ===== WhatsApp 入口 ===== */
.wa-link { display: inline-flex; align-items: center; gap: 7px; color: #cfe9d8 !important; }
.wa-link:hover { background: rgba(37,211,102,.18) !important; color: #fff !important; }
.wa-link svg { color: #25d366; }

.wa-float {
  position: fixed; right: 22px; bottom: 26px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(37,211,102,.45); transition: transform .2s ease;
}
.wa-float:hover { transform: translateY(-3px); }

/* 移动端底部固定栏 */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: none; grid-template-columns: 1fr 1fr;
  background: #fff; border-top: 1px solid var(--line);
  box-shadow: 0 -4px 18px rgba(18,58,107,.12);
}
.mb-bar {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 10px; font-size: 15px; font-weight: 600; text-decoration: none;
}
.mb-bar.wa { color: #128c4b; }
.mb-bar.wa svg { color: #25d366; }
.mb-bar.rfq { background: var(--primary); color: #fff; }

/* ===== 响应式 ===== */
@media (max-width: 960px) {
  .card-grid.four { grid-template-columns: repeat(2, 1fr); }
  .card-grid.three, .brand-grid { grid-template-columns: repeat(2, 1fr); }
  .brand-wall { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  #view-home .hero .hero-grid { grid-template-columns: 1fr; }
  .hero { padding: 48px 0; }
  .hero-title { font-size: 30px; }
  #view-home .hero .hero-visual { max-width: 320px; }
}
@media (max-width: 640px) {
  .nav { position: absolute; top: 68px; left: 0; right: 0; background: var(--primary-dark); flex-direction: column; padding: 12px 24px; display: none; }
  .nav.open { display: flex; }
  .nav-toggle { display: block; }
  .card-grid.four, .card-grid.three, .brand-grid { grid-template-columns: 1fr; }
  .brand-wall { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .brand-wall .bw-item { height: 80px; padding: 16px 10px; }
  .section { padding: 44px 0; }
  .mobile-bar { display: grid; }
  .wa-float { display: none; }
  main { padding-bottom: 64px; }
  .site-footer { padding-bottom: 64px; }

  /* Hero 手机版：上下堆叠排版 */
  .hero { padding: 44px 0; }
  #view-home .hero .hero-grid { grid-template-columns: 1fr; gap: 30px; text-align: left; }
  .hero-left { order: 1; }
  .hero-right { order: 2; justify-content: center; }
  .hero-title { font-size: 28px; }
  .hero-sub { max-width: 100%; }
  #view-home .hero .hero-visual { max-width: 280px; }
  .hero-stats { gap: 22px; }

  /* Inventory 手机版：表格转卡片，禁止左右拖动 */
  .table-wrap { overflow-x: visible; border: none; }
  .inv-table thead { display: none; }
  .inv-table tbody { display: block; }
  .inv-table tbody tr {
    display: block; background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
  }
  .inv-table tbody tr:hover { background: #fff; }
  .inv-table td {
    display: flex; justify-content: space-between; align-items: baseline;
    gap: 14px; padding: 8px 0; border-bottom: 1px dashed var(--line);
    text-align: right;
  }
  .inv-table td::before {
    content: attr(data-label); color: var(--muted); font-size: 13px;
    flex: 0 0 38%; text-align: left;
  }
  .inv-table td.part { font-size: 16px; color: var(--primary-dark); }
  .inv-table td.part::before { flex: 0 0 38%; }
  .inv-table td > * { flex: 1; min-width: 0; word-break: break-word; }
  .inv-table td.rfq-cell { justify-content: flex-end; border-bottom: none; padding-top: 12px; }
  .inv-table td.rfq-cell::before { content: none; }
  .inv-table td.rfq-cell .rfq-link {
    display: inline-block; flex: 0 0 auto; padding: 9px 18px;
    background: var(--accent); color: #fff; border-radius: 8px; white-space: nowrap;
  }
  .inv-table td[colspan] { display: block !important; text-align: center; padding: 30px 0; }
}

/* ===== RFQ 询盘弹框 ===== */
.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(12, 32, 51, .55);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-mask.open { display: flex; }
.modal-card {
  position: relative; background: #fff; border-radius: 16px;
  width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto;
  padding: 28px; box-shadow: 0 24px 60px rgba(0,0,0,.3);
  animation: modalIn .22s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.modal-close {
  position: absolute; top: 14px; right: 16px; background: none; border: none;
  font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer;
}
.modal-close:hover { color: var(--text); }
.modal-title { font-size: 20px; color: var(--primary-dark); margin-bottom: 14px; }
.modal-part {
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; margin-bottom: 18px; font-size: 14px;
}
.modal-part .mp-part { font-weight: 700; color: var(--primary-dark); }
.modal-part .mp-meta { color: var(--muted); margin-top: 4px; }
.modal-form label { display: block; margin-bottom: 14px; font-size: 14px; font-weight: 600; }
.modal-form input, .modal-form textarea {
  width: 100%; margin-top: 6px; padding: 11px 14px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 15px; font-family: inherit;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.modal-submit { width: 100%; margin-top: 4px; }
.modal-form .form-note { margin-top: 12px; font-size: 13.5px; color: var(--muted); }

@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .modal-card { padding: 22px; }
}

