/* ============ H5 端样式 ============ */
html, body { background: #e9edf2; }
body { font-size: 14px; }

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: #f5f6f8;
  position: relative;
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
  box-shadow: 0 0 40px rgba(15, 30, 50, 0.08);
  overflow-x: hidden;
}
.app.no-tab { padding-bottom: 0; }

/* 顶部 */
.h5-head { background: #fff; padding: 10px 16px 12px; position: sticky; top: 0; z-index: 60; border-bottom: 1px solid var(--line-2); }
.h5-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.h5-logo { display: flex; align-items: center; gap: 8px; }
.h5-logo .mark {
  width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(140deg, #1d4568, #0f2740);
  color: #f0d9a8; display: flex; align-items: center; justify-content: center; font-size: 16px; font-family: "Songti SC", serif;
  box-shadow: inset 0 0 0 1px rgba(216, 173, 95, 0.45);
}
.h5-logo b { font-size: 16px; color: var(--ink); letter-spacing: 1px; }
.h5-logo small { display: block; font-size: 8px; letter-spacing: 1.4px; color: var(--muted-2); }
.h5-head-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: flex; align-items: center; justify-content: center; color: var(--brand); }
.h5-search { display: flex; align-items: center; gap: 8px; margin-top: 10px; background: #f2f4f7; border-radius: 10px; padding: 0 12px; height: 40px; }
.h5-search input { flex: 1; border: none; background: transparent; outline: none; font-size: 14px; height: 100%; }
.h5-search svg { flex: none; color: var(--muted-2); }
.h5-search .go { border: none; background: var(--brand); color: #fff; font-size: 13px; height: 28px; padding: 0 12px; border-radius: 7px; }

/* 通用容器 */
.h5-body { padding: 12px 14px 0; }
.h5-block { background: #fff; border-radius: 14px; padding: 16px; margin-bottom: 12px; }
.h5-block-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.h5-block-title b { font-size: 16px; color: var(--ink); letter-spacing: 0.3px; }
.h5-block-title .more { font-size: 12px; color: var(--muted-2); display: flex; align-items: center; gap: 3px; }

/* Banner */
.h5-banner {
  background: linear-gradient(135deg, #0e2438, #1c4466 65%, #24547c);
  border-radius: 16px; padding: 20px 18px 18px; color: #fff; position: relative; overflow: hidden;
  margin-bottom: 12px;
}
.h5-banner::after { content: ""; position: absolute; right: -40px; top: -50px; width: 170px; height: 170px; border-radius: 50%; background: radial-gradient(circle, rgba(216, 173, 95, 0.3), transparent 65%); }
.h5-banner .tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: #f0d9a8; background: rgba(216, 173, 95, 0.14); border: 1px solid rgba(216, 173, 95, 0.32); padding: 4px 9px; border-radius: 999px; margin-bottom: 12px; }
.h5-banner h2 { font-size: 23px; line-height: 1.35; letter-spacing: 0.5px; margin-bottom: 8px; position: relative; }
.h5-banner h2 em { font-style: normal; color: #e6c07b; }
.h5-banner p { font-size: 12px; color: rgba(255, 255, 255, 0.68); line-height: 1.7; position: relative; }
.h5-banner .acts { display: flex; gap: 10px; margin-top: 16px; position: relative; }
.h5-banner .acts a { font-size: 13px; padding: 9px 16px; border-radius: 8px; }
.h5-banner .acts .main { background: #d8ad5f; color: #16283c; font-weight: 500; }
.h5-banner .acts .ghost { border: 1px solid rgba(255, 255, 255, 0.25); color: #fff; }

/* 概览数字 */
.h5-stats { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-radius: 14px; padding: 16px 6px; margin-bottom: 12px; }
.h5-stats div { text-align: center; border-right: 1px solid var(--line-2); }
.h5-stats div:last-child { border-right: none; }
.h5-stats b { display: block; font-size: 17px; color: var(--brand); font-weight: 700; }
.h5-stats span { font-size: 10.5px; color: var(--muted); }

/* 分类横滑 */
.cat-scroll { display: flex; gap: 10px; overflow-x: auto; padding: 2px 0 4px; margin: 0 -14px; padding-left: 14px; padding-right: 14px; scrollbar-width: none; }
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-pill {
  flex: none; width: 62px; padding: 10px 4px 9px; border-radius: 11px; background: #f6f8fb; text-align: center;
  border: 1px solid #eef1f6;
}
.cat-pill b { display: block; font-size: 13px; color: var(--ink); font-weight: 500; }
.cat-pill small { font-size: 10px; color: var(--muted-2); }
.cat-pill .no { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px; background: var(--brand-soft); color: var(--brand-2); font-size: 11px; font-weight: 600; margin-bottom: 6px; }

/* 商标横卡 */
.h5-tm { display: flex; gap: 12px; padding: 12px; background: #fff; border-radius: 14px; margin-bottom: 10px; position: relative; }
.h5-tm:active { background: #fbfcfd; }
.h5-tm-img { width: 92px; height: 92px; border-radius: 10px; overflow: hidden; background: #f2f4f7; flex: none; border: 1px solid var(--line-2); }
.h5-tm-img img { width: 100%; height: 100%; object-fit: cover; }
.h5-tm-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.h5-tm-title { display: flex; align-items: center; gap: 7px; }
.h5-tm-title b { font-size: 16.5px; color: var(--ink); letter-spacing: 0.4px; font-weight: 600; }
.h5-tm-title .badge { height: 19px; font-size: 10.5px; padding: 0 6px; }
.h5-tm-meta { font-size: 11.5px; color: var(--muted-2); margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h5-tm-tags { display: flex; gap: 5px; margin-top: 7px; flex-wrap: wrap; }
.h5-tm-tags span { font-size: 10.5px; color: var(--muted); background: var(--bg); padding: 2px 6px; border-radius: 4px; }
.h5-tm-price { margin-top: auto; padding-top: 8px; display: flex; align-items: baseline; justify-content: space-between; }
.h5-tm-price em { font-style: normal; font-weight: 700; color: #b3432f; font-size: 18px; }
.h5-tm-price em i { font-style: normal; font-size: 11px; margin-right: 1px; }
.h5-tm-price s { font-size: 10.5px; color: var(--muted-2); }
.h5-tm .corner { position: absolute; right: 12px; top: 12px; font-size: 10px; color: var(--gold); background: var(--gold-soft); padding: 3px 7px; border-radius: 4px; }

/* 流程 */
.h5-flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.h5-flow div { background: #f7f9fb; border-radius: 10px; padding: 12px 8px; text-align: center; }
.h5-flow b { display: block; font-size: 12px; color: var(--ink); margin-bottom: 4px; }
.h5-flow small { font-size: 10px; color: var(--muted-2); line-height: 1.5; display: block; }
.h5-flow .n { font-size: 10px; color: var(--gold); font-weight: 600; letter-spacing: 0.5px; display: block; margin-bottom: 6px; }

/* 底部导航 */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 480px;
  background: rgba(255, 255, 255, 0.97); backdrop-filter: blur(12px); border-top: 1px solid var(--line-2);
  display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); z-index: 80;
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--muted-2); font-size: 10.5px; padding: 4px 0; }
.tabbar a.active { color: var(--brand); }
.tabbar a.active svg { stroke: var(--brand); }
.tabbar .badge-dot { position: absolute; margin-left: 16px; margin-top: -2px; width: 6px; height: 6px; border-radius: 50%; background: #c0483a; }

/* 列表页 */
.h5-list-head { background: #fff; padding: 10px 14px 12px; position: sticky; top: 0; z-index: 60; border-bottom: 1px solid var(--line-2); }
.h5-nav-row { display: flex; align-items: center; gap: 10px; }
.back-btn { width: 32px; height: 32px; border: none; background: transparent; display: flex; align-items: center; justify-content: center; color: var(--text); flex: none; padding: 0; }
.filter-chips { display: flex; gap: 8px; overflow-x: auto; margin-top: 10px; scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chips button { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; font-size: 12.5px; color: var(--text); padding: 6px 13px; display: flex; align-items: center; gap: 4px; }
.filter-chips button.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 500; }
.h5-list-count { padding: 12px 4px 8px; font-size: 12px; color: var(--muted); }
.h5-list-count b { color: #b3432f; }
.load-more { width: 100%; border: none; background: transparent; color: var(--muted); font-size: 13px; padding: 16px 0 22px; }

/* 筛选面板 */
.sheet-mask { position: fixed; inset: 0; background: rgba(12, 22, 35, 0.45); z-index: 200; opacity: 0; visibility: hidden; transition: opacity 0.2s; }
.sheet-mask.show { opacity: 1; visibility: visible; }
.sheet {
  position: absolute; left: 50%; transform: translateX(-50%) translateY(100%); bottom: 0; width: 100%; max-width: 480px;
  background: #fff; border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.3, 1); max-height: 78vh; overflow-y: auto;
}
.sheet-mask.show .sheet { transform: translateX(-50%) translateY(0); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sheet-head b { font-size: 16px; }
.sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.sheet-grid button { border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 10px 6px; font-size: 12.5px; color: var(--text); }
.sheet-grid button.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 500; }
.sheet-actions { display: flex; gap: 10px; margin-top: 20px; }
.sheet-actions .btn { flex: 1; height: 42px; }

/* 详情页 */
.h5-gallery { background: #fff; padding: 14px 14px 12px; }
.h5-gallery .main { border-radius: 14px; overflow: hidden; background: #f7f8fa; aspect-ratio: 1/1; border: 1px solid var(--line-2); }
.h5-gallery .main img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.h5-gallery .thumbs { display: flex; gap: 9px; margin-top: 10px; }
.h5-gallery .thumbs div { width: 56px; height: 56px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; outline: 1px solid var(--line); }
.h5-gallery .thumbs div.on { border-color: var(--brand); outline-color: transparent; }
.h5-gallery .thumbs img { width: 100%; height: 100%; object-fit: cover; }
.h5-detail-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.h5-detail-head h1 { font-size: 24px; letter-spacing: 1px; color: var(--ink); }
.h5-detail-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.h5-detail-meta b { color: var(--text); font-weight: 500; }
.h5-price { display: flex; align-items: baseline; gap: 10px; margin-top: 14px; }
.h5-price em { font-style: normal; font-size: 30px; font-weight: 700; color: #b3432f; line-height: 1; }
.h5-price em i { font-style: normal; font-size: 14px; }
.h5-price s { font-size: 11.5px; color: var(--muted-2); }
.h5-price + .note { font-size: 11px; color: #8a6a34; margin-top: 8px; background: var(--gold-soft); display: inline-block; padding: 4px 9px; border-radius: 5px; }
.h5-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.h5-tags span { font-size: 11px; color: var(--brand-2); background: var(--brand-soft); padding: 4px 9px; border-radius: 5px; }
.h5-info-row { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px dashed var(--line-2); font-size: 13px; }
.h5-info-row:last-child { border-bottom: none; }
.h5-info-row span:first-child { color: var(--muted); flex: none; }
.h5-info-row span:last-child { color: var(--text); text-align: right; }
.h5-goods { font-size: 13px; color: var(--text); line-height: 1.9; }
.h5-desc { font-size: 13px; color: var(--text); line-height: 2; }

/* 详情底部操作 */
.action-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 480px;
  background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(10px); border-top: 1px solid var(--line-2);
  display: flex; align-items: center; gap: 10px; padding: 9px 14px calc(9px + env(safe-area-inset-bottom)); z-index: 90;
}
.action-bar .icon-act { width: 46px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; color: var(--muted); border: none; background: transparent; flex: none; }
.action-bar .icon-act.on { color: #c0483a; }
.action-bar .btn { flex: 1; height: 44px; font-size: 15px; }
.action-bar .btn-ghost { flex: 0 0 106px; }

/* 我的 */
.h5-profile { background: linear-gradient(135deg, #0e2438, #1d4568); border-radius: 0; padding: 22px 18px 26px; color: #fff; margin: -12px -14px 0; }
.h5-profile .row { display: flex; align-items: center; gap: 13px; }
.h5-profile .avatar { width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(216, 173, 95, 0.5); display: flex; align-items: center; justify-content: center; font-family: serif; color: #e6c07b; font-size: 20px; }
.h5-profile b { font-size: 17px; display: block; }
.h5-profile small { font-size: 11.5px; color: rgba(255, 255, 255, 0.55); }
.h5-menu { background: #fff; border-radius: 14px; overflow: hidden; margin-top: 12px; }
.h5-menu a { display: flex; align-items: center; justify-content: space-between; padding: 15px 16px; border-bottom: 1px solid var(--line-2); font-size: 14px; color: var(--text); }
.h5-menu a:last-child { border-bottom: none; }
.h5-menu .l { display: flex; align-items: center; gap: 10px; }
.h5-menu .r { font-size: 12px; color: var(--muted-2); }
.empty-h5 { text-align: center; padding: 56px 20px; color: var(--muted); font-size: 13px; }
.empty-h5 b { display: block; color: var(--text); font-size: 15px; margin-bottom: 8px; font-weight: 500; }

/* H5 咨询抽屉 */
.sheet .field > span { font-size: 12.5px; }
.h5-safe { height: 12px; }
.app.has-bar { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
.app.has-bar .h5-body { padding-bottom: 12px; }
