* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  overflow-x: hidden;
  width: 100%;
  -webkit-text-size-adjust: 100%;
}

:root {
  --shop-primary: #0ea5e9;
  --shop-bg: #f0f9ff;
  --shop-header: #0284c7;
  --shop-text: #0f172a;
  --shop-muted: #64748b;
  --shop-card: #ffffff;
  --shop-border: rgba(15, 23, 42, 0.08);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  background: var(--shop-bg);
  color: var(--shop-text);
}

body[data-theme="game-topup"],
body[data-theme="vip-boutique"],
body[data-theme="star-card"],
body[data-theme="esports-store"] {
  --shop-text: #f1f5f9;
  --shop-muted: #94a3b8;
  --shop-card: rgba(255,255,255,0.06);
  --shop-border: rgba(255,255,255,0.1);
}

.shop-bg {
  position: fixed; inset: 0;
  background: linear-gradient(180deg, var(--shop-bg) 0%, color-mix(in srgb, var(--shop-bg) 70%, #fff) 100%);
  z-index: 0;
}

body[data-theme="game-topup"] .shop-bg,
body[data-theme="vip-boutique"] .shop-bg,
body[data-theme="star-card"] .shop-bg,
body[data-theme="esports-store"] .shop-bg {
  background: radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--shop-primary) 20%, #000) 0%, var(--shop-bg) 60%);
}

.shop-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--shop-header);
  color: #fff;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}

.shop-header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between;
}

.shop-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.shop-logo { font-size: 2rem; flex-shrink: 0; line-height: 1; }
.shop-brand h1 {
  font-size: 1.25rem; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.shop-subtitle,
.shop-brand p {
  font-size: 0.8rem; opacity: 0.85; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.shop-main {
  position: relative; z-index: 1;
  max-width: 1200px; width: 100%; margin: 0 auto;
  padding: 24px 20px 40px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  overflow-x: hidden;
}

.shop-sidebar {
  position: sticky;
  top: 72px;
}

.shop-content {
  min-width: 0;
}

@media (max-width: 768px) {
  .shop-main {
    grid-template-columns: 1fr;
    padding: 12px 14px max(24px, env(safe-area-inset-bottom));
    gap: 14px;
  }
  .shop-sidebar {
    position: static;
    order: -1;
  }
  .shop-header-inner { padding: 12px 14px; }
  .shop-brand h1 { font-size: 1.05rem; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .category-list {
    flex-direction: row;
    flex-wrap: wrap;
    overflow-x: hidden;
    gap: 8px;
  }
  .category-item {
    flex: 0 1 auto;
    white-space: normal;
    max-width: 100%;
  }
  body[data-theme="ai-shop-cbs"] .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sidebar-title { display: none; }
  .product-card-body { padding: 12px; }
  .product-card-body h3 { font-size: 0.88rem; }
  .btn-buy { padding: 7px 10px; font-size: 0.72rem; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .shop-main { grid-template-columns: 180px minmax(0, 1fr); gap: 18px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

.sidebar-title {
  font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--shop-muted); margin-bottom: 10px;
}

.category-list { display: flex; flex-direction: column; gap: 4px; }

.category-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--shop-text);
  font-size: 0.875rem; font-weight: 500;
  cursor: pointer; text-align: left;
  transition: all 0.15s;
}

.category-item:hover { background: var(--shop-card); border-color: var(--shop-border); }
.category-item--active {
  background: var(--shop-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--shop-primary) 40%, transparent);
}

.shop-intro {
  background: color-mix(in srgb, var(--shop-primary) 6%, var(--shop-card));
  border: 1px solid color-mix(in srgb, var(--shop-primary) 12%, var(--shop-border));
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 16px;
}
.shop-content .shop-intro { margin-bottom: 16px; }
.shop-intro-title { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.shop-intro-text { font-size: 0.85rem; line-height: 1.65; color: var(--shop-muted); }

.content-toolbar {
  display: flex; align-items: baseline; gap: 10px;
  margin-bottom: 16px;
}

.content-toolbar h2 { font-size: 1.15rem; font-weight: 700; }
.product-count { font-size: 0.8rem; color: var(--shop-muted); }

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

.product-card {
  background: var(--shop-card);
  border: 1px solid var(--shop-border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  content-visibility: auto;
  contain-intrinsic-size: auto 320px;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

@media (prefers-reduced-motion: reduce) {
  .product-card { transition: none; }
  .product-card:hover { transform: none; }
  .product-img-skeleton { animation: none; }
}

.product-card-img {
  aspect-ratio: 16/10;
  background: color-mix(in srgb, var(--shop-primary) 8%, var(--shop-bg));
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

.product-img-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-img-skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--shop-primary) 6%, var(--shop-bg)) 0%,
    color-mix(in srgb, var(--shop-primary) 14%, var(--shop-bg)) 50%,
    color-mix(in srgb, var(--shop-primary) 6%, var(--shop-bg)) 100%
  );
  background-size: 200% 100%;
  animation: shop-shimmer 1.2s ease-in-out infinite;
}

@keyframes shop-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.product-card-img img,
.detail-img img,
.order-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.product-card-img img.is-loaded,
.detail-img img.is-loaded,
.order-thumb img.is-loaded {
  opacity: 1;
}

.product-placeholder {
  font-size: 3rem;
  opacity: 0.55;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.product-img-fallback {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-img-skeleton--persist {
  animation-duration: 1.6s;
}

.product-img-fallback-icon {
  position: relative;
  z-index: 1;
  font-size: 2rem;
  opacity: 0.45;
  pointer-events: none;
}

.product-placeholder--failed {
  background: color-mix(in srgb, var(--shop-muted) 8%, var(--shop-bg));
}

.category-icon-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}

.product-card-body { padding: 14px 16px 16px; }
.product-card-body h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 6px; }
.product-desc {
  font-size: 0.78rem; color: var(--shop-muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.4em; margin-bottom: 12px;
}

.product-card-foot {
  display: flex; align-items: center; justify-content: space-between;
}

.product-price { font-size: 1.1rem; font-weight: 800; color: var(--shop-primary); }
.product-price small { font-size: 0.7rem; font-weight: 600; opacity: 0.8; }

.btn-buy {
  padding: 8px 14px; border-radius: 8px;
  border: none; background: var(--shop-primary);
  color: #fff; font-size: 0.78rem; font-weight: 700;
  cursor: pointer; transition: opacity 0.15s;
}

.btn-buy:hover { opacity: 0.9; }
.btn-buy--large { width: 100%; padding: 14px; font-size: 0.95rem; margin-top: 16px; border-radius: 12px; }

.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--shop-muted);
}

.empty-state span { font-size: 3rem; display: block; margin-bottom: 12px; }
.hidden { display: none !important; }

.shop-footer {
  position: relative; z-index: 1;
  text-align: center;
  padding: 20px 20px max(20px, env(safe-area-inset-bottom));
  font-size: 0.75rem; color: var(--shop-muted);
}

/* Modal */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}

