/* ==========================================================================
   汇卡集 CardPort — Minimalist Digital Gift Card & Crypto Checkout Design
   ========================================================================== */

:root {
  --bg: #F8F9FB;
  --surface: #FFFFFF;
  --surface-subtle: #F9FAFB;
  --surface-muted: #F3F4F6;
  --border: #E5E7EB;
  --border-strong: #D1D5DB;

  --ink: #111827;
  --ink-secondary: #374151;
  --ink-muted: #6B7280;
  --ink-faint: #9CA3AF;

  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-soft: #EFF6FF;
  --primary-border: #BFDBFE;

  --emerald: #059669;
  --emerald-soft: #ECFDF5;
  --emerald-border: #A7F3D0;

  --amber: #D97706;
  --amber-soft: #FFFBEB;
  --amber-border: #FDE68A;

  --danger: #DC2626;
  --danger-soft: #FEF2F2;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  --shadow-xs: 0 1px 2px rgba(17, 24, 39, 0.04);
  --shadow-sm: 0 4px 12px rgba(17, 24, 39, 0.05);
  --shadow-lg: 0 24px 48px -12px rgba(17, 24, 39, 0.16);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.tabular { font-variant-numeric: tabular-nums; }

.container {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   Sticky Minimal Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 60px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}

.brand-logo-mark svg {
  width: 28px;
  height: 28px;
  display: block;
}

.brand-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-logo-text strong {
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-logo-text small {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-muted);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.nav-link {
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-weight: 500;
  font-size: 13.5px;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  transition: all 0.14s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--ink);
  background: var(--surface-muted);
}

.nav-link.active {
  color: var(--ink);
  background: var(--surface-muted);
  font-weight: 600;
}

.header-search {
  flex: 1;
  min-width: 160px;
  max-width: 320px;
  position: relative;
  display: flex;
  align-items: center;
  margin-left: auto;
}

.header-search .search-icon {
  position: absolute;
  left: 11px;
  width: 15px;
  height: 15px;
  color: var(--ink-faint);
  pointer-events: none;
  display: inline-flex;
}

.header-search input {
  width: 100%;
  height: 35px;
  padding: 0 30px 0 33px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--ink);
  font-size: 13px;
  transition: all 0.15s ease;
}

.header-search input:focus {
  outline: none;
  border-color: var(--ink);
  background: var(--surface);
}

.search-clear {
  position: absolute;
  right: 7px;
  border: none;
  background: var(--surface-muted);
  color: var(--ink-muted);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.icon-slot {
  display: inline-flex;
  width: 15px;
  height: 15px;
}

.icon-slot svg { width: 100%; height: 100%; }

.mobile-nav {
  display: none;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.mobile-nav::-webkit-scrollbar { display: none; }

/* Buttons */
.btn-primary, .btn-secondary, .btn-ghost, .btn-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--ink);
  color: #FFFFFF;
  border: 1px solid var(--ink);
  padding: 9px 16px;
}
.btn-primary:hover { background: #1F2937; border-color: #1F2937; }

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border-strong);
  padding: 9px 16px;
}
.btn-secondary:hover { background: var(--surface-muted); }

.btn-ghost {
  background: transparent;
  color: var(--ink-secondary);
  border: 1px solid transparent;
  padding: 7px 10px;
}
.btn-ghost:hover { background: var(--surface-muted); color: var(--ink); }

.btn-sm { padding: 6px 11px; font-size: 12.5px; }
.btn-lg { padding: 11px 18px; font-size: 14px; }
.btn-block { width: 100%; }

.btn-cart {
  background: var(--ink);
  color: #FFFFFF;
  border: 1px solid var(--ink);
  padding: 6px 12px;
  font-size: 12.5px;
}
.btn-cart:hover { background: #1F2937; }

.cart-count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--primary);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}

.btn-link-reset {
  border: none;
  background: none;
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 600;
  padding: 0;
}
.btn-link-reset:hover { text-decoration: underline; }

/* ==========================================================================
   Main Content & Minimal Intro Strip
   ========================================================================== */
