/* ==========================================================
   六花的轻腕小店 — 简洁设计系统
   白色/浅灰背景 · 深灰文字 · 六花蓝品牌强调
   小圆角 · 少阴影 · 大量留白 · 清晰字体层级
   ========================================================== */

:root {
  --bg: #ffffff;            /* 页面背景：白 */
  --bg-soft: #f7f8fa;       /* 浅灰分区背景 */
  --ink: #1f2329;           /* 主文字：深灰 */
  --ink-2: #4e5561;         /* 次级文字 */
  --muted: #878e9b;         /* 弱化文字 */
  --brand: #2f6bff;         /* 六花蓝（品牌强调色） */
  --brand-dark: #1f56d6;    /* 悬停加深 */
  --brand-soft: #eef4ff;    /* 品牌浅底 */
  --border: #e6e8ec;        /* 细边框 */
  --border-strong: #d6dae1; /* 深一档边框 */
  --ok: #1f9d55;  --ok-soft: #e9f7ef;
  --warn: #b45309; --warn-soft: #fdf3e3;
  --err: #d92d20; --err-soft: #fdeceb;
  --radius-lg: 14px;
  --radius: 10px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-pop: 0 12px 32px rgba(16, 24, 40, .14);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.65;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
code { font-family: "SF Mono", "JetBrains Mono", Consolas, monospace; }

/* ---------- 通用布局 ---------- */
.wrap { width: min(1080px, calc(100% - 48px)); margin: 0 auto; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- 顶部导航 ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.nav-inner { height: 60px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 16px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  color: #fff; font-size: 13px; font-weight: 800;
  background: var(--brand);
}
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  color: var(--ink-2); font-size: 14.5px; padding: 7px 14px; border-radius: var(--radius-sm); transition: .2s;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-soft); }

/* ---------- 页面主体 ---------- */
.page-main { padding: 0 0 56px; }

.announce {
  margin-top: 20px; padding: 11px 16px; font-size: 13.5px; color: var(--ink-2);
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius);
}

/* ---------- 首页 Hero：紧凑，首屏直达商品 ---------- */
.hero { text-align: center; padding: 38px 0 30px; }
.hero h1 {
  font-size: clamp(27px, 3.6vw, 34px); font-weight: 700; letter-spacing: .01em; color: var(--ink);
}
.hero-sub { margin-top: 8px; color: var(--ink-2); font-size: 15px; }
.hero-sub i { font-style: normal; color: var(--border-strong); margin: 0 9px; }
.hero-actions { margin-top: 20px; }

/* ---------- 分区标题 ---------- */
.sec-head { text-align: center; margin-bottom: 20px; }
.sec-head h2 { font-size: 21px; font-weight: 700; }
.sec-head p { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.sec-title { font-size: 19px; font-weight: 700; margin-bottom: 16px; }
.section { padding: 24px 0; }
.section[id] { scroll-margin-top: 76px; }
.section + .section { border-top: 1px solid var(--border); }

/* ---------- 广告轮播（安静低调） ---------- */
.ads { position: relative; overflow: hidden; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--bg-soft); }
.ad-track { display: flex; transition: transform .5s ease; }
.ad-slide { flex: 0 0 100%; }
.ad-slide img { width: 100%; height: clamp(140px, 20vw, 240px); object-fit: cover; }
.ad-dots {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 7px; padding: 6px 10px; border-radius: 999px;
  background: rgba(255,255,255,.85); border: 1px solid var(--border);
}
.ad-dot {
  width: 7px; height: 7px; border-radius: 50%; border: none; cursor: pointer;
  background: #c9ced8; transition: .25s;
}
.ad-dot.active { background: var(--brand); width: 18px; border-radius: 999px; }

