/* ============================================================
   云礼集 · Digital Gift Cards — V3 Light Premium Design
   Light surface, teal primary, gold accent, clean card design
   ============================================================ */

:root {
  --bg: #f8f9fc;
  --surface: #ffffff;
  --surface-2: #f4f5f9;
  --surface-3: #eef0f6;
  --border: #e2e5ed;
  --border-light: #d1d5e0;
  --ink: #111322;
  --heading: var(--ink);
  --body: #5a6078;
  --muted: #8e93a7;
  --primary: #0ea5a0;
  --primary-dark: #0c908b;
  --primary-soft: rgba(14, 165, 160, 0.08);
  --primary-glow: rgba(14, 165, 160, 0.15);
  --accent: #e59a00;
  --accent-soft: rgba(229, 154, 0, 0.08);
  --green: #16a34a;
  --green-soft: rgba(22, 163, 74, 0.08);
  --red: #dc2626;
  --red-soft: rgba(220, 38, 38, 0.06);
  --shadow: 0 2px 16px rgba(17, 19, 34, 0.07);
  --shadow-lg: 0 12px 40px rgba(17, 19, 34, 0.1);
  --white: #ffffff;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --container: 1280px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--body);
  background: var(--bg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

/* ============================================================
   HEADER
   ============================================================ */

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 32px;
  border-bottom: 1px solid var(--border);
  background: rgba(248, 249, 252, 0.85);
  backdrop-filter: blur(20px) saturate(1.4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.brand-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 100%;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.header-nav a {
  display: grid;
  height: 100%;
  place-items: center;
  border-bottom: 2px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.header-nav a:hover {
  color: var(--ink);
}

.header-nav a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.orders-button,
.wallet-button,
.account-button {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--body);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}

.orders-button:hover,
.wallet-button:hover,
.account-button:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.orders-button[hidden],
.wallet-button[hidden] {
  display: none;
}

.orders-button svg,
.wallet-button svg,
.account-button svg {
  width: 17px;
}

.wallet-button strong {
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.cart-button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #ffffff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.2s var(--ease), transform 0.15s var(--ease), box-shadow 0.2s var(--ease);
}

.cart-button:hover {
  background: var(--primary-dark);
  box-shadow: 0 0 20px var(--primary-glow);
}

.cart-button:active {
  transform: scale(0.97);
}

.cart-button svg {
  width: 17px;
}

.cart-count {
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  padding: 0 5px;
  border-radius: 10px;
  color: var(--primary);
  background: #ffffff;
  font-size: 11px;
  font-weight: 700;
}

/* ============================================================
   HERO TRUST BADGE — Floating top-right, blends with bg
   ============================================================ */

.hero-trust-badge {
  position: absolute;
  z-index: 2;
  top: 28px;
  right: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(12px) saturate(1.2);
  border: 1px solid rgba(226, 229, 237, 0.3);
  box-shadow: none;
}

.hero-trust-badge > i[data-lucide] {
  width: 24px;
  height: 24px;
  color: var(--primary);
  opacity: 0.55;
}

.hero-trust-badge div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.hero-trust-badge span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0.7;
}

.hero-trust-badge strong {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.15;
  opacity: 0.75;
}

.hero-trust-badge small {
  font-size: 11px;
  color: var(--primary);
  font-weight: 600;
  white-space: nowrap;
  margin-left: auto;
  opacity: 0.65;
}

/* ============================================================
   HERO DECORATIVE ELEMENTS
   ============================================================ */

.hero-decor {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.decor-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--border);
  opacity: 0;
  animation: decor-fade-in 1.2s var(--ease-out) forwards;
}

.decor-ring-1 {
  width: 520px;
  height: 520px;
  top: -120px;
  left: -160px;
  border-color: rgba(14, 165, 160, 0.18);
  background: radial-gradient(circle, rgba(14, 165, 160, 0.04), transparent 70%);
  animation-delay: 0.3s;
}

.decor-ring-2 {
  width: 380px;
  height: 380px;
  bottom: -80px;
  right: -100px;
  border-color: rgba(229, 154, 0, 0.14);
  background: radial-gradient(circle, rgba(229, 154, 0, 0.03), transparent 70%);
  animation-delay: 0.6s;
}

.decor-ring-3 {
  width: 260px;
  height: 260px;
  top: 40%;
  left: 60%;
  border-color: rgba(99, 102, 241, 0.12);
  background: radial-gradient(circle, rgba(99, 102, 241, 0.03), transparent 70%);
  animation-delay: 0.9s;
}

.decor-dots {
  position: absolute;
  background-image: radial-gradient(circle, rgba(17, 19, 34, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0;
  animation: decor-fade-in 1.5s var(--ease-out) 1.2s forwards;
}

.decor-dots-1 {
  width: 340px;
  height: 260px;
  top: 18%;
  right: 8%;
}

.decor-dots-2 {
  width: 280px;
  height: 200px;
  bottom: 22%;
  left: 5%;
  background-size: 22px 22px;
}

@keyframes decor-fade-in {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ============================================================
   HERO — Light, centered, gradient mesh
   ============================================================ */

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 64px);
  padding: 72px 32px 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 15% 20%, rgba(14, 165, 160, 0.15), transparent 55%),
    radial-gradient(ellipse 50% 45% at 85% 80%, rgba(229, 154, 0, 0.12), transparent 55%),
    radial-gradient(ellipse 45% 35% at 50% 50%, rgba(99, 102, 241, 0.09), transparent 55%),
    radial-gradient(ellipse 35% 50% at 75% 25%, rgba(14, 165, 160, 0.07), transparent 50%);
  pointer-events: none;
}

.hero-image,
.hero-shade {
  display: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  max-width: 880px;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: hero-fade-in 0.7s var(--ease-out) both;
}

@keyframes hero-fade-in {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  display: none;
}

.hero h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: var(--ink);
}

