/* ============================================================
   分分秒秒旗舰店 · 用户端基础样式 (base.css)
   黑金商务风 · 移动优先（H5 唯一形态）
   设计令牌 / 重置 / 通用组件 / 移动顶栏 / 底部导航 / 页脚
   ============================================================ */

:root {
  --black: #0d0d0f;
  --black-2: #17171b;
  --black-3: #22222a;
  --gold: #c39962;
  --gold-bright: #debe80;
  --gold-deep: #a87f44;
  --gold-soft: #f4ead8;

  --ink: #17171b;
  --ink-2: #4b4b55;
  --ink-3: #8a8a94;
  --line: #e8e8ec;
  --bg: #fff;
  --bg-soft: #f6f6f8;
  --bg-deep: #efeff3;

  --radius: 18px;
  --radius-lg: 22px;
  --radius-sm: 12px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 8px rgba(13, 13, 15, .06);
  --shadow-md: 0 10px 30px rgba(13, 13, 15, .10);

  --app-max: 560px;      /* 移动端唯一容器宽度 */
  --topbar-h: 54px;
  --tabbar-h: 58px;

  --grad-gold: linear-gradient(135deg, #d8b574, var(--gold-deep));
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: #ececef;
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold-deep); }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.3; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }

/* 通用文本 */
.muted { color: var(--ink-3); }
.gold { color: var(--gold-deep); }
.strong { font-weight: 700; }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.hide-mobile { display: none !important; }

/* ============================================================
   容器 · 页面（移动端唯一形态）
   ============================================================ */