.app-main {
  min-height: calc(100vh - 140px);
  padding: 20px 0 48px;
}

.minimal-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.minimal-intro h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.minimal-intro p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--ink-muted);
}

.minimal-intro-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.fx-mini-pill {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
}

/* ==========================================================================
   Brand Rail & Minimal Toolbar
   ========================================================================== */
.brand-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 2px 0 8px;
}

.brand-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.14s ease;
}

.brand-pill:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}

.brand-pill.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #FFFFFF;
}

.brand-pill-icon {
  width: 15px;
  height: 15px;
  display: inline-flex;
}
.brand-pill-icon svg { width: 100%; height: 100%; }

.minimal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 6px 0 18px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.chip-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-muted);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.13s ease;
}

.chip-btn:hover {
  background: var(--surface-muted);
  color: var(--ink);
}

.chip-btn.active {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

.filter-select {
  height: 32px;
  padding: 0 9px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 12.5px;
  font-weight: 500;
}

/* ==========================================================================
   Minimalist Product Grid & Cards
   ========================================================================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.product-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.card-visual {
  height: 82px;
  padding: 12px 14px;
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.card-visual-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-brand-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.card-brand-inline strong {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-brand-svg {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.card-brand-svg svg { width: 15px; height: 15px; }

.region-tag {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.card-visual-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.78);
}

.card-body {
  padding: 12px 14px 13px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}

.card-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.price-main {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.price-now {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.price-now small {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-muted);
  margin-left: 1px;
}

.price-fx {
  font-size: 11.5px;
  color: var(--ink-faint);
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}

.m-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.m-tag.emerald { background: var(--emerald-soft); color: var(--emerald); }
.m-tag.neutral { background: var(--primary-soft); color: var(--primary); }
.m-tag.amber { background: var(--amber-soft); color: var(--amber); }
.m-tag.danger { background: var(--danger-soft); color: var(--danger); }

.card-store-line {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--surface-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.merchant-mini {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  padding: 0;
  color: var(--ink-muted);
  font-weight: 500;
  min-width: 0;
}
.merchant-mini:hover { color: var(--ink); }

.merchant-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.merchant-mini-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-denom-meta {
  font-size: 11.5px;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-usd-hint {
  font-size: 11.5px;
  color: var(--ink-faint);
  white-space: nowrap;
}

.load-more-wrap {
  margin-top: 20px;
  text-align: center;
}

.minimal-trust-bar {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.empty-state {
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 40px 20px;
  text-align: center;
  color: var(--ink-muted);
}
.empty-state h3 { margin: 0 0 6px; color: var(--ink); font-size: 15px; }

/* ==========================================================================
   Tables, Merchants, Storefront, Help, Onboarding
   ========================================================================== */
.ai-compare-table-wrap, .panel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}
.ai-compare-table-wrap { padding: 0; overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th, .data-table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--surface-muted);
  white-space: nowrap;
}
.data-table th {
  background: var(--surface-subtle);
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
}
.data-table tr:last-child td { border-bottom: none; }

/* Merchants 3-col Minimal Cards */
.merchants-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.merchant-card-min {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.16s ease;
}
.merchant-card-min:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.m-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.m-card-top h3 { margin: 0; font-size: 15.5px; font-weight: 700; }
.m-card-top p { margin: 2px 0 0; font-size: 12px; color: var(--ink-muted); }

.merchant-avatar-xs {
  width: 22px; height: 22px; border-radius: 6px;
  color: #FFFFFF; font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.merchant-avatar-md {
  width: 40px; height: 40px; border-radius: 10px;
  color: #FFFFFF; font-size: 17px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.merchant-avatar-lg {
  width: 48px; height: 48px; border-radius: 12px;
  color: #FFFFFF; font-size: 20px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}

.m-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 10px 12px;
  background: var(--surface-subtle);
  border-radius: var(--radius-sm);
}
.m-card-stats strong { display: block; font-size: 14px; }
.m-card-stats span { font-size: 11px; color: var(--ink-muted); }

.m-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--ink-muted);
}
.m-enter-link { color: var(--ink); font-weight: 600; }

