/* =========================================================
   库库出海 · 专业科技风样式
   设计语言：深色 Hero + 精致浅色内容 + 玻璃质感 + 细网格 + 微动效
   ========================================================= */
:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #fbfcfe;
  --text: #0d1424;
  --muted: #5b6678;
  --primary: #4f46e5;
  --primary-d: #4338ca;
  --accent: #0ea5e9;
  --accent-2: #22d3ee;
  --line: #e8ecf3;
  --line-strong: #d8dee9;
  --ok: #15a34a;
  --danger: #ef4444;
  --shadow-sm: 0 1px 2px rgba(13, 20, 36, .05);
  --shadow: 0 10px 30px rgba(13, 20, 36, .07);
  --shadow-lg: 0 24px 60px rgba(13, 20, 36, .12);
  --radius: 16px;
  --radius-sm: 12px;
  --maxw: 1180px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.01em; }
img { max-width: 100%; }

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; padding: 12px 22px; font-weight: 700;
  font-size: 15px; cursor: pointer; font-family: inherit;
  transition: transform .12s, box-shadow .2s, background .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-d)); color: #fff; box-shadow: 0 8px 22px rgba(79, 70, 229, .28); }
.btn-primary:hover { box-shadow: 0 14px 34px rgba(79, 70, 229, .42); transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--text); border: 1px solid var(--line-strong); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.block { width: 100%; }