.hero-accent {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-copy {
  max-width: 500px;
  margin: 24px 0 36px;
  color: var(--body);
  font-size: 16px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.primary-link {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  gap: 10px;
  padding: 0 24px;
  border-radius: var(--radius-sm);
  color: #ffffff;
  background: var(--primary);
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 4px 20px var(--primary-glow);
  transition: background 0.25s var(--ease), transform 0.2s var(--ease), box-shadow 0.25s var(--ease), gap 0.25s var(--ease);
}

.primary-link:hover {
  background: var(--primary-dark);
  gap: 16px;
  box-shadow: 0 8px 30px var(--primary-glow);
  transform: translateY(-2px);
}

.primary-link svg {
  width: 18px;
  height: 18px;
}

.ghost-link {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  padding: 0 20px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--body);
  font-weight: 600;
  font-size: 14px;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.ghost-link:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.hero-price-preview {
  display: block;
  width: min(760px, 100%);
  margin-top: 158px;
}

.hero-price-heading {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin-bottom: 10px;
  white-space: nowrap;
}

.hero-price-heading strong {
  color: var(--heading);
  font-size: 11px;
}

.hero-price-heading span {
  color: var(--primary);
  font-size: 9px;
  font-weight: 600;
}

.hero-price-grid {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 8px;
}

.hero-price-card {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 4px 14px rgb(15 23 42 / 4%);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease);
  white-space: nowrap;
  cursor: pointer;
}

.hero-price-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.hero-price-card span {
  color: var(--heading);
  font-size: 11px;
  font-weight: 600;
}

.hero-price-card em {
  padding-left: 7px;
  border-left: 1px solid var(--border);
  color: var(--heading);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.hero-price-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  padding-left: 6px;
}

.hero-price-original,
.hero-price-card .hero-price-original {
  font-size: 9px;
  color: #94a3b8;
  text-decoration: line-through;
  font-weight: 400;
  border: none;
  padding: 0;
  line-height: 1.3;
}

.hero-price-promo,
.hero-price-card .hero-price-promo {
  font-size: 11px;
  color: #dc2626;
  font-weight: 800;
  border: none;
  padding: 0;
  line-height: 1.3;
}

/* ============================================================
   STATS STRIP — Horizontal with dividers
   ============================================================ */

.stats-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 24px 32px;
}

.stats-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.stat-item strong {
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.stat-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* ============================================================
   CATALOG SECTION
   ============================================================ */

.catalog,
.process,
.trust-section {
  padding: 96px 32px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 48px;
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
}

.section-heading h2,
.notice h2 {
  margin: 0;
  font-size: clamp(32px, 3.5vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: var(--ink);
}

.section-heading .eyebrow {
  margin-bottom: 12px;
}

.catalog-heading-copy {
  max-width: 420px;
  text-align: right;
}

.catalog-heading-copy p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.api-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.api-status.connected {
  color: var(--green);
}

.api-status.failure {
  color: var(--red);
}

.api-status.loading svg {
  animation: spin 1s linear infinite;
}

.api-status svg {
  width: 13px;
  height: 13px;
}

.catalog-toolbar {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
  padding: 10px 16px;
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.catalog-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.catalog-search {
  display: flex;
  width: 280px;
  height: 40px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.catalog-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.catalog-search svg {
  width: 16px;
  color: var(--muted);
}

.catalog-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
  color: var(--ink);
}

.catalog-search input::placeholder {
  color: var(--muted);
}

.region-select-wrap {
  position: relative;
  display: flex;
  width: 170px;
  height: 40px;
  align-items: center;
}

.region-select-wrap select {
  width: 100%;
  height: 100%;
  padding: 0 36px 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: 0;
  background: var(--surface-2);
  cursor: pointer;
  appearance: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  transition: border-color 0.2s var(--ease);
}

.region-select-wrap select:focus {
  border-color: var(--primary);
}

.region-select-wrap select option {
  background: var(--surface-2);
  color: var(--ink);
}

.region-select-wrap svg {
  position: absolute;
  right: 12px;
  width: 15px;
  pointer-events: none;
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.stock-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.stock-toggle input {
  position: absolute;
  opacity: 0;
}

.toggle-track {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 12px;
  background: var(--border-light);
  transition: 0.2s var(--ease);
}

.toggle-track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--muted);
  content: "";
  transition: 0.2s var(--ease);
}

.stock-toggle input:checked + .toggle-track {
  background: var(--primary);
}

.stock-toggle input:checked + .toggle-track::after {
  background: #ffffff;
  transform: translateX(18px);
}

/* ============================================================
   PRODUCT GRID & CARDS
   ============================================================ */

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  max-width: var(--container);
  margin: 0 auto;
}

.catalog-error {
  display: flex;
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding: 18px 20px;
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: var(--radius);
  background: var(--red-soft);
}

.catalog-error > div,
.catalog-error span {
  display: flex;
}

.catalog-error > div {
  align-items: center;
  gap: 14px;
}

.catalog-error span {
  flex-direction: column;
  gap: 4px;
}

.catalog-error svg {
  width: 24px;
  color: var(--red);
}

.catalog-error small {
  color: var(--muted);
  line-height: 1.5;
}

.catalog-error button {
  min-width: 100px;
  min-height: 40px;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: var(--surface-3);
  cursor: pointer;
  font-weight: 700;
  transition: background 0.2s var(--ease);
}

.catalog-error button:hover {
  background: var(--primary);
  color: #ffffff;
}

.product-skeleton {
  pointer-events: none;
}

.skeleton-visual,
.skeleton-info span,
.skeleton-info strong,
.skeleton-info i {
  display: block;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 45%, var(--surface-2) 65%);
  background-size: 220% 100%;
  animation: skeleton-loading 1.4s ease-in-out infinite;
}