.storefront-minimal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}

.sf-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  padding: 0;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 12px;
}
.back-btn:hover { color: var(--ink); }

.tier-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.tier-badge.gold { background: #FEF3C7; color: #B45309; }
.tier-badge.ai { background: #CCFBF1; color: #0F766E; }
.tier-badge.verified { background: var(--primary-soft); color: var(--primary); }

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.review-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
}
.review-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  font-size: 13px;
}

/* Help & Onboarding */
.help-layout {
  display: grid;
  grid-template-columns: 1.55fr 0.85fr;
  gap: 18px;
  align-items: start;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.faq-q {
  width: 100%;
  border: none;
  background: var(--surface);
  padding: 12px 14px;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink);
}
.faq-q:hover { background: var(--surface-subtle); }

.faq-chevron {
  width: 16px; height: 16px; color: var(--ink-muted);
  transition: transform 0.18s ease; flex-shrink: 0;
}
.faq-item.open .faq-chevron { transform: rotate(180deg); }

.faq-a {
  display: none;
  padding: 10px 14px 13px;
  border-top: 1px solid var(--surface-muted);
  font-size: 13px;
  color: var(--ink-secondary);
  line-height: 1.65;
}
.faq-item.open .faq-a { display: block; }

.guide-brand-tabs { display: flex; flex-wrap: wrap; gap: 5px; }
.guide-steps {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--ink-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.onboarding-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.15fr;
  gap: 18px;
  align-items: start;
}

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 12.5px; font-weight: 600; color: var(--ink-secondary); }
.form-group input, .form-group select, .form-group textarea {
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--ink);
}

.checkbox-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.check-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 9px; border-radius: 7px;
  border: 1px solid var(--border); background: var(--surface-subtle);
  font-size: 12px; cursor: pointer;
}
.check-pill input { margin: 0; }

/* ==========================================================================
   Modals & Cart Drawer
   ========================================================================== */
.modal-backdrop, .drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(17, 24, 39, 0.48);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.modal-backdrop[hidden], .drawer-backdrop[hidden] { display: none; }

.modal-dialog {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px;
}
.modal-md { max-width: 520px; }

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: var(--surface-muted); color: var(--ink); }
.modal-close.static-close { position: static; }

/* Minimal Product Modal */
.pm-compact { display: flex; flex-direction: column; gap: 12px; }

.pm-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pm-brand-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pm-brand-badge svg { width: 22px; height: 22px; }

.pm-merchant-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
}

.pm-section-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2px;
}

.denom-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.denom-option {
  border: 1.5px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 9px 6px;
  text-align: center;
  transition: all 0.13s ease;
}
.denom-option:hover { border-color: var(--border-strong); }
.denom-option.active { border-color: var(--ink); background: var(--surface-subtle); }
.denom-option strong { display: block; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.denom-option span { display: block; font-size: 11px; color: var(--ink-muted); margin-top: 1px; font-variant-numeric: tabular-nums; }

.price-breakdown {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 13px;
  font-size: 12.5px;
}
.pb-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  color: var(--ink-secondary);
  font-variant-numeric: tabular-nums;
}
.pb-row.total {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px dashed var(--border-strong);
  margin-bottom: 0;
  align-items: baseline;
  color: var(--ink);
  font-weight: 700;
}
.pb-row.total .big-total {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
}

