:root {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --panel-2: #ffffff;
  --border: #e6e9ef;
  --accent: #0ea472;
  --accent-2: #0891b2;
  --accent-ink: #ffffff;
  --warn: #e8590c;
  --text: #10151f;
  --muted: #6b7280;
  --radius: 14px;
  --font-display: 'Space Grotesk', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
}
.brand-mark i {
  display: block;
  width: 4px;
  background: var(--accent);
  border-radius: 2px;
}
.brand-mark i:nth-child(1) { height: 6px; }
.brand-mark i:nth-child(2) { height: 10px; }
.brand-mark i:nth-child(3) { height: 14px; }
.brand-mark i:nth-child(4) { height: 18px; background: var(--accent-2); }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.5px;
}
.brand-dot { color: var(--accent); }

.series-nav {
  position: relative;
  flex-shrink: 0;
}
.series-trigger {
  display: inline-flex; align-items: center; gap: 4px;
  white-space: nowrap;
  font-size: 13.5px;
  color: var(--muted);
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--border);
  cursor: default;
  user-select: none;
  transition: all 0.2s ease;
}
.series-nav:hover .series-trigger {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(76,224,179,0.06);
}
.series-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  min-width: 160px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 50;
}
.series-nav:hover .series-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.series-dropdown a {
  display: block;
  font-size: 13.5px;
  color: var(--muted);
  padding: 9px 14px;
  border-radius: 8px;
  white-space: nowrap;
  transition: all 0.12s ease;
}
.series-dropdown a:hover {
  color: var(--text);
  background: rgba(76,224,179,0.08);
}

.contact-btn {
  flex-shrink: 0;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 13.5px;
  padding: 9px 16px;
  border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.contact-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(76, 224, 179, 0.25); }

.track-btn {
  flex-shrink: 0;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-weight: 600;
  font-size: 13.5px;
  padding: 9px 16px;
  border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.track-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 72px 24px 56px;
  background:
    radial-gradient(circle at 15% 20%, rgba(94, 225, 230, 0.10), transparent 45%),
    radial-gradient(circle at 85% 0%, rgba(76, 224, 179, 0.10), transparent 40%);
  border-bottom: 1px solid var(--border);
}
.hero-inner { max-width: 1180px; margin: 0 auto; }
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2.5px;
  color: var(--accent-2);
  margin: 0 0 18px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 60px);
  line-height: 1.08;
  font-weight: 700;
  margin: 0 0 18px;
  letter-spacing: -0.5px;
}
.hero-sub {
  max-width: 560px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.7;
  margin: 0 0 36px;
}
.hero-stats { display: flex; gap: 36px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 600;
  color: var(--accent);
}
.stat-label { font-size: 12.5px; color: var(--muted); }

/* ---------- Catalog ---------- */
.catalog { max-width: 1180px; margin: 0 auto; padding: 48px 24px 80px; }
.loading { text-align: center; color: var(--muted); padding: 80px 0; font-family: var(--font-mono); }

.series-block { margin-bottom: 52px; scroll-margin-top: 90px; }
.series-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.series-title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
}
.series-count { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.product-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s ease, transform 0.15s ease;
  position: relative;
  overflow: hidden;
}
.product-card:hover { border-color: rgba(14, 164, 114, 0.35); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16,21,31,0.06); }

.card-img-wrap {
  margin: -20px -20px 4px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg);
}
.card-img-wrap img { display: block; width: 100%; height: 100%; object-fit: cover; }

.card-bars {
  position: absolute;
  top: 18px;
  right: 20px;
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 14px;
  opacity: 0.55;
}
.card-bars i { width: 3px; background: var(--accent); border-radius: 1px; }
.card-bars i:nth-child(1) { height: 5px; }
.card-bars i:nth-child(2) { height: 8px; }
.card-bars i:nth-child(3) { height: 11px; }
.card-bars i:nth-child(4) { height: 14px; background: var(--accent-2); }