.skeleton-visual {
  min-height: 200px;
  border-radius: var(--radius) var(--radius) 0 0;
}

.skeleton-info {
  padding: 20px;
}

.skeleton-info span,
.skeleton-info strong,
.skeleton-info i {
  height: 12px;
  margin-bottom: 12px;
  border-radius: 4px;
}

.skeleton-info span { width: 42%; }
.skeleton-info strong { width: 74%; height: 18px; }
.skeleton-info i { width: 55%; height: 26px; margin-bottom: 0; }

@keyframes skeleton-loading {
  to { background-position: -220% 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.product-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.product-card:hover {
  border-color: var(--border-light);
  box-shadow: 0 16px 40px rgba(17, 19, 34, 0.12), 0 0 30px var(--primary-glow);
  transform: translateY(-6px);
}

.product-visual {
  position: relative;
  display: grid;
  min-height: 200px;
  place-items: center;
  overflow: hidden;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.product-visual::before {
  position: absolute;
  width: 220px;
  height: 220px;
  border: 50px solid var(--card-color);
  border-radius: 50%;
  opacity: 0.08;
  content: "";
  transform: translate(70px, -65px);
}

.country-card-art {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 80%, var(--card-color), transparent 50%);
  opacity: 0.12;
}

.country-card-art::after {
  position: absolute;
  right: -40px;
  bottom: -70px;
  width: 250px;
  height: 250px;
  border: 55px solid var(--card-color);
  border-radius: 50%;
  opacity: 0.06;
  content: "";
}

.stock-badge {
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 14px;
  padding: 5px 10px;
  border-radius: 20px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(74, 222, 128, 0.2);
}

.stock-badge.low {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgba(251, 191, 36, 0.2);
}

.stock-badge.out {
  color: var(--muted);
  background: var(--surface-3);
  border-color: var(--border);
}

.region-symbol {
  position: absolute;
  z-index: 1;
  top: 16px;
  right: 16px;
  display: grid;
  min-width: 50px;
  height: 36px;
  padding: 0 10px;
  place-items: center;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(17, 19, 34, 0.1);
}

.country-gift-card {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(72%, 200px);
  aspect-ratio: 1.58;
  padding: 18px;
  border-radius: 10px;
  color: var(--white);
  background: var(--card-color);
  box-shadow: 0 12px 28px rgba(17, 19, 34, 0.15);
  transform: rotate(-5deg);
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s var(--ease);
}

.product-card:hover .country-gift-card {
  transform: rotate(-2deg) translateY(-4px);
}

.country-gift-card span {
  width: max-content;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
}

.country-gift-card strong {
  align-self: flex-end;
  font-size: 22px;
}

.amount-count {
  color: var(--primary);
  font-weight: 700;
}

.product-info {
  padding: 20px;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.product-info h3 {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink);
  font-weight: 700;
}

.price-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 16px;
}

.sale-price {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.face-value {
  color: var(--muted);
  font-size: 12px;
  text-decoration: line-through;
}

.add-button {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.add-button:hover:not(:disabled) {
  color: #ffffff;
  background: var(--primary);
  border-color: var(--primary);
}

.add-button:disabled {
  border-color: var(--border);
  color: var(--muted);
  background: transparent;
  cursor: not-allowed;
}

.add-button svg {
  width: 17px;
}

.empty-state {
  padding: 90px 20px;
  color: var(--muted);
  text-align: center;
  max-width: var(--container);
  margin: 0 auto;
}

.empty-state svg {
  width: 38px;
  height: 38px;
}

/* ============================================================
   PROCESS — Horizontal timeline
   ============================================================ */

.process {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.process-track {
  display: flex;
  align-items: stretch;
  gap: 0;
  max-width: var(--container);
  margin: 0 auto;
}

.process-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 24px;
  position: relative;
}

.step-marker {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: var(--bg);
  margin-bottom: 24px;
  position: relative;
  z-index: 2;
  box-shadow: 0 0 20px var(--primary-glow);
}

.step-marker span {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary);
}

.process-step > i[data-lucide],
.process-step svg {
  width: 28px;
  height: 28px;
  color: var(--primary);
  margin-bottom: 16px;
}

.process-step h3 {
  margin: 0 0 10px;
  font-size: 18px;
  color: var(--ink);
}

.process-step p {
  max-width: 240px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.step-line {
  flex-shrink: 0;
  width: 60px;
  min-height: 48px;
  border-bottom: 2px dashed var(--border-light);
  margin-bottom: 24px;
  align-self: flex-start;
}

/* ============================================================
   TRUST SECTION — Compact badges
   ============================================================ */

.trust-section {
  padding: 80px 32px;
}

.trust-badges {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: var(--container);
  margin: 0 auto;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.trust-badge:hover {
  border-color: var(--primary);
  box-shadow: 0 0 24px var(--primary-glow);
}

.trust-badge > svg,
.trust-badge > i[data-lucide] {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: var(--primary);
  padding: 8px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
}

.trust-badge div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.trust-badge strong {
  font-size: 15px;
  color: var(--ink);
}

.trust-badge span {
  font-size: 12px;
  color: var(--muted);
}

/* ============================================================
   NOTICE SECTION — Elevated card
   ============================================================ */

.notice {
  padding: 64px 32px 96px;
}

.notice-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 36px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.notice-icon {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
}

.notice-icon svg {
  width: 28px;
  height: 28px;
}

.notice-content h2 {
  margin: 8px 0 16px;
}

.notice-content p {
  margin: 0 0 12px;
  color: var(--body);
  font-size: 14px;
  line-height: 1.85;
}

.notice-content p:last-child {
  margin-bottom: 0;
}

/* ============================================================
   FOOTER
   ============================================================ */

footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 48px 32px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.footer-brand {
  font-size: 17px;
  color: var(--ink);
}

.footer-brand .brand-avatar {
  width: 30px;
  height: 30px;
}

footer p {
  max-width: 500px;
  margin: 0;
  line-height: 1.7;
}

footer > span {
  color: var(--muted);
}

/* ============================================================
   CART DRAWER
   ============================================================ */

.drawer-backdrop {
  position: fixed;
  z-index: 29;
  inset: 0;
  visibility: hidden;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: 0.3s var(--ease);
  backdrop-filter: blur(4px);
}

.drawer-backdrop.open {
  visibility: visible;
  opacity: 1;
}

.cart-drawer {
  position: fixed;
  z-index: 30;
  top: 0;
  right: 0;
  display: flex;
  width: min(440px, 100vw);
  height: 100vh;
  padding: 28px;
  flex-direction: column;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -12px 0 40px rgba(17, 19, 34, 0.1);
  transform: translateX(105%);
  transition: transform 0.35s var(--ease-out);
}

.cart-drawer.open {
  transform: translateX(0);
}

.drawer-header,
.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.drawer-header h2,
.dialog-header h2 {
  margin: 0;
  font-size: 24px;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.icon-button:hover {
  color: var(--ink);
  background: var(--surface-3);
  border-color: var(--border-light);
}

.icon-button svg {
  width: 18px;
}

.cart-items {
  overflow-y: auto;
  padding: 4px 0;
  flex: 1;
}

.cart-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item-visual {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: var(--radius-sm);
  color: var(--white);
  background: var(--item-color);
  font-size: 12px;
  font-weight: 700;
}

.cart-item h3 {
  margin: 1px 0 5px;
  font-size: 14px;
  color: var(--ink);
}

.cart-item-price {
  color: var(--muted);
  font-size: 12px;
}

.quantity-control {
  display: flex;
  width: max-content;
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.quantity-control button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--body);
  transition: background 0.15s var(--ease);
}

.quantity-control button:hover {
  background: var(--surface-3);
}

.quantity-control span {
  display: grid;
  width: 32px;
  place-items: center;
  border-right: 1px solid var(--border);
  border-left: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.remove-button {
  align-self: start;
  padding: 4px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: color 0.2s var(--ease);
}

.remove-button:hover {
  color: var(--red);
}

.remove-button svg {
  width: 17px;
}

.cart-empty {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--muted);
}

.cart-empty > svg {
  width: 42px;
  height: 42px;
  margin-bottom: 10px;
}

.text-button {
  padding: 8px 2px;
  border: 0;
  border-bottom: 1px solid var(--primary);
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.cart-summary {
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.cart-summary > div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.cart-summary > div strong {
  color: var(--ink);
}

.cart-summary .total-row {
  margin: 18px 0;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--ink);
  font-size: 16px;
}

.total-row strong {
  font-size: 24px;
  font-weight: 800;
}

.checkout-button,
.secondary-button {
  display: flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.15s var(--ease), box-shadow 0.25s var(--ease);
}

.checkout-button {
  border: 0;
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 4px 16px var(--primary-glow);
}

.checkout-button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--primary-glow);
}

.checkout-button:active {
  transform: translateY(0);
}

.secondary-button {
  border: 1px solid var(--border-light);
  background: var(--surface-2);
  color: var(--body);
}

.secondary-button:hover {
  background: var(--surface-3);
  border-color: var(--primary);
  color: var(--primary);
}

.checkout-button svg,
.secondary-button svg {
  width: 18px;
  height: 18px;
}

.summary-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.summary-note svg {
  width: 13px;
}

/* ============================================================
   DIALOGS — Shared (dark surface)
   ============================================================ */

.order-dialog,
.product-dialog,
.auth-dialog,
.recharge-dialog,
.alipay-dialog,
.wallet-dialog,
.orders-dialog,
.service-dialog {
  width: min(560px, calc(100vw - 30px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: dialog-pop 0.28s var(--ease-out);
  color: var(--body);
}

@keyframes dialog-pop {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.order-dialog::backdrop,
.product-dialog::backdrop,
.auth-dialog::backdrop,
.recharge-dialog::backdrop,
.alipay-dialog::backdrop,
.wallet-dialog::backdrop,
.orders-dialog::backdrop,
.service-dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}

.auth-dialog {
  width: min(430px, calc(100vw - 30px));
}

.wallet-dialog {
  width: min(480px, calc(100vw - 30px));
}

.recharge-dialog {
  width: min(460px, calc(100% - 28px));
}

.alipay-dialog {
  width: min(420px, calc(100% - 28px));
}

.orders-dialog {
  width: min(700px, calc(100vw - 30px));
}

.orders-dialog > .dialog-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
}

.dialog-header h2 {
  font-size: 22px;
}

/* ============================================================
   ORDERS DIALOG
   ============================================================ */

.orders-tabs {
  display: flex;
  gap: 6px;
  margin: 20px 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.orders-tabs button {
  min-height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: var(--surface-2);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.orders-tabs button.selected {
  color: #ffffff;
  background: var(--primary);
}

.orders-loading,
.orders-empty {
  padding: 55px 20px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.orders-empty svg {
  width: 34px;
  height: 34px;
}

.order-card {
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  transition: border-color 0.2s var(--ease);
}

.order-card:hover {
  border-color: var(--border-light);
}

.order-card-header,
.order-card-total,
.order-item-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.order-card-header {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.order-card-id {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.order-card-time {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.order-status {
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

.order-status.unpaid {
  color: var(--accent);
  background: var(--accent-soft);
}

.order-status.paid {
  color: var(--green);
  background: var(--green-soft);
}

.order-status-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.order-refresh-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--body);
  background: var(--surface);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.order-refresh-button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.order-refresh-button svg {
  width: 13px;
  height: 13px;
}

.order-refresh-button.refreshing svg {
  animation: spin 0.8s linear infinite;
}

.order-items {
  padding: 12px 0;
}

.order-item-line {
  margin: 7px 0;
  color: var(--muted);
  font-size: 12px;
}

.order-card-total {
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--body);
}

.order-deliveries {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(248, 113, 113, 0.3);
  background: var(--red-soft);
  border-radius: var(--radius-sm);
}

.order-deliveries strong {
  color: var(--red);
  font-size: 12px;
}

.order-deliveries code {
  overflow-wrap: anywhere;
  padding: 8px;
  color: var(--ink);
  background: var(--surface);
  font-size: 12px;
  border-radius: 4px;
}

.order-failure {
  display: block;
  margin-top: 10px;
  color: var(--red);
}

.order-card-total strong {
  font-size: 18px;
  color: var(--ink);
}

/* ============================================================
   WALLET DIALOG
   ============================================================ */

.wallet-overview {
  margin: 22px 0 14px;
  padding: 28px;
  color: var(--ink);
  background: linear-gradient(135deg, var(--surface-2), var(--surface-3));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.wallet-overview::before {
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  border: 35px solid var(--primary-soft);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.wallet-overview span,
.wallet-overview strong,
.wallet-overview small {
  display: block;
}

.wallet-overview span {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12px;
}

.wallet-overview strong {
  margin-bottom: 9px;
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.wallet-overview small {
  color: var(--muted);
  font-size: 11px;
}

.wallet-dialog > .checkout-button svg {
  width: 17px;
}

.wallet-history {
  margin-top: 28px;
}

.recharge-heading {
  margin-top: 0;
}

.wallet-recharges {
  display: grid;
  gap: 10px;
  margin-bottom: 28px;
}

.wallet-list-toggle {
  width: 100%;
  margin: -18px 0 28px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.wallet-list-toggle:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.wallet-recharge {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}

.wallet-recharge strong,
.wallet-recharge small {
  display: block;
}

.wallet-recharge strong {
  color: var(--ink);
}

.wallet-recharge small {
  color: var(--muted);
  font-size: 10px;
}

.recharge-status {
  align-self: start;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface-3);
  font-size: 10px;
  font-weight: 800;
}

.recharge-status.approved {
  color: var(--green);
  background: var(--green-soft);
}

.recharge-status.rejected {
  color: var(--red);
  background: var(--red-soft);
}

.wallet-empty.compact {
  min-height: auto;
  margin: -10px 0 28px;
  padding: 16px;
}

.recharge-form {
  display: grid;
  gap: 16px;
  padding-top: 22px;
}

.amount-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.amount-presets button {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  cursor: pointer;
  font-weight: 800;
  color: var(--ink);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}

.amount-presets button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.amount-presets button.selected {
  color: #ffffff;
  border-color: var(--primary);
  background: var(--primary);
}

.alipay-button {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 16px;
  border: 1px solid #1677ff;
  border-radius: var(--radius-sm);
  color: #fff;
  background: #1677ff;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s var(--ease);
}

.alipay-button:hover {
  background: #0958d9;
}

.alipay-button.secondary {
  border-color: #1677ff;
  background: #1677ff;
}

.alipay-button-hint {
  font-size: 10px;
  opacity: .85;
}

.alipay-button-main {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: inherit;
  opacity: 1;
}

.alipay-brand-mark {
  display: block;
  width: 29px;
  height: 29px;
  object-fit: contain;
  opacity: .78;
}

.alipay-button:disabled {
  color: var(--muted);
  border-color: var(--border);
  background: var(--surface-2);
  cursor: not-allowed;
}

.alipay-checkout {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding-top: 20px;
  text-align: center;
}

.alipay-amount {
  font-size: 34px;
  color: var(--ink);
  font-weight: 800;
}

.alipay-pay-detail {
  max-width: 310px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 12px;
  line-height: 1.6;
}

.alipay-qr-frame {
  display: grid;
  width: 250px;
  height: 250px;
  place-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 4px 12px rgba(17, 19, 34, 0.1);
}

.alipay-qr-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.alipay-checkout p,
.alipay-checkout small {
  margin: 0;
}

.alipay-checkout small {
  color: var(--muted);
  font-size: 10px;
}

.alipay-checkout .checkout-button {
  width: 100%;
}

.alipay-checkout .alipay-launch-button {
  background: #1677ff;
  box-shadow: 0 4px 16px rgba(22, 119, 255, 0.3);
}

.alipay-launch-button:hover {
  background: #0958d9;
}

.recharge-notice {
  margin: 0;
  padding: 12px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 11px;
  line-height: 1.7;
  border-radius: var(--radius-sm);
}

.wallet-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.wallet-section-heading h3 {
  margin: 0;
  font-size: 16px;
  color: var(--ink);
}

.wallet-section-heading span {
  color: var(--muted);
  font-size: 11px;
}

.wallet-empty {
  padding: 38px 10px 25px;
  color: var(--muted);
  text-align: center;
}

.wallet-empty svg {
  width: 28px;
  height: 28px;
}

.wallet-empty p {
  margin: 9px 0 0;
  font-size: 12px;
}

.wallet-transaction {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.wallet-transaction strong {
  font-size: 13px;
  color: var(--ink);
}

.wallet-transaction .credit {
  color: var(--green);
}

.wallet-transaction .debit {
  color: var(--red);
}

.wallet-transaction small {
  color: var(--muted);
  font-size: 10px;
}

/* ============================================================
   AUTH DIALOG
   ============================================================ */

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin: 20px 0;
  padding: 4px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.auth-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.auth-tabs button.selected {
  color: var(--ink);
  background: var(--surface-3);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 48px;
}

.password-field button {
  position: absolute;
  top: 3px;
  right: 3px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
}

.password-field button:hover {
  color: var(--ink);
}

.password-field button svg {
  width: 17px;
}

.forgot-password-button {
  justify-self: end;
  margin: -4px 0 2px;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: color 0.2s var(--ease);
}

.forgot-password-button:hover {
  color: var(--primary);
}

.auth-error {
  min-height: 20px;
  margin: -4px 0 10px;
  color: var(--red);
  font-size: 12px;
}

.account-panel {
  padding: 28px 0 4px;
  text-align: center;
}

.account-avatar {
  display: grid;
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.account-avatar svg {
  width: 28px;
  height: 28px;
}

.account-panel strong,
.account-panel span {
  display: block;
}

.account-panel strong {
  margin-bottom: 5px;
  font-size: 20px;
  color: var(--ink);
}

.account-panel span {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 13px;
}

.account-panel .secondary-button {
  gap: 9px;
}

.account-panel .secondary-button svg {
  width: 17px;
}

/* ============================================================
   PRODUCT DIALOG
   ============================================================ */

.product-dialog {
  width: min(980px, calc(100vw - 30px));
}

.region-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.region-flag {
  display: grid;
  min-width: 54px;
  height: 40px;
  place-items: center;
  padding: 0 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 18px;
  font-weight: 700;
  background: var(--surface-2);
}

.product-dialog-note {
  margin: 20px 0;
  color: var(--body);
  font-size: 13px;
  line-height: 1.7;
  padding: 12px 16px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
}

.product-purchase-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}

.denomination-section {
  min-width: 0;
}

.denomination-section-title,
.quantity-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.denomination-section-title {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.denomination-section-title small,
.quantity-heading small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.denomination-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 5px;
}

.denomination-option {
  position: relative;
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  cursor: pointer;
  text-align: left;
  color: var(--body);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.denomination-option:hover:not(:disabled),
.denomination-option.selected {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary), 0 0 16px var(--primary-glow);
}

.denomination-option:disabled {
  color: var(--muted);
  background: var(--surface);
  cursor: not-allowed;
}

.denomination-option strong,
.denomination-option span {
  display: block;
}

.denomination-option strong {
  margin-bottom: 8px;
  font-size: 18px;
  color: var(--ink);
}

.denomination-option span {
  color: var(--muted);
  font-size: 11px;
}

.denomination-option .option-stock {
  position: absolute;
  right: 10px;
  bottom: 10px;
  color: var(--green);
}

.denomination-option:disabled .option-stock {
  color: var(--muted);
}

.denom-price-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.denom-price-original,
.denomination-option .denom-price-original {
  display: inline;
  margin-left: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  text-decoration: line-through;
}

.denom-price-promo,
.denomination-option .denom-price-promo {
  display: inline;
  margin-left: 4px;
  color: #dc2626;
  font-size: 11px;
  font-weight: 700;
}

.selected-product-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: 16px 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.selected-product-summary span,
.selected-product-summary strong {
  display: block;
}

.selected-product-summary span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
}

.selected-product-summary strong {
  font-size: 15px;
  color: var(--ink);
}

.selected-price {
  text-align: right;
}

.selected-price-original {
  display: block;
  font-size: 12px;
  color: var(--muted);
  text-decoration: line-through;
}

.selected-price strong {
  font-size: 22px;
  color: var(--primary);
}

.purchase-panel {
  position: sticky;
  top: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.purchase-panel h3 {
  margin: 0 0 18px;
  font-size: 20px;
  color: var(--ink);
}

.purchase-quantity {
  margin-bottom: 18px;
}

.quantity-heading {
  margin-bottom: 9px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.quantity-stepper {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.quantity-stepper button,
.quantity-stepper input {
  min-width: 0;
  border: 0;
  background: var(--surface-2);
  text-align: center;
  color: var(--ink);
}

.quantity-stepper button {
  cursor: pointer;
  font-size: 20px;
}

.quantity-stepper button:hover:not(:disabled) {
  background: var(--surface-3);
}

.quantity-stepper button:disabled,
.quantity-stepper input:disabled {
  color: var(--muted);
  background: var(--surface);
  cursor: not-allowed;
}

.quantity-stepper input {
  border-right: 1px solid var(--border);
  border-left: 1px solid var(--border);
  outline: 0;
  font-weight: 700;
  appearance: textfield;
}

.quantity-stepper input::-webkit-inner-spin-button,
.quantity-stepper input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.purchase-total {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.purchase-total span {
  color: var(--muted);
  font-size: 12px;
}

.purchase-total strong {
  font-size: 25px;
  color: var(--ink);
  font-weight: 800;
}

.purchase-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.purchase-hint svg {
  width: 13px;
}

.checkout-button:disabled {
  background: var(--surface-3);
  color: var(--muted);
  cursor: not-allowed;
  box-shadow: none;
}

/* ============================================================
   ORDER DIALOG (checkout review)
   ============================================================ */

.order-review {
  margin: 20px 0;
  padding: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.review-line {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 13px;
}

.review-line strong {
  color: var(--ink);
}

.review-line:last-child {
  margin: 15px 0 0;
  padding-top: 15px;
  border-top: 1px solid var(--border);
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.balance-check {
  margin-bottom: 18px;
  padding: 15px 17px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}

.balance-check > div,
.balance-check > div span {
  display: flex;
  align-items: center;
}

.balance-check > div {
  justify-content: space-between;
  gap: 16px;
}

.balance-check > div span {
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.balance-check svg {
  width: 16px;
}

.balance-check strong {
  font-size: 18px;
  color: var(--ink);
}

.balance-check p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.balance-check.checking svg {
  animation: pulse 1s ease-in-out infinite;
}

.balance-check.sufficient {
  border-color: rgba(74, 222, 128, 0.3);
  background: var(--green-soft);
}

.balance-check.sufficient strong,
.balance-check.sufficient p {
  color: var(--green);
}

.balance-check.insufficient {
  border-color: rgba(248, 113, 113, 0.3);
  background: var(--red-soft);
}

.balance-check.service-error {
  border-color: rgba(248, 113, 113, 0.45);
  background: var(--red-soft);
}

.balance-check.insufficient strong,
.balance-check.insufficient p,
.balance-check.service-error strong,
.balance-check.service-error p {
  color: var(--red);
}

.checkout-button.submitting svg {
  animation: spin 0.8s linear infinite;
}

.balance-check button {
  width: 100%;
  min-height: 40px;
  margin-top: 12px;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: var(--red);
  cursor: pointer;
  font-weight: 700;
  transition: background 0.2s var(--ease);
}

.balance-check button:hover {
  background: #ef4444;
}

@keyframes pulse {
  50% { opacity: .35; }
}

.delivery-notice {
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}

.delivery-notice-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--ink);
}

.delivery-notice-title svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.delivery-notice ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.delivery-notice li + li {
  margin-top: 5px;
}

.form-field {
  display: block;
  margin-bottom: 17px;
}

.form-field span {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.form-field input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  background: var(--surface-2);
  color: var(--ink);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.form-field input::placeholder {
  color: var(--muted);
}

.form-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.agreement {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 22px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.agreement input {
  margin-top: 3px;
  accent-color: var(--primary);
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 12px;
}

.dialog-actions-single {
  grid-template-columns: 1fr;
}

/* ============================================================
   TOAST
   ============================================================ */

.toast {
  position: fixed;
  z-index: 50;
  bottom: 28px;
  left: 50%;
  visibility: hidden;
  min-width: 260px;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: var(--surface-3);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  transform: translate(-50%, 15px);
  transition: 0.3s var(--ease-out);
}

.toast.show {
  visibility: visible;
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ============================================================
   FLOATING ACTION BUTTONS — 客服
   ============================================================ */

.fab-group {
  position: fixed;
  z-index: 1000;
  bottom: 28px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), opacity 0.2s var(--ease);
}

.fab-btn > i[data-lucide] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.fab-service {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary) 0%, #0891b2 100%);
  box-shadow: 0 4px 16px rgba(14, 165, 160, 0.35);
  border-radius: 50px;
}

.fab-service:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 26px rgba(14, 165, 160, 0.45);
}

.fab-service:active {
  transform: translateY(-1px);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1020px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-inner {
    flex-wrap: wrap;
    gap: 20px;
  }

  .stat-divider {
    display: none;
  }
}

@media (max-width: 760px) {
  .site-header {
    height: 56px;
    padding: 0 16px;
  }

  .header-nav {
    display: none;
  }

  .cart-label,
  .wallet-label,
  .account-button span,
  .orders-button span {
    display: none;
  }

  .cart-button,
  .account-button,
  .wallet-button,
  .orders-button {
    min-height: 36px;
    padding: 0 10px;
  }

  .wallet-button strong {
    display: none;
  }

  .live-stats {
    display: none;
  }

  /* 信任徽章：居中显示在描述下方、按钮上方，紧凑单行 */
  .hero-trust-badge {
    position: relative;
    top: auto;
    right: auto;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 16px;
    padding: 6px 12px;
    border-radius: 100px;
    gap: 6px;
  }

  .hero-trust-badge > i[data-lucide] {
    width: 16px !important;
    height: 16px !important;
    opacity: 0.5;
  }

  .hero-trust-badge strong {
    font-size: 13px !important;
    opacity: 0.75;
  }

  .hero-trust-badge span,
  .hero-trust-badge small {
    display: none;
  }

  .hero {
    padding: 40px 18px 36px;
    min-height: 0;
    flex-direction: column;
    align-items: center;
  }

  .hero h1 {
    font-size: clamp(26px, 9vw, 36px);
  }

  .hero-copy {
    margin: 14px 0 20px;
    font-size: 14px;
    line-height: 1.6;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .primary-link,
  .ghost-link {
    width: 100%;
    justify-content: center;
  }

  .hero-price-preview {
    margin-top: 24px;
  }

  .hero-price-heading {
    margin-bottom: 12px;
  }

  .hero-price-grid {
    flex-wrap: wrap;
    gap: 8px;
  }

  .hero-price-card {
    padding: 6px 10px;
  }

  .stats-strip {
    padding: 24px 20px;
  }

  .stats-inner {
    grid-template-columns: repeat(2, 1fr);
    display: grid;
    gap: 24px;
  }

  .stat-item strong {
    font-size: 24px;
  }

  .catalog,
  .process {
    padding: 48px 20px;
  }

  .section-heading {
    align-items: flex-start;
    margin-bottom: 32px;
    flex-direction: column;
  }

  .catalog-heading-copy {
    text-align: left;
  }

  .catalog-toolbar {
    align-items: flex-start;
    padding: 12px;
    flex-direction: column;
  }

  .catalog-error {
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-error button {
    width: 100%;
  }

  .catalog-controls {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-search,
  .region-select-wrap {
    width: 100%;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-visual {
    min-height: 220px;
  }

  .process-track {
    flex-direction: column;
    gap: 32px;
  }

  .step-line {
    display: none;
  }

  .process-step {
    padding: 0;
  }

  .trust-badges {
    grid-template-columns: 1fr;
  }

  .notice {
    padding: 48px 20px 64px;
  }

  .notice-card {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 24px;
  }

  footer {
    padding: 36px 20px;
  }

  .cart-drawer {
    padding: 20px 16px;
  }

  .dialog-actions {
    grid-template-columns: 1fr;
  }

  .denomination-grid {
    grid-template-columns: repeat(2, 1fr);
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .product-purchase-layout {
    grid-template-columns: 1fr;
  }

  .purchase-panel {
    position: static;
  }

  .order-dialog,
  .product-dialog,
  .auth-dialog,
  .recharge-dialog,
  .alipay-dialog,
  .wallet-dialog,
  .orders-dialog {
    padding: 20px;
    margin: auto;
    max-height: calc(100dvh - 20px);
  }

  .order-dialog {
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }

  .dialog-header h2,
  .drawer-header h2 {
    font-size: 20px;
  }

  .fab-group {
    position: fixed;
    bottom: 20px;
    right: 16px;
    gap: 8px;
    z-index: 1000;
  }

  .fab-btn {
    padding: 10px 14px;
    font-size: 12px;
  }

  .fab-btn > i[data-lucide] {
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 400px) {
  .hero h1 {
    font-size: clamp(24px, 10vw, 32px);
  }

  .hero-copy {
    font-size: 13px;
  }

  .amount-presets {
    grid-template-columns: repeat(2, 1fr);
  }

  .checkout-button,
  .secondary-button {
    min-height: 46px;
    font-size: 13px;
  }

  .fab-group {
    bottom: 16px;
    right: 12px;
    gap: 6px;
  }

  .fab-btn {
    padding: 8px 12px;
    font-size: 11px;
    border-radius: 40px;
  }

  .fab-btn > i[data-lucide] {
    width: 14px;
    height: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
/* ===== Service Dialog ===== */
.service-content { display: flex; flex-direction: column; align-items: center; padding: 0 32px 32px; text-align: center; }
.service-qr { width: 220px; height: 220px; border-radius: 16px; border: none; margin-bottom: 20px; object-fit: contain; background: transparent; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
.service-qr:hover { transform: scale(1.04); box-shadow: 0 6px 24px rgba(0,0,0,0.18); }
.service-hint { font-size: 14px; color: var(--secondary); line-height: 1.6; margin: 0; }

/* QR Lightbox */
.qr-lightbox { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,0.85); display: flex; align-items: center; justify-content: center; cursor: pointer; animation: dialog-pop 0.2s var(--ease-out); }
.qr-lightbox img { max-width: min(320px, 80vw); max-height: min(320px, 80vh); border-radius: 16px; background: #fff; padding: 20px; box-shadow: 0 8px 40px rgba(0,0,0,0.4); }