.pm-details {
  font-size: 12.5px;
  color: var(--ink-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}
.pm-details summary { cursor: pointer; font-weight: 600; color: var(--ink-secondary); }
.pm-details ol { margin: 8px 0 2px; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }

.pm-actions {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 10px;
  margin-top: 2px;
}

.pay-method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.pay-option {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
  text-align: center;
  background: var(--surface);
  font-weight: 600;
  font-size: 12.5px;
}
.pay-option.active {
  border-color: var(--ink);
  background: var(--surface-subtle);
}

/* Cart Drawer */
.drawer-backdrop { justify-content: flex-end; padding: 0; }
.drawer-panel {
  width: 100%;
  max-width: 400px;
  height: 100%;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.drawer-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-header h3 { margin: 0; font-size: 16px; }
.drawer-sub { margin: 2px 0 0; font-size: 12px; color: var(--ink-muted); }
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cart-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cart-item-top { display: flex; justify-content: space-between; gap: 8px; }
.cart-item-top strong { font-size: 13.5px; }
.cart-item-meta { font-size: 12px; color: var(--ink-muted); }
.cart-item-bottom { display: flex; align-items: center; justify-content: space-between; }
.qty-control {
  display: inline-flex; align-items: center;
  border: 1px solid var(--border); border-radius: 6px; overflow: hidden;
}
.qty-control button { border: none; background: var(--surface-subtle); width: 26px; height: 24px; font-weight: 700; }
.qty-control span { min-width: 26px; text-align: center; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.drawer-footer {
  padding: 14px 18px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface-subtle);
}

.code-box {
  background: #111827;
  color: #34D399;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  padding: 7px 10px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}
.code-copy-btn {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 5px;
}

/* ==========================================================================
   Minimal Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 18px 0;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.footer-minimal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-min-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.footer-min-left strong { color: var(--ink); }
.footer-sep { color: var(--border-strong); }

.footer-min-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-min-links a:hover { color: var(--ink); }

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
.toast-container {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: #111827;
  color: #FFFFFF;
  padding: 9px 15px;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  font-size: 12.5px;
  font-weight: 500;
  animation: toastIn 0.18s ease;
}
.toast.success { border-left: 3px solid #10B981; }
.toast.info { border-left: 3px solid #3B82F6; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Crypto Checkout Selectors & Dedicated Payment Gateway Page (pay.html)
   ========================================================================== */
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22);
}

.crypto-token-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.crypto-choice-btn {
  border: 1.5px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  transition: all 0.14s ease;
}
.crypto-choice-btn:hover { border-color: var(--border-strong); }
.crypto-choice-btn.active { border-color: var(--ink); background: var(--surface-subtle); }

.crypto-choice-icon { width: 26px; height: 26px; flex-shrink: 0; display: inline-flex; }
.crypto-choice-icon svg { width: 100%; height: 100%; }
.crypto-choice-text { display: flex; flex-direction: column; line-height: 1.25; }
.crypto-choice-text strong { font-size: 14px; color: var(--ink); }
.crypto-choice-text small { font-size: 11px; color: var(--ink-muted); }
.crypto-choice-pill {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
  background: var(--surface-muted);
  padding: 2px 7px;
  border-radius: 999px;
}

.crypto-net-btn {
  border: 1.5px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 8px 9px;
  display: flex;
  align-items: center;
  gap: 7px;
  text-align: left;
  transition: all 0.14s ease;
}
.crypto-net-btn:hover { border-color: var(--border-strong); }
.crypto-net-btn.active { border-color: var(--ink); background: var(--surface-subtle); }
.crypto-net-btn strong { display: block; font-size: 12.5px; line-height: 1.15; }
.crypto-net-btn small { display: block; font-size: 10.5px; color: var(--ink-muted); }

.crypto-net-icon { width: 21px; height: 21px; flex-shrink: 0; display: inline-flex; }
.crypto-net-icon svg { width: 100%; height: 100%; }

/* ==========================================================================
   Hosted Crypto Payment Gateway (pay.html — Stripe × Cryptomus Aesthetic)
   ========================================================================== */
.gw-body {
  background: #EEF2F6;
  min-height: 100vh;
  color: var(--ink);
}

.gw-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 20px 18px 36px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.gw-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.gw-top-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.gw-back-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  transition: color 0.14s ease;
}
.gw-back-link:hover { color: var(--ink); }

.gw-divider {
  width: 1px;
  height: 16px;
  background: var(--border-strong);
}

.gw-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14.5px;
}

.gw-lock-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--emerald);
  font-size: 11px;
  font-weight: 600;
}

.gw-top-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.gw-order-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--ink-muted);
}
.gw-order-pill strong { color: var(--ink); }