.card-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  padding-right: 30px;
  line-height: 1.35;
}
.card-spec { font-size: 12.5px; color: var(--muted); line-height: 1.6; min-height: 18px; }
.card-remark { font-size: 11.5px; color: var(--muted); font-family: var(--font-mono); opacity: 0.8; }

.card-bottom {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
}
.card-price { font-family: var(--font-mono); font-size: 20px; font-weight: 600; color: var(--accent); }
.card-price small { font-size: 12px; color: var(--muted); font-weight: 400; }

.buy-btn {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  transition: all 0.15s ease;
}
.buy-btn:hover { background: var(--accent); color: var(--accent-ink); }

.sold-out .buy-btn,
.sold-out .card-price { color: var(--warn); border-color: var(--warn); }
.sold-out .buy-btn { pointer-events: none; opacity: 0.7; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 40px 24px; }
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-brand { font-size: 17px; margin-bottom: 8px; }
.footer-note { color: var(--muted); font-size: 12.5px; max-width: 420px; line-height: 1.6; margin: 0; }
.footer-contact { text-align: right; }
.footer-contact p { margin: 0 0 6px; color: var(--muted); font-size: 12.5px; }
.footer-whatsapp { font-family: var(--font-mono); color: var(--accent-2); font-size: 15px; font-weight: 600; }

/* ---------- Modal ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(5, 8, 15, 0.72);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-mask[hidden] { display: none !important; }
.modal {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px;
  max-width: 400px;
  width: 100%;
  position: relative;
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; color: var(--muted);
  font-size: 22px; line-height: 1;
}
.modal-title { font-family: var(--font-display); font-size: 19px; margin: 0 0 6px; padding-right: 20px; }
.modal-img-wrap { margin: -8px 0 16px; border-radius: 12px; overflow: hidden; background: var(--bg); }
.modal-img-wrap[hidden] { display: none !important; }
.modal-img-wrap img { display: block; width: 100%; max-height: 180px; object-fit: cover; }
.qty-stepper { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.qty-btn {
  width: 34px; height: 34px; flex-shrink: 0;
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; font-size: 17px; line-height: 1;
}
.qty-btn:hover { border-color: var(--accent); color: var(--accent); }
.qty-input {
  width: 60px; text-align: center;
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  padding: 8px 4px; border-radius: 8px; font-size: 14px; font-family: var(--font-mono);
}
.qty-input:focus { outline: none; border-color: var(--accent); }
.modal-price { font-family: var(--font-mono); font-size: 26px; color: var(--accent); margin: 0 0 22px; }
.modal-label { font-size: 12.5px; color: var(--muted); margin: 0 0 10px; }
.modal-label .req { color: #ef4444; font-weight: 600; }
.info-notice { font-size: 12px; color: var(--muted); margin: 12px 0 0; line-height: 1.5; }
.info-notice a { color: var(--accent); text-decoration: underline; }
.pay-methods { display: flex; gap: 10px; margin-bottom: 22px; }
.pay-btn {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  transition: border-color 0.15s ease;
}
.pay-btn.active { border-color: var(--accent); color: var(--accent); }
.pay-icon {
  width: 20px; height: 20px; border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700;
}
.contact-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 13.5px;
  margin-bottom: 22px;
}
.contact-input:focus { outline: none; border-color: var(--accent); }
.confirm-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  padding: 13px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
}
.confirm-btn:disabled { opacity: 0.5; }

.order-no { font-family: var(--font-mono); font-size: 13px; color: var(--muted); margin: 0 0 4px; }
.qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 20px 0; }
.qr-img {
  width: 200px; height: 200px;
  object-fit: contain;
  background: #fff;
  border-radius: 12px;
  padding: 10px;
}
.qr-img[hidden] { display: none !important; }
.qr-fallback { font-size: 12.5px; color: var(--warn); text-align: center; max-width: 260px; }
.pay-tip { font-size: 12px; color: var(--muted); line-height: 1.6; margin-bottom: 18px; }
.whatsapp-confirm { background: var(--accent-2); }

/* ---------- 支付成功 ---------- */
.success-icon {
  font-size: 48px; text-align: center; margin-bottom: 8px;
}
.order-copy-box {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px; margin-bottom: 8px;
}
.order-copy-label { font-size: 12px; color: var(--muted); }
.order-copy-value {
  font-family: var(--font-mono); font-size: 16px; font-weight: 600;
  color: var(--accent); cursor: pointer; user-select: none;
  transition: opacity 0.15s ease;
}
.order-copy-value:hover { opacity: 0.7; }
.copy-toast {
  text-align: center; font-size: 13px; color: #0a8a4a; font-weight: 600;
  margin: 0 0 12px;
}

