/* ============================================================
   MagorPrint — 宽幅打印机配件 B2B 独立站样式
   设计系统：深墨蓝主色 + 青色强调 + CMYK 点缀
   ============================================================ */

:root {
  --ink: #0b2546;
  --ink-2: #13315c;
  --ink-3: #1d4e89;
  --accent: #0aa2c0;
  --accent-dark: #087f98;
  --magenta: #e5177b;
  --amber: #f7a600;
  --bg: #ffffff;
  --bg-soft: #f4f7fa;
  --bg-soft-2: #eaf0f6;
  --text: #22303f;
  --text-mute: #5b6b7c;
  --line: #dde5ee;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 2px 8px rgba(11, 37, 70, .07);
  --shadow-lg: 0 12px 32px rgba(11, 37, 70, .13);
  --maxw: 1200px;
  --header-h: 68px;
}

* { box-sizing: border-box; }

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

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

img, svg { max-width: 100%; height: auto; }

a { color: var(--ink-3); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent-dark); }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.3; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(1.75rem, 4vw, 2.6rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); letter-spacing: -.01em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- 顶部工具条 ---------- */
.topbar {
  background: var(--ink);
  color: #cdd9e6;
  font-size: 13px;
  padding: 6px 0;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.topbar a { color: #cdd9e6; }
.topbar a:hover { color: #fff; }
.topbar-contacts { display: flex; gap: 18px; flex-wrap: wrap; }
.topbar-lang { display: flex; gap: 10px; align-items: center; }
.topbar-lang a { padding: 1px 8px; border: 1px solid rgba(255,255,255,.28); border-radius: 5px; }
.topbar-lang a[aria-current="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- 头部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(150%) blur(8px);
}
.header-inner { display: flex; align-items: center; gap: 22px; height: var(--header-h); }

.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--ink); white-space: nowrap; }
.logo:hover { color: var(--ink); }
.logo-mark {
  width: 38px; height: 38px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, var(--ink-3), var(--accent));
  display: grid; place-items: center; color: #fff; font-size: 17px; font-weight: 800;
  box-shadow: var(--shadow);
}
.logo small { display: block; font-size: 11px; font-weight: 600; color: var(--text-mute); letter-spacing: .06em; text-transform: uppercase; }

.main-nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.main-nav > a {
  padding: 9px 13px; border-radius: 8px; color: var(--text); font-weight: 600; font-size: 15px;
}
.main-nav > a:hover, .main-nav > a[aria-current="page"] { background: var(--bg-soft-2); color: var(--ink); }
.main-nav .btn-rfq { margin-left: 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 9px; border: 1px solid transparent;
  font-weight: 700; font-size: 15px; cursor: pointer; transition: all .15s ease;
  text-align: center;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-2); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-dark); }
.btn-sm { padding: 7px 14px; font-size: 13.5px; border-radius: 7px; }
.btn-block { width: 100%; }

.nav-toggle {
  display: none; margin-left: auto; width: 44px; height: 40px;
  background: none; border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav-toggle span { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: .2s; }

/* 询价单角标 */
.rfq-badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--magenta); color: #fff; font-size: 11.5px; font-weight: 800; border-radius: 10px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  /* 背景层级（自上而下）：
     1) 暗色渐变罩层 —— 保证左侧白色文案可读
     2) 实拍背景图（Pexels 免费商用授权，见 CREDITS.md）
     3~5) 原有品牌渐变 —— 图片加载失败时的兜底 */
  background:
    linear-gradient(100deg, rgba(8,14,22,.93) 0%, rgba(8,14,22,.80) 45%, rgba(8,14,22,.52) 100%),
    url("../img/hero-large-format-printer.jpg") center 46% / cover no-repeat,
    radial-gradient(1000px 420px at 85% -10%, rgba(10,162,192,.35), transparent 60%),
    radial-gradient(700px 380px at -5% 110%, rgba(229,23,123,.20), transparent 60%),
    linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 55%, var(--ink-3) 100%);
  color: #eaf2fa;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 44px 44px; pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; padding: clamp(48px, 8vw, 92px) 0; max-width: 780px; }