.gw-inline-copy {
  border: none;
  background: var(--surface-muted);
  color: var(--ink-secondary);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 5px;
}
.gw-inline-copy:hover { background: var(--border); }
.gw-inline-copy.copied { background: var(--emerald-soft); color: var(--emerald); }

.gw-status-dot-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}
.gw-status-dot-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.gw-status-dot-pill.pending { background: #FEF3C7; color: #B45309; }
.gw-status-dot-pill.verifying { background: var(--primary-soft); color: var(--primary); }
.gw-status-dot-pill.done { background: var(--emerald-soft); color: var(--emerald); }
.gw-status-dot-pill.cancelled { background: var(--surface-muted); color: var(--ink-muted); }

/* Unified Split-Sheet Payment Card */
.gw-card {
  background: var(--surface);
  border: 1px solid #DCE3EC;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 18px 40px -16px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.04);
}

.gw-progress-track {
  height: 3px;
  background: #E5E7EB;
  width: 100%;
}
.gw-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #10B981 0%, #2563EB 100%);
  transition: width 0.8s linear;
}

.gw-split {
  display: grid;
  grid-template-columns: 0.74fr 1.06fr;
  min-height: 550px;
}

/* Left Invoice & Blockchain Stepper Pane */
.gw-invoice-pane {
  background: #F8FAFC;
  border-right: 1px solid var(--border);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.gw-merchant-head {
  display: flex;
  align-items: center;
  gap: 11px;
}

.gw-merchant-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
}

.gw-verified-tick {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gw-merchant-sub {
  font-size: 11.5px;
  color: var(--ink-muted);
  margin-top: 1px;
}

.gw-amount-hero {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.gw-amount-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
}

.gw-amount-big {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 4px;
}

.gw-amount-big strong {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
}

.gw-amount-big span {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-secondary);
}

.gw-amount-fiat {
  margin-top: 5px;
  font-size: 12px;
  color: var(--ink-muted);
}

.gw-line-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gw-line-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
}

.gw-li-title { font-weight: 600; color: var(--ink); }
.gw-li-sub { font-size: 11.5px; color: var(--ink-muted); margin-top: 1px; }
.gw-li-price { text-align: right; flex-shrink: 0; }
.gw-li-price strong { display: block; font-size: 12.5px; }
.gw-li-price span { font-size: 11px; color: var(--ink-muted); }

.gw-meta-list {
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}

.gw-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-muted);
}
.gw-meta-row strong { color: var(--ink-secondary); font-weight: 600; }

/* Live On-Chain Stepper */
.gw-stepper {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gw-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  position: relative;
}

.gw-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 15px;
  bottom: -14px;
  width: 1px;
  background: var(--border-strong);
}

.gw-step-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-strong);
  margin-top: 4px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.gw-step.active .gw-step-dot {
  background: #10B981;
}

.gw-step-dot.pulsing {
  animation: gwPulse 1.8s infinite;
}

@keyframes gwPulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.gw-step strong { display: block; font-size: 12.5px; color: var(--ink-muted); font-weight: 600; line-height: 1.25; }
.gw-step.active strong { color: var(--ink); }
.gw-step span { display: block; font-size: 11px; color: var(--ink-faint); margin-top: 1px; }
.gw-step.active span { color: var(--emerald); font-weight: 500; }

.gw-left-foot {
  font-size: 11px;
  color: var(--ink-faint);
  padding-top: 4px;
}