/* ---------- Product Detail Page ---------- */
.back-link {
  white-space: nowrap;
  font-size: 13.5px;
  color: var(--muted);
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  transition: all 0.15s ease;
}
.back-link:hover { color: var(--text); border-color: var(--accent); }

.product-detail-page { max-width: 1180px; margin: 0 auto; padding: 32px 24px 60px; }
.detail-layout {
  display: none;
}
.detail-layout:not([hidden]) {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}
.detail-left { flex: 1; min-width: 0; }
.detail-right { flex-shrink: 0; width: 340px; }

.detail-breadcrumb {
  font-size: 12.5px; color: var(--muted); margin-bottom: 16px;
}
.detail-breadcrumb a { color: var(--muted); text-decoration: none; }
.detail-breadcrumb a:hover { color: var(--accent); }
.detail-breadcrumb .sep { margin: 0 6px; }

.detail-title {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 700; margin: 0 0 6px;
  line-height: 1.3;
}
.detail-spec {
  font-size: 15px; color: var(--muted); margin: 0 0 28px;
}
.detail-content {
  font-size: 14.5px; line-height: 1.85; color: var(--text);
  padding-bottom: 28px; border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.detail-content p { margin: 0 0 12px; }
.detail-content img { max-width: 100%; border-radius: 10px; margin: 10px 0; }
.detail-content h2, .detail-content h3 {
  font-size: 16px; font-weight: 600; margin: 20px 0 10px;
}
.detail-content ul, .detail-content ol { padding-left: 20px; margin: 0 0 12px; }
.detail-content li { margin-bottom: 6px; }

.detail-images { margin-top: 28px; }
.detail-img-item { margin-bottom: 16px; }
.detail-img-item img {
  width: 100%; border-radius: 12px; border: 1px solid var(--border);
}

.order-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  position: sticky;
  top: 80px;
}
.order-price-label { font-size: 12.5px; color: var(--muted); margin: 0 0 4px; }
.order-price {
  font-family: var(--font-mono);
  font-size: 30px; font-weight: 700; color: var(--accent);
  margin: 0 0 24px;
}

/* 支付步骤全屏卡片 */
.detail-pay-step {
  display: none;
}
.detail-pay-step:not([hidden]) {
  display: flex; justify-content: center; align-items: flex-start;
  padding: 40px 20px;
}
.pay-step-card {
  position: relative;
  max-width: 420px; width: 100%;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 28px;
  text-align: center;
}
.pay-step-card .modal-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none; font-size: 24px; color: var(--muted);
  cursor: pointer; line-height: 1;
}

@media (max-width: 900px) {
  .detail-layout { flex-direction: column; }
  .detail-right { width: 100%; }
  .order-card { position: static; }
}

@media (max-width: 720px) {
  .series-nav { display: none; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-contact { text-align: left; }
  .detail-title { font-size: 22px; }
  .product-detail-page { padding: 20px 16px 40px; }
  .topbar-inner { gap: 12px; padding: 12px 16px; }
  .topbar-inner .contact-btn, .topbar-inner .track-btn { display: none; }
}
