/* ==========================================================
   灿聪多明汽配商城 · 全局样式
   ========================================================== */
:root {
  --ink: #0c1a2b;
  --ink-2: #13263b;
  --ink-3: #1c3450;
  --accent: #ff6a13;
  --accent-dark: #e65605;
  --accent-soft: #fff1e8;
  --gold: #ffb020;
  --bg: #f4f6fa;
  --card: #ffffff;
  --text: #17222f;
  --muted: #778698;
  --line: #e7ecf3;
  --green: #0aa06e;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(14, 30, 50, .08);
  --shadow-sm: 0 4px 14px rgba(14, 30, 50, .06);
  --wrap: 1200px;
  --header-h: 64px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.6;
  padding-bottom: 0;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
input, select, textarea { font-family: inherit; font-size: 14px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.hide { display: none !important; }

/* ---------- 顶部通栏 ---------- */
.topbar {
  background: var(--ink);
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 34px;
  gap: 12px;
}
.topbar-left { display: flex; align-items: center; gap: 14px; white-space: nowrap; overflow: hidden; }
.topbar-left span { display: inline-flex; align-items: center; gap: 5px; }
.topbar-right { display: flex; align-items: center; gap: 16px; white-space: nowrap; }
.topbar a:hover { color: #fff; }
.topbar .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }

/* ---------- 主头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 12px rgba(14, 30, 50, .04);
}
.header-main {
  display: flex;
  align-items: center;
  gap: 22px;
  height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--ink-2), #2a4d78);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 800; font-size: 15px; letter-spacing: .5px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
  position: relative;
  overflow: hidden;
}
.brand-mark::after {
  content: "";
  position: absolute; inset: auto -8px -14px auto;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); opacity: .9;
}
.brand-text strong { display: block; font-size: 17px; letter-spacing: 1px; line-height: 1.2; }
.brand-text small { display: block; font-size: 11px; color: var(--muted); letter-spacing: 2px; }

.search {
  flex: 1;
  max-width: 520px;
  display: flex;
  align-items: center;
  background: #f1f4f9;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 4px 4px 4px 16px;
  transition: .2s;
}
.search:focus-within { background: #fff; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255, 106, 19, .1); }
.search input {
  flex: 1; border: 0; background: transparent; outline: none; height: 34px; color: var(--text);
}
.search input::placeholder { color: #9aa7b6; }
.search button {
  border: 0; height: 34px; padding: 0 18px; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #ff8a3d);
  color: #fff; font-weight: 600; font-size: 13px;
}
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.cart-link {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-dark);
  font-weight: 600; position: relative; transition: .2s;
}
.cart-link:hover { background: #ffe3d3; }
.cart-link svg { width: 18px; height: 18px; }
.cart-badge {
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--accent); color: #fff;
  font-size: 11px; line-height: 18px; text-align: center; font-style: normal;
}
.cart-badge.zero { display: none; }

.main-nav { border-top: 1px solid var(--line); }
.main-nav .wrap { display: flex; align-items: center; gap: 6px; height: 46px; overflow-x: auto; scrollbar-width: none; }
.main-nav .wrap::-webkit-scrollbar { display: none; }
.main-nav a {
  padding: 7px 14px; border-radius: 8px; font-size: 14px; color: #3c4b5f;
  white-space: nowrap; transition: .18s;
}
.main-nav a:hover { color: var(--accent-dark); background: var(--accent-soft); }
.main-nav a.active { color: #fff; background: var(--ink-2); font-weight: 600; }
.nav-hot { font-size: 10px; color: #fff; background: var(--accent); border-radius: 4px; padding: 1px 4px; margin-left: 4px; vertical-align: 2px; }

/* ---------- 首页轮播 ---------- */
.hero { padding-top: 18px; }
.hero-slider {
  position: relative; border-radius: 20px; overflow: hidden;
  background: var(--ink); box-shadow: var(--shadow);
}
.hero-track { display: flex; transition: transform .6s cubic-bezier(.4, 0, .2, 1); }
.hero-slide { position: relative; flex: 0 0 100%; aspect-ratio: 21 / 8; min-height: 200px; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8, 20, 34, .82) 0%, rgba(8, 20, 34, .45) 46%, rgba(8, 20, 34, .05) 100%);
}
.hero-copy {
  position: absolute; z-index: 2; left: 34px; top: 50%; transform: translateY(-50%);
  color: #fff; max-width: 60%;
}
.hero-copy .eyebrow {
  display: inline-block; font-size: 11px; letter-spacing: 3px; color: var(--gold);
  border: 1px solid rgba(255, 176, 32, .5); border-radius: 999px; padding: 3px 10px; margin-bottom: 12px;
}
.hero-copy h2 { font-size: clamp(20px, 3vw, 36px); line-height: 1.25; letter-spacing: 1px; }
.hero-copy p { margin-top: 10px; color: rgba(255, 255, 255, .78); font-size: 13px; }
.hero-copy .hero-btn {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 16px;
  background: var(--accent); color: #fff; font-weight: 600;
  padding: 9px 20px; border-radius: 999px; font-size: 13px;
  white-space: nowrap;
}
.hero-copy .hero-btn svg { width: 15px; height: 15px; flex: 0 0 auto; }
.hero-dots {
  position: absolute; z-index: 3; bottom: 14px; left: 34px; display: flex; gap: 6px;
}
.hero-dots button {
  width: 8px; height: 8px; border-radius: 4px; border: 0; padding: 0;
  background: rgba(255, 255, 255, .45); transition: .3s;
}
.hero-dots button.on { width: 22px; background: var(--accent); }
.hero-arrow {
  position: absolute; z-index: 3; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .18); color: #fff; font-size: 18px;
  display: grid; place-items: center; opacity: 0; transition: .25s;
  backdrop-filter: blur(6px);
}
.hero-slider:hover .hero-arrow { opacity: 1; }
.hero-arrow.prev { left: 12px; }
.hero-arrow.next { right: 12px; }