/* Right Interactive Terminal Pane */
.gw-terminal-pane {
  background: #FFFFFF;
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gw-term-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.gw-term-head h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.gw-countdown-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #F1F5F9;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}
.gw-countdown-pill.urgent {
  background: #FEF2F2;
  color: var(--danger);
}

.gw-sub-switcher {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.gw-sub-tab {
  flex: 1;
  min-width: 170px;
  border: 1.5px solid var(--border);
  background: var(--surface-subtle);
  border-radius: 10px;
  padding: 8px 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-secondary);
}
.gw-sub-tab.active {
  border-color: var(--ink);
  background: #FFFFFF;
  color: var(--ink);
}

/* Segmented Token & Network Bar */
.gw-selector-group {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.gw-token-segmented {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  background: #F1F5F9;
  padding: 4px;
  border-radius: 11px;
}

.gw-seg-btn {
  border: 1px solid transparent;
  background: transparent;
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--ink-muted);
  transition: all 0.14s ease;
}
.gw-seg-btn:hover { color: var(--ink); }
.gw-seg-btn.active {
  background: #FFFFFF;
  border-color: #E2E8F0;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}
.gw-seg-btn strong { font-size: 13.5px; }
.gw-seg-btn small { font-size: 11px; color: var(--ink-faint); font-weight: 500; }

.gw-coin-ico { width: 20px; height: 20px; display: inline-flex; flex-shrink: 0; }
.gw-coin-ico svg { width: 100%; height: 100%; }

.gw-net-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.gw-net-pill {
  flex: 1;
  min-width: 130px;
  border: 1.5px solid var(--border);
  background: #FFFFFF;
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  transition: all 0.14s ease;
}
.gw-net-pill:hover { border-color: var(--border-strong); }
.gw-net-pill.active {
  border-color: var(--ink);
  background: #F8FAFC;
  box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.06);
}

.gw-net-ico { width: 20px; height: 20px; display: inline-flex; flex-shrink: 0; }
.gw-net-ico svg { width: 100%; height: 100%; }

.gw-net-label { line-height: 1.2; }
.gw-net-label strong { display: block; font-size: 12.5px; color: var(--ink); }
.gw-net-label small { display: block; font-size: 10.5px; color: var(--ink-muted); }

.gw-net-tag {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--emerald-soft);
  color: var(--emerald);
}

.gw-net-note {
  font-size: 11.5px;
  color: var(--ink-muted);
}

/* Central Payment Core: QR + Address Fields */
.gw-pay-core {
  display: grid;
  grid-template-columns: 196px 1fr;
  gap: 16px;
  align-items: start;
  padding: 16px;
  border-radius: 14px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
}

.gw-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 7px;
}

.gw-qr-box {
  position: relative;
  background: #FFFFFF;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  line-height: 0;
  box-shadow: var(--shadow-xs);
}

.qr-corner {
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: #111827;
  border-style: solid;
  pointer-events: none;
}
.qr-corner.tl { top: -1px; left: -1px; border-width: 2.5px 0 0 2.5px; border-radius: 8px 0 0 0; }
.qr-corner.tr { top: -1px; right: -1px; border-width: 2.5px 2.5px 0 0; border-radius: 0 8px 0 0; }
.qr-corner.bl { bottom: -1px; left: -1px; border-width: 0 0 2.5px 2.5px; border-radius: 0 0 0 8px; }
.qr-corner.br { bottom: -1px; right: -1px; border-width: 0 2.5px 2.5px 0; border-radius: 0 0 8px 0; }

.gw-qr-net-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
}
.gw-qr-dot { width: 7px; height: 7px; border-radius: 50%; }
.gw-qr-wallets { font-size: 10.5px; color: var(--ink-faint); }

.gw-fields-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.gw-copy-field {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 11px 13px;
}

.gw-field-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

.gw-exact-badge {
  color: var(--amber);
  font-weight: 600;
  font-size: 11px;
}

.gw-field-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.gw-exact-val {
  display: flex;
  align-items: baseline;
  gap: 5px;
}
.gw-exact-val strong {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.gw-exact-val span { font-size: 13px; font-weight: 700; color: var(--ink-secondary); }

.gw-addr-line {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: -0.01em;
  background: #F1F5F9;
  padding: 9px 10px;
  border-radius: 7px;
  word-break: break-all;
  line-height: 1.48;
  margin-bottom: 9px;
}
.addr-edge { font-weight: 800; color: #0F172A; }
.addr-mid { font-weight: 500; color: #64748B; }

.gw-addr-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.gw-verify-tip { font-size: 11px; color: var(--ink-faint); }

.gw-copy-btn {
  border: 1px solid var(--border-strong);
  background: #FFFFFF;
  color: var(--ink);
  padding: 5px 11px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.14s ease;
}
.gw-copy-btn:hover { background: var(--surface-muted); }
.gw-copy-btn.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #FFFFFF;
}
.gw-copy-btn.primary:hover { background: #1F2937; }
.gw-copy-btn.copied {
  background: var(--emerald);
  border-color: var(--emerald);
  color: #FFFFFF;
}

.gw-contract-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--ink-muted);
  padding: 0 2px;
}
.gw-contract-strip a { color: var(--primary); font-weight: 600; }
.gw-contract-strip a:hover { text-decoration: underline; }
.gw-contract-strip code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; }

