/* ==========================================================================
   澎启集采 · 设计系统
   风格参考：小米商城 —— 白底、大量留白、橙色点缀、商品图居中、卡片轻阴影
   ========================================================================== */

:root {
  --brand: #ff5a00;
  --brand-dark: #e14f00;
  --brand-soft: #fff2ec;
  --ink: #1a1a1a;
  --ink-2: #3d3d3d;
  --ink-3: #6b6b6b;
  --muted: #9a9a9a;
  --line: #e8e8e8;
  --line-2: #f0f0f0;
  --bg: #f5f5f5;
  --card: #ffffff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-1: 0 2px 8px rgba(0, 0, 0, .04);
  --shadow-2: 0 10px 30px rgba(0, 0, 0, .10);
  --max: 1226px;
  --nav-h: 84px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* ------------------------------------------------------------ 顶部工具条 */
.topbar {
  background: #fafafa;
  border-bottom: 1px solid var(--line-2);
  font-size: 12px;
  color: var(--ink-3);
}
.topbar .wrap { display: flex; align-items: center; height: 36px; gap: 18px; }
.topbar .spacer { flex: 1; }
.topbar a { color: var(--ink-3); transition: color .15s; }
.topbar a:hover { color: var(--brand); }
.topbar .sep { width: 1px; height: 12px; background: var(--line); }

/* ------------------------------------------------------------ 主导航 */
.header { background: #fff; position: sticky; top: 0; z-index: 60; box-shadow: 0 1px 0 rgba(0,0,0,.04); }
.header .wrap { display: flex; align-items: center; height: var(--nav-h); gap: 26px; }

.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-mark {
  width: 40px; height: 40px; border-radius: 11px;
  background: linear-gradient(135deg, #ff7a2f, #ff4d00);
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 6px 14px rgba(255, 90, 0, .28);
}
.logo-mark svg { width: 22px; height: 22px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text b { font-size: 18px; letter-spacing: .5px; }
.logo-text span { font-size: 10px; color: var(--muted); letter-spacing: 1.6px; text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav > a, .nav > .nav-item > a {
  display: block; padding: 0 14px; height: 40px; line-height: 40px;
  font-size: 15px; color: var(--ink-2); border-radius: 6px; transition: color .15s;
}
.nav > a:hover, .nav > .nav-item > a:hover { color: var(--brand); }
.nav > a.active { color: var(--brand); font-weight: 600; }

.header-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }

.search {
  position: relative; display: flex; align-items: center;
  width: 300px; height: 42px; border: 1px solid var(--line);
  border-radius: 21px; background: #fff; transition: border-color .18s, box-shadow .18s;
}
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255, 90, 0, .10); }
.search input {
  flex: 1; border: 0; outline: 0; background: transparent;
  padding: 0 6px 0 18px; font-size: 13.5px;
}
.search input::placeholder { color: #b5b5b5; }
.search button {
  width: 44px; height: 34px; margin-right: 4px; border: 0; border-radius: 17px;
  background: var(--brand); color: #fff; display: grid; place-items: center;
  transition: background .15s;
}
.search button:hover { background: var(--brand-dark); }
.search button svg { width: 17px; height: 17px; }

.hot-words { position: absolute; top: 46px; left: 18px; font-size: 11.5px; color: var(--muted); }

.cart-btn {
  position: relative; display: flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 21px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  font-size: 13.5px; transition: all .16s;
}
.cart-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.cart-btn svg { width: 18px; height: 18px; }
.cart-badge {
  position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px;
  padding: 0 5px; border-radius: 10px; background: var(--brand); color: #fff;
  font-size: 11px; line-height: 19px; text-align: center; font-weight: 600;
  box-shadow: 0 2px 6px rgba(255, 90, 0, .35);
}

.user-link { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.user-link svg { width: 17px; height: 17px; }
.user-link:hover { color: var(--brand); }

.burger { display: none; width: 40px; height: 40px; border: 0; background: none; border-radius: 8px; }
.burger svg { width: 22px; height: 22px; }

/* ------------------------------------------------------------ 首页布局 */
.hero { padding-top: 22px; }
.hero-grid { display: grid; grid-template-columns: 228px 1fr; gap: 16px; align-items: start; }

.cat-panel {
  background: #fff; border-radius: var(--radius); padding: 10px 0;
  box-shadow: var(--shadow-1);
}
.cat-item { position: relative; }
.cat-item > a {
  display: flex; align-items: center; gap: 11px; padding: 10px 18px;
  font-size: 14px; color: var(--ink-2); transition: all .15s;
}
.cat-item > a svg { width: 19px; height: 19px; flex-shrink: 0; color: var(--ink-3); transition: color .15s; }
.cat-item > a .arrow { margin-left: auto; opacity: .45; width: 13px; height: 13px; }
.cat-item:hover > a { background: var(--brand-soft); color: var(--brand); }
.cat-item:hover > a svg { color: var(--brand); }

.cat-flyout {
  position: absolute; left: 100%; top: 0; z-index: 40;
  min-width: 520px; padding: 18px 22px; background: #fff;
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  box-shadow: var(--shadow-2); display: none;
}
.cat-item:hover .cat-flyout { display: block; }
.flyout-row { display: flex; gap: 14px; padding: 7px 0; }
.flyout-row b { width: 68px; flex-shrink: 0; font-size: 13px; color: var(--ink); }
.flyout-row .links { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.flyout-row a { font-size: 13px; color: var(--ink-3); }
.flyout-row a:hover { color: var(--brand); }

/* ------------------------------------------------------------ 轮播 */
.banner {
  position: relative; border-radius: var(--radius); overflow: hidden;
  height: 400px; background: #eef1f6; box-shadow: var(--shadow-1);
}
.banner-track { display: flex; height: 100%; transition: transform .55s cubic-bezier(.4, 0, .2, 1); }
.slide {
  flex: 0 0 100%; height: 100%; position: relative;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 64px; color: #fff; overflow: hidden;
}
.slide.tone-blue   { background: linear-gradient(115deg, #1e3a8a 0%, #2563eb 46%, #60a5fa 100%); }
.slide.tone-violet { background: linear-gradient(115deg, #4c1d95 0%, #7c3aed 46%, #c4b5fd 100%); }
.slide.tone-orange { background: linear-gradient(115deg, #9a3412 0%, #ea580c 46%, #fdba74 100%); }
.slide.tone-green  { background: linear-gradient(115deg, #064e3b 0%, #059669 46%, #6ee7b7 100%); }
.slide::after {
  content: ''; position: absolute; right: -80px; bottom: -120px;
  width: 420px; height: 420px; border-radius: 50%;
  background: rgba(255, 255, 255, .10);
}
.slide::before {
  content: ''; position: absolute; right: 120px; top: -100px;
  width: 260px; height: 260px; border-radius: 50%;
  background: rgba(255, 255, 255, .08);
}
.slide .tag {
  display: inline-flex; align-items: center; height: 26px; padding: 0 12px;
  border-radius: 13px; background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .3);
  font-size: 12px; letter-spacing: 1px; width: fit-content; backdrop-filter: blur(6px);
}
.slide h2 { margin: 16px 0 8px; font-size: 40px; line-height: 1.22; font-weight: 700; letter-spacing: -.5px; }
.slide p { margin: 0; font-size: 15px; opacity: .88; }
.slide .cta {
  margin-top: 26px; display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 24px; border-radius: 21px; background: #fff;
  color: #1a1a1a; font-weight: 600; font-size: 14px; width: fit-content;
  transition: transform .16s, box-shadow .16s;
}
.slide .cta:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0, 0, 0, .18); }

.banner-dots {
  position: absolute; bottom: 18px; left: 64px; display: flex; gap: 8px; z-index: 3;
}
.banner-dots button {
  width: 8px; height: 8px; padding: 0; border-radius: 4px; border: 0;
  background: rgba(255, 255, 255, .45); transition: all .2s;
}
.banner-dots button.on { width: 22px; background: #fff; }

.banner-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 40px; height: 62px; border: 0; border-radius: 6px;
  background: rgba(0, 0, 0, .20); color: #fff; display: grid; place-items: center;
  opacity: 0; transition: opacity .2s, background .2s;
}
.banner:hover .banner-arrow { opacity: 1; }
.banner-arrow:hover { background: rgba(0, 0, 0, .38); }
.banner-arrow.prev { left: 0; border-radius: 0 6px 6px 0; }
.banner-arrow.next { right: 0; border-radius: 6px 0 0 6px; }
.banner-arrow svg { width: 20px; height: 20px; }

/* ------------------------------------------------------------ 频道卡片 */
.channels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 16px; }
.channel-card {
  background: #fff; border-radius: var(--radius); padding: 20px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  box-shadow: var(--shadow-1); transition: transform .18s, box-shadow .18s;
  position: relative; overflow: hidden;
}
.channel-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.channel-card h3 { margin: 0 0 4px; font-size: 17px; font-weight: 600; }
.channel-card p { margin: 0; font-size: 12.5px; color: var(--muted); }
.channel-art { width: 62px; height: 62px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; }
.channel-art svg { width: 30px; height: 30px; }
.channel-card.tone-blue   .channel-art { background: #eef4ff; color: #2563eb; }
.channel-card.tone-slate  .channel-art { background: #f0f2f5; color: #475569; }
.channel-card.tone-violet .channel-art { background: #f5efff; color: #7c3aed; }
.channel-card.tone-orange .channel-art { background: #fff1e8; color: #ea580c; }

/* ------------------------------------------------------------ 区块标题 */
.section { margin-top: 42px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
.section-head h2 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -.3px; }
.section-head .sub { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.section-head .more { font-size: 13px; color: var(--ink-3); display: flex; align-items: center; gap: 4px; }
.section-head .more:hover { color: var(--brand); }
.section-head .more svg { width: 14px; height: 14px; }

/* ------------------------------------------------------------ 商品卡 */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.pcard {
  display: flex; flex-direction: column; background: #fff; border-radius: var(--radius);
  padding: 20px 16px 18px; transition: transform .18s, box-shadow .18s;
  position: relative; overflow: hidden;
}
.pcard:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0, 0, 0, .10); }
.pcard .thumb {
  width: 100%; aspect-ratio: 1 / 1; display: grid; place-items: center;
  margin-bottom: 14px; background: #fbfbfb; border-radius: 10px; overflow: hidden;
}
.pcard .thumb img { width: 86%; height: 86%; object-fit: contain; transition: transform .3s; }
.pcard:hover .thumb img { transform: scale(1.05); }
.pcard h3 {
  margin: 0 0 6px; font-size: 14px; font-weight: 500; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 40px;
}
.pcard .meta { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.pcard .row-end { margin-top: auto; display: flex; align-items: baseline; gap: 6px; }
.price { color: var(--brand); font-weight: 600; }
.price .cur { font-size: 12px; }
.price .num { font-size: 20px; letter-spacing: -.4px; }
.price .unit { font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 2px; }
.market { font-size: 12px; color: #b0b0b0; text-decoration: line-through; }

.badge {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px;
  border-radius: 4px; font-size: 11px; line-height: 1; letter-spacing: .3px;
  background: var(--brand-soft); color: var(--brand); border: 1px solid #ffd9c7;
}
.badge.gray { background: #f4f4f4; color: var(--ink-3); border-color: var(--line); }
.badge.dark { background: #1f2329; color: #fff; border-color: transparent; }
.badge.green { background: #eafaf1; color: #0f9d58; border-color: #c8ecd8; }
.badge.blue { background: #eef4ff; color: #2563eb; border-color: #d6e3ff; }

.tag-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; min-height: 20px; }

/* ------------------------------------------------------------ 品牌条 */
.brand-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.brand-tile {
  background: #fff; border-radius: var(--radius-sm); height: 84px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  transition: all .18s; border: 1px solid transparent;
}
.brand-tile:hover { border-color: #ffd0b8; box-shadow: var(--shadow-1); transform: translateY(-2px); }
.brand-tile b { font-size: 15px; letter-spacing: .3px; }
.brand-tile span { font-size: 11px; color: var(--muted); }

/* ------------------------------------------------------------ 服务承诺 */
.service-row {
  margin-top: 40px; background: #fff; border-radius: var(--radius);
  display: grid; grid-template-columns: repeat(4, 1fr); padding: 24px 8px;
}
.service-row .cell { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.service-row .cell svg { width: 22px; height: 22px; color: var(--brand); }

/* ------------------------------------------------------------ 页脚 */
.footer { background: #fff; margin-top: 56px; border-top: 1px solid var(--line); }
.footer-cols { display: grid; grid-template-columns: repeat(4, 1fr) 1.4fr; gap: 28px; padding: 44px 0 34px; }
.footer-cols h4 { margin: 0 0 14px; font-size: 14px; font-weight: 600; }
.footer-cols li { margin-bottom: 9px; }
.footer-cols a { font-size: 13px; color: var(--ink-3); }
.footer-cols a:hover { color: var(--brand); }
.footer-contact .tel { font-size: 22px; font-weight: 600; color: var(--ink); letter-spacing: .5px; }
.footer-contact p { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.8; }
.footer-bottom {
  border-top: 1px solid var(--line-2); padding: 18px 0 26px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: 12px; color: var(--muted);
}
.footer-bottom .spacer { flex: 1; }

/* ------------------------------------------------------------ 通用组件 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 22px; border-radius: 20px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); font-size: 14px; font-weight: 500;
  transition: all .16s; white-space: nowrap;
}
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn.dark { background: #1f2329; border-color: #1f2329; color: #fff; }
.btn.dark:hover { background: #000; color: #fff; }
.btn.lg { height: 48px; padding: 0 32px; border-radius: 24px; font-size: 15px; }
.btn.sm { height: 32px; padding: 0 14px; font-size: 12.5px; border-radius: 16px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.input, .select, .textarea {
  width: 100%; height: 42px; padding: 0 14px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: #fff; outline: 0;
  transition: border-color .16s, box-shadow .16s;
}
.textarea { height: auto; padding: 11px 14px; resize: vertical; min-height: 92px; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255, 90, 0, .10); }
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 7px; font-size: 13px; color: var(--ink-2); }
.field label .req { color: var(--brand); margin-left: 2px; }
.field .hint { margin-top: 6px; font-size: 11.5px; color: var(--muted); }

.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-1); }
.card-pad { padding: 24px; }

.breadcrumb { padding: 18px 0 4px; font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .sep { color: #ccc; }

.empty {
  padding: 80px 20px; text-align: center; color: var(--muted);
  background: #fff; border-radius: var(--radius);
}
.empty svg { width: 56px; height: 56px; color: #dcdcdc; margin-bottom: 14px; }
.empty h3 { margin: 0 0 6px; font-size: 16px; color: var(--ink-2); font-weight: 500; }
.empty p { margin: 0 0 20px; font-size: 13px; }

.toast {
  position: fixed; left: 50%; bottom: 60px; transform: translateX(-50%) translateY(20px);
  background: rgba(26, 26, 26, .94); color: #fff; padding: 12px 22px;
  border-radius: 24px; font-size: 13.5px; z-index: 999; opacity: 0;
  transition: opacity .22s, transform .22s; pointer-events: none; max-width: 84vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ------------------------------------------------------------ 列表页 */
.list-layout { display: grid; grid-template-columns: 210px 1fr; gap: 20px; margin-top: 16px; align-items: start; }
.filter-panel { background: #fff; border-radius: var(--radius); padding: 18px; position: sticky; top: calc(var(--nav-h) + 16px); }
.filter-panel h4 { margin: 0 0 10px; font-size: 13.5px; font-weight: 600; }
.filter-panel .grp + .grp { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line-2); }
.filter-panel a { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; color: var(--ink-3); }
.filter-panel a:hover { color: var(--brand); }
.filter-panel a.on { color: var(--brand); font-weight: 600; }
.filter-panel a span { color: var(--muted); font-size: 11.5px; }

.sortbar {
  display: flex; align-items: center; gap: 6px; background: #fff;
  border-radius: var(--radius); padding: 8px 12px; margin-bottom: 16px; font-size: 13px;
}
.sortbar button {
  height: 32px; padding: 0 14px; border: 0; border-radius: 16px; background: transparent;
  color: var(--ink-3); font-size: 13px; transition: all .15s;
}
.sortbar button:hover { color: var(--brand); }
.sortbar button.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.sortbar .count { margin-left: auto; color: var(--muted); font-size: 12.5px; }

.pager { display: flex; justify-content: center; gap: 8px; margin-top: 30px; }
.pager button {
  min-width: 38px; height: 38px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; font-size: 13px;
}
.pager button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager button:disabled { opacity: .4; cursor: not-allowed; }

/* ------------------------------------------------------------ 详情页 */
.detail { display: grid; grid-template-columns: 480px 1fr; gap: 40px; background: #fff; border-radius: var(--radius); padding: 30px; margin-top: 16px; }
.gallery-main { aspect-ratio: 1/1; background: #fbfbfb; border-radius: 10px; display: grid; place-items: center; overflow: hidden; }
.gallery-main img { width: 82%; height: 82%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; }
.gallery-thumbs button { width: 64px; height: 64px; border: 2px solid transparent; border-radius: 8px; background: #fbfbfb; padding: 4px; }
.gallery-thumbs button.on { border-color: var(--brand); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; }

.detail h1 { margin: 4px 0 10px; font-size: 24px; line-height: 1.4; font-weight: 600; }
.detail .sub { color: var(--ink-3); font-size: 14px; margin-bottom: 16px; }
.price-box { background: linear-gradient(180deg, #fff6f1, #fffaf7); border-radius: 10px; padding: 18px 20px; margin: 16px 0; }
.price-box .big { display: flex; align-items: baseline; gap: 8px; }
.price-box .big .num { font-size: 32px; font-weight: 700; color: var(--brand); letter-spacing: -.8px; }
.price-box .big .cur { font-size: 16px; color: var(--brand); font-weight: 600; }
.price-box .big .unit { font-size: 12px; color: var(--muted); }
.price-box .row { display: flex; gap: 24px; font-size: 12.5px; color: var(--ink-3); margin-top: 8px; }
.price-box .row b { color: var(--ink); }

.tier-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 10px; }
.tier-table th, .tier-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line-2); }
.tier-table th { color: var(--muted); font-weight: 400; background: #fcfcfc; }
.tier-table td { color: var(--ink-2); }
.tier-table td:last-child { color: var(--brand); font-weight: 600; }

.spec-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 6px 0 18px; }
.spec-chip { padding: 6px 14px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; color: var(--ink-3); background: #fff; }
.spec-chip.on { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; height: 42px; }
.qty button { width: 40px; height: 100%; border: 0; background: #fff; font-size: 17px; color: var(--ink-3); }
.qty button:hover { color: var(--brand); background: var(--brand-soft); }
.qty input { width: 64px; height: 100%; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; outline: 0; }

.buy-actions { display: flex; gap: 12px; margin-top: 24px; }
.buy-actions .btn { flex: 1; max-width: 200px; }

.merchant-card { display: flex; gap: 14px; align-items: center; padding: 16px; border: 1px solid var(--line-2); border-radius: 10px; margin-top: 22px; background: #fcfcfc; }
.merchant-card .avatar { width: 46px; height: 46px; border-radius: 10px; background: #1f2329; color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 15px; flex-shrink: 0; }
.merchant-card b { font-size: 14px; }
.merchant-card p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }

.detail-body { background: #fff; border-radius: var(--radius); margin-top: 20px; padding: 28px 30px; }
.detail-body h3 { margin: 0 0 14px; font-size: 16px; }
.detail-body .prose { font-size: 14px; color: var(--ink-2); line-height: 2; }
.detail-body .prose img { margin: 16px 0; border-radius: 10px; }

/* ------------------------------------------------------------ 采购车 / 结算 */
.cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 20px; margin-top: 16px; align-items: start; }
.cart-table { background: #fff; border-radius: var(--radius); overflow: hidden; }
.cart-head, .cart-line {
  display: grid; grid-template-columns: 40px 1fr 150px 130px 120px 60px;
  align-items: center; gap: 12px; padding: 14px 20px;
}
.cart-head { background: #fafafa; font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--line-2); }
.cart-line { border-bottom: 1px solid var(--line-2); }
.cart-line:last-child { border-bottom: 0; }
.cart-line .info { display: flex; gap: 12px; align-items: center; min-width: 0; }
.cart-line .info img { width: 62px; height: 62px; object-fit: contain; background: #fbfbfb; border-radius: 8px; flex-shrink: 0; }
.cart-line .info h4 { margin: 0 0 4px; font-size: 13.5px; font-weight: 500; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-line .info span { font-size: 11.5px; color: var(--muted); }
.cart-line .sub { color: var(--brand); font-weight: 600; font-size: 15px; }
.cart-del { border: 0; background: none; color: var(--muted); font-size: 12px; }
.cart-del:hover { color: var(--brand); }
.check { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; }

.summary { background: #fff; border-radius: var(--radius); padding: 22px; position: sticky; top: calc(var(--nav-h) + 16px); }
.summary h3 { margin: 0 0 16px; font-size: 15px; }
.summary .line { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-3); margin-bottom: 10px; }
.summary .total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; border-top: 1px solid var(--line-2); margin-top: 6px; }
.summary .total b { font-size: 26px; color: var(--brand); letter-spacing: -.5px; }
.summary .btn { margin-top: 18px; }

/* ------------------------------------------------------------ 表单页（入驻/登录/后台） */
.auth-wrap { min-height: calc(100vh - 300px); display: grid; place-items: center; padding: 48px 16px; }
.auth-card { width: 100%; max-width: 440px; background: #fff; border-radius: 16px; padding: 36px 34px; box-shadow: var(--shadow-1); }
.auth-card h1 { margin: 0 0 6px; font-size: 22px; font-weight: 600; }
.auth-card .lead { margin: 0 0 28px; font-size: 13px; color: var(--muted); }
.auth-card .foot { margin-top: 18px; font-size: 12.5px; color: var(--muted); text-align: center; }
.auth-card .foot a { color: var(--brand); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-error { background: #fff1f0; border: 1px solid #ffd6d2; color: #c0392b; padding: 10px 14px; border-radius: 8px; font-size: 12.5px; margin-bottom: 16px; display: none; }
.form-error.show { display: block; }

.form-card { background: #fff; border-radius: var(--radius); padding: 28px; margin-top: 18px; }
.form-card h2 { margin: 0 0 4px; font-size: 18px; }
.form-card .lead { margin: 0 0 24px; font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------ 后台（商家 / 平台） */
.console { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; background: var(--bg); }
.side { background: #fff; border-right: 1px solid var(--line); padding: 22px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.side .brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 22px; }
.side .brand b { font-size: 15px; }
.side .brand small { display: block; font-size: 10.5px; color: var(--muted); letter-spacing: 1px; }
.side nav a {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 8px;
  font-size: 13.5px; color: var(--ink-3); margin-bottom: 4px;
}
.side nav a svg { width: 17px; height: 17px; }
.side nav a:hover { background: #f7f7f7; color: var(--ink); }
.side nav a.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.side .side-foot { margin-top: auto; padding: 12px 6px 0; border-top: 1px solid var(--line-2); font-size: 12px; color: var(--muted); }
.side .side-foot button { border: 0; background: none; color: var(--ink-3); font-size: 12.5px; padding: 6px 8px; }
.side .side-foot button:hover { color: var(--brand); }

.main { padding: 24px 28px 60px; min-width: 0; }
.main-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 16px; flex-wrap: wrap; }
.main-head h1 { margin: 0; font-size: 21px; font-weight: 600; }
.main-head p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat { background: #fff; border-radius: 12px; padding: 18px 20px; }
.stat .k { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.stat .v { font-size: 26px; font-weight: 600; letter-spacing: -.5px; }
.stat .v small { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 4px; }

.table-wrap { background: #fff; border-radius: 12px; overflow: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 720px; }
table.data th, table.data td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.data th { background: #fafafa; font-weight: 500; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #fcfcfc; }
table.data .prod { display: flex; gap: 10px; align-items: center; min-width: 240px; }
table.data .prod img { width: 42px; height: 42px; object-fit: contain; background: #fbfbfb; border-radius: 6px; flex-shrink: 0; }
table.data .prod b { font-weight: 500; font-size: 13px; display: block; line-height: 1.4; }
table.data .prod span { font-size: 11.5px; color: var(--muted); }
table.data .ops { display: flex; gap: 8px; flex-wrap: wrap; }
.link-btn { border: 0; background: none; color: var(--brand); font-size: 12.5px; padding: 0; }
.link-btn:hover { text-decoration: underline; }
.link-btn.gray { color: var(--ink-3); }

.tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs button { height: 34px; padding: 0 16px; border-radius: 17px; border: 1px solid var(--line); background: #fff; font-size: 13px; color: var(--ink-3); }
.tabs button.on { background: #1f2329; border-color: #1f2329; color: #fff; }

.panel { background: #fff; border-radius: 12px; padding: 24px; }
.panel h3 { margin: 0 0 18px; font-size: 16px; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 200;
  display: none; place-items: center; padding: 20px;
}
.modal-mask.show { display: grid; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 560px; max-height: 86vh; overflow: auto; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line-2); }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-head button { border: 0; background: none; font-size: 20px; color: var(--muted); line-height: 1; }
.modal-body { padding: 22px 24px; }
.modal-foot { padding: 16px 24px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 10px; }

/* ------------------------------------------------------------ 响应式 */
@media (max-width: 1180px) {
  .header .wrap { gap: 16px; }
  .nav > a, .nav > .nav-item > a { padding: 0 9px; font-size: 14px; }
  .search { width: 220px; }
  .hero-grid { grid-template-columns: 200px 1fr; }
  .banner { height: 360px; }
  .slide h2 { font-size: 32px; }
}

@media (max-width: 980px) {
  .nav, .topbar .hide-sm { display: none; }
  .burger { display: grid; place-items: center; }
  .header .wrap { height: 64px; }
  .search { width: 180px; }
  .hero-grid { grid-template-columns: 1fr; }
  .cat-panel { display: none; }
  .channels { grid-template-columns: repeat(2, 1fr); }
  .grid-4, .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .brand-strip { grid-template-columns: repeat(3, 1fr); }
  .service-row { grid-template-columns: repeat(2, 1fr); gap: 16px 0; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 24px; }
  .detail { grid-template-columns: 1fr; gap: 24px; padding: 20px; }
  .list-layout { grid-template-columns: 1fr; }
  .filter-panel { position: static; }
  .cart-layout { grid-template-columns: 1fr; }
  .summary { position: static; }
  .cart-head { display: none; }
  .cart-line { grid-template-columns: 30px 1fr 90px; row-gap: 10px; }
  .cart-line .qty { grid-column: 2; }
  .console { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; align-items: center; overflow-x: auto; padding: 12px; }
  .side .brand { padding: 0 12px 0 4px; }
  .side nav { display: flex; gap: 4px; }
  .side nav a { white-space: nowrap; margin: 0; }
  .side .side-foot { margin: 0 0 0 auto; border: 0; padding: 0; display: flex; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .main { padding: 18px 16px 50px; }
}

@media (max-width: 640px) {
  .banner { height: 300px; }
  .slide { padding: 0 24px; }
  .slide h2 { font-size: 24px; }
  .slide p { font-size: 13px; }
  .slide .cta { height: 38px; padding: 0 18px; font-size: 13px; margin-top: 18px; }
  .banner-dots { left: 24px; bottom: 14px; }
  .grid-4, .grid-5, .grid-3 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pcard { padding: 14px 12px; }
  .pcard h3 { font-size: 13px; min-height: 38px; }
  .price .num { font-size: 17px; }
  .brand-strip { grid-template-columns: repeat(2, 1fr); }
  .channels { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .cart-line { grid-template-columns: 26px 1fr; }
  .cart-line .qty { grid-column: 2; }
  .stat-grid { grid-template-columns: 1fr; }
  .section-head h2 { font-size: 19px; }
  .auth-card { padding: 26px 20px; }
  .search { display: none; }
  .topbar { display: none; }
}
