:root {
  --primary: #1757a6;
  --primary-dark: #11427d;
  --primary-light: #e8f0fb;
  --accent: #d9772b;
  --text: #1f2a37;
  --text-soft: #5b6776;
  --line: #e3e8ef;
  --bg: #f5f7fa;
  --white: #ffffff;
  --ok: #2e7d4f;
  --shadow: 0 1px 3px rgba(16, 36, 64, 0.08), 0 6px 18px rgba(16, 36, 64, 0.06);
  --radius: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 15px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0 0 .5em; color: var(--text); font-weight: 700; }
.container { width: 1180px; max-width: 100%; margin: 0 auto; padding: 0 20px; }
.btn-primary-sm, .btn-primary, .btn-outline {
  display: inline-block; cursor: pointer; border: none; border-radius: 6px;
  font-size: 14px; padding: 9px 18px; transition: background .15s, color .15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary-sm { background: var(--primary); color: #fff; padding: 7px 14px; }
.btn-primary-sm:hover { background: var(--primary-dark); }
.btn-outline { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-link { color: var(--text-soft); padding: 7px 12px; }
.btn-link:hover { color: var(--primary); }
.btn-block { width: 100%; text-align: center; }
.muted { color: var(--text-soft); }
.center { text-align: center; }

/* ---------- 页眉 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: #fff;
  border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(16,36,64,.03);
}
.header-inner { display: flex; align-items: center; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--primary); font-size: 19px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 8px; background: var(--primary);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.nav { display: flex; align-items: center; gap: 4px; margin-left: 30px; }
.nav-link { padding: 8px 14px; color: var(--text-soft); border-radius: 6px; font-size: 15px; }
.nav-link:hover { color: var(--primary); background: var(--primary-light); }
.nav-link.active { color: var(--primary); font-weight: 600; }
.cart-link { position: relative; }
.cart-badge {
  position: absolute; top: -2px; right: -2px; background: var(--accent); color: #fff;
  font-size: 11px; min-width: 17px; height: 17px; line-height: 17px; text-align: center;
  border-radius: 9px; padding: 0 4px;
}
.header-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.user-menu { position: relative; }
.user-btn {
  background: var(--primary-light); color: var(--primary); border: none; cursor: pointer;
  padding: 8px 14px; border-radius: 6px; font-size: 14px; display: flex; align-items: center; gap: 6px;
}
.caret { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid var(--primary); }
.user-drop {
  display: none; position: absolute; right: 0; top: 46px; background: #fff; border: 1px solid var(--line);
  border-radius: 8px; box-shadow: var(--shadow); min-width: 140px; overflow: hidden;
}
.user-drop.show { display: block; }
.user-drop a { display: block; padding: 10px 16px; color: var(--text-soft); font-size: 14px; }
.user-drop a:hover { background: var(--primary-light); color: var(--primary); }
.menu-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; margin-left: auto; padding: 6px; }
.menu-toggle span { width: 22px; height: 2px; background: var(--text); display: block; }

/* ---------- 页脚 ---------- */
.site-footer { background: #14213a; color: #c7d2e3; margin-top: 50px; }
.footer-inner { display: grid; grid-template-columns: 1.6fr 1fr 1.4fr; gap: 36px; padding: 44px 20px 30px; }
.footer-brand { font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 12px; }
.footer-desc { font-size: 13px; line-height: 1.8; color: #9fb0c9; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer-col ul li { margin-bottom: 9px; }
.footer-col a { color: #c7d2e3; font-size: 14px; }
.footer-col a:hover { color: #fff; }
.footer-contact li { font-size: 13px; color: #9fb0c9; line-height: 1.9; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 16px 0; font-size: 13px; color: #8ea0bd; }
.footer-bottom .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer-icp { color: #8ea0bd; text-decoration: none; }
.footer-icp:hover { color: #ffffff; text-decoration: underline; }

/* ---------- 通用区块 ---------- */
.section { padding: 44px 0; }
.section-head { text-align: center; margin-bottom: 30px; }
.section-head h2 { font-size: 26px; }
.section-head p { color: var(--text-soft); margin: 0; }

/* ---------- 首页 Hero ---------- */
.hero { background: linear-gradient(120deg, #11427d 0%, #1757a6 60%, #2a6fc0 100%); color: #fff; padding: 64px 0; }
.hero h1 { color: #fff; font-size: 34px; margin-bottom: 14px; }
.hero p { font-size: 16px; color: #d7e6fb; max-width: 640px; margin: 0 0 26px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .btn-outline { background: rgba(255,255,255,.12); color:#fff; border-color: rgba(255,255,255,.5); }
.hero .btn-outline:hover { background: rgba(255,255,255,.22); }
.hero-stats { display: flex; gap: 40px; margin-top: 38px; flex-wrap: wrap; }
.hero-stats .num { font-size: 26px; font-weight: 700; }
.hero-stats .label { font-size: 13px; color: #cfe0f6; }

/* 模块卡片 */
.module-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.module-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px; box-shadow: var(--shadow); display: flex; gap: 22px; align-items: flex-start;
}
.module-icon {
  width: 58px; height: 58px; border-radius: 12px; background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700; flex-shrink: 0;
}
.module-card h3 { font-size: 20px; margin-bottom: 8px; }
.module-card p { color: var(--text-soft); margin: 0 0 16px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.feature-card .fc-no { color: var(--primary); font-weight: 700; font-size: 14px; }
.feature-card h4 { font-size: 17px; margin: 8px 0 6px; }
.feature-card p { color: var(--text-soft); font-size: 14px; margin: 0; }

/* ---------- 商城 / 列表 ---------- */
.page-title { background: #fff; border-bottom: 1px solid var(--line); padding: 26px 0; }
.page-title h1 { font-size: 24px; margin: 0; }
.page-title .crumb { color: var(--text-soft); font-size: 13px; margin-bottom: 6px; }
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 22px; }
.filter-bar .label { color: var(--text-soft); font-size: 14px; margin-right: 4px; }
.chip {
  border: 1px solid var(--line); background: #fff; color: var(--text-soft); cursor: pointer;
  padding: 7px 16px; border-radius: 20px; font-size: 14px; transition: all .15s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.search-box { margin-left: auto; display: flex; }
.search-box input { border: 1px solid var(--line); border-right: none; border-radius: 6px 0 0 6px; padding: 8px 12px; width: 220px; font-size: 14px; outline: none; }
.search-box button { border: 1px solid var(--primary); background: var(--primary); color: #fff; border-radius: 0 6px 6px 0; padding: 0 16px; cursor: pointer; }

.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.product-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s;
}
.product-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(16,36,64,.12); }
.product-card .thumb { aspect-ratio: 4/3; overflow: hidden; background: #eef2f7; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .body { padding: 14px 16px 18px; display: flex; flex-direction: column; flex: 1; }
.product-card .pname { font-size: 16px; font-weight: 600; margin: 0 0 8px; }
.product-card .pmeta { color: var(--text-soft); font-size: 13px; margin-bottom: 10px; }
.product-card .ptags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.product-card .tag { background: var(--primary-light); color: var(--primary); font-size: 12px; padding: 2px 8px; border-radius: 4px; }
.product-card .pfoot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.price { color: var(--accent); font-weight: 700; font-size: 18px; }
.price small { color: var(--text-soft); font-weight: 400; font-size: 12px; text-decoration: line-through; margin-left: 6px; }
.empty { text-align: center; color: var(--text-soft); padding: 60px 0; }

/* ---------- 商品详情 ---------- */
.detail-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.gallery .main-img { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #eef2f7; aspect-ratio: 4/3; }
.gallery .main-img img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; }
.thumbs img { width: 72px; height: 60px; object-fit: cover; border: 2px solid transparent; border-radius: 6px; cursor: pointer; }
.thumbs img.active { border-color: var(--primary); }
.detail-info h1 { font-size: 24px; margin-bottom: 10px; }
.detail-price { font-size: 28px; color: var(--accent); font-weight: 700; margin: 12px 0; }
.detail-price small { font-size: 15px; color: var(--text-soft); text-decoration: line-through; margin-left: 8px; font-weight: 400; }
.detail-meta { border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); padding: 14px 0; margin: 16px 0; color: var(--text-soft); font-size: 14px; }
.detail-meta div { margin: 4px 0; }
.qty-row { display: flex; align-items: center; gap: 12px; margin: 18px 0; }
.qty-ctrl { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.qty-ctrl button { width: 36px; height: 38px; border: none; background: #fff; font-size: 18px; cursor: pointer; color: var(--text); }
.qty-ctrl input { width: 50px; height: 38px; border: none; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; font-size: 15px; outline: none; }
.detail-desc { margin-top: 30px; }
.detail-desc h3 { font-size: 18px; }
.detail-desc p { color: var(--text-soft); }

/* ---------- 购物车 ---------- */
.cart-table { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.cart-row { display: grid; grid-template-columns: 90px 1fr 120px 140px 100px 60px; gap: 14px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.cart-row.head { background: #fafbfd; font-weight: 600; color: var(--text-soft); font-size: 14px; }
.cart-row .c-img { width: 80px; height: 64px; object-fit: cover; border-radius: 6px; background: #eef2f7; }
.cart-row .c-name { font-weight: 600; }
.cart-row .c-sub { color: var(--text-soft); font-size: 13px; }
.cart-summary { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; margin-top: 22px; box-shadow: var(--shadow); }
.cart-summary .line { display: flex; justify-content: space-between; margin-bottom: 10px; color: var(--text-soft); }
.cart-summary .total { font-size: 22px; font-weight: 700; color: var(--accent); }

/* ---------- 信息列表 ---------- */
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.info-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.info-card .cover { aspect-ratio: 16/9; overflow: hidden; background: #eef2f7; }
.info-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.info-card .body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.info-card .cat { display: inline-block; background: var(--primary-light); color: var(--primary); font-size: 12px; padding: 2px 10px; border-radius: 4px; margin-bottom: 10px; align-self: flex-start; }
.info-card h3 { font-size: 17px; margin: 0 0 8px; line-height: 1.45; }
.info-card .summary { color: var(--text-soft); font-size: 14px; margin: 0 0 14px; flex: 1; }
.info-card .foot { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text-soft); border-top: 1px solid var(--line); padding-top: 12px; }
.info-card .foot .phone { color: var(--primary); }

/* ---------- 信息详情 ---------- */
.info-detail-layout { display: grid; grid-template-columns: 1fr 320px; gap: 36px; align-items: start; }
.info-detail .cover { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #eef2f7; aspect-ratio: 16/9; margin-bottom: 22px; }
.info-detail .cover img { width: 100%; height: 100%; object-fit: cover; }
.info-detail h1 { font-size: 26px; }
.info-detail .meta { color: var(--text-soft); font-size: 14px; margin-bottom: 20px; }
.info-detail .meta span { margin-right: 16px; }
.info-detail .content p { color: #36424f; line-height: 1.9; margin: 0 0 16px; }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); position: sticky; top: 84px; }
.contact-card h4 { font-size: 16px; margin-bottom: 14px; }
.contact-card .row { margin-bottom: 12px; font-size: 14px; }
.contact-card .row .k { color: var(--text-soft); display: inline-block; width: 64px; }
.contact-card .phone-mask { font-weight: 600; color: var(--primary); }
.contact-card .tip { background: var(--primary-light); color: var(--primary); font-size: 13px; padding: 10px 12px; border-radius: 6px; margin-top: 8px; }
.contact-card .tip a { color: var(--primary); text-decoration: underline; }

/* ---------- 表单 / 认证 ---------- */
.auth-wrap { max-width: 460px; margin: 40px auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow); }
.auth-wrap h2 { text-align: center; font-size: 22px; }
.auth-wrap .sub { text-align: center; color: var(--text-soft); margin: 0 0 22px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; margin-bottom: 6px; color: var(--text); }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; font-size: 14px; outline: none; font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); }
.field textarea { resize: vertical; min-height: 120px; }
.agree { font-size: 13px; color: var(--text-soft); margin: 6px 0 18px; line-height: 1.7; }
.agree input { margin-right: 6px; vertical-align: middle; }
.agree a { color: var(--primary); }
.form-msg { font-size: 13px; margin-bottom: 12px; padding: 8px 12px; border-radius: 6px; }
.form-msg.err { background: #fdecec; color: #c0392b; }
.form-msg.ok { background: #eafaf0; color: var(--ok); }
.auth-switch { text-align: center; font-size: 14px; color: var(--text-soft); margin-top: 16px; }
.auth-switch a { color: var(--primary); }

/* 发布表单 */
.publish-wrap { max-width: 720px; margin: 30px auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }

/* 关于 / 账户 */
.about-layout { display: grid; grid-template-columns: 280px 1fr; gap: 36px; align-items: start; }
.about-side { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.about-side h4 { margin-bottom: 12px; }
.about-side .kv { font-size: 14px; margin: 8px 0; color: var(--text-soft); }
.about-side .kv b { color: var(--text); font-weight: 600; }
.about-main { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.about-main h3 { font-size: 20px; margin-top: 24px; }
.about-main p { color: var(--text-soft); line-height: 1.9; }
.account-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); max-width: 560px; }
.account-card .uname { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.account-card .line { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--line); padding: 12px 0; font-size: 14px; }
.account-card .line .k { color: var(--text-soft); }
.notice-bar { background: var(--primary-light); color: var(--primary); padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 20px; }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .detail-layout, .info-detail-layout, .about-layout { grid-template-columns: 1fr; }
  .module-grid { grid-template-columns: 1fr; }
  .contact-card { position: static; }
  .cart-row { grid-template-columns: 70px 1fr 90px 110px 80px 40px; font-size: 13px; }
}
@media (max-width: 720px) {
  .menu-toggle { display: flex; }
  .nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0; background: #fff;
    flex-direction: column; align-items: stretch; padding: 10px 20px; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow); gap: 2px;
  }
  .nav.open { display: flex; }
  .header-right { display: none; }
  .product-grid, .info-grid, .feature-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 26px; }
  .cart-row { grid-template-columns: 60px 1fr; }
  .cart-row .c-price, .cart-row .c-qty, .cart-row .c-sub-total, .cart-row .c-del { grid-column: 2; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .product-grid, .info-grid, .feature-grid { grid-template-columns: 1fr; }
}