/* Real-Time Blockchain Listener Bar */
.gw-listener-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 13px;
  border-radius: 10px;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
  font-size: 12.5px;
}

.gw-listener-left {
  display: flex;
  align-items: center;
  gap: 9px;
}

.gw-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(5, 150, 105, 0.25);
  border-top-color: #059669;
  animation: gwSpin 0.9s linear infinite;
  flex-shrink: 0;
}

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

.gw-listener-right {
  font-size: 11.5px;
  color: #047857;
  font-weight: 600;
}

.gw-warn-line {
  font-size: 11.5px;
  color: #92400E;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  padding: 8px 12px;
  border-radius: 8px;
  line-height: 1.5;
}

.gw-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 2px;
}

.gw-tx-toggle {
  border: none;
  background: none;
  padding: 0;
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 600;
}
.gw-tx-toggle:hover { text-decoration: underline; }

.gw-cancel-link {
  border: none;
  background: none;
  padding: 0;
  color: var(--ink-faint);
  font-size: 12px;
}
.gw-cancel-link:hover { color: var(--danger); }

.gw-tx-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.gw-tx-drawer {
  display: flex;
  gap: 8px;
  padding-top: 2px;
}
.gw-tx-drawer input {
  flex: 1;
  height: 36px;
  padding: 0 11px;
  border: 1.5px solid var(--border-strong);
  border-radius: 8px;
  font-size: 12.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}
.gw-tx-drawer input:focus { outline: none; border-color: var(--ink); }
.gw-tx-drawer input.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}
.gw-tx-drawer input.is-valid {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.gw-tx-msg {
  min-height: 16px;
  font-size: 11.5px;
  line-height: 1.4;
}
.gw-tx-msg.error { color: var(--danger); font-weight: 500; }
.gw-tx-msg.ok { color: var(--emerald); font-weight: 600; }

/* Post-status / Empty centered cards */
.gw-center-card {
  max-width: 540px;
  margin: 28px auto;
  background: #FFFFFF;
  border: 1px solid #DCE3EC;
  border-radius: 20px;
  padding: 34px 28px;
  text-align: center;
  box-shadow: 0 18px 40px -16px rgba(15, 23, 42, 0.1);
}

.gw-status-icon {
  width: 54px; height: 54px; border-radius: 50%;
  font-size: 24px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.gw-status-icon.done { background: var(--emerald-soft); color: var(--emerald); }
.gw-status-icon.verifying { background: var(--primary-soft); color: var(--primary); }
.gw-status-icon.cancelled { background: var(--surface-muted); color: var(--ink-muted); }
.gw-status-icon.neutral { background: var(--surface-muted); color: var(--ink); }

.gw-center-card h1 { margin: 0 0 8px; font-size: 20px; }
.gw-center-card p { margin: 0; font-size: 13px; color: var(--ink-muted); line-height: 1.6; }

.gw-receipt-sheet {
  margin-top: 18px;
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 15px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12.5px;
}
.gw-r-row { display: flex; justify-content: space-between; gap: 10px; color: var(--ink-muted); }
.gw-r-row strong { color: var(--ink); }

.gw-settlement-summary {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}
.gw-settle-mini {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: #FFFFFF;
}
.gw-mono-muted {
  margin-top: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--ink-muted);
  word-break: break-all;
}

.pay-status-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }

.gw-footer {
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--ink-faint);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .merchants-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .main-nav { display: none; }
  .mobile-nav { display: flex; }
  .help-layout, .onboarding-grid, .reviews-grid, .gw-split { grid-template-columns: 1fr; }
  .gw-invoice-pane { border-right: none; border-bottom: 1px solid var(--border); }
}