.modal-panel {
  position: relative;
  background: var(--shop-card);
  border: 1px solid var(--shop-border);
  border-radius: 20px;
  width: min(480px, 100%);
  max-width: 100%;
  max-height: 90vh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-x: none;
  box-shadow: 0 24px 64px rgba(0,0,0,0.2);
}

body[data-theme="game-topup"] .modal-panel,
body[data-theme="vip-boutique"] .modal-panel,
body[data-theme="star-card"] .modal-panel,
body[data-theme="esports-store"] .modal-panel {
  background: #1e1b4b;
  border-color: rgba(255,255,255,0.1);
}

.modal-panel--product { width: min(640px, 100%); padding: 24px; }
.modal-panel--checkout { width: min(480px, 100%); padding: 24px 20px 28px; }

@media (max-width: 560px) {
  .modal { padding: 0; align-items: flex-end; overflow-x: hidden; }
  .modal-panel {
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }
  .modal-panel--product { padding: 20px 16px max(24px, env(safe-area-inset-bottom)); }
  .modal-panel--checkout { padding: 20px 16px max(24px, env(safe-area-inset-bottom)); }
  .checkout-pay { max-width: 100%; overflow-x: hidden; }
  .pay-currency-tabs { gap: 6px; }
  .pay-currency-tab { padding: 8px 10px; font-size: 0.75rem; }
  .pay-channel-tabs { max-height: 180px; overflow-y: auto; overflow-x: hidden; }
  .pay-steps { gap: 4px; flex-wrap: wrap; }
  .pay-step { font-size: 0.62rem; padding: 4px 8px; max-width: 100%; }
  .pay-wallet-grid { display: none; }
  .pay-qr-box img { width: min(200px, 70vw) !important; height: auto !important; max-width: 100%; }
  .order-row { flex-wrap: wrap; }
  .order-price { width: 100%; text-align: right; margin-top: 4px; white-space: normal; }
}