/* ---------- 商品卡片 ---------- */
.goods-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px;
}
.goods-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
  color: var(--ink);
}
.goods-card:hover { border-color: var(--border-strong); box-shadow: 0 6px 20px rgba(16,24,40,.07); transform: translateY(-2px); }
.goods-thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-soft); }
.goods-thumb img { width: 100%; height: 100%; object-fit: cover; }
.goods-thumb-fallback {
  width: 100%; height: 100%; display: grid; place-items: center;
  font-size: 44px; font-weight: 700; color: var(--brand);
  background: var(--brand-soft);
}
.goods-thumb-fallback.big { font-size: 64px; }
.badge {
  position: absolute; top: 10px; right: 10px; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
}
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-off { background: #eef0f3; color: var(--muted); }
.goods-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.goods-name-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.goods-name-row .badge { position: static; }
.goods-name { font-size: 15.5px; font-weight: 600; }
.goods-desc { color: var(--muted); font-size: 13px; min-height: 20px; overflow: hidden; }
.goods-meta { margin-top: auto; padding-top: 8px; display: flex; align-items: baseline; justify-content: space-between; }
.goods-price { color: var(--brand); font-size: 18px; font-weight: 700; }
.goods-stock { color: var(--muted); font-size: 12.5px; }

/* ---------- 信任三项 ---------- */
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.trust-item { text-align: center; padding: 8px 16px; }
.trust-item svg { width: 22px; height: 22px; color: var(--brand); margin: 0 auto 8px; display: block; }
.trust-item b { display: block; font-size: 15px; font-weight: 600; }
.trust-item span { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }

/* ---------- 项目导航 ---------- */
.links-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.link-card {
  position: relative; display: flex; flex-direction: column; gap: 2px; padding: 16px 18px;
  color: var(--ink); background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color .2s ease;
}
.link-card:hover { border-color: var(--brand); }
.link-name { font-weight: 600; font-size: 14.5px; }
.link-url { color: var(--muted); font-size: 12.5px; word-break: break-all; }
.link-arrow {
  position: absolute; top: 16px; right: 16px; color: var(--muted); font-size: 14px; transition: .2s;
}
.link-card:hover .link-arrow { color: var(--brand); }

/* ---------- 面板（白底细边框，替代毛玻璃大卡片） ---------- */
.glass-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.glass {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ---------- 商品详情 / 购买面板 ---------- */
.crumbs { display: flex; gap: 8px; color: var(--muted); font-size: 13px; padding: 24px 0 4px; }
.crumbs b { color: var(--ink); font-weight: 600; }
.product-layout { display: grid; grid-template-columns: minmax(300px, 5fr) 7fr; gap: 40px; align-items: start; padding-top: 16px; }
.product-side { }
.product-cover { aspect-ratio: 4 / 3; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); background: var(--bg-soft); }
.product-cover img { width: 100%; height: 100%; object-fit: cover; }
.product-title { font-size: 22px; font-weight: 700; margin-top: 18px; }
.product-desc { margin-top: 10px; color: var(--ink-2); font-size: 14.5px; }
.contact-tip {
  margin-top: 16px; padding: 11px 14px; display: flex; align-items: center; gap: 10px; font-size: 13.5px;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius);
}
.contact-tip b { color: var(--ink-2); font-size: 13px; flex: none; font-weight: 600; }
.contact-tip span { word-break: break-all; color: var(--ink-2); }

.buy-panel { padding: 6px 26px 26px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.panel-title { font-size: 17px; font-weight: 700; padding: 16px 0 6px; }
.buy-row { padding: 18px 0; }
.buy-row + .buy-row { border-top: 1px solid var(--border); }
.buy-row.two-col { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: start; }
.buy-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 10px; }

.spec-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.spec-chip {
  font-family: inherit; font-size: 14px; font-weight: 500; color: var(--ink-2);
  padding: 8px 15px; border-radius: var(--radius-sm); cursor: pointer; transition: .18s;
  background: var(--bg); border: 1px solid var(--border-strong);
}
.spec-chip small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; margin-top: 1px; }
.spec-chip:hover { border-color: var(--brand); color: var(--brand); }
.spec-chip.active {
  color: var(--brand); border-color: var(--brand); background: var(--brand-soft); font-weight: 600;
}
.spec-chip:disabled { opacity: .4; cursor: not-allowed; }
.pay-chip small { display: none; }

.qty-stepper { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 3px; background: var(--bg); }
.qty-stepper button {
  width: 32px; height: 32px; border: none; border-radius: 6px; font-size: 17px; cursor: pointer;
  background: transparent; color: var(--ink-2); transition: .15s;
}
.qty-stepper button:hover { background: var(--bg-soft); color: var(--ink); }
.qty-stepper input {
  width: 42px; text-align: center; border: none; background: transparent;
  font-size: 15px; font-weight: 600; color: var(--ink); font-family: inherit;
}

