/* =================================================================
   环球优品 GlobalPick · 全站样式
   主题色：海洋蓝 + 琥珀金（跨境航海感）
   ================================================================= */

:root {
  --brand: #0e4f8f;
  --brand-deep: #0a3a6b;
  --brand-light: #1173b8;
  --accent: #f59e0b;
  --accent-deep: #d97706;
  --price: #e02e2a;
  --bg: #f4f7fb;
  --card: #ffffff;
  --ink: #1c2b3a;
  --muted: #64748b;
  --line: #e4eaf2;
  --ok: #16a34a;
  --err: #dc2626;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(15, 40, 80, .08);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button { font: inherit; cursor: pointer; }
input, select { font: inherit; }
h1, h2, h3, h4, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* ---------------- 按钮 ---------------- */
.btn {
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  transition: filter .15s, background .15s, border-color .15s, color .15s;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-light)); color: #fff; }
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn-accent { background: var(--accent); color: #431407; }
.btn-accent:hover:not(:disabled) { filter: brightness(.96); }
.btn-ghost { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.btn-block { display: block; width: 100%; }

/* ---------------- 顶部导航 ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 19px;
  color: var(--brand-deep);
  white-space: nowrap;
}
.logo svg { width: 30px; height: 30px; flex: none; }
.logo small { color: var(--muted); font-weight: 500; font-size: 11px; letter-spacing: .12em; }

.search-box {
  flex: 1;
  display: flex;
  max-width: 520px;
  border: 2px solid var(--brand);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}
.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 16px;
  height: 38px;
  font-size: 14px;
  background: transparent;
}
.search-box button {
  border: 0;
  background: var(--brand);
  color: #fff;
  padding: 0 18px;
  font-size: 14px;
  transition: background .15s;
}
.search-box button:hover { background: var(--brand-deep); }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.user-link {
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 8px;
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-link:hover { background: #eef4fb; color: var(--brand); }
.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--ink);
  transition: border-color .15s, color .15s;
}
.cart-btn:hover { border-color: var(--brand); color: var(--brand); }
.cart-btn svg { width: 18px; height: 18px; }
.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent-deep);
  color: #fff;
  font-size: 11px;
  display: grid;
  place-items: center;
}

/* ---------------- Hero ---------------- */
.hero {
  background: linear-gradient(135deg, #0a3a6b, #0e4f8f 55%, #1173b8);
  color: #fff;
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 30px;
  padding-top: 54px;
  padding-bottom: 54px;
  align-items: center;
}
.hero-kicker { letter-spacing: .32em; font-size: 12px; color: #cfe3ff; margin-bottom: 12px; }
.hero h1 { font-size: 38px; line-height: 1.28; margin-bottom: 14px; font-weight: 800; }
.hero-sub { color: #d9e8ff; font-size: 15px; margin-bottom: 24px; max-width: 480px; }
.hero-stats { display: flex; gap: 36px; margin-bottom: 24px; }
.stat strong { font-size: 26px; font-weight: 800; }
.stat span { display: block; font-size: 12px; color: #bcd6f7; margin-top: 2px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.hbadge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .28);
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 13px;
}
.hbadge svg { width: 14px; height: 14px; }
.hero-art svg { width: 100%; max-width: 340px; margin: 0 auto; animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .hero-art svg { animation: none; } }

/* ---------------- 服务承诺 ---------------- */
.promise-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding-top: 26px;
  padding-bottom: 6px;
}
.promise {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.promise svg { width: 32px; height: 32px; flex: none; color: var(--brand); }
.promise h3 { font-size: 14px; margin-bottom: 4px; }
.promise p { font-size: 12px; color: var(--muted); line-height: 1.55; }

/* ---------------- 工具栏 ---------------- */
.toolbar { padding-top: 18px; }
.toolbar-head { display: flex; align-items: baseline; gap: 12px; }
.toolbar-head h2 { font-size: 22px; padding: 8px 0 4px; }
.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 10px 0 18px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  color: var(--ink);
  transition: border-color .15s, color .15s, background .15s;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.sort-box { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.sort-box select {
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
  color: var(--ink);
}

/* ---------------- 商品卡片 ---------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 16px;
  padding-bottom: 50px;
}
.product-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .18s, box-shadow .18s;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.product-art svg { width: 100%; height: auto; }
.product-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  min-height: 40px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.rating { margin-left: auto; color: var(--accent-deep); }
.product-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-tags { display: flex; gap: 6px; flex-wrap: wrap; min-height: 22px; }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 4px; }
.tag-bond { background: #e8f1fd; color: #0e4f8f; }
.tag-mail { background: #e8f7ef; color: #15803d; }
.tag-std { background: #fdf3e3; color: #b45309; }
.product-foot { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.price strong { color: var(--price); font-size: 19px; font-weight: 800; }
.price del { color: var(--muted); font-size: 12px; margin-left: 4px; }
.sales { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.btn-add { margin-top: 2px; }

/* ---------------- 空状态 ---------------- */
.empty, .empty-inline { text-align: center; color: var(--muted); }
.empty { padding: 70px 0 80px; }
.empty strong { display: block; font-size: 16px; color: var(--ink); margin-bottom: 6px; }
.empty-inline { padding: 40px 0; font-size: 14px; }
.empty-inline a { color: var(--brand); font-weight: 600; }
.empty-inline a:hover { text-decoration: underline; }

/* ---------------- 购物车抽屉 ---------------- */
.drawer-mask { position: fixed; inset: 0; background: rgba(15, 35, 60, .45); z-index: 70; }
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(420px, 100%);
  background: #fff;
  z-index: 80;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s ease;
  box-shadow: -12px 0 40px rgba(10, 30, 60, .15);
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.drawer-head h3 { font-size: 16px; }
.drawer-close {
  border: 0;
  background: none;
  font-size: 24px;
  line-height: 1;
  color: var(--muted);
  padding: 2px 8px;
}
.drawer-close:hover { color: var(--ink); }
.drawer-list { flex: 1; overflow: auto; padding: 6px 18px; }
.cart-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.cart-thumb { width: 66px; height: 50px; border-radius: 8px; overflow: hidden; flex: none; }
.cart-thumb svg { width: 100%; height: 100%; }
.cart-info { flex: 1; min-width: 0; padding-right: 20px; }
.cart-name {
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cart-price { color: var(--price); font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.qty button {
  width: 26px;
  height: 26px;
  border: 0;
  background: #f6f8fb;
  font-size: 15px;
  color: var(--ink);
}
.qty button:hover { background: #e8eef7; }
.qty span { min-width: 28px; text-align: center; font-size: 13px; }
.cart-del {
  position: absolute;
  top: 12px;
  right: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 18px;
  padding: 2px 4px;
}
.cart-del:hover { color: var(--err); }
.cart-foot {
  border-top: 1px solid var(--line);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.cart-total { font-size: 13px; color: var(--muted); }
.cart-total strong { color: var(--price); font-size: 20px; margin-left: 6px; }
.cart-foot .btn { margin-left: auto; padding: 10px 26px; }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 16px);
  background: #123c66;
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 99;
  max-width: 88vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 页脚 ---------------- */
.site-footer { background: #0c2b4e; color: #b9cde6; margin-top: 24px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 30px;
  padding-top: 38px;
  padding-bottom: 26px;
}
.footer-grid h4 { color: #fff; font-size: 14px; margin-bottom: 10px; }
.footer-grid p, .footer-grid li { font-size: 13px; line-height: 2; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding: 14px 0;
  text-align: center;
  font-size: 12px;
  color: #8fb0d9;
}
.footer-bottom a { color: #cfe3ff; }
.footer-bottom a:hover { text-decoration: underline; }

/* =================================================================
   登录 / 注册页
   ================================================================= */
.auth-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, #eef4fb, #f8fafd 40%, #eef6f1);
}
.auth-top { display: flex; align-items: center; justify-content: space-between; padding-top: 18px; width: 100%; }
.back-link { font-size: 14px; color: var(--muted); }
.back-link:hover { color: var(--brand); }
.auth-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 16px 16px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 30px 28px 26px;
}
.auth-card h1 { font-size: 21px; margin-bottom: 4px; }
.auth-sub { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab {
  flex: 1;
  background: none;
  border: 0;
  padding: 10px 4px;
  font-size: 14px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.tab:hover { color: var(--brand); }
.tab.active { color: var(--brand); border-color: var(--brand); font-weight: 600; }
.pane { display: none; }
.pane.active { display: block; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.field input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  font-size: 14px;
  outline: none;
  background: #fbfcfe;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(14, 79, 143, .12);
  background: #fff;
}
.field input::placeholder { color: #9aa8ba; }

.code-row { display: flex; gap: 10px; }
.code-row input { flex: 1; min-width: 0; }
.send-btn { white-space: nowrap; padding: 0 14px; height: 42px; border-radius: 10px; font-size: 13px; }

.captcha-row { display: flex; gap: 10px; align-items: stretch; }
.captcha-row input { flex: 1; min-width: 0; }
.captcha-box {
  flex: none;
  width: 136px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: #fbfcfe;
  display: flex;
  align-items: center;
  justify-content: center;
}
.captcha-box svg { width: 100%; height: 100%; }
.captcha-loading { font-size: 12px; color: var(--muted); }
.captcha-tip { font-size: 12px; color: var(--muted); margin-top: -8px; margin-bottom: 14px; }
.captcha-tip button { border: 0; background: none; color: var(--brand); font-size: 12px; padding: 0; }

.pwd-row { position: relative; }
.pwd-row input { padding-right: 52px; }
.pwd-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  padding: 4px;
}
.pwd-toggle:hover { color: var(--brand); }

.form-error {
  background: #fdecec;
  color: #b91c1c;
  border: 1px solid #f6c9c9;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 14px;
}
.pane-hint { font-size: 12px; color: var(--muted); margin-top: 12px; text-align: center; }
.pane-hint a { color: var(--brand); font-weight: 600; }
.pane-hint a:hover { text-decoration: underline; }
.auth-foot { padding: 16px; text-align: center; font-size: 12px; color: var(--muted); }
.auth-foot a { color: inherit; }
.auth-foot a:hover { color: var(--brand); }

/* =================================================================
   会员中心
   ================================================================= */
.account-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
  padding-top: 24px;
  padding-bottom: 50px;
  align-items: start;
}
.acct-side { display: grid; gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.profile-card { text-align: center; }
.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  display: grid;
  place-items: center;
  margin: 0 auto 10px;
}
.profile-card h2 { font-size: 18px; margin-bottom: 4px; }
.member-badge {
  display: inline-block;
  background: #fdf3e3;
  color: #b45309;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  margin-top: 10px;
}
.sms-card h3, .tips-card h3 { font-size: 14px; margin-bottom: 8px; }
#smsBalance { font-size: 18px; font-weight: 700; color: var(--brand); margin-bottom: 4px; }
.tips-card ul { padding-left: 18px; font-size: 12px; color: var(--muted); line-height: 2; list-style: disc; }

.orders-card h2 { font-size: 18px; margin-bottom: 14px; }
.order { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.order-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-size: 13px; margin-bottom: 8px; }
.order-no { color: var(--muted); }
.order-status { color: var(--ok); font-weight: 600; }
.order-items { margin-bottom: 8px; }
.order-items li { display: flex; gap: 10px; padding: 3px 0; font-size: 13px; }
.oi-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-items em { font-style: normal; color: var(--muted); }
.oi-price { min-width: 52px; text-align: right; }
.order-foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px dashed var(--line);
  padding-top: 8px;
}
.order-foot strong { color: var(--price); font-size: 14px; }

/* =================================================================
   响应式
   ================================================================= */
@media (max-width: 920px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 10px 0; row-gap: 10px; }
  .search-box { order: 3; flex-basis: 100%; max-width: 100%; }
  .header-actions { margin-left: auto; }
  .hero-inner { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 40px; }
  .hero-art { display: none; }
  .promise-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .account-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .hero h1 { font-size: 28px; }
  .hero-stats { gap: 22px; }
  .promise-grid { gap: 10px; }
  .footer-grid { grid-template-columns: 1fr; gap: 18px; }
  .auth-card { padding: 24px 20px 22px; }
  .cart-foot { flex-wrap: wrap; }
  .cart-foot .btn { margin-left: 0; flex: 1; }
}
