:root {
  --primary: #0f5ea8;
  --primary-dark: #0a487f;
  --primary-light: #e8f2fb;
  --accent: #d99b28;
  --text: #1d2b3a;
  --muted: #637385;
  --line: #e3eaf1;
  --bg: #f5f8fb;
  --white: #fff;
  --radius: 12px;
  --shadow: 0 8px 28px rgba(18, 61, 104, .08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 15px/1.7 "Microsoft YaHei", "PingFang SC", Arial, sans-serif; color: var(--text); background: var(--bg); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
.wrap { width: min(1200px, calc(100% - 32px)); margin: 0 auto; }
.icon { width: 18px; height: 18px; flex: 0 0 auto; vertical-align: -3px; }

/* 页头 */
.topbar { background: #f0f4f8; border-bottom: 1px solid #e7edf3; color: #56687b; font-size: 13px; }
.topbar-inner { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.topbar-links { display: flex; align-items: center; gap: 18px; }
.topbar-links a:hover { color: var(--primary); }
.top-register { color: var(--primary); font-weight: 600; }
.mainhead { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
.mainhead-inner { min-height: 74px; display: flex; align-items: center; gap: 26px; }
.brand { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand-mark { width: 42px; height: 42px; display: block; }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-text strong { display: block; font-size: 17px; letter-spacing: .3px; color: #14293e; white-space: nowrap; }
.brand-text small { display: block; color: var(--muted); font-size: 11px; letter-spacing: 1.2px; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { padding: 9px 14px; border-radius: 7px; font-weight: 600; color: #33475b; white-space: nowrap; }
.nav a:hover, .nav a.active { background: var(--primary-light); color: var(--primary); }
.cart-link { display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.cart-link b { min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--primary); color: #fff; font-size: 11px; line-height: 19px; text-align: center; }
.menu-btn { display: none; border: 0; background: none; padding: 8px; cursor: pointer; }
.menu-btn span { display: block; width: 22px; height: 2px; margin: 4px 0; background: var(--text); }

/* 通用组件 */
.section { padding: 62px 0; }
.section-sm { padding: 38px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 26px; }
.section-head h2 { font-size: 28px; line-height: 1.3; color: #14293e; }
.section-head p { color: var(--muted); font-size: 14px; margin-top: 6px; }
.section-head .more { color: var(--primary); font-size: 14px; font-weight: 600; white-space: nowrap; }
.section-head .more .icon { width: 15px; }
.eyebrow { color: var(--primary); font-size: 13px; font-weight: 700; letter-spacing: 2px; margin-bottom: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--primary); border-radius: 8px; padding: 10px 18px; background: var(--primary); color: #fff; font: inherit; font-weight: 600; cursor: pointer; transition: .18s; }
.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn.ghost { background: #fff; color: var(--primary); }
.btn.ghost:hover { background: var(--primary-light); }
.btn.sm { padding: 7px 13px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pill { display: inline-block; padding: 3px 9px; border-radius: 20px; background: var(--primary-light); color: var(--primary); font-size: 12px; font-weight: 600; }
.muted { color: var(--muted); }
.breadcrumb { padding: 18px 0 4px; font-size: 13px; color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }

/* 首页 */
.hero { background: linear-gradient(135deg, #0b4b86 0%, #1268b3 58%, #2b83c7 100%); color: #fff; overflow: hidden; }
.hero-inner { min-height: 430px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 44px; align-items: center; padding: 54px 0; }
.hero h1 { font-size: 39px; line-height: 1.35; letter-spacing: 1px; margin: 0 0 16px; }
.hero h1 em { color: #ffd47e; font-style: normal; }
.hero p { max-width: 540px; color: #d9e8f5; font-size: 15px; }
.hero-actions { display: flex; gap: 12px; margin-top: 26px; }
.hero-actions .btn.ghost { border-color: rgba(255,255,255,.7); background: transparent; color: #fff; }
.hero-actions .btn.ghost:hover { background: rgba(255,255,255,.12); }
.hero-stats { display: flex; gap: 34px; margin-top: 36px; }
.hero-stats div { border-left: 2px solid rgba(255,255,255,.35); padding-left: 14px; }
.hero-stats strong { display: block; font-size: 24px; }
.hero-stats span { font-size: 12px; color: #cfe1f2; }
.hero-art { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; transform: rotate(1deg); }
.hero-art figure { margin: 0; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); border-radius: 14px; padding: 12px; backdrop-filter: blur(4px); }
.hero-art figure:nth-child(2) { margin-top: 34px; }
.hero-art img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; }
.hero-art figcaption { color: #e8f2fb; font-size: 12px; padding: 8px 2px 0; }
.modules { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.module-card { display: flex; gap: 20px; padding: 28px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); transition: .2s; }
.module-card:hover { transform: translateY(-3px); border-color: #b9d4ec; }
.module-card__icon { width: 58px; height: 58px; border-radius: 14px; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.module-card__icon svg { width: 30px; height: 30px; }
.module-card h3 { font-size: 19px; margin-bottom: 6px; }
.module-card p { color: var(--muted); font-size: 14px; }
.module-card ul { margin: 14px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.module-card li { background: #f3f7fb; border-radius: 5px; padding: 3px 10px; font-size: 12px; color: #4c6074; }
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.info-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.product-card, .info-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: .2s; }
.product-card:hover, .info-card:hover { transform: translateY(-3px); border-color: #b9d4ec; }
.product-card__img { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #eef3f8; }
.product-card__body, .info-card__body { padding: 15px 16px 17px; }
.product-card h3, .info-card h3 { font-size: 15px; line-height: 1.5; min-height: 45px; }
.product-card h3 a, .info-card h3 a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card__meta { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; color: var(--muted); font-size: 12px; gap: 8px; }
.price { color: #c53a2f; font-size: 19px; font-weight: 700; }
.price small { font-size: 12px; font-weight: 400; color: var(--muted); text-decoration: line-through; margin-left: 5px; }
.about-strip { display: grid; grid-template-columns: 1fr 1.2fr; gap: 42px; align-items: center; }
.about-strip__panel { padding: 30px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.about-strip__panel dl { display: grid; grid-template-columns: 90px 1fr; gap: 10px 12px; margin: 0; font-size: 14px; }
.about-strip__panel dt { color: var(--muted); }
.about-strip__panel dd { margin: 0; color: var(--text); }

/* 列表页 */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 20px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 6px 13px; font: inherit; font-size: 13px; color: #43576b; cursor: pointer; }
.filter:hover { border-color: var(--primary); color: var(--primary); }
.filter.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.searchbox { margin-left: auto; display: flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.searchbox input { border: 0; outline: 0; padding: 8px 11px; width: 215px; font: inherit; font-size: 13px; }
.searchbox button { border: 0; background: var(--primary); color: #fff; padding: 0 13px; cursor: pointer; }
.merchant-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 22px; }
.merchant-mini { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.merchant-mini strong { display: block; font-size: 13px; line-height: 1.5; }
.merchant-mini span { color: var(--muted); font-size: 12px; }
.list-count { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.info-card__img { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: #eef3f8; }
.info-card h3 { margin-top: 12px; }
.info-card__body { padding-top: 0; }
.info-card__meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-top: 10px; }
.info-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; }
.info-card__foot .btn { padding: 6px 10px; font-size: 12px; }
.empty { grid-column: 1/-1; text-align: center; padding: 70px 20px; color: var(--muted); background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); }

/* 详情页 */
.detail-layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: 28px; }
.gallery-main { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.gallery-thumbs { display: flex; gap: 9px; margin-top: 12px; }
.gallery-thumbs img { width: 78px; height: 60px; object-fit: cover; border: 2px solid transparent; border-radius: 7px; cursor: pointer; background: #fff; }
.gallery-thumbs img.active { border-color: var(--primary); }
.detail-info { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.detail-info h1 { font-size: 25px; line-height: 1.4; }
.detail-info .price { display: block; margin: 14px 0; font-size: 28px; }
.detail-info .price small { font-size: 14px; }
.spec-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.spec-table th, .spec-table td { border-bottom: 1px solid var(--line); padding: 9px 4px; text-align: left; }
.spec-table th { width: 96px; color: var(--muted); font-weight: 400; }
.qty-row { display: flex; align-items: center; gap: 12px; margin: 18px 0; }
.qty-row input { width: 78px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; text-align: center; font: inherit; }
.buy-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.buy-meta { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; margin-top: 12px; }
.merchant-card { margin-top: 20px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.merchant-card h4 { margin-bottom: 8px; }
.merchant-card p { font-size: 13px; color: var(--muted); }
.content-panel { margin-top: 24px; padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.content-panel h2 { font-size: 20px; margin-bottom: 14px; }
.content-panel p { margin-bottom: 13px; color: #3b4d60; }
.info-detail-layout { display: grid; grid-template-columns: 1fr 320px; gap: 26px; align-items: start; }
.info-detail-layout .content-panel { margin-top: 0; }
.info-hero-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: sticky; top: 96px; }
.contact-card h3 { font-size: 17px; margin-bottom: 4px; }
.contact-card .company { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.contact-row { display: flex; align-items: flex-start; gap: 9px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.contact-row .icon { margin-top: 3px; color: var(--primary); }
.contact-row strong { font-size: 17px; letter-spacing: 1px; }
.contact-note { font-size: 12px; color: #8a6a2c; background: #fff8ea; border-radius: 6px; padding: 9px 11px; margin-top: 13px; }

/* 表单与账户 */
.auth-wrap { max-width: 460px; margin: 0 auto; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.form-card h1 { font-size: 23px; margin-bottom: 6px; }
.form-card > p { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #d9e2eb; border-radius: 7px; padding: 10px 12px; font: inherit; font-size: 14px; outline: 0; background: #fff; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(15,94,168,.09); }
.field textarea { min-height: 150px; resize: vertical; }
.checkline { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: #4c6074; margin: 10px 0; }
.checkline input { margin-top: 4px; }
.checkline a { color: var(--primary); }
.form-msg { font-size: 13px; min-height: 20px; margin-top: 6px; color: #c53a2f; }
.form-msg.ok { color: #1c8a5a; }
.form-tip { font-size: 12px; color: var(--muted); margin-top: 14px; }
.account-grid { display: grid; grid-template-columns: 260px 1fr; gap: 22px; align-items: start; }
.account-side { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.account-side .avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.account-side .avatar .icon { width: 26px; height: 26px; }
.account-side h3 { font-size: 18px; }
.account-side p { color: var(--muted); font-size: 13px; }
.account-side a { display: block; margin-top: 14px; font-size: 13px; color: var(--primary); }

/* 购物车 */
.cart-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14px; }
.cart-table th, .cart-table td { padding: 14px 12px; border-bottom: 1px solid var(--line); word-break: break-word; text-align: left; }
.cart-table th:nth-child(1) { width: 48%; }
.cart-table th:nth-child(2) { width: 16%; }
.cart-table th:nth-child(3) { width: 18%; }
.cart-table th:nth-child(4) { width: 18%; }
.cart-item { display: flex; gap: 13px; align-items: center; }
.cart-item img { width: 82px; height: 64px; object-fit: cover; border-radius: 6px; flex: 0 0 auto; }
.cart-item b { display: block; font-size: 14px; }
.cart-item span { color: var(--muted); font-size: 12px; }
.cart-summary { margin-top: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; justify-content: flex-end; gap: 26px; align-items: center; }
.cart-summary .total { font-size: 22px; color: #c53a2f; font-weight: 700; }
.order-note { background: #fff8ea; border: 1px solid #f0e2c6; border-radius: 8px; padding: 12px 15px; font-size: 13px; color: #7c642f; margin-bottom: 18px; }
.order-box { max-width: 720px; margin: 0 auto; padding: 40px; text-align: center; }

/* 内容页 */
.prose { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.prose h2 { font-size: 21px; margin: 22px 0 10px; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: #3b4d60; margin-bottom: 12px; }
.prose ul { padding-left: 22px; color: #3b4d60; }
.prose li { margin-bottom: 6px; }

/* 页脚 */
footer { margin-top: 48px; background: #11283e; color: #b8c9d8; }
.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1.2fr; gap: 40px; padding: 42px 0 30px; }
.footer-brand { color: #fff; font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.footer-grid p { font-size: 13px; line-height: 1.9; }
.footer-grid p .icon { width: 15px; height: 15px; margin-right: 6px; }
.footer-grid h4 { color: #fff; font-size: 14px; margin-bottom: 12px; }
.footer-grid a { display: block; font-size: 13px; margin-bottom: 6px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.13); padding: 16px 0; display: flex; justify-content: space-between; gap: 14px; font-size: 12px; }

@media (max-width: 1050px) {
  .product-grid, .info-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { max-width: 520px; }
  .merchant-strip { grid-template-columns: repeat(3, 1fr); }
  .nav a { padding: 8px 9px; }
}
@media (max-width: 760px) {
  .wrap { width: calc(100% - 24px); }
  .topbar-inner { flex-direction: column; justify-content: center; padding: 7px 0; gap: 3px; text-align: center; }
  .topbar-links { gap: 12px; }
  .mainhead-inner { min-height: 64px; }
  .brand-text strong { font-size: 14px; white-space: normal; }
  .brand-text small { display: none; }
  .menu-btn { display: block; margin-left: auto; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); padding: 10px; flex-direction: column; align-items: stretch; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .cart-link span { display: none; }
  .hero-inner { padding: 34px 0; }
  .hero h1 { font-size: 28px; }
  .hero-stats { gap: 20px; }
  .modules, .detail-layout, .info-detail-layout, .about-strip, .account-grid { grid-template-columns: 1fr; }
  .product-grid, .info-grid { grid-template-columns: repeat(2, 1fr); }
  .merchant-strip { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 40px 0; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .searchbox { margin-left: 0; width: 100%; }
  .searchbox input { flex: 1; }
  .cart-summary { flex-direction: column; align-items: flex-end; gap: 10px; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .footer-bottom { flex-direction: column; }
  .contact-card { position: static; }
}
@media (max-width: 430px) {
  .product-grid, .info-grid, .merchant-strip { grid-template-columns: 1fr; }
  .hero-art { display: none; }
}