/* ---------- 快捷服务栏 ---------- */
.quick-bar {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border-radius: var(--radius); overflow: hidden;
  margin-top: 16px; box-shadow: var(--shadow-sm);
}
.quick-item {
  background: #fff; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 8px; font-size: 13px; color: #33455b; transition: .2s;
}
.quick-item:hover { background: #fbfcfe; color: var(--accent-dark); }
.quick-item svg { width: 22px; height: 22px; color: var(--accent); flex-shrink: 0; }
.quick-item b { display: block; font-size: 13px; font-weight: 600; }
.quick-item small { display: block; font-size: 11px; color: var(--muted); }

/* ---------- 区块标题 ---------- */
.section { margin-top: 30px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.section-title h2 { font-size: 21px; letter-spacing: .5px; position: relative; padding-left: 12px; }
.section-title h2::before {
  content: ""; position: absolute; left: 0; top: 5px; bottom: 4px; width: 4px;
  border-radius: 2px; background: linear-gradient(var(--accent), var(--gold));
}
.section-title span { font-size: 12px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }
.section-more { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.section-more:hover { color: var(--accent); }

/* ---------- 分类瓷砖 ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; }
.cat-tile {
  background: #fff; border-radius: 14px; padding: 18px 6px 14px; text-align: center;
  border: 1px solid transparent; transition: .22s; box-shadow: var(--shadow-sm);
}
.cat-tile:hover { transform: translateY(-4px); border-color: #ffd9c2; box-shadow: 0 14px 26px rgba(255, 106, 19, .14); }
.cat-icon {
  width: 46px; height: 46px; margin: 0 auto 9px; border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #eef3fa, #dfe8f4); color: var(--ink-3);
}
.cat-icon svg { width: 24px; height: 24px; }
.cat-tile:nth-child(3n+1) .cat-icon { background: linear-gradient(145deg, #fff2e9, #ffe0cc); color: var(--accent-dark); }
.cat-tile:nth-child(3n+2) .cat-icon { background: linear-gradient(145deg, #eaf5ff, #d8eaff); color: #1d6fb8; }
.cat-tile span { font-size: 13px; color: #2d3c4e; }
.cat-tile small { display: block; font-size: 11px; color: #a3afbd; }

/* ---------- 商品卡片 ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.product-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: .25s; display: flex; flex-direction: column;
  border: 1px solid #eef2f7;
}
.product-card:hover { transform: translateY(-5px); box-shadow: 0 18px 34px rgba(14, 30, 50, .13); border-color: #ffe0cb; }
.pc-media { position: relative; aspect-ratio: 1 / 1; background: #f7f9fc; overflow: hidden; }
.pc-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.product-card:hover .pc-media img { transform: scale(1.05); }
.pc-tag {
  position: absolute; left: 10px; top: 10px; z-index: 2;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: 6px; letter-spacing: .5px;
}
.pc-tag.dark { background: var(--ink-2); }
.pc-body { padding: 12px 14px 14px; display: flex; flex-direction: column; flex: 1; }
.pc-brand { font-size: 11px; color: var(--muted); letter-spacing: .5px; margin-bottom: 2px; }
.pc-name {
  font-size: 14px; line-height: 1.45; color: #1b2836; font-weight: 500;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 40px;
}
.pc-fit { font-size: 11px; color: #97a4b3; margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.price { color: var(--accent); font-weight: 700; line-height: 1; }
.price .cur { font-size: 12px; margin-right: 1px; }
.price .num { font-size: 20px; letter-spacing: -.5px; }
.price-old { font-size: 11px; color: #a9b4c1; text-decoration: line-through; margin-left: 5px; font-weight: 400; }
.pc-sales { font-size: 11px; color: #9aa7b6; white-space: nowrap; }
.pc-add {
  width: 34px; height: 34px; border-radius: 50%; border: 0; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent-dark); display: grid; place-items: center;
  transition: .2s;
}
.pc-add:hover { background: var(--accent); color: #fff; }
.pc-add svg { width: 17px; height: 17px; }

/* ---------- 促销双栏 ---------- */
.promo-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 14px; }
.promo {
  position: relative; border-radius: var(--radius); overflow: hidden; min-height: 170px;
  display: flex; align-items: center; padding: 26px; color: #fff;
  background: linear-gradient(120deg, #10243a, #1e4267);
}
.promo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.promo .promo-copy { position: relative; z-index: 2; max-width: 70%; }
.promo h3 { font-size: 22px; letter-spacing: 1px; }
.promo p { font-size: 12px; color: rgba(255, 255, 255, .75); margin-top: 6px; }
.promo .promo-btn {
  display: inline-block; margin-top: 14px; background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .3); padding: 6px 16px; border-radius: 999px; font-size: 12px;
  backdrop-filter: blur(4px);
}
.promo.orange { background: linear-gradient(120deg, #ff6a13, #ffa14c); }
.promo.orange img { opacity: .22; }

/* ---------- 服务保障 ---------- */
.service-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 30px; }
.service-cell {
  background: #fff; border-radius: var(--radius); padding: 20px; display: flex; gap: 14px;
  box-shadow: var(--shadow-sm); border: 1px solid #eef2f7;
}
.service-cell .ico {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-dark);
}
.service-cell .ico svg { width: 22px; height: 22px; }
.service-cell b { display: block; font-size: 14px; }
.service-cell small { color: var(--muted); font-size: 12px; line-height: 1.5; display: block; margin-top: 2px; }

/* ---------- 品牌条 ---------- */
.brand-strip {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #fff; border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow-sm);
}
.brand-strip .label { font-size: 12px; color: var(--muted); letter-spacing: 2px; margin-right: 6px; }
.brand-chip {
  font-size: 13px; font-weight: 600; letter-spacing: 1px; color: #3d4d61;
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 14px; transition: .18s;
}
.brand-chip:hover { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-soft); }

/* ---------- 面包屑 ---------- */
.crumb { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); padding: 16px 0 12px; flex-wrap: wrap; }
.crumb a:hover { color: var(--accent); }
.crumb .sep { color: #c3cdd9; }

/* ---------- 页头标题 ---------- */
.page-hero {
  background: linear-gradient(120deg, #0d1e31, #1c3f63);
  border-radius: 18px; padding: 28px 26px; color: #fff; position: relative; overflow: hidden;
}
.page-hero::after {
  content: ""; position: absolute; right: -40px; top: -60px; width: 220px; height: 220px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255, 106, 19, .35), transparent 68%);
}
.page-hero h1 { font-size: 24px; letter-spacing: 1px; }
.page-hero p { color: rgba(255, 255, 255, .68); font-size: 13px; margin-top: 6px; max-width: 640px; }

