/* ============================================================
 * CodeMart 源码超市 - 电商设计系统（参考主流中文电商版式）
 * 红色主调 · 大搜索框 · 三栏首页 · 密集商品网格 · 促销区块
 * ============================================================ */
:root {
  --red: #e1251b;
  --red-dark: #c81623;
  --red-bg: #fff5f4;
  --price: #e1251b;
  --orange: #ff6a00;
  --green: #00b26a;
  --blue: #2b6bd7;
  --ink: #111111;
  --ink-2: #555555;
  --ink-3: #999999;
  --line: #e8e8e8;
  --bg: #f4f4f4;
  --card: #ffffff;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.12);
  --maxw: 1200px;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Segoe UI", sans-serif;
  color: var(--ink); background: var(--bg); font-size: 13px; line-height: 1.6;
}
a { color: var(--ink-2); text-decoration: none; transition: color .15s; }
a:hover { color: var(--red); }
button { font-family: inherit; cursor: pointer; transition: all .15s; }
input, select, textarea { font-family: inherit; font-size: 13px; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 12px; }
.hide { display: none !important; }
.empty { text-align: center; color: var(--ink-3); padding: 60px 16px; font-size: 14px; }

/* ---------------- 顶部大促条 ---------------- */
.campaign { background: linear-gradient(90deg, #c81623 0%, #e1251b 45%, #ff6a3d 100%); color: #fff; }
.campaign .wrap { display: flex; align-items: center; justify-content: center; gap: 16px; height: 44px; position: relative; }
.campaign .ct { font-size: 15.5px; font-weight: 800; letter-spacing: 1px; }
.campaign .cs { font-size: 12.5px; opacity: .92; }
.campaign .cbtn { background: #fff; color: var(--red); font-size: 12.5px; font-weight: 700; padding: 5px 20px; border-radius: 99px; }
.campaign .cbtn:hover { opacity: .92; color: var(--red); }
.campaign .cx { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); cursor: pointer; opacity: .85; font-size: 16px; line-height: 1; }

/* ---------------- 顶部工具条 ---------------- */
.topbar { background: #fff; border-bottom: 1px solid #f0f0f0; font-size: 12px; color: #666; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; height: 32px; }
.topbar .tl span { margin-right: 14px; }
.topbar a { color: #666; margin: 0 7px; }
.topbar a:hover { color: var(--red); }
.topbar .reg { color: var(--red); }

/* ---------------- 头部：Logo + 大搜索 + 购物车 ---------------- */
.header { background: #fff; }
.header .wrap { display: flex; align-items: center; gap: 26px; padding: 16px 12px 12px; }
.logo { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.logo .mark { width: 42px; height: 42px; background: var(--red); border-radius: 9px; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 21px; font-weight: 800; }
.logo .lt b { display: block; font-size: 21px; color: var(--red); letter-spacing: -.5px; line-height: 1.15; font-weight: 800; }
.logo .lt span { font-size: 11.5px; color: var(--ink-3); letter-spacing: 2px; }
.hsearch { flex: 1; max-width: 640px; }
.hsearch .srow { display: flex; height: 40px; }
.hsearch select { width: 86px; border: 2px solid var(--red); border-right: none; border-radius: 0; padding: 0 8px; outline: none; color: var(--ink-2); background: #fff; appearance: auto; }
.hsearch input { flex: 1; border: 2px solid var(--red); border-right: none; padding: 0 12px; outline: none; font-size: 13.5px; }
.hsearch button { width: 96px; background: var(--red); color: #fff; border: none; font-size: 15px; font-weight: 700; letter-spacing: 4px; text-indent: 4px; }
.hsearch button:hover { background: var(--red-dark); }
.hotwords { margin-top: 5px; font-size: 12px; color: var(--ink-3); overflow: hidden; white-space: nowrap; }
.hotwords a { margin-right: 12px; }
.hcart { flex-shrink: 0; position: relative; display: flex; align-items: center; gap: 8px; width: 150px; height: 38px; border: 1px solid var(--line); background: #fff; font-size: 13px; color: var(--ink-2); padding: 0 14px; }
.hcart:hover { border-color: var(--red); color: var(--red); }
.hcart .cart-badge { position: absolute; top: -8px; left: 26px; background: var(--red); color: #fff; font-size: 11px; min-width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 9px; padding: 0 5px; font-weight: 700; }
.hcart svg { flex-shrink: 0; }
.menu-btn { display: none; }

/* ---------------- 主导航 ---------------- */
.mainnav { background: #fff; border-bottom: 2px solid var(--red); }
.mainnav .wrap { display: flex; align-items: stretch; }
.allcat { position: relative; }
.allcat > a { display: flex; align-items: center; width: 210px; height: 42px; background: var(--red); color: #fff; font-size: 14.5px; font-weight: 700; padding: 0 14px; gap: 10px; }
.allcat > a:hover { color: #fff; background: var(--red-dark); }
.allcat .burger { display: inline-block; width: 15px; height: 11px; border-top: 2px solid #fff; border-bottom: 2px solid #fff; position: relative; flex-shrink: 0; }
.allcat .burger:before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: #fff; margin-top: -1px; }
.allcat .drop { position: absolute; left: 0; top: 42px; width: 210px; background: #fff; border: 1px solid var(--line); border-top: none; box-shadow: var(--shadow-lg); z-index: 60; display: none; }
.allcat:hover .drop { display: block; }
.allcat .drop a { display: flex; align-items: center; gap: 9px; padding: 10px 14px; font-size: 13.5px; color: var(--ink); border-bottom: 1px solid #f5f5f5; }
.allcat .drop a:last-child { border-bottom: none; }
.allcat .drop a:hover { background: var(--red-bg); color: var(--red); }
.allcat .drop .ic { width: 26px; height: 26px; border-radius: 6px; color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.allcat .drop .arr { margin-left: auto; color: #ccc; }
.navlinks { display: flex; align-items: center; gap: 2px; padding-left: 14px; overflow: hidden; }
.navlinks a { display: flex; align-items: center; gap: 6px; padding: 0 15px; height: 42px; font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.navlinks a:hover { color: var(--red); }
.navlinks a.on { color: var(--red); }
.navlinks .ch-ic { width: 22px; height: 22px; border-radius: 6px; color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

/* ---------------- 首页三栏区（高度锁定，侧栏撑满） ---------------- */
.home-hero { display: flex; gap: 10px; margin-top: 10px; height: 360px; }
.catside { width: 230px; flex-shrink: 0; background: #fff; border-radius: var(--radius); padding: 6px 0; box-shadow: var(--shadow); height: 100%; overflow: hidden; }
.catside a { display: flex; align-items: center; gap: 7px; height: 43.5px; padding: 0 12px; font-size: 12.5px; color: var(--ink); white-space: nowrap; overflow: hidden; }
.catside a b { font-weight: 700; }
.catside a:hover { background: var(--red-bg); color: var(--red); }
.catside .gi { width: 18px; height: 18px; border: 1.5px solid #cfcfcf; border-radius: 5px; color: #9a9a9a; font-size: 9px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: #fff; }
.catside a:hover .gi { border-color: var(--red); color: var(--red); }
.catside .tx { overflow: hidden; text-overflow: ellipsis; }

.banner { flex: 1; min-width: 0; position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); height: 100%; }
.slides { position: relative; height: 100%; }
.slide { position: absolute; inset: 0; display: none; align-items: center; padding: 0 44px; color: #fff; }
.slide.on { display: flex; }
.slide .stx { flex: 1; position: relative; z-index: 2; }
.slide .stag { display: inline-block; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.35); padding: 3px 12px; border-radius: 99px; font-size: 12px; margin-bottom: 14px; }
.slide h3 { font-size: 30px; font-weight: 800; letter-spacing: 1px; line-height: 1.35; margin-bottom: 10px; }
.slide p { font-size: 14px; opacity: .85; margin-bottom: 20px; }
.slide .sbtn { display: inline-block; background: #fff; color: var(--red); font-size: 14px; font-weight: 700; padding: 9px 26px; border-radius: 99px; }
.slide .sbtn:hover { opacity: .92; }
.slide .smock { width: 300px; flex-shrink: 0; margin-left: 12px; filter: drop-shadow(0 16px 32px rgba(0,0,0,.35)); }
.bdots { position: absolute; left: 22px; bottom: 14px; display: flex; gap: 6px; z-index: 5; }
.bdots i { width: 15px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.5); cursor: pointer; transition: all .2s; }
.bdots i.on { width: 24px; background: #fff; }

.userside { width: 230px; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; height: 100%; overflow: hidden; }
.ucard { background: #fff; border-radius: var(--radius); padding: 11px 14px; box-shadow: var(--shadow); flex-shrink: 0; }
.ucard .uhi { display: flex; align-items: center; gap: 10px; }
.ucard .uava { width: 42px; height: 42px; border-radius: 50%; background: var(--red-bg); color: var(--red); display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 800; flex-shrink: 0; }
.ucard .uhi b { font-size: 14px; display: block; }
.ucard .uhi span { font-size: 11.5px; color: var(--ink-3); }
.ucard .ulink { margin-top: 10px; display: flex; gap: 8px; }
.ucard .ulink a { flex: 1; text-align: center; height: 32px; line-height: 30px; border-radius: 6px; font-size: 12.5px; font-weight: 700; border: 1px solid var(--red); color: var(--red); }
.ucard .ulink a.pri { background: var(--red); color: #fff; }
.ucard .ulink a.pri:hover { background: var(--red-dark); }
.ucard h5 { font-size: 13.5px; font-weight: 700; margin-bottom: 9px; display: flex; align-items: center; justify-content: space-between; }
.ucard h5 a { font-size: 11.5px; color: var(--ink-3); font-weight: 400; }
.svc-grid { display: flex; flex-direction: column; gap: 5px; }
.svc-grid a { display: flex; align-items: center; gap: 7px; padding: 6px 9px; background: #f7f7f7; border-radius: 6px; font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; }
.svc-grid a:hover { background: var(--red-bg); color: var(--red); }
.svc-grid .ic { width: 18px; height: 18px; border-radius: 4px; color: #fff; font-size: 9.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.svc-grid .sv { margin-left: auto; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; padding-left: 8px; }
.notice p { font-size: 12px; color: var(--ink-2); padding: 3px 0; border-bottom: 1px dashed #f0f0f0; }
.notice p:last-child { border-bottom: none; }
.notice p b { color: var(--red); font-weight: 700; margin-right: 5px; }

/* ---------------- 促销四宫格 ---------------- */
.promo-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.promo { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.promo .ph { display: flex; align-items: baseline; gap: 8px; padding: 13px 16px 9px; }
.promo .ph b { font-size: 16px; font-weight: 800; color: var(--red); }
.promo .ph.plain b { color: var(--ink); }
.promo .ph span { font-size: 11.5px; color: var(--ink-3); flex: 1; }
.promo .ph a { font-size: 11.5px; color: var(--ink-3); }
.promo .ph a:hover { color: var(--red); }
.promo .cd { color: var(--red); font-weight: 700; font-variant-numeric: tabular-nums; }
.promo .pb { display: flex; gap: 8px; padding: 4px 14px 14px; flex: 1; }
.promo .pitem { flex: 1; min-width: 0; }
.promo .pitem .pfig { height: 96px; background: #fafafa; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 6px; overflow: hidden; }
.promo .pitem .pfig svg { max-width: 100%; max-height: 100%; }
.promo .pitem .pn { margin-top: 6px; font-size: 12px; color: var(--ink-2); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.promo .pitem .pp { font-size: 15px; font-weight: 800; color: var(--red); }
.promo .pitem .pp s { font-size: 11px; color: var(--ink-3); font-weight: 400; margin-left: 5px; }
.promo .svc4 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 6px 14px 14px; flex: 1; }
.promo .svc4 a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: #f7f7f7; border-radius: 8px; padding: 12px 4px; font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.promo .svc4 a:hover { background: var(--red-bg); color: var(--red); }
.promo .svc4 .ic { width: 30px; height: 30px; border-radius: 8px; color: #fff; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.promo .svc4 small { font-size: 10.5px; color: var(--ink-3); font-weight: 400; }

/* ---------------- 推荐流 ---------------- */
.feed-head { display: flex; align-items: center; gap: 18px; margin: 22px 0 12px; flex-wrap: wrap; }
.feed-head h2 { font-size: 20px; font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.feed-head h2:before { content: ""; width: 4px; height: 18px; background: var(--red); border-radius: 2px; }
.feed-chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.feed-chips button { border: none; background: transparent; padding: 5px 13px; font-size: 13px; color: var(--ink-2); border-radius: 99px; }
.feed-chips button:hover { color: var(--red); }
.feed-chips button.on { background: var(--red); color: #fff; font-weight: 700; }
.feed { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.gcard { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: all .2s; display: flex; flex-direction: column; position: relative; }
.gcard:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.gcard .gfig { display: flex; align-items: center; justify-content: center; height: 168px; padding: 14px; background: linear-gradient(180deg, #fbfbfb, #f3f4f6); position: relative; overflow: hidden; }
.gcard .gfig svg { max-width: 100%; max-height: 100%; transition: transform .25s; }
.gcard:hover .gfig svg { transform: scale(1.04); }
.gcard .gbadge { position: absolute; left: 8px; top: 8px; font-size: 11px; color: #fff; padding: 2px 8px; border-radius: 4px; font-weight: 700; z-index: 2; }
.gcard .gbadge.hot { background: var(--red); }
.gcard .gbadge.new { background: var(--green); }
.gcard .gbadge.rec { background: var(--blue); }
.gcard .gbadge.top { background: var(--orange); }
.gcard .gbody { padding: 10px 12px 12px; flex: 1; display: flex; flex-direction: column; }
.gcard .gt { font-size: 13px; color: var(--ink); line-height: 1.45; height: 38px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; }
.gcard .gt:hover { color: var(--red); }
.gcard .gmeta { display: flex; gap: 5px; margin-top: 6px; flex-wrap: wrap; }
.gcard .gmeta .stk { font-size: 10.5px; color: var(--red); background: var(--red-bg); padding: 1px 7px; border-radius: 3px; }
.gcard .gmeta .tag { font-size: 10.5px; color: var(--ink-3); background: #f5f5f5; padding: 1px 7px; border-radius: 3px; }
.gcard .gp { margin-top: 8px; display: flex; align-items: baseline; }
.gcard .gp .p { font-size: 20px; font-weight: 800; color: var(--price); font-family: Arial, sans-serif; }
.gcard .gp .p i { font-style: normal; font-size: 12px; font-weight: 700; margin-right: 1px; }
.gcard .gp s { font-size: 11.5px; color: var(--ink-3); margin-left: 6px; }
.gcard .gsale { margin-left: auto; font-size: 11px; color: var(--ink-3); }
.gcard .gacts { display: flex; gap: 6px; margin-top: 9px; }
.gcard .gacts .btn { flex: 1; }

/* ---------------- 通用按钮 ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); border-radius: 6px; padding: 7px 16px; font-size: 12.5px; font-weight: 600; }
.btn:hover { border-color: var(--red); color: var(--red); }
.btn-primary { background: var(--red); border: 1px solid var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-orange { background: var(--orange); border: 1px solid var(--orange); color: #fff; }
.btn-orange:hover { filter: brightness(1.06); color: #fff; }
.btn-sm { padding: 4px 11px; font-size: 12px; border-radius: 5px; }
.btn-lg { padding: 11px 30px; font-size: 15px; border-radius: 8px; }
.btn-block { display: flex; width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------------- 列表页筛选 ---------------- */
.crumb { font-size: 12.5px; color: var(--ink-3); }
.crumb a { color: var(--ink-3); }
.crumb a:hover { color: var(--red); }
/* ---------------- 列表筛选条（京东搜索页式：纯文字 + 竖线分隔 + 红色选中） ---------------- */
.fbar { background: #fff; border-radius: var(--radius); margin: 12px 0; box-shadow: var(--shadow); overflow: hidden; }
.frow { display: flex; align-items: center; min-height: 46px; padding: 0 18px; }
.frow-sort { border-top: 1px solid #f0f0f0; background: #fafafa; }
.flb { font-size: 13px; color: #999; flex-shrink: 0; }
.f-links { display: flex; align-items: center; flex-wrap: wrap; }
.f-links button { border: none; background: none; position: relative; padding: 0 15px; font-size: 13px; color: var(--ink); line-height: 1.2; cursor: pointer; }
.f-links button:first-child { padding-left: 0; }
.f-links button + button::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 1px; height: 12px; background: #e3e3e3; }
.f-links button:hover { color: var(--red); }
.f-links button.on { color: var(--red); font-weight: 700; }
.fbar .filter-right { margin-left: auto; padding-left: 12px; }
.result-count { font-size: 12px; color: var(--ink-3); white-space: nowrap; }

/* ---------------- 分页 ---------------- */
.pager { display: flex; justify-content: center; gap: 6px; margin: 24px 0 10px; }
.pager button { border: 1px solid var(--line); background: #fff; border-radius: 4px; min-width: 36px; padding: 7px 12px; font-size: 13px; color: var(--ink-2); }
.pager button:hover:not([disabled]):not(.on) { border-color: var(--red); color: var(--red); }
.pager button.on { background: var(--red); border-color: var(--red); color: #fff; font-weight: 700; }
.pager button[disabled] { opacity: .4; cursor: not-allowed; }

/* ---------------- 详情页 ---------------- */
.detail-top { display: flex; gap: 24px; background: #fff; border-radius: var(--radius); padding: 24px; margin-top: 12px; box-shadow: var(--shadow); }
.detail-gallery { width: 420px; flex-shrink: 0; }
.detail-gallery .main-mock { border-radius: var(--radius); overflow: hidden; background: #fafafa; padding: 16px; border: 1px solid #f0f0f0; }
.detail-gallery .main-mock svg { width: 100%; display: block; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; }
.thumbs .th { width: 92px; height: 62px; border-radius: 6px; overflow: hidden; cursor: pointer; background: #fafafa; border: 2px solid transparent; padding: 0; }
.thumbs .th svg { width: 100%; height: 100%; }
.thumbs .th.on { border-color: var(--red); }
.detail-info { flex: 1; min-width: 0; }
.detail-info h1 { font-size: 20px; font-weight: 800; line-height: 1.5; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.detail-info .sub { color: var(--red); margin: 8px 0 14px; font-size: 13px; }
.price-line { background: linear-gradient(90deg, var(--red-bg), #fff); border-radius: 6px; padding: 14px 18px; margin-bottom: 14px; display: flex; align-items: baseline; }
.price-line .price { font-size: 30px; font-weight: 800; color: var(--price); font-family: Arial, sans-serif; }
.price-line .price i { font-style: normal; font-size: 15px; }
.price-line .orig { color: var(--ink-3); text-decoration: line-through; margin-left: 12px; font-size: 12.5px; }
.price-line .sale { margin-left: auto; color: var(--ink-3); font-size: 12px; }
.specs { border-top: 1px dashed var(--line); padding-top: 12px; margin-bottom: 16px; }
.specs li { list-style: none; font-size: 13px; color: var(--ink-2); padding: 3.5px 0; }
.specs li b { color: var(--ink-3); font-weight: 400; display: inline-block; width: 74px; }
.detail-actions { display: flex; gap: 10px; }
.sec-panel { background: #fff; border-radius: var(--radius); padding: 20px 24px; margin-top: 12px; box-shadow: var(--shadow); }
.sec-panel h3 { font-size: 16px; font-weight: 800; margin-bottom: 12px; padding-left: 9px; border-left: 4px solid var(--red); line-height: 1.3; }
.sec-panel p { color: var(--ink-2); font-size: 13.5px; margin-bottom: 8px; }
.sec-panel ul { margin: 0 0 8px; }
.sec-panel ul li { list-style: none; color: var(--ink-2); font-size: 13.5px; padding: 3.5px 0 3.5px 16px; position: relative; }
.sec-panel ul li:before { content: ""; position: absolute; left: 2px; top: 12px; width: 5px; height: 5px; background: var(--red); border-radius: 50%; }

/* ---------------- 购物车 / 表单 ---------------- */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { border-bottom: 1px solid #f2f2f2; padding: 11px 12px; font-size: 13px; text-align: left; }
.table th { background: #fafafa; color: var(--ink-2); font-weight: 700; font-size: 12px; }
.table .num { text-align: right; }
.table .price { color: var(--price); font-weight: 700; }
.panel { background: #fff; border-radius: var(--radius); padding: 20px 22px; margin-top: 12px; box-shadow: var(--shadow); }
.panel h3 { font-size: 15.5px; font-weight: 800; margin-bottom: 14px; padding-left: 9px; border-left: 4px solid var(--red); line-height: 1.3; }
.cart-bar { display: flex; justify-content: flex-end; align-items: center; gap: 16px; margin-top: 14px; background: #fff; border-radius: var(--radius); padding: 14px 20px; box-shadow: var(--shadow); }
.cart-bar .all { font-size: 13px; color: var(--ink-2); }
.cart-bar .total { font-size: 13.5px; }
.cart-bar .total b { color: var(--price); font-size: 24px; font-weight: 800; font-family: Arial, sans-serif; }
.form-row { display: flex; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.form-row .field { flex: 1; min-width: 220px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.field label i { color: var(--red); font-style: normal; margin-right: 3px; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #ddd; border-radius: 6px; padding: 9px 12px; outline: none; background: #fff; }
.field input:focus, .field textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(225,37,27,.08); }
.field textarea { height: 84px; resize: vertical; }
.field .err { color: var(--red); font-size: 12px; margin-top: 4px; }

/* ---------------- 联系页 ---------------- */
.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 12px 0; }
.contact-card { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.contact-card .ic { width: 42px; height: 42px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; color: #fff; background: var(--red); margin-bottom: 12px; }
.contact-card:nth-child(2) .ic { background: var(--green); }
.contact-card:nth-child(3) .ic { background: var(--blue); }
.contact-card:nth-child(4) .ic { background: var(--orange); }
.contact-card h4 { font-size: 14.5px; font-weight: 700; margin-bottom: 4px; }
.contact-card .val { font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 3px; word-break: break-all; }
.contact-card .tip { font-size: 12px; color: var(--ink-3); margin-bottom: 14px; }
.faq-item { border-bottom: 1px solid #f2f2f2; padding: 13px 0; }
.faq-item:last-child { border-bottom: none; }
.faq-item .q { font-weight: 700; font-size: 13.5px; margin-bottom: 4px; }
.faq-item .q:before { content: "Q"; display: inline-block; background: var(--red); color: #fff; font-size: 11px; width: 16px; height: 16px; line-height: 16px; text-align: center; border-radius: 4px; margin-right: 7px; vertical-align: 1px; }
.faq-item .a { color: var(--ink-2); font-size: 13px; padding-left: 23px; }
.faq-item .a:before { content: "A"; display: inline-block; background: #f0f0f0; color: var(--ink-2); font-size: 11px; width: 16px; height: 16px; line-height: 16px; text-align: center; border-radius: 4px; margin-right: 7px; margin-left: -23px; vertical-align: 1px; }

/* ---------------- 关于页 ---------------- */
.about-hero { background: linear-gradient(135deg, var(--red-dark) 0%, var(--red) 60%, #ff5745 100%); border-radius: var(--radius); padding: 34px 36px; margin-top: 12px; color: #fff; }
.about-hero h2 { font-size: 22px; font-weight: 800; margin-bottom: 12px; }
.about-hero p { color: rgba(255,255,255,.88); margin-bottom: 8px; max-width: 780px; font-size: 13.5px; }
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.about-grid .cell { background: #fff; border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.about-grid .cell h4 { font-size: 14.5px; font-weight: 800; margin-bottom: 8px; display: flex; align-items: center; gap: 7px; }
.about-grid .cell h4:before { content: ""; width: 4px; height: 14px; background: var(--red); border-radius: 2px; }
.about-grid .cell p { font-size: 12.8px; color: var(--ink-2); }

/* ---------------- 客服浮窗 / 右侧工具条 ---------------- */
.serv-tab { position: fixed; right: 0; bottom: 140px; z-index: 94; writing-mode: vertical-lr; letter-spacing: 4px; background: var(--red); color: #fff; border: none; border-radius: 8px 0 0 8px; padding: 15px 8px; font-size: 12.5px; font-weight: 700; box-shadow: -2px 2px 10px rgba(225,37,27,.35); }
.serv-tab:hover { background: var(--red-dark); color: #fff; }
.serv-float { position: fixed; right: 12px; bottom: 100px; z-index: 95; width: 220px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; }
.serv-float .hd { padding: 11px 14px; border-bottom: 1px solid #f2f2f2; font-size: 13px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.serv-float .hd .x { cursor: pointer; color: var(--ink-3); font-weight: 400; font-size: 12px; }
.serv-float .it { display: block; padding: 10px 14px; border-bottom: 1px solid #f7f7f7; font-size: 12px; color: var(--ink-3); }
.serv-float .it:last-child { border-bottom: none; }
.serv-float .it b { display: block; font-size: 13px; color: var(--ink); font-weight: 700; }
.serv-float .it:hover { background: var(--red-bg); }
.serv-float .it:hover b { color: var(--red); }
.backtop { position: fixed; right: 12px; bottom: 56px; z-index: 93; width: 40px; height: 40px; border-radius: 8px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); font-size: 11px; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 1px; box-shadow: var(--shadow); }
.backtop.show { display: flex; }
.backtop:hover { color: var(--red); border-color: var(--red); }

/* ---------------- Toast ---------------- */
.toast { position: fixed; left: 50%; top: 14%; transform: translateX(-50%) translateY(-8px); background: rgba(0,0,0,.82); color: #fff; padding: 11px 24px; border-radius: 8px; font-size: 13.5px; opacity: 0; pointer-events: none; transition: .25s; z-index: 999; max-width: 80vw; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------------- 页脚 ---------------- */
.footer { background: #fff; margin-top: 30px; border-top: 1px solid #eee; }
.fservice { border-bottom: 1px solid #f2f2f2; }
.fservice .wrap { display: grid; grid-template-columns: repeat(4, 1fr); padding: 22px 12px; }
.fservice .fs { display: flex; align-items: center; justify-content: center; gap: 10px; }
.fservice .fs b { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--red); color: var(--red); font-size: 15px; display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; }
.fservice .fs div b { display: block; font-size: 14.5px; color: var(--ink); border: none; width: auto; height: auto; }
.fservice .fs div span { font-size: 12px; color: var(--ink-3); }
.footer .cols { display: flex; gap: 30px; padding: 26px 12px; }
.footer .fcol h5 { font-size: 13.5px; margin-bottom: 10px; color: var(--ink); font-weight: 700; }
.footer .fcol p, .footer .fcol a { display: block; font-size: 12.5px; color: var(--ink-3); padding: 3px 0; }
.footer .fcol a:hover { color: var(--red); }
.footer .fcol.wide { flex: 1.5; }
.footer .copy { border-top: 1px solid #f2f2f2; text-align: center; color: var(--ink-3); font-size: 12px; padding: 15px 0 18px; }

/* ---------------- 后台 ---------------- */
.admin-shell { display: flex; min-height: 100vh; }
.aside { width: 200px; background: #1c1c1c; color: #a8a8a8; flex-shrink: 0; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.aside .alogo { padding: 18px 16px; color: #fff; font-weight: 800; font-size: 16px; border-bottom: 1px solid #2c2c2c; }
.aside a { display: flex; align-items: center; gap: 9px; padding: 13px 18px; color: #a8a8a8; font-size: 13.5px; }
.aside a:hover, .aside a.on { background: #2a2a2a; color: #fff; }
.aside a.on { box-shadow: inset 3px 0 0 var(--red); }
.amain { flex: 1; padding: 18px 22px; min-width: 0; }
.amain h2 { font-size: 19px; font-weight: 800; margin-bottom: 16px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.stat { background: #fff; border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 24px; font-weight: 800; color: var(--ink); font-family: Arial, sans-serif; }
.stat span { font-size: 12px; color: var(--ink-3); }
.stat.red b { color: var(--red); }
.login-box { max-width: 360px; margin: 80px auto; background: #fff; border-radius: var(--radius); padding: 30px 32px; box-shadow: var(--shadow-lg); }
.login-box h2 { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.login-box .tip { color: var(--ink-3); font-size: 12.5px; margin-bottom: 18px; }
.login-box .field { margin-bottom: 14px; }
.tbl-box { background: #fff; border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); overflow-x: auto; }

/* ---------------- 移动端 ---------------- */
@media (max-width: 1020px) {
  .feed { grid-template-columns: repeat(3, 1fr); }
  .catside { display: none; }
  .userside { display: none; }
  .promo-row { grid-template-columns: 1fr 1fr; }
  .promo.svc-only { display: none; }
  .campaign .cs { display: none; }
  .home-hero { height: auto; }
  .banner { height: 250px; }
  .navlinks a { padding: 0 10px; }
  .allcat > a { width: 170px; }
}
@media (max-width: 860px) {
  .topbar .tl { display: none; }
  .topbar .wrap { justify-content: flex-end; }
  .header .wrap { flex-wrap: wrap; gap: 10px; padding: 10px 12px; }
  .logo .lt b { font-size: 18px; }
  .hsearch { order: 3; max-width: none; flex-basis: 100%; }
  .hcart { margin-left: auto; }
  .allcat { display: none; }
  .navlinks { padding-left: 0; overflow-x: auto; width: 100%; }
  .menu-btn { display: block; }
  .home-hero { height: auto; }
  .banner { height: 210px; }
  .slide { padding: 0 24px; }
  .slide h3 { font-size: 22px; }
  .frow { padding: 8px 14px; flex-wrap: wrap; }
  .f-links { width: 100%; row-gap: 4px; }
  .fbar .filter-right { margin-left: 0; width: 100%; padding: 4px 0 0 0; }
  .slide .smock { display: none; }
  .slides { min-height: 230px; }
  .detail-top { flex-direction: column; padding: 16px; }
  .detail-gallery { width: 100%; }
  .contact-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .about-grid { grid-template-columns: 1fr; }
  .form-row .field { min-width: 100%; }
  .cart-bar { flex-wrap: wrap; }
  .table th:nth-child(3), .table td:nth-child(3) { display: none; }
  .footer .cols { flex-direction: column; gap: 14px; }
  .fservice .wrap { grid-template-columns: 1fr 1fr; padding: 14px 12px; gap: 10px; }
  .fservice .fs { justify-content: flex-start; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .serv-float { right: 10px; left: 10px; width: auto; }
}
@media (max-width: 560px) {
  .feed { grid-template-columns: 1fr 1fr; gap: 8px; }
  .gcard .gfig { height: 128px; padding: 10px; }
  .gcard .gp .p { font-size: 17px; }
  .gcard .gmeta { display: none; }
  .promo-row { grid-template-columns: 1fr; }
  .promo.svc-only { display: flex; }
  .contact-grid { grid-template-columns: 1fr; }
  .thumbs .th { width: 72px; height: 50px; }
  .hsearch button { width: 78px; letter-spacing: 2px; }
  .hsearch select { display: none; }
}
