:root {
  --bg: #f6f8fa;
  --surface: #ffffff;
  --surface-2: #eef3f7;
  --text: #1f2933;
  --muted: #66717d;
  --primary: #0f5b8c;
  --primary-dark: #0a4569;
  --accent: #e07a2f;
  --line: #dbe3ea;
  --shadow: 0 12px 32px rgba(15, 91, 140, 0.12);
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.wrap { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner { display: flex; align-items: center; gap: 28px; min-height: 72px; }

.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--primary); color: #fff;
  display: grid; place-items: center; font-weight: 800; letter-spacing: .5px;
}
.brand-text strong { display: block; font-size: 15px; }
.brand-text small { display: block; color: var(--muted); font-size: 10px; letter-spacing: 1px; }

.nav { display: flex; gap: 26px; font-size: 14px; }
.nav a { color: var(--muted); transition: color .2s; }
.nav a:hover { color: var(--primary); }

.cart-btn {
  border: 1px solid var(--primary); background: #fff; color: var(--primary);
  border-radius: 999px; padding: 8px 16px; cursor: pointer; font-size: 14px; font-weight: 600;
}
.cart-btn:hover { background: var(--primary); color: #fff; }
.cart-count {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px;
  padding: 0 6px; margin-left: 6px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 12px;
}

.hero { background: linear-gradient(135deg, #eaf3f9 0%, #f8fbfe 60%, #fff 100%); }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 50px; align-items: center; padding: 88px 0 78px; }
.hero-copy h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.18; margin: 12px 0 18px; letter-spacing: -1px; }
.lead { color: var(--muted); font-size: 17px; max-width: 540px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.eyebrow { color: var(--accent); font-weight: 700; font-size: 12px; letter-spacing: 2px; margin: 0 0 6px; }
.hero-panel svg { width: 100%; height: auto; filter: drop-shadow(0 18px 28px rgba(15,91,140,.16)); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 10px; padding: 11px 20px; border: 1px solid transparent;
  cursor: pointer; font-weight: 600; font-size: 14px; transition: transform .15s, background .2s, color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); }
.btn.ghost { background: #fff; color: var(--primary); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--primary); }
.btn.wide { width: 100%; }
.btn.small { padding: 7px 12px; font-size: 12px; border: 1px solid var(--line); background: #fff; color: var(--text); }

.section { padding: 76px 0; }
.section-alt { background: var(--surface); }
.section-head { margin-bottom: 34px; }
.section-head h2 { font-size: 30px; margin: 4px 0 10px; }
.section-head p:last-child { color: var(--muted); max-width: 720px; }

.about-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 48px; align-items: start; }
.feature-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.feature-list li { position: relative; padding-left: 22px; color: var(--muted); font-size: 14px; }
.feature-list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.info-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.info-card h3 { margin: 0 0 14px; font-size: 17px; }
.info-card p { display: flex; justify-content: space-between; gap: 14px; margin: 10px 0; font-size: 14px; }
.info-card span { color: var(--muted); }
.info-card b { text-align: right; word-break: break-all; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.product-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s;
}
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.product-visual { height: 158px; background: linear-gradient(135deg, #e6eff6, #f7fafc); display: grid; place-items: center; border-bottom: 1px solid var(--line); }
.product-visual svg { width: 82%; height: 82%; }
.product-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.product-tag { font-size: 11px; color: var(--primary); background: #e7f0f7; border-radius: 999px; padding: 3px 10px; align-self: flex-start; }
.product-body h3 { margin: 12px 0 8px; font-size: 19px; }
.product-body p { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.product-meta { display: flex; gap: 16px; font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.product-meta b { color: var(--text); }
.product-actions { display: flex; gap: 10px; margin-top: auto; }
.product-actions .btn { flex: 1; padding: 9px 10px; font-size: 13px; }

.order-layout { display: grid; grid-template-columns: 1.5fr .7fr; gap: 50px; align-items: start; }
.order-form { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.order-form label, .field { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 15px; }
.order-form input, .order-form textarea, .field select {
  width: 100%; margin-top: 6px; padding: 10px 12px; border-radius: 9px;
  border: 1px solid var(--line); background: #fff; color: var(--text); outline: none;
}
.order-form input:focus, .order-form textarea:focus, .field select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(15,91,140,.09); }
.form-hint { font-size: 12px; color: var(--muted); margin: 12px 0 0; }
.order-aside { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.order-aside h3 { margin-top: 0; }
.steps { padding-left: 20px; color: var(--muted); font-size: 14px; }
.steps li { margin: 9px 0; }
.notice { margin-top: 18px; padding: 12px 14px; border-left: 3px solid var(--accent); background: #fff7f0; font-size: 12px; color: #8a5a2b; }

.site-footer { background: #102b3d; color: #b8cad6; padding: 26px 0; font-size: 13px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer p { margin: 0; }

.overlay { position: fixed; inset: 0; background: rgba(16,43,61,.45); z-index: 40; }
.hidden { display: none !important; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%);
  background: var(--surface); z-index: 41; box-shadow: -12px 0 40px rgba(16,43,61,.2);
  transform: translateX(105%); transition: transform .28s ease; display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 19px; }
.icon-btn { border: 0; background: transparent; font-size: 26px; line-height: 1; cursor: pointer; color: var(--muted); }
.icon-btn:hover { color: var(--primary); }
.drawer-body { flex: 1; overflow: auto; padding: 18px 22px; }
.cart-item { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.cart-item h4 { margin: 0 0 4px; font-size: 15px; }
.cart-item p { margin: 0; color: var(--muted); font-size: 12px; }
.qty { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; }
.qty button { width: 26px; height: 26px; border: 1px solid var(--line); background: #fff; border-radius: 6px; cursor: pointer; }
.cart-item .amount { text-align: right; font-weight: 700; color: var(--primary); }
.remove-link { display: inline-block; margin-top: 8px; font-size: 12px; color: #b4483d; cursor: pointer; }
.empty-cart { text-align: center; color: var(--muted); padding: 40px 0; }
.drawer-foot { border-top: 1px solid var(--line); padding: 18px 22px 22px; }
.drawer-foot .field { margin-bottom: 12px; }
.totals { border-top: 1px solid var(--line); padding-top: 12px; margin: 14px 0 18px; font-size: 14px; }
.totals div { display: flex; justify-content: space-between; margin: 6px 0; color: var(--muted); }
.totals b { color: var(--text); }
.totals .grand { font-size: 17px; color: var(--text); font-weight: 700; }
.totals .grand b { color: var(--accent); }
.drawer-foot .btn + .btn { margin-top: 8px; }

.modal { position: fixed; inset: 0; z-index: 50; background: rgba(16,43,61,.55); display: grid; place-items: center; padding: 24px; overflow: auto; }
.modal-card { position: relative; width: min(760px, 100%); background: #fff; border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); max-height: calc(100vh - 48px); overflow: auto; }
.modal-card.large { width: min(960px, 100%); }
.modal-close { position: absolute; top: 14px; right: 18px; z-index: 2; }

.product-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.product-detail-grid h2 { margin: 0 40px 8px 0; font-size: 25px; }
.detail-tag { color: var(--primary); font-size: 12px; font-weight: 700; }
.detail-block { margin-top: 20px; }
.detail-block h4 { margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.diagram { border: 1px solid var(--line); border-radius: 10px; background: #f8fbfd; padding: 10px; margin-bottom: 10px; }
.diagram svg { width: 100%; height: auto; display: block; }
.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.photo { aspect-ratio: 4/3; border: 1px dashed var(--line); border-radius: 8px; background: #f3f6f8; display: grid; place-items: center; color: var(--muted); font-size: 12px; text-align: center; padding: 8px; }
.photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
table.spec { width: 100%; border-collapse: collapse; font-size: 13px; }
table.spec th, table.spec td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
table.spec th { background: var(--surface-2); width: 42%; font-weight: 600; }
.detail-buy { margin-top: 22px; display: flex; align-items: center; gap: 14px; }
.detail-price { font-size: 22px; font-weight: 800; color: var(--accent); }

.invoice-card { width: min(1000px, 100%); padding: 24px 30px 30px; }
.invoice-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; padding-right: 44px; }
.tabs { display: flex; gap: 8px; }
.tab { border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 8px; padding: 8px 12px; cursor: pointer; font-size: 12px; }
.tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.invoice-sheet { border: 1px solid var(--line); padding: 28px; background: #fff; }
.invoice-head { display: flex; justify-content: space-between; gap: 20px; border-bottom: 2px solid var(--primary); padding-bottom: 16px; }
.invoice-head h2 { margin: 0; font-size: 22px; }
.invoice-head p { margin: 4px 0; font-size: 12px; color: var(--muted); }
.invoice-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 18px 0; font-size: 13px; }
.invoice-meta div { border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.invoice-meta h4 { margin: 0 0 6px; font-size: 13px; color: var(--primary); }
.invoice-meta p { margin: 3px 0; }
table.invoice-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 10px; }
table.invoice-table th, table.invoice-table td { border: 1px solid var(--line); padding: 8px; text-align: left; }
table.invoice-table th { background: var(--surface-2); }
table.invoice-table td.num, table.invoice-table th.num { text-align: right; }
.invoice-total { margin-left: auto; width: min(340px, 100%); margin-top: 14px; font-size: 13px; }
.invoice-total div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.invoice-total .final { font-size: 16px; font-weight: 800; color: var(--primary); border-bottom: 2px solid var(--primary); }
.invoice-terms { margin-top: 22px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }
.status-bar { margin-top: 16px; padding: 12px 14px; background: #fff7f0; border-left: 3px solid var(--accent); font-size: 13px; color: #8a5a2b; }

/* CYS-style additions */
.hero-copy h1 em { font-style: normal; color: var(--accent); }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 22px; font-size: 12px; color: var(--muted); }
.hero-badges span { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; }

.flow-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.flow-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.flow-card b { font-family: Consolas, monospace; font-size: 12px; color: var(--accent); }
.flow-card h3 { margin: 8px 0; font-size: 16px; }
.flow-card p { margin: 0; color: var(--muted); font-size: 13px; }

.series-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 18px; }
.series-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 10px; transition: box-shadow .2s, transform .2s; }
.series-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.series-card .code { font-family: Consolas, monospace; font-size: 11px; color: var(--accent); letter-spacing: .05em; }
.series-card h3 { margin: 0; font-size: 17px; }
.series-card p { margin: 0; color: var(--muted); font-size: 13px; flex: 1; }
.series-card .meta { font-size: 12px; color: var(--primary); }
.series-card .actions { display: flex; gap: 8px; }
.series-card .actions .btn { flex: 1; padding: 8px 6px; font-size: 12px; }
.series-note { margin-top: 20px; padding: 14px 16px; background: var(--surface-2); border-left: 3px solid var(--primary); font-size: 13px; color: var(--muted); }

.selector-layout { display: grid; grid-template-columns: 1.3fr .7fr; gap: 40px; align-items: start; }
.selector-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; grid-template-columns: 1fr 1fr 90px; gap: 12px; align-items: end; }
.selector-form label { font-size: 12px; font-weight: 600; color: var(--muted); margin: 0; }
.selector-form select, .selector-form input { width: 100%; margin-top: 6px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); }
.selector-form .btn { height: 39px; }
.model-preview { margin-top: 16px; background: var(--surface-2); border-radius: var(--radius); padding: 18px; font-size: 13px; color: var(--muted); line-height: 1.8; }
.model-preview b { color: var(--text); }
.feature-list.compact { display: block; margin-top: 0; }
.feature-list.compact li { margin: 10px 0; }
.bank-box { margin-top: 18px; padding: 14px; border: 1px dashed var(--line); border-radius: 8px; font-size: 12px; color: var(--muted); white-space: pre-line; }

@media (max-width: 900px) {
  .selector-layout { grid-template-columns: 1fr; }
  .selector-form { grid-template-columns: 1fr; }

  .nav { display: none; }
  .hero-inner, .about-grid, .order-layout, .product-detail-grid { grid-template-columns: 1fr; }
  .hero-inner { padding: 56px 0; }
  .hero-panel { display: none; }
  .feature-list { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .invoice-meta { grid-template-columns: 1fr; }
  .invoice-toolbar { flex-direction: column; align-items: flex-start; }
}

@media print {
  body { background: #fff; }
  /* 打印发票（模态打开时）才隐藏页面外壳；打印 About / 产品页 / 政策页时保留正文 */
  body:has(#invoiceModal:not(.hidden)) .site-header,
  body:has(#invoiceModal:not(.hidden)) main,
  body:has(#invoiceModal:not(.hidden)) footer,
  body:has(#invoiceModal:not(.hidden)) .overlay,
  body:has(#invoiceModal:not(.hidden)) .drawer,
  body:has(#invoiceModal:not(.hidden)) .modal-close,
  body:has(#invoiceModal:not(.hidden)) .invoice-toolbar,
  body:has(#invoiceModal:not(.hidden)) .status-bar { display: none !important; }
  body:has(#invoiceModal:not(.hidden)) .modal { position: static; display: block; padding: 0; background: #fff; overflow: visible; }
  body:has(#invoiceModal:not(.hidden)) .modal-card.invoice-card { width: 100%; max-height: none; overflow: visible; box-shadow: none; padding: 0; }
  .invoice-sheet { border: 0; padding: 0; }
  @page { margin: 14mm; }
}