/* ---------- 入场动画 ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s cubic-bezier(.2, .7, .2, 1), transform .6s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* =========================================================
   顶部导航
   ========================================================= */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 13px 22px;
  display: flex; align-items: center; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.brand-logo {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font-size: 16px;
  box-shadow: 0 4px 12px rgba(79, 70, 229, .35);
}
.nav-links { display: flex; gap: 26px; margin-left: auto; align-items: center; }
.nav-links a { color: var(--muted); font-weight: 600; font-size: 14.5px; transition: color .2s; position: relative; }
.nav-links a:hover { color: var(--text); }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px; background: var(--primary); transition: width .2s; border-radius: 2px; }
.nav-links a:hover::after { width: 100%; }
.nav-toggle { display: none; background: none; border: 0; font-size: 22px; cursor: pointer; margin-left: auto; color: var(--text); }
.cart-btn {
  position: relative; background: #fff; border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 8px 15px; cursor: pointer; font-size: 15px; color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
.cart-btn:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.cart-count {
  position: absolute; top: -7px; right: -7px; background: var(--danger); color: #fff;
  font-size: 11px; min-width: 18px; height: 18px; line-height: 18px; text-align: center;
  border-radius: 999px; padding: 0 4px; font-weight: 700; box-shadow: 0 0 0 2px #fff;
}

/* =========================================================
   Hero（深色科技风）
   ========================================================= */
.hero { position: relative; overflow: hidden; color: #eaf0fb; background: #0b1020; }
.hero-bg { position: absolute; inset: 0; }
.hero-bg::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(820px 460px at 8% -12%, rgba(79, 70, 229, .45), transparent 60%),
    radial-gradient(700px 440px at 98% 8%, rgba(14, 165, 233, .38), transparent 58%),
    radial-gradient(600px 360px at 60% 120%, rgba(34, 211, 238, .22), transparent 60%);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
}
.hero-inner {
  position: relative; max-width: var(--maxw); margin: 0 auto; padding: 78px 22px 84px;
  display: grid; grid-template-columns: 1.12fr .88fr; gap: 48px; align-items: center;
}
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16);
  color: #cfe0ff; font-weight: 600; font-size: 13px;
  padding: 7px 14px; border-radius: 999px; backdrop-filter: blur(6px);
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2); }
.hero h1 { font-size: clamp(36px, 5.2vw, 58px); margin: 20px 0 16px; font-weight: 850; color: #fff; letter-spacing: -.025em; }
.grad { background: linear-gradient(100deg, #7dd3fc, #818cf8 60%, #a78bfa); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: #aebad4; font-size: 17px; max-width: 540px; }
.hero-cta { display: flex; gap: 12px; margin: 28px 0 30px; flex-wrap: wrap; }
.hero-cta .btn-ghost { background: rgba(255, 255, 255, .06); color: #eaf0fb; border-color: rgba(255, 255, 255, .18); }
.hero-cta .btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .35); }
.hero-stats { list-style: none; display: flex; gap: 30px; margin-top: 6px; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 28px; color: #fff; font-weight: 800; letter-spacing: -.02em; }
.hero-stats span { color: #93a0c0; font-size: 13px; margin-top: 2px; }

.hero-card {
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 18px; padding: 20px; backdrop-filter: blur(10px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}
.hc-head { font-weight: 700; margin-bottom: 14px; color: #dfe7fb; display: flex; align-items: center; gap: 8px; }
.hc-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.hc-list li { display: flex; justify-content: space-between; align-items: center; padding: 11px 13px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; font-size: 14px; color: #e7edfb; }
.hc-list .price { color: #7dd3fc; font-weight: 700; }
.hc-skeleton { color: #8c9abf; justify-content: center; }

/* =========================================================
   信任保障条
   ========================================================= */
.trustbar { border-bottom: 1px solid var(--line); background: var(--surface-2); }
.trustbar-inner { max-width: var(--maxw); margin: 0 auto; padding: 16px 22px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.trust-item { display: flex; align-items: center; gap: 12px; }
.trust-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, #eef2ff, #e0f2fe); color: var(--primary); flex: none; }
.trust-item h4 { font-size: 14.5px; font-weight: 700; }
.trust-item p { font-size: 12.5px; color: var(--muted); margin-top: 1px; }

/* =========================================================
   区块标题
   ========================================================= */
.section { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.section-head { padding: 0 22px; max-width: var(--maxw); margin: 0 auto; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); margin: 64px 0 10px; }
.section-head h2 { font-size: 30px; font-weight: 850; }
.section-head .sub { color: var(--muted); font-size: 15.5px; margin-top: 8px; max-width: 640px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 4px; }
.chip {
  border: 1px solid var(--line-strong); background: #fff; border-radius: 999px;
  padding: 7px 15px; font-size: 14px; cursor: pointer; color: var(--muted); font-weight: 600; transition: all .18s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 6px 16px rgba(79, 70, 229, .3); }

/* =========================================================
   商品网格
   ========================================================= */
.shop { padding-bottom: 30px; }
.grid {
  max-width: var(--maxw); margin: 0 auto; padding: 16px 22px 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 18px;
}
.loading { color: var(--muted); padding: 40px; text-align: center; grid-column: 1/-1; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden; display: flex; flex-direction: column;
  transition: transform .18s, box-shadow .25s, border-color .25s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: #cdd6ea; }
.card-img { height: 116px; display: flex; align-items: center; justify-content: center; font-size: 44px; background: linear-gradient(135deg, #eef2ff, #e6f6fe); position: relative; }
.card-img .cat-flag { position: absolute; top: 10px; left: 10px; font-size: 11px; font-weight: 700; color: var(--primary); background: rgba(255, 255, 255, .85); padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); }
.card-body { padding: 15px 16px 16px; flex: 1; display: flex; flex-direction: column; }
.card-name { font-weight: 750; margin: 2px 0 6px; font-size: 16px; }
.card-desc { color: var(--muted); font-size: 13px; flex: 1; min-height: 38px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.price { color: var(--text); font-weight: 850; font-size: 20px; letter-spacing: -.02em; }
.price small { font-size: 12px; font-weight: 600; color: var(--muted); }
.stock { font-size: 12px; color: var(--muted); }
.stock.zero { color: var(--danger); font-weight: 600; }
.add-btn { background: linear-gradient(135deg, var(--primary), var(--primary-d)); color: #fff; border: 0; border-radius: 10px; padding: 9px 15px; font-weight: 700; cursor: pointer; font-size: 14px; transition: box-shadow .2s, transform .12s; }
.add-btn:hover { box-shadow: 0 8px 18px rgba(79, 70, 229, .35); }
.add-btn:active { transform: translateY(1px); }
.add-btn:disabled { background: #cbd5e1; cursor: not-allowed; box-shadow: none; }

/* =========================================================
   品牌叙事（出海定位）
   ========================================================= */
.story { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 56px; }
.story-inner { max-width: var(--maxw); margin: 0 auto; padding: 64px 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.story-text h2 { font-size: 30px; font-weight: 850; }
.story-text p { color: var(--muted); font-size: 15.5px; margin-top: 16px; }
.story-points { list-style: none; margin-top: 22px; display: flex; flex-direction: column; gap: 14px; }
.story-points li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; }
.story-points .ck { width: 22px; height: 22px; border-radius: 7px; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; display: grid; place-items: center; font-size: 13px; flex: none; margin-top: 1px; }
.story-visual { background: linear-gradient(160deg, #0b1020, #131a3a); border-radius: 20px; padding: 30px; color: #dfe7fb; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.story-visual::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px); background-size: 34px 34px; opacity: .5; -webkit-mask-image: radial-gradient(circle at 70% 30%, #000, transparent 75%); mask-image: radial-gradient(circle at 70% 30%, #000, transparent 75%); }
.story-visual h3 { font-size: 18px; color: #fff; position: relative; }
.story-visual .rows { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; position: relative; }
.story-visual .row { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px; font-size: 14px; }
.story-visual .row b { color: #7dd3fc; font-size: 17px; }

/* =========================================================
   优势
   ========================================================= */
.why-grid { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.why-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); transition: box-shadow .25s, transform .18s; }
.why-item:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.why-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px; background: linear-gradient(135deg, #eef2ff, #e0f2fe); color: var(--primary); }
.why-item h3 { font-size: 17px; margin-bottom: 6px; }
.why-item p { color: var(--muted); font-size: 14px; }

/* =========================================================
   FAQ
   ========================================================= */
.faq-list { max-width: 820px; margin: 22px auto 0; padding: 0 22px; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; transition: border-color .2s; }
.faq-item[open] { border-color: #cdd6ea; box-shadow: var(--shadow-sm); }
.faq-item summary { list-style: none; cursor: pointer; padding: 16px 18px; font-weight: 700; font-size: 15.5px; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .plus { color: var(--primary); font-size: 20px; transition: transform .2s; flex: none; }
.faq-item[open] summary .plus { transform: rotate(45deg); }
.faq-item p { padding: 0 18px 18px; color: var(--muted); font-size: 14.5px; }

/* =========================================================
   页脚
   ========================================================= */
.footer { background: #0b1020; color: #aebad4; margin-top: 64px; padding: 48px 22px 30px; }
.foot-inner { max-width: var(--maxw); margin: 0 auto; }
.foot-top { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; align-items: flex-start; }
.foot-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: #fff; }
.foot-brand .brand-logo { width: 28px; height: 28px; }
.foot-brand-sub { color: #8c9abf; font-size: 13.5px; margin-top: 10px; max-width: 320px; }
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-links a { color: #c7d0e6; font-weight: 600; font-size: 14px; transition: color .2s; }
.foot-links a:hover { color: #fff; }
.foot-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 30px; padding-top: 18px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 13px; color: #8c9abf; }

/* =========================================================
   购物车抽屉
   ========================================================= */
.drawer-mask, .modal-mask { position: fixed; inset: 0; background: rgba(11, 16, 32, .5); opacity: 0; visibility: hidden; transition: opacity .25s; z-index: 60; backdrop-filter: blur(2px); }
.drawer-mask.open, .modal-mask.open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; right: -400px; width: 380px; max-width: 92vw; height: 100dvh;
  background: var(--surface); z-index: 61; display: flex; flex-direction: column;
  transition: right .28s ease; box-shadow: -16px 0 50px rgba(0, 0, 0, .2);
}
.drawer.open { right: 0; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-size: 17px; }
.drawer-body { flex: 1; overflow: auto; padding: 14px 20px; }
.drawer-foot { padding: 16px 20px; border-top: 1px solid var(--line); background: var(--surface-2); }
.drawer-foot .total { margin-bottom: 12px; font-size: 15px; display: flex; justify-content: space-between; }
.drawer-foot .total strong { font-size: 18px; color: var(--primary); }
.icon-btn { background: none; border: 0; font-size: 18px; cursor: pointer; color: var(--muted); width: 32px; height: 32px; border-radius: 8px; transition: background .2s; }
.icon-btn:hover { background: var(--bg); }

.cart-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-item .ci-ico { width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center; font-size: 24px; background: linear-gradient(135deg, #eef2ff, #e6f6fe); flex: none; }
.cart-item .ci-main { flex: 1; }
.cart-item .ci-name { font-weight: 700; font-size: 14.5px; }
.cart-item .ci-price { color: var(--primary); font-weight: 750; font-size: 14px; }
.qty { display: inline-flex; align-items: center; gap: 10px; margin-top: 8px; }
.qty button { width: 28px; height: 28px; border: 1px solid var(--line-strong); background: #fff; border-radius: 8px; cursor: pointer; font-size: 16px; color: var(--text); transition: border-color .2s; }
.qty button:hover { border-color: var(--primary); }
.qty span { min-width: 18px; text-align: center; font-weight: 700; }
.cart-empty { color: var(--muted); text-align: center; padding: 50px 0; }

/* =========================================================
   弹窗
   ========================================================= */
.modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -46%); width: 440px; max-width: 92vw; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); z-index: 62; opacity: 0; transition: opacity .2s, transform .2s; }
.modal-mask.open .modal { opacity: 1; transform: translate(-50%, -50%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 17px; }
.modal-body { padding: 20px; }
.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; font-weight: 600; }
.field input { width: 100%; padding: 12px 13px; border: 1px solid var(--line-strong); border-radius: 11px; font-size: 15px; font-family: inherit; transition: border-color .2s, box-shadow .2s; }
.field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, .14); }
.pay-tip { background: #fffbeb; border: 1px solid #fde68a; color: #92600a; font-size: 13px; padding: 11px 13px; border-radius: 11px; margin-bottom: 16px; display: flex; gap: 8px; align-items: flex-start; }

.result-order { border: 1px solid var(--line); border-radius: 13px; padding: 15px; margin-bottom: 14px; background: var(--surface-2); }
.result-order h4 { font-size: 15px; margin-bottom: 10px; }
.code-line { font-family: ui-monospace, Menlo, Consolas, monospace; background: #fff; border: 1px solid var(--line); padding: 10px 12px; border-radius: 9px; margin: 7px 0; font-size: 13px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.copy-code { background: none; border: 0; color: var(--primary); cursor: pointer; font-size: 12.5px; font-weight: 700; flex: none; }
.copy-code:hover { text-decoration: underline; }

/* =========================================================
   Toast
   ========================================================= */
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px); background: #0d1424; color: #fff; padding: 12px 20px; border-radius: 11px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 80; box-shadow: var(--shadow-lg); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* =========================================================
   后台 / 登录（通用类，专属样式在模板内联）
   ========================================================= */
.login-bg { background: radial-gradient(900px 500px at 15% -10%, rgba(79, 70, 229, .5), transparent 60%), radial-gradient(700px 420px at 100% 0%, rgba(14, 165, 233, .4), transparent 58%), #0b1020; }

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; padding: 54px 22px 60px; }
  .hero-card { display: none; }
  .story-inner { grid-template-columns: 1fr; gap: 30px; }
  .trustbar-inner { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .nav-links { display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; background: #fff; padding: 16px 22px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .cart-btn { margin-left: 12px; }
}
@media (max-width: 520px) {
  .trustbar-inner { grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; }
}