.pay-mode-banner {
  font-size: 0.78rem; font-weight: 600; line-height: 1.45;
  padding: 10px 12px; border-radius: 10px; margin-bottom: 14px;
}
.pay-mode-banner--qr {
  background: color-mix(in srgb, #3b82f6 12%, var(--shop-card));
  color: #1d4ed8;
  border: 1px solid color-mix(in srgb, #3b82f6 25%, transparent);
}
.pay-mode-banner--mobile {
  background: color-mix(in srgb, #22c55e 12%, var(--shop-card));
  color: #15803d;
  border: 1px solid color-mix(in srgb, #22c55e 25%, transparent);
}

.pay-qr-box {
  display: flex; justify-content: center; padding: 12px;
  background: #fff; border-radius: 14px; border: 1px solid var(--shop-border);
}
.pay-qr-box img { display: block; border-radius: 8px; }
.pay-qr-tip { font-size: 0.72rem; color: var(--shop-muted); text-align: center; margin-top: 10px; }

.pay-mobile-grid { display: flex; flex-direction: column; gap: 10px; }
.pay-mobile-wallet {
  display: flex; align-items: center; gap: 12px;
  width: 100%; max-width: 100%;
  padding: 12px 14px; border-radius: 12px;
  border: 2px solid color-mix(in srgb, var(--w-color, var(--shop-primary)) 35%, var(--shop-border));
  background: color-mix(in srgb, var(--w-color, var(--shop-primary)) 8%, var(--shop-card));
  color: var(--shop-text); text-decoration: none;
  min-height: 56px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.pay-mobile-wallet .pay-wallet-icon-img {
  width: 36px; height: 36px; flex-shrink: 0;
}
.pay-mobile-wallet .pay-wallet-icon {
  width: 36px; text-align: center; flex-shrink: 0;
}
.pay-mobile-wallet .pay-wallet-name {
  font-size: 0.9rem; font-weight: 700; flex: 1; min-width: 0;
}
.pay-mobile-wallet small {
  margin-left: auto; font-size: 0.68rem; color: var(--shop-muted); font-weight: 600;
}

.modal-close {
  position: absolute; top: 12px; right: 14px;
  width: 32px; height: 32px; border-radius: 8px;
  border: none; background: rgba(0,0,0,0.06);
  font-size: 1.25rem; cursor: pointer; color: var(--shop-text);
  z-index: 2;
}

.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 560px) { .product-detail { grid-template-columns: 1fr; } }

.detail-img {
  aspect-ratio: 1; border-radius: 14px; overflow: hidden;
  background: color-mix(in srgb, var(--shop-primary) 10%, var(--shop-bg));
  display: flex; align-items: center; justify-content: center;
}

.detail-img img { width: 100%; height: 100%; object-fit: cover; }
.detail-cat { font-size: 0.75rem; color: var(--shop-muted); }
.detail-info h2 { font-size: 1.35rem; margin: 8px 0; }
.detail-desc {
  font-size: 0.875rem; color: var(--shop-muted); line-height: 1.65;
  max-height: min(42vh, 320px); overflow-y: auto; margin-top: 8px;
  padding-right: 4px;
}
.detail-desc-block {
  margin-bottom: 12px; padding-bottom: 12px;
  border-bottom: 1px solid var(--shop-border);
}
.detail-desc-block:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.detail-desc-block h4 {
  font-size: 0.8rem; font-weight: 700; color: var(--shop-text);
  margin-bottom: 6px;
}
.detail-desc-block p { font-size: 0.82rem; }
.detail-desc-empty { font-size: 0.82rem; color: var(--shop-muted); }
.detail-price { font-size: 1.75rem; font-weight: 800; color: var(--shop-primary); margin-top: 16px; }

.load-more-wrap { text-align: center; margin-top: 20px; }
.btn-load-more {
  padding: 10px 28px; border-radius: 999px;
  border: 1px solid var(--shop-border);
  background: var(--shop-card);
  color: var(--shop-text);
  font-size: 0.875rem; font-weight: 600;
  cursor: pointer;
}
.btn-load-more:hover { border-color: var(--shop-primary); color: var(--shop-primary); }

/* Checkout / Pay */
.checkout-head h2 { font-size: 1.1rem; margin-bottom: 12px; }

.checkout-order {
  background: color-mix(in srgb, var(--shop-primary) 6%, transparent);
  border-radius: 12px; padding: 12px; margin-bottom: 20px;
}

.order-row { display: flex; align-items: center; gap: 12px; }
.order-thumb {
  width: 56px; height: 56px; border-radius: 10px; overflow: hidden;
  flex-shrink: 0; background: var(--shop-bg);
  display: flex; align-items: center; justify-content: center;
}

.order-thumb img { width: 100%; height: 100%; object-fit: cover; }
.order-info { flex: 1; min-width: 0; }
.order-info strong { display: block; font-size: 0.875rem; }
.order-info span { font-size: 0.72rem; color: var(--shop-muted); display: block; margin-top: 2px; }
.order-price { font-weight: 800; color: var(--shop-primary); white-space: nowrap; }

.pay-steps {
  display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap;
}

.pay-step {
  font-size: 0.68rem; font-weight: 600; padding: 5px 10px; border-radius: 999px;
  background: rgba(0,0,0,0.05); color: var(--shop-muted);
}

.pay-step--active { background: var(--shop-primary); color: #fff; }
.pay-step--done { background: color-mix(in srgb, var(--shop-primary) 20%, transparent); color: var(--shop-primary); }

.pay-section { margin-bottom: 16px; }
.pay-section h3 { font-size: 0.85rem; font-weight: 700; margin-bottom: 8px; }
.pay-hint { font-size: 0.72rem; color: var(--shop-muted); margin-bottom: 10px; }

.checkout-pay { max-width: 100%; overflow-x: hidden; }

.pay-currency-tabs {
  display: flex; flex-wrap: wrap; gap: 8px;
  max-width: 100%; overflow-x: hidden;
}

.pay-currency-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-radius: 10px;
  border: 2px solid var(--shop-border);
  background: var(--shop-card); color: var(--shop-text);
  font-size: 0.82rem; font-weight: 700; cursor: pointer;
}

.pay-currency-tab--active {
  border-color: var(--shop-primary);
  background: color-mix(in srgb, var(--shop-primary) 12%, var(--shop-card));
  color: var(--shop-primary);
}

.pay-currency-icon { font-size: 1.1rem; }

.pay-channel-tabs { display: flex; flex-direction: column; gap: 8px; }

.pay-channel-tab {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  border: 2px solid var(--shop-border);
  background: transparent; color: var(--shop-text);
  cursor: pointer; text-align: left; width: 100%;
}

.pay-channel-tab--active {
  border-color: var(--tab-color, var(--shop-primary));
  background: color-mix(in srgb, var(--tab-color, var(--shop-primary)) 10%, transparent);
}

.pay-channel-icon { font-size: 1.25rem; }
.pay-channel-text { display: flex; flex-direction: column; gap: 2px; }
.pay-channel-text strong { font-size: 0.82rem; }
.pay-channel-text small { font-size: 0.68rem; color: var(--shop-muted); }

.pay-network-info { font-size: 0.7rem; color: var(--shop-muted); margin: 8px 0 12px; }

.pay-wallet-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.75rem; font-weight: 600; margin-bottom: 8px;
}

.pay-auto-tag { font-size: 0.68rem; color: #22c55e; font-weight: 500; }
.pay-auto-tag--warn { color: #f59e0b; }

.pay-wallet-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

@media (min-width: 420px) {
  .pay-wallet-grid { grid-template-columns: repeat(3, 1fr); }
}

.pay-wallet-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 72px;
  padding: 12px 8px;
  border-radius: 12px;
  border: 2px solid var(--shop-border);
  background: var(--shop-card);
  cursor: pointer;
  text-align: center;
}

.pay-wallet-card--active {
  border-color: var(--w-color, var(--shop-primary));
  background: color-mix(in srgb, var(--w-color, var(--shop-primary)) 8%, var(--shop-card));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--w-color, var(--shop-primary)) 25%, transparent);
}

.pay-wallet-card--launch {
  border-style: dashed;
  background: color-mix(in srgb, var(--w-color, var(--shop-primary)) 5%, var(--shop-card));
}
.pay-wallet-card--launch:hover {
  border-color: var(--w-color, var(--shop-primary));
  background: color-mix(in srgb, var(--w-color, var(--shop-primary)) 12%, var(--shop-card));
}

.pay-wallet-sub {
  display: block;
  font-size: 0.62rem;
  color: var(--shop-muted);
  font-weight: 500;
}

.pay-qr-wallet-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.pay-qr-wallet-tab {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--shop-border);
  background: var(--shop-card);
  font-size: 0.72rem;
  cursor: pointer;
}

.pay-qr-wallet-tab--active {
  border-color: var(--w-color, var(--shop-primary));
  background: color-mix(in srgb, var(--w-color, var(--shop-primary)) 10%, var(--shop-card));
  font-weight: 700;
}

.pay-qr-note {
  font-size: 0.72rem;
  color: var(--shop-muted);
  margin-bottom: 10px;
}

.pay-wallet-icon { font-size: 1.5rem; line-height: 1; }

.pay-wallet-name {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--shop-text);
  word-break: break-word;
}