main.page {
  max-width: var(--app-max);
  margin: 0 auto;
  background: var(--bg);
  padding: 12px 0 calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom));
  min-height: 50vh;
}
.container { width: 100%; max-width: var(--app-max); margin: 0 auto; padding: 0 15px; }
.section { padding: 20px 0; }
.section--soft { background: var(--bg-soft); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.section-title { font-size: 19px; letter-spacing: .3px; }
.section-title::after { content: ""; display: block; width: 34px; height: 3px; margin-top: 8px; border-radius: 3px; background: var(--grad-gold); }
.section-sub { color: var(--ink-3); font-size: 12.5px; margin-top: 5px; }
.section-more { color: var(--gold-deep); font-size: 13px; white-space: nowrap; }

/* flex / grid 工具 */
.flex { display: flex; }
.between { display: flex; align-items: center; justify-content: space-between; }
.acenter { display: flex; align-items: center; }
.vcenter { display: flex; align-items: center; justify-content: center; }
.col { display: flex; flex-direction: column; }
.wrap { flex-wrap: wrap; }
.gap6 { gap: 6px; } .gap8 { gap: 8px; } .gap12 { gap: 12px; } .gap16 { gap: 16px; } .gap20 { gap: 16px; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid { display: grid; gap: 14px; }
.grid-2, .grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, 1fr); }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.mt20 { margin-top: 20px; } .mt24 { margin-top: 24px; } .mt32 { margin-top: 28px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; } .mb20 { margin-bottom: 20px; } .mb24 { margin-bottom: 24px; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--radius-pill);
  font-size: 15px; font-weight: 600; line-height: 1;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s;
  border: 1px solid transparent; white-space: nowrap; color: var(--ink);
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn--gold { background: var(--grad-gold); color: #2a1e08; box-shadow: 0 6px 18px rgba(168, 127, 68, .35); }
.btn--gold:hover { color: #2a1e08; }
.btn--dark { background: var(--black); color: #f5efe3; }
.btn--dark:hover { background: var(--black-3); color: #fff; }
.btn--line { border-color: var(--line); background: #fff; color: var(--ink-2); }
.btn--line:hover { border-color: var(--gold); color: var(--gold-deep); }
.btn--ghost { background: var(--bg-soft); color: var(--ink-2); }
.btn--ghost:hover { background: var(--bg-deep); }
.btn--text { padding: 6px 8px; color: var(--gold-deep); }
.btn--sm { padding: 8px 15px; font-size: 13px; }
.btn--lg { padding: 13px 28px; font-size: 16px; }
.btn--block { width: 100%; }
.btn--pill-sm { padding: 6px 13px; font-size: 12px; border-radius: var(--radius-pill); border: 1px solid var(--line); background: #fff; color: var(--ink-2); }
.btn--pill-sm:hover { border-color: var(--gold); color: var(--gold-deep); }

/* 表单 */
.field { margin-bottom: 15px; }
.field__label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 7px; font-weight: 600; }
.field__label .req { color: #d9534f; margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; padding: 13px 14px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: #fff; outline: none; transition: border-color .18s, box-shadow .18s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(195, 153, 98, .14); }
.input::placeholder, .textarea::placeholder { color: #b6b6be; }
.textarea { min-height: 92px; resize: vertical; }
.input-group { display: flex; gap: 10px; }
.input-group .input { flex: 1 1 auto; min-width: 0; }
.input-group .btn { flex: 0 0 auto; }
.field__err { color: #d9534f; font-size: 12px; margin-top: 6px; display: none; }
.field.is-error .input, .field.is-error .select { border-color: #d9534f; }
.field.is-error .field__err { display: block; }
.check { display: inline-flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.check input { width: 16px; height: 16px; margin-top: 3px; accent-color: var(--gold-deep); }

/* 卡片 / 面板 */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); }
.panel--dark { background: var(--black-2); border-color: transparent; color: #e9e4da; }
.divider { height: 1px; background: var(--line); margin: 15px 0; border: 0; }

/* 标签 / 徽标 */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; font-size: 12px; border-radius: var(--radius-pill); background: var(--gold-soft); color: var(--gold-deep); }
.tag--line { background: #fff; border: 1px solid var(--line); color: var(--ink-3); }
.badge { display: inline-block; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #d9534f; color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 700; }
.status { display: inline-flex; align-items: center; padding: 3px 9px; font-size: 12px; border-radius: 6px; background: var(--bg-deep); color: var(--ink-2); font-weight: 600; }
.status--gold { background: var(--gold-soft); color: var(--gold-deep); }
.status--ok { background: #e8f5ec; color: #2e7d4f; }
.status--warn { background: #fdf0e3; color: #b8762a; }
.status--muted { background: var(--bg-deep); color: var(--ink-3); }

/* 价格 */
.price { color: #c0392b; font-weight: 800; }
.price--lg { font-size: 24px; }
.price .cur { font-size: .65em; margin-right: 1px; }
.price--old { color: var(--ink-3); text-decoration: line-through; font-weight: 400; font-size: 13px; }

/* 选项卡 */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; padding: 11px 13px; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.tab.is-active { color: var(--ink); font-weight: 700; }
.tab.is-active::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: -1px; height: 2px; background: var(--grad-gold); border-radius: 2px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { padding: 8px 15px; border-radius: var(--radius-pill); border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-size: 13px; }
.pill.is-active { background: var(--black); color: #f5efe3; border-color: var(--black); }
.pill:hover { border-color: var(--gold); }

/* 空态 / 加载 */
.empty { text-align: center; padding: 46px 20px; color: var(--ink-3); }
.empty__icon { width: 60px; height: 60px; margin: 0 auto 14px; color: var(--line); }
.empty__icon svg { width: 100%; height: 100%; }
.empty__title { font-size: 16px; color: var(--ink-2); margin-bottom: 6px; font-weight: 600; }
.loading { text-align: center; padding: 40px 0; color: var(--ink-3); font-size: 13px; }
.spinner { width: 26px; height: 26px; border: 3px solid var(--line); border-top-color: var(--gold); border-radius: 50%; margin: 0 auto 10px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 分页 */
.pager { display: flex; justify-content: center; align-items: center; gap: 7px; margin: 22px 0 6px; flex-wrap: wrap; }
.pager button { min-width: 36px; height: 36px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink-2); font-size: 13px; }
.pager button.is-active { background: var(--black); color: #fff; border-color: var(--black); }
.pager button:disabled { opacity: .4; cursor: not-allowed; }

/* 面包屑 */
.breadcrumb { display: flex; align-items: center; gap: 7px; padding: 4px 0 12px; color: var(--ink-3); font-size: 12.5px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--gold-deep); }

/* 头像 */
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--bg-deep); }
.avatar--lg { width: 68px; height: 68px; }
.avatar--sm { width: 32px; height: 32px; }
.nav-icon { position: relative; width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-3); background: var(--bg-deep); }
.nav-icon svg { width: 22px; height: 22px; }

/* toast */
.toast-wrap { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; width: 100%; max-width: var(--app-max); padding: 0 16px; }
.toast {
  max-width: 100%; padding: 11px 20px; border-radius: var(--radius-pill); background: rgba(13, 13, 15, .92);
  color: #f5efe3; font-size: 14px; box-shadow: var(--shadow-md); opacity: 0; transform: translateY(-8px);
  transition: opacity .22s, transform .22s;
}
.toast.is-show { opacity: 1; transform: translateY(0); }
.toast--ok { background: #2e7d4f; }
.toast--err { background: #b53a3a; }

/* ============================================================
   移动端顶部栏（唯一形态，无桌面顶栏）
   ============================================================ */
#site-header { position: sticky; top: 0; z-index: 900; max-width: var(--app-max); margin: 0 auto; }
.app-top { background: var(--black); color: #efeae0; }
.app-top__inner { height: var(--topbar-h); padding: 0 14px; display: flex; align-items: center; gap: 10px; }
.app-top__brand { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1 1 auto; }
.app-top__brand img { height: 26px; width: auto; flex: 0 0 auto; }
.app-top__brand span { font-size: 16px; font-weight: 700; color: #f3eee4; letter-spacing: .5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-top__actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.icon-btn { position: relative; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #e2ddd2; background: rgba(255, 255, 255, .07); }
.icon-btn:hover { color: var(--gold-bright); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn .badge { position: absolute; top: -2px; right: -2px; }
.app-top__search { padding: 0 14px 12px; }
.search-bar { position: relative; display: flex; align-items: center; background: rgba(255, 255, 255, .09); border-radius: var(--radius-pill); padding: 0 6px 0 14px; height: 40px; }
.search-bar svg { width: 16px; height: 16px; color: #b9b4aa; flex: 0 0 auto; }
.search-bar input { flex: 1 1 auto; min-width: 0; background: none; border: 0; outline: none; color: #f0ece3; padding: 0 8px; font-size: 14px; }
.search-bar input::placeholder { color: #8f8b83; }
.search-bar button { width: 30px; height: 30px; border-radius: 50%; background: var(--grad-gold); color: #2a1e08; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }

/* ============================================================
   移动底部导航（4 项）
   ============================================================ */
#mobile-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 950; display: flex; justify-content: center; pointer-events: none; }
.tabbar {
  width: 100%; max-width: var(--app-max); pointer-events: auto;
  background: rgba(13, 13, 15, .97); backdrop-filter: blur(10px);
  border-top: 1px solid rgba(195, 153, 98, .18);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -8px 24px rgba(13, 13, 15, .12);
}
.tabbar__inner { display: flex; height: var(--tabbar-h); }
.tabbar a { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #8f8b83; font-size: 11px; }
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a.is-active { color: var(--gold-bright); }
.tabbar a.is-active svg { filter: drop-shadow(0 0 6px rgba(222, 190, 128, .5)); }

/* ============================================================
   页脚（统一注入备案信息）
   ============================================================ */
#site-footer { max-width: var(--app-max); margin: 0 auto; }
.app-footer { background: var(--black-2); color: #b7b2a8; padding: 24px 0 26px; margin-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
/* 登录 / 注册 / 找回密码页：底部仅备案号，无底部导航，故无需为导航预留底部间距 */
.app-footer--slim { padding: 20px 0 calc(20px + env(safe-area-inset-bottom)); margin-bottom: 0; text-align: center; }
.app-footer--slim .beian { align-items: center; }
.app-footer a { color: #b7b2a8; }
.app-footer a:hover { color: var(--gold-bright); }
.app-footer__inner { padding: 0 18px; }
.app-footer__brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.app-footer__brand img { height: 28px; width: auto; }
.app-footer__brand b { color: #efeae0; font-size: 15px; letter-spacing: .5px; }
.app-footer__desc { font-size: 12.5px; color: #8f8b83; line-height: 1.7; margin-bottom: 4px; }
.app-footer__links { display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: 13px; margin: 14px 0; }
.app-footer__links a { color: #aba69c; }
.footer-divider { height: 1px; background: rgba(255, 255, 255, .09); margin: 0 0 14px; }
.beian { display: flex; flex-direction: column; gap: 8px; font-size: 12px; color: #8f8b83; }
.beian a { display: inline-flex; align-items: center; gap: 6px; color: #8f8b83; }
.beian img { width: 16px; height: 16px; display: inline-block; }
.copyright { margin-top: 12px; font-size: 12px; color: #8f8b83; }

/* ============================================================
   认证页（登录 / 注册 / 找回）· 移动端卡片
   ============================================================ */
.auth-wrap { padding: 0 15px; }
.auth-card { width: 100%; max-width: 420px; margin: 0 auto; }
.auth-head { text-align: center; margin-bottom: 22px; }
.auth-head .logo-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 14px; }
.auth-head .logo-row img { height: 30px; }
.auth-head .logo-row b { font-size: 16px; letter-spacing: .5px; }
.auth-head h2 { font-size: 22px; margin-bottom: 6px; }
.auth-head p { color: var(--ink-3); font-size: 13px; }
.auth-captcha { display: flex; gap: 10px; align-items: center; }
.auth-captcha__img { flex: 0 0 auto; width: 116px; height: 46px; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; background: var(--bg-soft); display: flex; align-items: center; justify-content: center; color: var(--ink-3); font-size: 12px; }
.auth-captcha__img svg { width: 116px; height: 46px; }
.auth-foot { margin-top: 18px; text-align: center; font-size: 13px; color: var(--ink-3); }
.auth-foot a { color: var(--gold-deep); }
.auth-links { display: flex; justify-content: space-between; font-size: 13px; margin-top: -4px; }
.auth-links a { color: var(--gold-deep); }
.auth-switch { display: flex; gap: 8px; background: var(--bg-deep); border-radius: var(--radius-pill); padding: 4px; margin-bottom: 20px; }
.auth-switch button { flex: 1 1 0; padding: 9px; border-radius: var(--radius-pill); font-size: 14px; color: var(--ink-2); }
.auth-switch button.is-active { background: #fff; color: var(--ink); font-weight: 700; box-shadow: var(--shadow-sm); }
.auth-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.auth-tabs button { padding: 10px 2px; font-size: 15px; color: var(--ink-3); position: relative; }
.auth-tabs button.is-active { color: var(--ink); font-weight: 700; }
.auth-tabs button.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--grad-gold); }
.auth-tip { background: var(--gold-soft); color: var(--gold-deep); border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-bottom: 15px; }
.auth-agree { font-size: 12px; color: var(--ink-3); line-height: 1.7; }
.auth-agree a { color: var(--gold-deep); }

/* 大屏居中呈现手机宽度：内容列固定 560，两侧留白 */
@media (min-width: 561px) {
  body { background: #ededf1; }
  #site-header, main.page, #site-footer { box-shadow: 0 0 0 1px rgba(13, 13, 15, .04); }
}