.hero h1 { color: #fff; margin-bottom: .5em; }
.hero h1 em { font-style: normal; color: #5ed7ef; }
.hero p.lead { font-size: clamp(1rem, 2vw, 1.2rem); color: #c8d8ea; margin-bottom: 1.6em; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-cta .btn-ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.35); }
.hero-cta .btn-ghost:hover { background: rgba(255,255,255,.16); color: #fff; }

.hero-stats { display: flex; gap: clamp(20px, 5vw, 54px); margin-top: 42px; flex-wrap: wrap; }
.hero-stat b { display: block; font-size: clamp(1.5rem, 3.4vw, 2.1rem); color: #fff; font-weight: 800; line-height: 1.15; }
.hero-stat span { font-size: 13px; color: #9db4cc; }

/* 搜索条 */
.hero-search { display: flex; max-width: 560px; margin-top: 30px; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-lg); }
.hero-search input {
  flex: 1; min-width: 0; border: none; padding: 14px 18px; font-size: 15.5px; outline: none;
  font-family: inherit;
}
.hero-search button { border: none; background: var(--accent); color: #fff; padding: 0 24px; font-weight: 700; font-size: 15px; cursor: pointer; }
.hero-search button:hover { background: var(--accent-dark); }

/* ---------- 通用 section ---------- */
.section { padding: clamp(44px, 7vw, 76px) 0; }
.section-alt { background: var(--bg-soft); }
.section-head { max-width: 720px; margin-bottom: 34px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .eyebrow {
  display: inline-block; font-size: 12.5px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent-dark); background: #e3f5f9;
  padding: 4px 12px; border-radius: 99px; margin-bottom: 12px;
}
.section-head p { color: var(--text-mute); font-size: 1.02rem; }

/* ---------- 分类卡片 ---------- */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.cat-card {
  position: relative; display: block; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 20px 20px 18px; transition: all .18s ease; overflow: hidden;
}
.cat-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--accent), var(--ink-3));
  opacity: 0; transition: opacity .18s;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #c9d9ea; color: inherit; }
.cat-card:hover::before { opacity: 1; }
.cat-card .num {
  font-size: 12px; font-weight: 800; color: var(--accent); letter-spacing: .08em;
}
.cat-card h3 { font-size: 1.05rem; margin: 6px 0 6px; }
.cat-card p { font-size: 13.5px; color: var(--text-mute); margin: 0 0 10px; line-height: 1.55; }
.cat-card .count { font-size: 12.5px; font-weight: 700; color: var(--ink-3); }
.cat-card .arrow { position: absolute; right: 16px; bottom: 14px; color: var(--accent); font-weight: 800; transition: transform .18s; }
.cat-card:hover .arrow { transform: translateX(4px); }

/* ---------- 优势/卖点 ---------- */
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
.feature .ico {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, #e3f5f9, #d6ecf7); color: var(--accent-dark);
  font-size: 22px; margin-bottom: 14px;
}
.feature h3 { font-size: 1.05rem; margin-bottom: .45em; }
.feature p { font-size: 14.5px; color: var(--text-mute); margin: 0; }

/* ---------- 产品表 ---------- */
.table-wrap {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow-x: auto; background: #fff; box-shadow: var(--shadow);
}
table.products { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 640px; }
table.products thead th {
  background: var(--ink); color: #dce7f3; text-align: left; font-size: 12.5px;
  letter-spacing: .06em; text-transform: uppercase; padding: 12px 16px; white-space: nowrap;
  position: sticky; top: 0;
}
table.products tbody td { padding: 11px 16px; border-top: 1px solid var(--line); vertical-align: top; }
table.products tbody tr:nth-child(even) { background: #fafcfe; }
table.products tbody tr:hover { background: #eef7fb; }
table.products .sku { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; color: var(--ink-3); white-space: nowrap; }
table.products .pname { font-weight: 600; color: var(--ink); }
table.products .pname a { color: var(--ink); font-weight: 600; display: flex; align-items: center; gap: 12px; }
table.products .pname a:hover { color: var(--accent-dark); }
table.products .spec { color: var(--text-mute); font-size: 13.5px; }
.add-btn {
  border: 1px solid var(--accent); background: #fff; color: var(--accent-dark);
  padding: 5px 12px; border-radius: 7px; font-size: 12.5px; font-weight: 700; cursor: pointer;
  white-space: nowrap; transition: .15s;
}
.add-btn:hover { background: var(--accent); color: #fff; }
.add-btn.added { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- 面包屑 ---------- */
.breadcrumb { padding: 16px 0 0; font-size: 13.5px; color: var(--text-mute); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumb li::after { content: "/"; margin-left: 6px; color: #b3c1d1; }
.breadcrumb li:last-child::after { content: ""; }
.breadcrumb a { color: var(--text-mute); }
.breadcrumb a:hover { color: var(--accent-dark); }

/* ---------- 页面头部 ---------- */
.page-head { background: linear-gradient(135deg, var(--ink) 0%, var(--ink-3) 100%); color: #fff; padding: 34px 0; }
.page-head h1 { color: #fff; margin-bottom: .3em; font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
.page-head p { color: #c3d4e6; margin: 0; max-width: 760px; }
.page-head .breadcrumb { padding-top: 0; }
.page-head .breadcrumb, .page-head .breadcrumb a { color: #9db4cc; }
.page-head .breadcrumb li:last-child { color: #fff; }

/* ---------- 工具条（分类筛选/搜索） ---------- */
.toolbar {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 22px;
}
.toolbar input[type="search"] {
  flex: 1; min-width: 220px; padding: 9px 14px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 15px; font-family: inherit; outline: none;
}
.toolbar input[type="search"]:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(10,162,192,.15); }
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 6px 14px; border-radius: 99px; border: 1px solid var(--line);
  background: #fff; font-size: 13.5px; font-weight: 600; color: var(--text-mute); cursor: pointer;
}
.chip:hover { border-color: var(--accent); color: var(--accent-dark); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.result-count { font-size: 13.5px; color: var(--text-mute); margin-bottom: 12px; }

/* ---------- 询价单 (RFQ) ---------- */
.rfq-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 26px; align-items: start; }
.rfq-list { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.rfq-list-head { background: var(--ink); color: #fff; padding: 13px 18px; font-weight: 700; font-size: 15px; display: flex; justify-content: space-between; }
.rfq-items { list-style: none; margin: 0; padding: 0; }
.rfq-items li { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 14.5px; }
.rfq-items li:first-child { border-top: none; }
.rfq-items .sku { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; color: var(--ink-3); background: var(--bg-soft-2); padding: 2px 7px; border-radius: 5px; }
.rfq-items .rm { margin-left: auto; background: none; border: none; color: var(--magenta); font-size: 18px; cursor: pointer; line-height: 1; padding: 4px; }
.rfq-empty { padding: 28px 18px; text-align: center; color: var(--text-mute); font-size: 14.5px; }

.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow); }
.form-card h2 { font-size: 1.25rem; }
.form-row { margin-bottom: 15px; }
.form-row label { display: block; font-size: 13.5px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.form-row label .req { color: var(--magenta); }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 10px 13px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 15px; font-family: inherit; outline: none; background: #fff;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(10,162,192,.15);
}
.form-row textarea { resize: vertical; min-height: 96px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-note { font-size: 12.5px; color: var(--text-mute); }
.form-success { background: #e7f7ef; border: 1px solid #b7e6cf; color: #10693f; padding: 13px 16px; border-radius: 9px; font-size: 14.5px; margin-bottom: 16px; }

/* ---------- CTA 横幅 ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--ink-2), var(--ink-3) 70%, var(--accent));
  border-radius: var(--radius-lg); color: #fff; padding: clamp(28px, 5vw, 46px);
  display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.cta-band h2 { color: #fff; margin-bottom: .3em; }
.cta-band p { color: #cfe0f0; margin: 0; }
.cta-band .btn { background: #fff; color: var(--ink); }
.cta-band .btn:hover { background: var(--amber); color: var(--ink); }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq details {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 12px; overflow: hidden;
}
.faq summary {
  cursor: pointer; padding: 15px 20px; font-weight: 700; color: var(--ink);
  list-style: none; position: relative; padding-right: 44px; font-size: 15.5px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  color: var(--accent); font-size: 22px; font-weight: 400;
}
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 20px 16px; margin: 0; color: var(--text-mute); font-size: 14.5px; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--ink); color: #aebfd2; margin-top: 60px; font-size: 14.5px; }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 32px;
  padding: 52px 0 36px;
}
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; letter-spacing: .02em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #aebfd2; }
.site-footer a:hover { color: #5ed7ef; }
.footer-brand .logo { color: #fff; margin-bottom: 12px; }
.footer-brand p { color: #90a5bc; font-size: 14px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; font-size: 13px; color: #7d92ab; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.footer-bottom a { color: #7d92ab; }

/* ---------- 回到顶部 ---------- */
.back-top {
  position: fixed; right: 20px; bottom: 22px; width: 44px; height: 44px;
  border-radius: 12px; border: none; background: var(--ink); color: #fff;
  font-size: 18px; cursor: pointer; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: .2s; z-index: 90;
}
.back-top.show { opacity: 1; visibility: visible; transform: none; }
.back-top:hover { background: var(--accent); }

/* ---------- 内容块 ---------- */
.prose { max-width: 820px; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; color: var(--text-mute); }
.prose li { margin-bottom: .45em; }

.badge-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.badge {
  font-size: 12.5px; font-weight: 700; padding: 4px 11px; border-radius: 99px;
  background: var(--bg-soft-2); color: var(--ink-3);
}

.notice {
  background: #fff8e6; border: 1px solid #f3df9d; color: #7a5b00;
  padding: 12px 16px; border-radius: 9px; font-size: 14px; margin-bottom: 18px;
}

/* 搜索结果页 */
.search-hit { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; background: #fff; }
.search-hit:hover { border-color: var(--accent); box-shadow: var(--shadow); color: inherit; }
.search-hit b { color: var(--ink); display: block; margin-bottom: 3px; }
.search-hit span { font-size: 13.5px; color: var(--text-mute); }
.search-hit .hit-thumb {
  flex: none; width: 52px; height: 52px; border-radius: 9px;
  object-fit: cover; border: 1px solid var(--line); background: var(--bg-soft);
}
.search-hit .hit-text { display: block; min-width: 0; }

/* ---------- 产品图片 ---------- */
.p-thumb {
  float: left; width: 46px; height: 46px; margin: -4px 12px 2px 0;
  border-radius: 8px; object-fit: cover; border: 1px solid var(--line);
  background: var(--bg-soft);
}
.prod-hero {
  margin: 0 0 22px; padding: 18px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); text-align: center;
}
.prod-hero img {
  max-width: 100%; max-height: 420px; border-radius: 10px; object-fit: contain;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .rfq-layout { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
    flex-direction: column; align-items: stretch; padding: 12px 16px 18px; gap: 4px; margin: 0;
  }
  .main-nav.open { display: flex; }
  .main-nav > a { padding: 12px 14px; }
  .main-nav .btn-rfq { margin: 8px 0 0; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .topbar .container { justify-content: center; }
  .topbar-contacts { display: none; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .hero-search { flex-direction: column; }
  .cta-band { text-align: center; }
}