.pay-status {
  font-size: 0.72rem; color: var(--shop-muted);
  background: rgba(0,0,0,0.04); border-radius: 8px;
  padding: 8px 10px; margin-bottom: 12px;
  word-break: break-all;
}

.pay-main-btn {
  width: 100%; padding: 14px; border: none; border-radius: 12px;
  background: var(--shop-primary); color: #fff;
  font-size: 0.95rem; font-weight: 700; cursor: pointer;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--shop-primary) 35%, transparent);
}

.pay-main-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.toast {
  position: fixed; bottom: max(24px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%) translateY(20px);
  padding: 10px 20px; border-radius: 10px;
  background: #0f172a; color: #fff; font-size: 0.85rem;
  opacity: 0; pointer-events: none; transition: all 0.25s; z-index: 200;
}

.toast--show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast--error { background: #dc2626; }

/* 出海TG商城 chuhaitg.com 风格 */
body[data-theme="chuhai-tg"] .shop-header {
  background: linear-gradient(135deg, var(--shop-header) 0%, var(--shop-primary) 100%);
}
body[data-theme="chuhai-tg"] .category-item--active {
  background: color-mix(in srgb, var(--shop-primary) 12%, transparent);
  border-color: var(--shop-primary);
}
body[data-theme="chuhai-tg"] .product-card {
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--shop-primary) 15%, transparent);
}