@media (max-width: 680px) {
  .header-search { display: none; }
  .product-grid, .merchants-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .gw-pay-core, .crypto-token-grid, .pay-status-actions, .form-grid { grid-template-columns: 1fr; }
  .gw-tx-drawer { flex-direction: column; }
  .denom-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 440px) {
  .product-grid, .merchants-grid-3 { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Merchant Customer Support Window (support.html)
   ========================================================================== */
.cs-body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #E2E8F0 0%, #EEF2F6 50%, #E5E7EB 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cs-backdrop {
  width: 100%;
  padding: 24px 16px;
  display: flex;
  justify-content: center;
}

.cs-window {
  width: 100%;
  max-width: 860px;
  height: min(84vh, 660px);
  background: #FFFFFF;
  border-radius: 16px;
  border: 1px solid #E5E7EB;
  box-shadow: 0 24px 50px -16px rgba(15, 23, 42, 0.16);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cs-header {
  height: 70px;
  padding: 0 20px;
  background: radial-gradient(circle at 90% 10%, rgba(191, 219, 254, 0.42), transparent 32%), #FFFFFF;
  border-bottom: 1px solid #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.cs-head-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cs-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid #E5E7EB;
  background: #F8FAFC;
  color: var(--ink-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.14s ease;
}
.cs-icon-btn:hover {
  background: #F1F5F9;
  color: var(--ink);
}

.cs-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cs-title-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.cs-title-row strong { font-size: 15.5px; font-weight: 700; color: var(--ink); }
.cs-store-sub { font-size: 12px; color: var(--ink-muted); }

.cs-status-line {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  font-size: 12px;
  color: var(--ink-faint);
}

.cs-offline-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #CBD5E1;
}

.cs-canvas {
  flex: 1;
  background: #F8FAFC;
  padding: 28px 20px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.cs-notice-card {
  width: 100%;
  max-width: 380px;
  background: #FFFFFF;
  border: 1px solid #ECEFF4;
  border-radius: 14px;
  padding: 18px 20px 16px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
}

.cs-notice-card h2 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.cs-notice-card p {
  margin: 0 0 14px;
  font-size: 12.5px;
  color: var(--ink-faint);
  line-height: 1.55;
}

.cs-contact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cs-contact-row {
  width: 100%;
  border: 1px solid #E5E7EB;
  background: #F1F5F9;
  border-radius: 10px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.14s ease;
}
.cs-contact-row:hover {
  background: #E8EEF5;
  border-color: #CBD5E1;
}

.cs-contact-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink-muted);
  font-weight: 500;
}

.cs-social-ico {
  display: inline-flex;
  color: #64748B;
}

.cs-contact-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.cs-contact-val.locked {
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

.cs-copy-hint {
  margin-top: 10px;
  text-align: center;
  font-size: 11px;
  color: var(--ink-faint);
}

.cs-messages {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cs-msg-row {
  display: flex;
}
.cs-msg-row.user { justify-content: flex-end; }
.cs-msg-row.bot { justify-content: flex-start; }

.cs-bubble {
  max-width: 78%;
  padding: 9px 13px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.55;
}
.cs-msg-row.user .cs-bubble {
  background: #111827;
  color: #FFFFFF;
  border-bottom-right-radius: 4px;
}
.cs-msg-row.bot .cs-bubble {
  background: #FFFFFF;
  color: var(--ink-secondary);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.cs-composer {
  padding: 12px 18px;
  border-top: 1px solid #F1F5F9;
  background: #FFFFFF;
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.cs-composer input {
  flex: 1;
  height: 38px;
  padding: 0 13px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: #F8FAFC;
  font-size: 13px;
}
.cs-composer input:focus {
  outline: none;
  border-color: var(--ink);
  background: #FFFFFF;
}

@media (max-width: 600px) {
  .cs-backdrop { padding: 0; }
  .cs-window { height: 100vh; border-radius: 0; border: none; }
}