.text-input, .field input, .field select, .field textarea {
  width: 100%; font-family: inherit; font-size: 14.5px; color: var(--ink);
  padding: 10px 13px; border-radius: var(--radius-sm); outline: none; transition: .18s;
  background: var(--bg); border: 1px solid var(--border-strong);
}
.text-input:focus, .field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
.text-input::placeholder, .field input::placeholder, .field textarea::placeholder { color: #a6acb8; }

.price-line {
  display: flex; align-items: baseline; justify-content: space-between; padding: 18px 0 2px;
  border-top: 1px solid var(--border);
}
.price-line span { color: var(--ink-2); font-size: 14px; }
.price-now { color: var(--brand); font-size: 16px; font-weight: 600; }
.price-now i { font-style: normal; font-size: 28px; font-weight: 700; }
.stock-line { font-size: 12.5px; margin-bottom: 16px; }
.buy-row.no-line { border-top: none; }
.buy-note { margin-top: 12px; text-align: center; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 14.5px; font-weight: 600; line-height: 1; white-space: nowrap;
  padding: 11px 20px; border-radius: var(--radius); border: 1px solid transparent; cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.btn-primary {
  color: #fff; background: var(--brand); border-color: var(--brand);
}
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-ghost {
  color: var(--ink-2); background: var(--bg);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover { color: var(--brand); border-color: var(--brand); }
.btn-danger { color: #fff; background: var(--err); border-color: var(--err); }
.btn-danger:hover { background: #b92318; border-color: #b92318; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-lg { padding: 14px 28px; font-size: 15.5px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px;
  background: rgba(15, 18, 25, .45);
}
.modal {
  position: relative; width: min(420px, 100%); padding: 28px;
  background: var(--bg); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop);
  animation: pop .28s ease;
}
@keyframes pop { from { transform: scale(.97) translateY(8px); opacity: 0; } }
.modal-title { font-size: 16.5px; font-weight: 700; text-align: center; }
.modal-close {
  position: absolute; top: 12px; right: 12px; width: 30px; height: 30px;
  border: none; border-radius: var(--radius-sm); font-size: 17px; cursor: pointer;
  background: transparent; color: var(--muted); transition: .15s;
}
.modal-close:hover { background: var(--bg-soft); color: var(--ink); }
.pay-choose-btns { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }

.pm-amount { text-align: center; font-size: 15px; color: var(--ink-2); margin-top: 14px; }
.pm-amount b { color: var(--brand); font-size: 36px; font-weight: 700; margin-left: 4px; }
.pm-amount.big b { font-size: 42px; }
.pm-qr {
  width: 224px; height: 224px; margin: 18px auto 6px; padding: 12px;
  background: #fff; border-radius: var(--radius); border: 1px solid var(--border);
}
.pm-qr img, .pm-qr canvas { width: 200px; height: 200px; }
.pm-qr:empty::after {
  content: "等待支付数据…"; display: grid; place-items: center; height: 100%;
  color: var(--muted); font-size: 13px;
}
.pm-status { text-align: center; font-size: 14px; font-weight: 600; color: var(--ink-2); margin-top: 12px; }
.pm-status::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--warn); margin-right: 8px; vertical-align: 1px; animation: pulse 1.2s infinite;
}
.pm-status.ok { color: var(--ok); }
.pm-status.ok::before { background: var(--ok); animation: none; }
.pm-status.dead { color: var(--err); }
.pm-status.dead::before { background: var(--err); animation: none; }
@keyframes pulse { 50% { opacity: .25; } }
.pm-countdown { text-align: center; }

/* ---------- 订单详情 ---------- */
.pay-page, .order-page, .query-page { display: grid; place-items: start center; padding-top: 40px; }
.pay-card, .query-card { width: min(440px, 100%); padding: 32px; }
.order-card { width: min(620px, 100%); padding: 32px; }
.pay-card-head h1 { font-size: 18px; font-weight: 700; }
.pay-card-head p { margin-top: 2px; }

.order-status-head { display: flex; gap: 14px; align-items: center; margin-bottom: 20px; }
.order-status-icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  font-size: 21px; font-weight: 700; color: #fff; flex: none;
}
.status-1 .order-status-icon { background: var(--ok); }
.status-0 .order-status-icon { background: #d97706; }
.status-2 .order-status-icon { background: #ea580c; }
.status-3 .order-status-icon { background: #98a1ad; }
.order-status-head h1 { font-size: 19px; font-weight: 700; }

.order-info { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; padding: 18px 0; border-top: 1px solid var(--border); }
.order-info > div { display: flex; flex-direction: column; gap: 2px; }
.order-info dt { font-size: 12px; color: var(--muted); }
.order-info dd { font-size: 14px; font-weight: 600; word-break: break-all; }

.cards-sec { margin-top: 4px; }
.cards-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cards-head h2 { font-size: 15.5px; font-weight: 700; }
.cards-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.card-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px;
}
.card-item code { font-size: 14px; word-break: break-all; color: var(--ink); }
.order-actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.order-actions .contact-tip { margin-top: 0; flex: 1; min-width: 220px; }

/* ---------- 查单 ---------- */
.query-card h1 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.query-form { margin-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.query-form .field { display: flex; flex-direction: column; gap: 7px; }
.query-form .field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.captcha-row { display: flex; gap: 10px; align-items: stretch; }
.captcha-chip {
  flex: none; display: grid; place-items: center; padding: 0 16px; font-weight: 700; font-size: 14.5px;
  cursor: pointer; user-select: none; color: var(--brand);
}

/* 查询结果列表 */
.query-results { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.query-order {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 16px; color: var(--ink); transition: border-color .18s;
}
.query-order:hover { border-color: var(--brand); }
.qo-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.qo-title { font-size: 14px; font-weight: 600; }
.qo-sub { word-break: break-all; }
.qo-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.qo-money { color: var(--brand); font-size: 15px; font-weight: 700; }

/* 状态徽标 */
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.tag-ok { background: var(--ok-soft); color: var(--ok); }
.tag-off { background: #eef0f3; color: var(--muted); }
.tag-warn { background: var(--warn-soft); color: var(--warn); }
.tag-err { background: var(--err-soft); color: var(--err); }
.tag-info { background: var(--brand-soft); color: var(--brand); }

/* ---------- 通知 / 空态 / Toast ---------- */
.notice { padding: 12px 16px; border-radius: var(--radius); font-size: 14px; margin-bottom: 16px; }
.notice ul { margin-left: 18px; }
.notice-ok { background: var(--ok-soft); color: #14683a; border: 1px solid #c3e8d2; }
.notice-err { background: var(--err-soft); color: #a92019; border: 1px solid #f5c6c2; }
.empty { padding: 64px 30px; text-align: center; color: var(--muted); font-size: 15px; }
.empty .btn { margin-left: 12px; }

.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(16px);
  background: var(--ink); color: #fff; font-size: 13.5px; padding: 10px 20px;
  border-radius: 999px; opacity: 0; pointer-events: none; transition: .25s; z-index: 120;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 安装向导 ---------- */
.install-wrap { width: min(660px, calc(100% - 24px)); margin: 6vh auto; padding: 34px 36px; }
.install-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.install-logo {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--brand); color: #fff; font-size: 17px; font-weight: 800;
}
.install-head h1 { font-size: 21px; font-weight: 700; }
.install-sec { margin-top: 18px; }
.install-sec h2 { font-size: 14.5px; font-weight: 700; margin-bottom: 12px; color: var(--ink-2); }
.check-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.check-list li { font-size: 13.5px; display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.check-list li em { font-style: normal; color: var(--muted); font-size: 12px; }
.check-list .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.check-list li.ok .dot { background: var(--ok); }
.check-list li.bad .dot { background: var(--err); }
.check-list li.bad { color: var(--err); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.install-actions { margin-top: 24px; }
.install-links { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

/* ---------- 页脚 ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0 36px; text-align: center; color: var(--muted); font-size: 12.5px; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .product-layout { grid-template-columns: 1fr; gap: 24px; }
  .order-info { grid-template-columns: 1fr; }
  .check-list { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 32px); }
  .hero { padding: 28px 0 24px; }
  .goods-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .goods-body { padding: 10px 12px 12px; }
  .goods-name { font-size: 14px; }
  .goods-price { font-size: 15.5px; }
  .goods-desc { display: none; }
  .buy-row.two-col { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .brand-name { display: none; }
  .pm-amount b { font-size: 32px; }
  .pm-amount.big b { font-size: 36px; }
  .install-wrap { padding: 26px 20px; }
  .pay-card, .query-card, .order-card { padding: 22px; }
}