/* 跨境兽 AI 商城 aishop.cbshs.com 风格 */
body[data-theme="ai-shop-cbs"] .shop-header {
  background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 50%, #a78bfa 100%);
}
body[data-theme="ai-shop-cbs"] .shop-bg {
  background: linear-gradient(180deg, #faf5ff 0%, #f3e8ff 40%, #ede9fe 100%);
}
body[data-theme="ai-shop-cbs"] .product-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
body[data-theme="ai-shop-cbs"] .product-card {
  border-radius: 14px;
  border: 1px solid rgba(124, 58, 237, 0.12);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.08);
}
body[data-theme="ai-shop-cbs"] .product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.15);
}
body[data-theme="ai-shop-cbs"] .product-price {
  color: #7c3aed;
  font-weight: 800;
}
body[data-theme="ai-shop-cbs"] .category-item--active {
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  color: #fff;
  border-color: transparent;
}
body[data-theme="ai-shop-cbs"] .btn-buy {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
}

/* 钱包 App 内极简购买页 */
body.shop-auth-page {
  background: var(--shop-bg, #f0f9ff);
  min-height: 100vh;
}
.shop-auth-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  padding: 24px 20px max(24px, env(safe-area-inset-bottom));
  gap: 16px;
}
.shop-auth-order {
  width: min(360px, 100%);
  background: var(--shop-card, #fff);
  border: 1px solid var(--shop-border, rgba(15,23,42,0.08));
  border-radius: 14px;
  padding: 14px 16px;
}
.shop-auth-order .order-row { align-items: flex-start; }
.shop-auth-order .order-info strong { font-size: 0.92rem; line-height: 1.35; }
.shop-auth-order .order-price { font-size: 1.1rem; white-space: nowrap; }
.shop-auth-channel {
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--shop-muted, #64748b);
}
.shop-auth-loading {
  display: flex;
  align-items: center;
  justify-content: center;
}
.shop-auth-loading.hidden { display: none; }
.shop-auth-pay-btn {
  display: none;
  width: min(320px, 100%);
  padding: 16px 24px;
  border: none;
  border-radius: 14px;
  background: var(--shop-primary, #0ea5e9);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 28px color-mix(in srgb, var(--shop-primary, #0ea5e9) 35%, transparent);
  -webkit-tap-highlight-color: transparent;
}
.shop-auth-pay-btn--ready { display: block; }
.shop-auth-pay-btn:disabled { opacity: 0.65; cursor: wait; }
.shop-auth-error {
  font-size: 0.85rem;
  color: var(--shop-muted, #64748b);
  text-align: center;
  max-width: 280px;
  line-height: 1.5;
}
.shop-auth-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid color-mix(in srgb, var(--shop-primary, #0ea5e9) 20%, transparent);
  border-top-color: var(--shop-primary, #0ea5e9);
  border-radius: 50%;
  animation: shop-auth-spin 0.75s linear infinite;
}
@keyframes shop-auth-spin {
  to { transform: rotate(360deg); }
}
body.shop-auth-page .shop-auth-pay {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.pay-wallet-icon-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 10px;
  display: block;
  flex-shrink: 0;
}
.pay-wallet-card .pay-wallet-icon-img {
  margin-bottom: 2px;
}
.pay-wallet-card .pay-wallet-name {
  font-size: 0.72rem;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