/* ---------- 商品中心布局 ---------- */
.shop-layout { display: grid; grid-template-columns: 216px 1fr; gap: 18px; margin-top: 4px; align-items: start; }
.filter-panel {
  background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm);
  position: sticky; top: calc(var(--header-h) + 58px);
}
.filter-panel h4 { font-size: 13px; color: var(--muted); letter-spacing: 1px; margin: 4px 0 10px; }
.filter-panel h4:not(:first-child) { margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--line); }
.filter-list a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; border-radius: 8px; font-size: 13px; color: #3c4b5f;
}
.filter-list a:hover { background: #f6f8fc; color: var(--accent-dark); }
.filter-list a.active { background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; }
.filter-list a i { font-style: normal; font-size: 11px; color: #a6b2c0; }
.filter-toggle { display: none; }
.filter-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-tags a {
  font-size: 12px; padding: 5px 11px; border-radius: 999px; background: #f4f6fa; color: #55657a;
}
.filter-tags a.on { background: var(--ink-2); color: #fff; }

.shop-toolbar {
  background: #fff; border-radius: var(--radius); padding: 10px 14px; box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px;
}
.sort-group { display: flex; gap: 4px; }
.sort-group button {
  border: 0; background: transparent; padding: 7px 12px; border-radius: 8px;
  font-size: 13px; color: #4a5a6e;
}
.sort-group button.on { background: var(--ink-2); color: #fff; font-weight: 600; }
.toolbar-count { font-size: 12px; color: var(--muted); margin-left: auto; }
.toolbar-search { display: flex; align-items: center; gap: 6px; background: #f4f6fa; border-radius: 999px; padding: 4px 4px 4px 12px; }
.toolbar-search input { border: 0; background: transparent; outline: none; height: 30px; width: 170px; }
.toolbar-search button { border: 0; background: var(--ink-2); color: #fff; border-radius: 999px; height: 30px; padding: 0 14px; font-size: 12px; }

.empty-state { background: #fff; border-radius: var(--radius); padding: 64px 20px; text-align: center; box-shadow: var(--shadow-sm); }
.empty-state svg { width: 64px; height: 64px; color: #c9d4e1; margin: 0 auto 14px; }
.empty-state p { color: var(--muted); font-size: 14px; }

/* ---------- 商品详情 ---------- */
.detail-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.gallery-main { border-radius: 14px; overflow: hidden; background: #f7f9fc; aspect-ratio: 1 / 1; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; }
.gallery-thumbs button {
  width: 66px; height: 66px; border-radius: 10px; overflow: hidden; padding: 0;
  border: 2px solid transparent; background: #f7f9fc;
}
.gallery-thumbs button.on { border-color: var(--accent); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.detail-info h1 { font-size: 22px; line-height: 1.4; letter-spacing: .3px; }
.detail-sub { color: var(--muted); font-size: 13px; margin-top: 6px; }
.price-box {
  margin-top: 16px; background: linear-gradient(100deg, #fff5ee, #fffaf6);
  border: 1px solid #ffe1cd; border-radius: 12px; padding: 14px 16px;
}
.price-box .base { font-size: 13px; color: #8a6a56; }
.price-box .price .num { font-size: 32px; }
.price-box .meta { display: flex; gap: 18px; font-size: 12px; color: #96a3b2; margin-top: 6px; }
.promo-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.promo-tags span {
  font-size: 12px; color: var(--accent-dark); background: var(--accent-soft);
  border: 1px solid #ffd9c2; border-radius: 6px; padding: 3px 9px;
}
.spec-list { margin-top: 16px; border-top: 1px dashed var(--line); }
.spec-row { display: flex; gap: 14px; padding: 9px 0; font-size: 13px; border-bottom: 1px dashed #f0f4f8; }
.spec-row dt { width: 76px; color: var(--muted); flex-shrink: 0; }
.spec-row dd { margin: 0; color: #2c3b4d; }
.qty-row { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.qty-row .label { font-size: 13px; color: var(--muted); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.stepper button { width: 34px; height: 34px; border: 0; background: #f7f9fc; color: #46586d; font-size: 16px; }
.stepper button:hover { background: #eef2f8; }
.stepper input { width: 52px; height: 34px; border: 0; text-align: center; outline: none; font-size: 14px; }
.stock-tip { font-size: 12px; color: var(--muted); }
.buy-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.btn {
  border: 0; border-radius: 10px; padding: 13px 22px; font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: .2s;
}
.btn-lg { padding: 15px 30px; font-size: 15px; border-radius: 12px; }
.btn-primary { background: linear-gradient(135deg, var(--accent), #ff8f42); color: #fff; box-shadow: 0 8px 18px rgba(255, 106, 19, .28); }
.btn-primary:hover { filter: brightness(1.04); transform: translateY(-1px); }
.btn-dark { background: var(--ink-2); color: #fff; }
.btn-dark:hover { background: var(--ink-3); }
.btn-ghost { background: #fff; color: #33455b; border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-dark); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none !important; }
.btn svg { width: 18px; height: 18px; }
.assure-line { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 16px; font-size: 12px; color: #8391a2; }
.assure-line span { display: inline-flex; align-items: center; gap: 4px; }
.assure-line svg { width: 14px; height: 14px; color: var(--green); }

.detail-body { background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); margin-top: 18px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs button {
  border: 0; background: transparent; padding: 10px 16px; font-size: 14px; color: #5a6a7e;
  position: relative; font-weight: 500;
}
.tabs button.on { color: var(--accent-dark); font-weight: 700; }
.tabs button.on::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px; }
.tab-panel { font-size: 14px; color: #46586c; line-height: 1.9; }
.tab-panel h3 { font-size: 15px; color: #1c2a3a; margin: 18px 0 8px; }
.tab-panel > h3:first-child { margin-top: 0; }
.tab-panel ul { padding-left: 0; }
.tab-panel li { position: relative; padding-left: 16px; margin-bottom: 6px; }
.tab-panel li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.fit-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.fit-table th, .fit-table td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.fit-table th { background: #f7f9fc; color: #4a5a6e; font-weight: 600; }
.fit-table tr:nth-child(even) td { background: #fbfcfe; }

/* ---------- 购物车 ---------- */
.cart-wrap { display: grid; grid-template-columns: 1fr 320px; gap: 18px; align-items: start; }
.cart-panel, .summary-panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.cart-panel { overflow: hidden; }
.cart-head {
  display: grid; grid-template-columns: 40px 1fr 120px 130px 100px; gap: 10px;
  padding: 14px 18px; background: #f7f9fc; font-size: 12px; color: var(--muted); letter-spacing: .5px;
}
.cart-row {
  display: grid; grid-template-columns: 40px 1fr 120px 130px 100px; gap: 10px; align-items: center;
  padding: 16px 18px; border-top: 1px solid #f1f4f9;
}
.cart-row:first-of-type { border-top: 0; }
.cart-check {
  width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid #c8d3e0; appearance: none;
  background: #fff; cursor: pointer; position: relative; flex-shrink: 0;
}
.cart-check:checked { background: var(--accent); border-color: var(--accent); }
.cart-check:checked::after {
  content: ""; position: absolute; left: 5px; top: 1.5px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.cart-item { display: flex; gap: 12px; min-width: 0; }
.cart-item img { width: 76px; height: 76px; border-radius: 10px; object-fit: cover; background: #f7f9fc; flex-shrink: 0; }
.cart-item .ci-name { font-size: 14px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-item .ci-meta { font-size: 11px; color: var(--muted); margin-top: 4px; }
.cart-price { font-size: 14px; color: #33455b; }
.cart-sub { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.cart-sub .price { font-size: 15px; }
.cart-sub .price .cur { font-size: 11px; }
.cart-del { border: 0; background: transparent; color: #a3afbd; font-size: 12px; padding: 4px; }
.cart-del:hover { color: #e04444; }
.cart-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-top: 1px solid #f1f4f9; flex-wrap: wrap; }
.cart-foot .left { display: flex; align-items: center; gap: 14px; font-size: 13px; color: #55657a; }
.link-btn { border: 0; background: transparent; color: #55657a; font-size: 13px; padding: 0; }
.link-btn:hover { color: var(--accent); }
.summary-panel { padding: 18px; position: sticky; top: calc(var(--header-h) + 58px); }
.summary-panel h3 { font-size: 15px; margin-bottom: 14px; }
.sum-row { display: flex; justify-content: space-between; font-size: 13px; color: #55657a; padding: 6px 0; }
.sum-row.total { border-top: 1px dashed var(--line); margin-top: 10px; padding-top: 14px; font-size: 15px; color: #223244; align-items: baseline; }
.sum-row.total .price .num { font-size: 26px; }
.summary-panel .btn { margin-top: 14px; }
.sum-note { font-size: 11px; color: var(--muted); text-align: center; margin-top: 10px; line-height: 1.6; }

/* ---------- 结算 ---------- */
.steps { display: flex; align-items: center; gap: 8px; justify-content: center; margin: 6px 0 20px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #9aa7b6; }
.step .n {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: #e8edf4; color: #8b99aa; font-size: 12px; font-weight: 700;
}
.step.on { color: var(--ink); font-weight: 600; }
.step.on .n { background: var(--accent); color: #fff; }
.step.done .n { background: var(--green); color: #fff; }
.step-line { width: 36px; height: 1px; background: #dbe3ed; }

.checkout-grid { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 20px; }
.card + .card { margin-top: 14px; }
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.card-title .idx {
  width: 20px; height: 20px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-dark);
  font-size: 11px; display: grid; place-items: center;
}
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: #64748b; margin-bottom: 6px; }
.field label .req { color: #e04444; margin-left: 2px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid #dfe6ef; border-radius: 10px; padding: 11px 13px;
  outline: none; background: #fbfcfe; transition: .18s; color: var(--text);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(255, 106, 19, .1);
}
.field textarea { resize: vertical; min-height: 84px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row.three { grid-template-columns: 1fr 1fr 1fr; }
.field .err { color: #e04444; font-size: 11px; margin-top: 4px; display: none; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #f0a6a6; background: #fff7f7; }
.field.invalid .err { display: block; }

.opt-list { display: grid; gap: 10px; }
.opt {
  display: flex; align-items: center; gap: 10px; border: 1px solid #e2e9f2; border-radius: 10px;
  padding: 12px 14px; cursor: pointer; transition: .18s; font-size: 13px; background: #fbfcfe;
}
.opt:hover { border-color: #ffcdb9; }
.opt.on { border-color: var(--accent); background: #fff7f2; box-shadow: 0 0 0 3px rgba(255, 106, 19, .08); }
.opt input { accent-color: var(--accent); width: 16px; height: 16px; }
.opt .opt-main { flex: 1; }
.opt .opt-main b { display: block; font-weight: 600; color: #223244; }
.opt .opt-main small { color: var(--muted); font-size: 12px; }
.opt .opt-price { color: var(--accent); font-weight: 700; font-size: 13px; }

.mini-list { border-top: 1px dashed var(--line); margin-top: 14px; padding-top: 12px; }
.mini-item { display: flex; gap: 10px; padding: 8px 0; align-items: center; }
.mini-item img { width: 54px; height: 54px; border-radius: 8px; object-fit: cover; background: #f7f9fc; }
.mini-item .mi-name { flex: 1; font-size: 13px; line-height: 1.4; }
.mini-item .mi-qty { font-size: 12px; color: var(--muted); }
.mini-item .mi-price { font-size: 13px; font-weight: 600; }

/* ---------- 支付 ---------- */
.pay-wrap { max-width: 720px; margin: 0 auto; }
.pay-card { background: #fff; border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.pay-head {
  background: linear-gradient(120deg, #0d1e31, #1d4066); color: #fff; padding: 26px 24px; text-align: center;
  position: relative; overflow: hidden;
}
.pay-head::after { content: ""; position: absolute; right: -50px; bottom: -70px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 106, 19, .4), transparent 70%); }
.pay-head .label { font-size: 12px; color: rgba(255, 255, 255, .65); letter-spacing: 2px; }
.pay-amount { font-size: 38px; font-weight: 700; letter-spacing: -1px; margin-top: 4px; }
.pay-amount .cur { font-size: 18px; margin-right: 3px; font-weight: 500; }
.pay-countdown { margin-top: 8px; font-size: 12px; color: var(--gold); }
.pay-body { padding: 22px 24px 26px; }
.pay-tabs { display: flex; gap: 10px; margin-bottom: 18px; }
.pay-tab {
  flex: 1; border: 1px solid #e2e9f2; background: #fbfcfe; border-radius: 10px; padding: 12px 8px;
  font-size: 13px; color: #4a5a6e; display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.pay-tab b { font-weight: 600; }
.pay-tab.on { border-color: var(--accent); background: #fff7f2; color: var(--accent-dark); box-shadow: 0 0 0 3px rgba(255, 106, 19, .08); }
.pay-tab svg { width: 24px; height: 24px; }
.pay-main { display: grid; grid-template-columns: 200px 1fr; gap: 22px; align-items: center; }
.pay-channel {
  width: 200px; height: 200px; border: 1px solid var(--line); border-radius: 14px; padding: 18px;
  background: #f7f9fc; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; text-align: center; margin: 0 auto;
}
.pay-channel svg { width: 46px; height: 46px; color: var(--accent); }
.pay-channel b { font-size: 14px; color: #223244; }
.pay-channel span { font-size: 11px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }
.pay-instructions h4 { font-size: 15px; margin-bottom: 8px; }
.pay-instructions p { font-size: 13px; color: var(--muted); line-height: 1.8; }
.pay-instructions .bank { margin-top: 12px; background: #f7f9fc; border-radius: 10px; padding: 12px 14px; font-size: 12px; color: #4a5a6e; line-height: 1.9; }
.pay-instructions .bank b { color: #223244; }
.pay-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.pay-actions .btn { flex: 1; min-width: 160px; }
.pay-tip { font-size: 11px; color: #9aa7b6; text-align: center; margin-top: 14px; line-height: 1.7; }

/* ---------- 订单成功 ---------- */
.result-wrap { max-width: 760px; margin: 0 auto; }
.result-head { text-align: center; padding: 35px 20px 26px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.result-icon {
  width: 66px; height: 66px; border-radius: 50%; margin: 0 auto 14px;
  background: #e8f8f1; color: var(--green); display: grid; place-items: center;
}
.result-icon svg { width: 34px; height: 34px; }
.result-head h2 { font-size: 22px; }
.result-head p { color: var(--muted); font-size: 13px; margin-top: 6px; }
.result-head .amount { color: var(--accent); font-weight: 700; font-size: 20px; margin-top: 8px; }
.result-actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.order-card { margin-top: 14px; }
.order-line { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; font-size: 13px; color: #4a5a6e; border-bottom: 1px dashed #f0f4f8; }
.order-line:last-child { border-bottom: 0; }
.order-line .k { color: var(--muted); flex-shrink: 0; }
.order-line .v { text-align: right; color: #223244; }
.order-status { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 20px; background: #e8f8f1; color: var(--green); }
.order-status.unpaid { background: #fff4e5; color: #b26b00; }

/* ---------- 内容页 ---------- */
.about-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; align-items: start; }
.reader { max-width: 880px; margin: 0 auto; }
.prose h3 { font-size: 17px; margin: 22px 0 10px; }
.prose h3:first-child { margin-top: 0; }
.prose p { font-size: 14px; color: #4b5c70; line-height: 1.95; margin-bottom: 10px; }
.prose ul, .prose ol { margin: 4px 0 12px; padding-left: 20px; }
.prose li { font-size: 14px; color: #4b5c70; line-height: 1.95; }
.prose h3[id] { scroll-margin-top: 90px; }
.prose .prose-meta { font-size: 12px; color: var(--muted); margin-bottom: 16px; }
.help-links { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.help-links a {
  font-size: 12px; color: #4a5a6e; background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 14px;
}
.help-links a:hover { color: var(--accent); border-color: var(--accent); }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 18px; }
.stat { background: #f7f9fc; border-radius: 12px; padding: 16px; }
.stat b { display: block; font-size: 24px; color: var(--accent); letter-spacing: -.5px; }
.stat small { font-size: 12px; color: var(--muted); }
.timeline { border-left: 2px solid #e9eef6; padding-left: 18px; margin-top: 8px; }
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item::before {
  content: ""; position: absolute; left: -25px; top: 4px; width: 10px; height: 10px;
  border-radius: 50%; background: #fff; border: 2px solid var(--accent);
}
.tl-item b { font-size: 14px; color: var(--accent-dark); }
.tl-item p { font-size: 13px; color: #5a6a7e; margin-top: 3px; }
.cert-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cert { background: #f7f9fc; border-radius: 10px; padding: 18px 10px; text-align: center; font-size: 12px; color: #55657a; }
.cert svg { width: 28px; height: 28px; color: var(--accent); margin: 0 auto 8px; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.contact-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px dashed var(--line); }
.contact-item:last-child { border-bottom: 0; }
.contact-item .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-dark); display: grid; place-items: center; flex-shrink: 0; }
.contact-item .ico svg { width: 20px; height: 20px; }
.contact-item b { display: block; font-size: 14px; margin-bottom: 3px; }
.contact-item p { font-size: 13px; color: #55657a; line-height: 1.7; }
.map-box { height: 240px; border-radius: 14px; background: #eef2f8; display: grid; place-items: center; color: var(--muted); font-size: 13px; position: relative; overflow: hidden; }
.map-box::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(#dde5ef 1px, transparent 1px), linear-gradient(90deg, #dde5ef 1px, transparent 1px);
  background-size: 36px 36px;
}
.map-pin { position: relative; z-index: 2; text-align: center; }
.map-pin svg { width: 34px; height: 34px; color: var(--accent); margin: 0 auto 6px; }
.form-tip { font-size: 11px; color: var(--muted); margin-top: 8px; }
.notice { background: #fff9f2; border: 1px solid #ffe3cd; color: #8a5a33; border-radius: 10px; padding: 12px 14px; font-size: 12px; line-height: 1.8; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, .62); margin-top: 40px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 26px; padding: 34px 16px 26px; }
.footer-brand .brand-text strong { color: #fff; }
.footer-brand .brand-text small { color: rgba(255, 255, 255, .45); }
.footer-brand p { font-size: 12px; line-height: 1.9; margin-top: 12px; max-width: 300px; }
.footer-col h4 { font-size: 13px; color: #fff; margin-bottom: 12px; letter-spacing: 1px; }
.footer-col a, .footer-col p { display: block; font-size: 12px; line-height: 2; color: rgba(255, 255, 255, .6); }
.footer-col a:hover { color: var(--accent); }
.footer-tel { font-size: 20px; font-weight: 700; color: #fff; letter-spacing: .5px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .09); padding: 16px 16px 24px;
  font-size: 12px; color: rgba(255, 255, 255, .45); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.footer-bottom a:hover { color: #fff; }
.footer-bottom .icp { display: inline-flex; align-items: center; gap: 6px; }
.footer-bottom .icp svg { width: 14px; height: 14px; }

/* ---------- 移动端底部导航 ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  display: none; background: rgba(255, 255, 255, .97); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.tabbar-inner { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 520px; margin: 0 auto; }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; font-size: 10px; color: #8b99aa; position: relative; }
.tabbar svg { width: 21px; height: 21px; }
.tabbar a.active { color: var(--accent); }
.tabbar .tab-badge {
  position: absolute; top: 4px; left: 50%; margin-left: 6px;
  min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px;
  background: var(--accent); color: #fff; font-size: 10px; line-height: 15px; text-align: center;
}
.tabbar .tab-badge.zero { display: none; }

/* ---------- 提示条 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px);
  background: rgba(17, 30, 45, .94); color: #fff; padding: 11px 20px; border-radius: 999px;
  font-size: 13px; z-index: 200; opacity: 0; pointer-events: none; transition: .28s;
  max-width: 88vw; text-align: center; box-shadow: 0 12px 30px rgba(0, 0, 0, .22);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .shop-layout { grid-template-columns: 190px 1fr; }
  .footer-top { grid-template-columns: 1.3fr 1fr 1fr; }
  .footer-col:last-child { display: none; }
}

@media (max-width: 900px) {
  :root { --header-h: 58px; }
  body { padding-bottom: 64px; }
  .topbar { display: none; }
  .header-main { gap: 12px; }
  .brand-text small { display: none; }
  .brand-text strong { font-size: 15px; }
  .header-actions .cart-link span.cart-text { display: none; }
  .cart-link { padding: 0 12px; }
  .search { display: none; }
  .main-nav { display: none; }
  .tabbar { display: block; }
  .hero-slide { aspect-ratio: 16 / 10; }
  .hero-copy { left: 18px; max-width: 74%; }
  .hero-copy p { display: none; }
  .hero-dots { left: 18px; }
  .hero-arrow { display: none; }
  .quick-bar { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .promo-grid { grid-template-columns: 1fr; }
  .service-row { grid-template-columns: repeat(2, 1fr); }
  .detail-top { grid-template-columns: 1fr; padding: 16px; gap: 18px; }
  .detail-info h1 { font-size: 18px; }
  .cart-wrap { grid-template-columns: 1fr; }
  .cart-head { display: none; }
  .cart-row {
    grid-template-columns: 28px 1fr auto; gap: 8px 10px; padding: 14px;
    align-items: start; position: relative;
    grid-template-areas: "chk item item" "chk qty sub";
  }
  .cart-row > label:first-child { grid-area: chk; margin-top: 3px; }
  .cart-item { grid-area: item; }
  .cart-item img { width: 66px; height: 66px; }
  .cart-unit { display: none; }
  .cart-row .stepper { grid-area: qty; justify-self: start; }
  .cart-sub { grid-area: sub; justify-self: end; }
  .cart-del { padding: 0; font-size: 11px; }
  .summary-panel { position: static; }
  .checkout-grid { grid-template-columns: 1fr; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .field-row.three { grid-template-columns: 1fr 1fr; }
  .pay-main { grid-template-columns: 1fr; }
  .pay-channel { width: 100%; height: auto; padding: 20px; }
  .pay-instructions { text-align: center; }
  .pay-instructions .bank { text-align: left; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 20px; padding: 26px 16px 20px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-col:last-child { display: block; }
  .shop-layout { grid-template-columns: 1fr; }
  .filter-panel { position: static; display: none; }
  .filter-panel.mobile-open { display: block; }
  .filter-toggle { display: inline-flex !important; }
  .toolbar-search { order: 3; width: 100%; }
  .toolbar-search input { flex: 1; width: auto; }
  .section { margin-top: 24px; }
  .section-title h2 { font-size: 18px; }
  .section-title span { display: none; }
  .cert-grid { grid-template-columns: 1fr 1fr; }
  .page-hero { padding: 22px 18px; }
  .page-hero h1 { font-size: 20px; }
  .detail-body { padding: 16px; }
  .pay-head { padding: 22px 16px; }
  .pay-amount { font-size: 32px; }
  .toast { bottom: 78px; }
}

@media (max-width: 420px) {
  .cat-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .cat-tile { padding: 13px 4px 10px; }
  .cat-icon { width: 38px; height: 38px; border-radius: 11px; }
  .cat-icon svg { width: 20px; height: 20px; }
  .cat-tile span { font-size: 12px; }
  .cat-tile small { display: none; }
  .quick-item small { display: none; }
  .product-grid { gap: 9px; }
  .pc-body { padding: 10px 11px 12px; }
  .pc-name { font-size: 13px; min-height: 38px; }
  .price .num { font-size: 18px; }
}

/* ---------- 动效 ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
