/* ============================================================
   商业CC查企业 · 公共样式
   依赖 theme.css 的变量
   ============================================================ */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

/* ---------- SVG 图标 ---------- */
.ggc-svg { width: 1em; height: 1em; display: inline-block; vertical-align: -0.14em; flex: none; }
i.ic { display: inline-flex; align-items: center; justify-content: center; font-style: normal; line-height: 0; }
.btn .ggc-svg { width: 1.15em; height: 1.15em; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  transition: background .25s, color .25s;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--text-2); }
.weak { color: var(--text-3); }
.hl { color: var(--brand); }
.danger { color: var(--danger); }
.ok { color: var(--ok); }
.center { text-align: center; }
.hide { display: none !important; }

/* ---------- 顶部导航 ---------- */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.topbar .wrap { display: flex; align-items: center; height: 60px; gap: 20px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; color: var(--brand); white-space: nowrap; }
.logo .paw { width: 30px; height: 30px; display: grid; place-items: center; background: var(--hero-grad); border-radius: 9px; color: #fff; font-size: 17px; }
.topnav { display: flex; gap: 22px; margin-left: 6px; }
.topnav a { color: var(--text-2); font-size: 15px; padding: 6px 0; position: relative; }
.topnav a.active, .topnav a:hover { color: var(--brand); }
.topnav a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--brand); border-radius: 2px; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.top-right .vip { color: var(--accent); font-weight: 700; }

/* 顶栏内嵌小搜索（搜索页/详情页用） */
.mini-search { display: flex; flex: 1; max-width: 560px; height: 40px; }
.mini-search input { flex: 1; border: 2px solid var(--brand); border-right: none; border-radius: 8px 0 0 8px; padding: 0 14px; font-size: 14px; background: var(--surface); color: var(--text); outline: none; }
.mini-search button { background: var(--brand); color: #fff; padding: 0 22px; border-radius: 0 8px 8px 0; font-weight: 600; }

/* ---------- 按钮 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 8px; font-size: 14px; font-weight: 600; transition: .15s; white-space: nowrap; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--text-2); border: 1px solid var(--line-2); }
.btn-ghost:hover { color: var(--brand); border-color: var(--brand); }
.btn-sm { height: 30px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }

/* ---------- 标签 ---------- */
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 4px; font-size: 12px; line-height: 1; background: var(--tag-bg); color: var(--tag-text); margin-right: 6px; }
.tag-ok { background: rgba(22,163,74,.12); color: var(--ok); }
.tag-warn { background: rgba(245,158,11,.14); color: var(--warn); }
.tag-danger { background: rgba(229,72,77,.12); color: var(--danger); }
.tag-outline { background: transparent; border: 1px solid var(--line-2); color: var(--text-2); }

/* ---------- 卡片 ---------- */
.card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.card-pad { padding: 20px; }

/* ---------- 底部 ---------- */
.footer { background: #0e1422; color: #9aa6bd; margin-top: 48px; padding: 36px 0 28px; font-size: 13px; }
[data-theme="dark"] .footer { background: #070a12; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 40px; }
.footer h4 { color: #e7ecf5; font-size: 14px; margin: 0 0 12px; }
.footer a { display: block; color: #9aa6bd; line-height: 2; }
.footer a:hover { color: #fff; }
.footer .copy { width: 100%; border-top: 1px solid rgba(255,255,255,.08); margin-top: 18px; padding-top: 16px; color: #67728a; line-height: 1.9; }

/* ---------- 主题切换悬浮器 ---------- */
.theme-fab { position: fixed; right: 18px; bottom: 90px; z-index: 80; }
.theme-fab .fab-btn { width: 48px; height: 48px; border-radius: 50%; background: var(--brand); color: #fff; box-shadow: var(--shadow-lg); font-size: 20px; display: grid; place-items: center; }
.theme-panel { position: absolute; right: 0; bottom: 58px; width: 200px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 12px; }
.theme-panel h5 { margin: 2px 0 10px; font-size: 13px; color: var(--text-2); }
.theme-opt { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; cursor: pointer; }
.theme-opt:hover { background: var(--surface-2); }
.theme-opt.active { background: var(--brand-50); }
.swatch { width: 20px; height: 20px; border-radius: 6px; flex: none; border: 1px solid rgba(0,0,0,.08); }

/* ---------- 弹窗 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(15,22,40,.5); z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-mask.open { display: flex; }
.modal { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); width: 100%; max-width: 480px; max-height: 86vh; display: flex; flex-direction: column; overflow: hidden; }
.modal-head { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 16px; }
.modal-head .x { margin-left: auto; color: var(--text-3); font-size: 22px; line-height: 1; cursor: pointer; }
.modal-body { padding: 18px 20px; overflow: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- 会员锁 ---------- */
.locked { position: relative; }
.lock-pill { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-size: 13px; cursor: pointer; }
.blur-val { filter: blur(5px); user-select: none; color: var(--text-2); }

/* ---------- 移动端底部导航（默认隐藏，窄屏显示） ---------- */
.mobile-tabbar { display: none; }

/* 占位 LOGO 块（企业图标） */
.ent-logo { width: 68px; height: 68px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 20px; flex: none; text-align: center; line-height: 1.15; padding: 4px; }

/* ============================================================
   响应式：≤900px 视为移动版
   ============================================================ */
@media (max-width: 900px) {
  body { font-size: 14px; padding-bottom: 58px; }  /* 给底部导航留位 */
  .wrap { padding: 0 12px; }

  .topnav { display: none; }                        /* 移动端收起主导航 */
  .topbar .wrap { height: 52px; gap: 10px; }
  .logo { font-size: 18px; }
  .top-right .pc-only { display: none; }
  .mini-search { height: 36px; }
  .mini-search button { padding: 0 14px; }

  .footer { display: none; }                         /* 移动端隐藏大页脚 */

  .theme-fab { bottom: 72px; right: 12px; }

  .modal { max-width: 100%; border-radius: 14px 14px 0 0; align-self: flex-end; max-height: 80vh; }
  .modal-mask { align-items: flex-end; padding: 0; }

  /* 底部 Tab 栏 */
  .mobile-tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    height: 58px; background: var(--surface); border-top: 1px solid var(--line);
  }
  .mobile-tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--text-3); font-size: 11px; }
  .mobile-tabbar a.active { color: var(--brand); }
  .mobile-tabbar .ic { font-size: 19px; line-height: 1; }
}

/* 仅移动端显示 / 仅桌面端显示 的工具类 */
.only-mobile { display: none; }
@media (max-width: 900px) {
  .only-mobile { display: initial; }
  .only-pc { display: none !important; }
}
