/* 主色：蓝色。换色只需改下面一行。
   备选：#1d4ed8（默认，标准蓝）  #1e40af（深蓝）  #2563eb（亮蓝） */
:root {
  --primary: #1d4ed8;
  --primary-dark: #1e3a8a;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f8fafc;
  --white: #fff;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--text); background: var(--white);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 16px; line-height: 1.75;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 800px; }
.page { padding: 32px 20px 56px; }
.page.narrow { padding-left: 20px; padding-right: 20px; }
.lead { font-size: 1.1rem; color: var(--muted); }
.muted { color: var(--muted); }
.center { text-align: center; }
.skip { position: absolute; left: -999px; top: 0; background: var(--primary); color: #fff; padding: 8px 12px; z-index: 9; }
.skip:focus { left: 0; }

/* 页头 */
.site-header { border-bottom: 1px solid var(--line); background: var(--white); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.logo:hover { text-decoration: none; }
.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a { color: var(--text); padding: 6px 12px; border-radius: 6px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--primary); text-decoration: none; background: var(--bg); }
.header-phone { color: var(--primary); font-weight: 600; white-space: nowrap; }
.nav-toggle { display: none; }
.nav-btn { display: none; width: 40px; height: 40px; margin-left: auto; cursor: pointer; position: relative; }
.nav-btn span, .nav-btn span::before, .nav-btn span::after {
  content: ""; position: absolute; left: 9px; width: 22px; height: 2px; background: var(--text); }
.nav-btn span { top: 19px; }
.nav-btn span::before { top: -7px; left: 0; }
.nav-btn span::after { top: 7px; left: 0; }

/* 页脚 */
.site-footer { background: var(--bg); border-top: 1px solid var(--line); margin-top: 40px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; padding-top: 32px; padding-bottom: 16px; }
.footer-grid p { margin: 0 0 .3em; }
.footer-strong { font-weight: 600; }
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { margin-bottom: .2em; }
.footer-list a { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 12px; padding-bottom: 20px; font-size: .9rem; color: var(--muted); }
.footer-bottom p { margin: 0; }

/* 首页 */
.hero {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  background-size: cover; background-position: center;
  color: #fff; padding: 80px 0 72px;
}
.hero h1 { font-size: 2.75rem; margin-bottom: .3em; }
.hero-sub { font-size: 1.2rem; max-width: 720px; margin-bottom: 1.6em; opacity: .95; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 12px; }
.section { padding: 48px 0; }
.section h2 { text-align: center; margin-bottom: 28px; }
.section-grey { background: var(--bg); }
.section-blue { background: var(--primary); color: #fff; padding: 40px 0; }
.section-blue h2 { color: #fff; text-align: left; margin-bottom: 12px; }
.section-blue a { color: #fff; text-decoration: underline; }
.section-blue p { margin: 0 0 .2em; }
.two-col { display: grid; grid-template-columns: 3fr 2fr; gap: 40px; align-items: center; }
.two-col h2 { text-align: left; }
.photo, .thumb-empty, .gallery-main, .photo-empty {
  background: var(--bg); border: 1px dashed var(--line); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: var(--muted); aspect-ratio: 4 / 3; overflow: hidden;
}
.photo img, .gallery-main > img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.cat-entry { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 32px; }
.cat-card { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 20px 24px; color: var(--text); display: block; }
.cat-card:hover { text-decoration: none; border-color: var(--primary); }
.cat-card h3 { color: var(--primary); margin-bottom: .2em; }
.cat-card p { margin-bottom: .4em; }
.grid { display: grid; gap: 20px; }
.cards { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 14px; color: var(--text); display: block; }
.card:hover { text-decoration: none; border-color: var(--primary); }
.card h3 { margin: 12px 0 .2em; font-size: 1.05rem; }
.card h3 small { font-weight: 400; color: var(--muted); }
.card p { font-size: .92rem; color: var(--muted); margin-bottom: .6em; }
.thumb { aspect-ratio: 1; border-radius: 6px; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb-empty { aspect-ratio: 1; border: 1px solid var(--line); background: var(--bg); }
.cat-tag { display: inline-block; font-size: .78rem; color: var(--primary); border: 1px solid var(--primary); border-radius: 999px; padding: 0 10px; }
.adv-list { list-style: none; padding: 0; grid-template-columns: repeat(4, 1fr); }
.adv-list li { background: var(--bg); border-radius: 8px; padding: 20px; }
.adv-list h3 { color: var(--primary); }
.adv-list p { margin: 0; color: var(--muted); font-size: .95rem; }
.gallery { grid-template-columns: repeat(4, 1fr); }
.gallery img { border-radius: 6px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.gallery.small { grid-template-columns: 1fr 1fr; }
.news-list { list-style: none; padding: 0; }
.news-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.news-list time { color: var(--muted); font-size: .9rem; margin-right: 12px; }
.more { font-weight: 600; }
.btn {
  display: inline-block; background: var(--primary); color: #fff; border: 1px solid var(--primary);
  border-radius: 6px; padding: 10px 22px; font-size: 1rem; cursor: pointer; font-family: inherit;
}
.btn:hover { background: var(--primary-dark); text-decoration: none; color: #fff; }
.btn-light { background: #fff; color: var(--primary); border-color: #fff; }
.btn-light:hover { background: var(--bg); color: var(--primary-dark); }
.btn-outline { background: transparent; color: inherit; border-color: currentColor; }
.btn-outline:hover { background: #fff; color: var(--primary); text-decoration: none; }
.btn-sm { padding: 6px 14px; font-size: .9rem; }

/* 内页 */
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 16px; }
.crumbs span[aria-current="page"] { color: var(--text); }
.cat-block { margin-top: 48px; }
.cat-block h2 a { color: inherit; }
.file-list { list-style: none; padding: 0; }
.file-row {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 10px; background: var(--white);
}
.file-title { font-weight: 600; margin: 0; }
.file-meta, .file-note { font-size: .88rem; color: var(--muted); margin: 0; }
.file-row .btn { white-space: nowrap; flex-shrink: 0; }
.product-top { align-items: start; margin-bottom: 32px; }
.thumbs { grid-template-columns: repeat(5, 1fr); margin-top: 10px; }
.thumbs img { border-radius: 6px; aspect-ratio: 1; object-fit: cover; width: 100%; }
.product-files { margin-top: 28px; }
.feature-list li { margin-bottom: .3em; }
.box { background: var(--bg); border-radius: 8px; padding: 20px 24px; margin-bottom: 20px; }
.big-link { font-size: 1.25rem; font-weight: 600; }
.article-list { list-style: none; padding: 0; }
.article-list li { display: flex; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.article-list .cover { width: 180px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.article-list h2 { font-size: 1.2rem; margin-bottom: .2em; }
.article-list h2 a { color: var(--text); }
.article-list p { margin-bottom: 0; }
.meta { color: var(--muted); font-size: .92rem; }
.draft-tag { color: var(--primary); border: 1px solid var(--primary); border-radius: 999px; padding: 0 8px; font-size: .82rem; margin-left: 8px; }
article p { margin-bottom: 1.1em; }
.pager { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; margin-top: 28px; color: var(--muted); }

/* 响应式 */
@media (max-width: 1023px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .adv-list { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; gap: 24px; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .header-phone { display: none; }
  .nav-btn { display: block; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column;
    background: var(--white); border-bottom: 1px solid var(--line); padding: 8px 20px 16px; gap: 2px;
  }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 639px) {
  html { font-size: 15px; }
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }
  .hero { padding: 52px 0 48px; }
  .hero h1 { font-size: 2rem; }
  .section { padding: 36px 0; }
  .cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .adv-list, .cat-entry { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .thumbs { grid-template-columns: repeat(3, 1fr); }
  .article-list li { flex-direction: column; gap: 10px; }
  .article-list .cover { width: 100%; }
  .file-row { flex-direction: column; align-items: stretch; }
  .file-row .btn { text-align: center; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* 后台 */
.admin-body { background: var(--bg); }
.admin-wrap { display: grid; grid-template-columns: 200px 1fr; min-height: 100vh; }
.admin-side { background: var(--white); border-right: 1px solid var(--line); padding: 20px 16px; }
.admin-brand { font-weight: 700; color: var(--primary); margin-bottom: 16px; }
.admin-side nav { display: flex; flex-direction: column; gap: 2px; }
.admin-side nav a { color: var(--text); padding: 6px 10px; border-radius: 6px; }
.admin-side nav a:hover, .admin-side nav a[aria-current="page"] { background: var(--bg); color: var(--primary); text-decoration: none; }
.admin-side .side-bottom { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.admin-main { padding: 28px 32px 56px; max-width: 960px; }
.admin-main h1 { font-size: 1.5rem; margin-bottom: 20px; }
.admin-main h2 { font-size: 1.15rem; margin-top: 28px; }
.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; }
.flash.ok { background: #e0e7ff; color: var(--primary-dark); }
.flash.err { background: var(--muted); color: #fff; }
.f label { display: block; margin-bottom: 16px; font-weight: 600; max-width: 720px; }
.f input[type="text"], .f input[type="password"], .f input[type="number"], .f input[type="date"], .f input[type="url"],
.f input:not([type]), .f select, .f textarea {
  display: block; width: 100%; margin-top: 6px; padding: 9px 12px; font: inherit; font-weight: 400;
  border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--text);
}
.f textarea { resize: vertical; }
.f small { display: block; font-weight: 400; color: var(--muted); margin-top: 4px; }
.f .check { display: flex; align-items: center; gap: 8px; }
.f .check input { margin: 0; }
.f input[type="file"] { display: block; margin-top: 6px; width: 100%; }
.btn-secondary { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn-secondary:hover { background: var(--bg); color: var(--text); }
.btn-danger { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn-danger:hover { background: var(--muted); color: #fff; }
.inline-form { display: inline; }
table.t { width: 100%; border-collapse: collapse; background: #fff; font-size: .95rem; }
table.t th, table.t td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
table.t th { background: var(--bg); font-weight: 600; }
table.t td.num { text-align: right; }
.tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 24px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.tile b { display: block; font-size: 1.6rem; color: var(--primary); }
.tile span { color: var(--muted); font-size: .9rem; }
.preview { width: 120px; margin-top: 8px; border-radius: 6px; }
.admin-thumbs { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0 20px; }
.admin-thumbs figure { margin: 0; text-align: center; }
.admin-thumbs img { width: 110px; height: 110px; object-fit: cover; border-radius: 6px; margin-bottom: 6px; }
.login-box { max-width: 380px; margin: 80px auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 28px; }
.login-box h1 { font-size: 1.3rem; }
.login-box .error { color: var(--primary-dark); background: #e0e7ff; padding: 8px 12px; border-radius: 6px; }
@media (max-width: 800px) {
  .admin-wrap { grid-template-columns: 1fr; }
  .admin-side nav { flex-direction: row; flex-wrap: wrap; }
  .admin-side .side-bottom { flex-direction: row; }
  .admin-main { padding: 20px; }
  .tiles { grid-template-columns: 1fr 1fr; }
}
