/* ===== 商品模块公共样式（前台 shop/） ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #60a5fa;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;
  --border: #e2e8f0;
  --success: #10b981;
  --error: #ef4444;
}
html.dark {
  --primary: #60a5fa;
  --primary-dark: #3b82f6;
  --primary-light: #93c5fd;
  --bg: #1e1e1e;
  --card-bg: #2a2a2a;
  --text: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --border: #3a3a3a;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* ===== 共用 Header（与首页 web.css 一致，样式不变） ===== */
.header {
  position: sticky; top: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 50;
}
.logo { display: flex; align-items: center; gap: 8px; }
.logo-icon { width: 30px; height: 30px; border-radius: 8px; object-fit: contain; }
.logo-text { font-size: 16px; font-weight: 600; }
.version-badge {
  font-size: 11px; color: var(--primary); background: rgba(59,130,246,0.1);
  padding: 2px 8px; border-radius: 100px; font-weight: 600;
}
.land-nav { display: flex; align-items: center; gap: 2px; margin: 0 auto; }
.land-nav a {
  padding: 7px 14px; border-radius: 100px;
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
  text-decoration: none; transition: all 0.2s ease; white-space: nowrap;
}
.land-nav a:hover { color: var(--text); background: rgba(59,130,246,0.08); }
.header-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.theme-btn, .settings-btn, .header-action-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border: none; border-radius: 8px;
  background: transparent; color: var(--text-secondary); cursor: pointer;
  text-decoration: none;
}
.theme-btn:hover, .settings-btn:hover, .header-action-btn:hover { background: rgba(59,130,246,0.1); color: var(--text); }
.theme-btn svg, .settings-btn svg, .header-action-btn svg { width: 18px; height: 18px; }
.header-action-btn {
  width: auto; padding: 0 12px; gap: 6px; font-size: 13px; color: var(--text);
}
@media (max-width: 560px) {
  .land-nav { display: none; }
}

.shop-detail-wrap {
  max-width: 1080px; margin: 0 auto;
  padding: 40px 24px 64px;
}
.shop-detail-card {
  display: grid; grid-template-columns: 1.05fr 1fr;
  gap: 40px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 36px;
  box-shadow: 0 20px 50px -30px rgba(59,130,246,0.25);
}

.shop-hero {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.shop-hero-icon {
  width: 132px; height: 132px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 36px;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 24px 60px -20px rgba(59,130,246,0.5);
  transform: rotate(-4deg);
  transition: transform 0.35s ease;
}
.shop-hero-icon svg { width: 62px; height: 62px; }
.shop-hero-icon:hover { transform: rotate(3deg) scale(1.05); }
html.dark .shop-hero-icon { background: rgba(255,255,255,0.12); }
.shop-hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.shop-hero-badge {
  position: absolute; top: 18px; left: 18px;
  padding: 5px 14px; border-radius: 100px;
  font-size: 12px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 6px 16px -6px rgba(59,130,246,0.6);
}
.shop-hero-badge.hot { background: linear-gradient(135deg, #f97316, #ea580c); }
.shop-hero-badge.new { background: linear-gradient(135deg, #10b981, #059669); }

.shop-info { display: flex; flex-direction: column; gap: 14px; padding: 8px 0; }
.shop-info-name { font-size: 30px; font-weight: 800; line-height: 1.3; }
.shop-info-sub { font-size: 16px; color: var(--text-secondary); }
.shop-info-price {
  display: flex; align-items: baseline; gap: 12px; margin-top: 4px;
}
.shop-info-price .now {
  font-size: 34px; font-weight: 800;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.shop-info-price .was {
  font-size: 16px; color: var(--text-tertiary); text-decoration: line-through;
}
.shop-info-desc {
  font-size: 14px; line-height: 1.8;
  color: var(--text-secondary);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
}
html.dark .shop-info-desc { background: rgba(255,255,255,0.04); }

.shop-features { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.shop-features-title { font-size: 14px; font-weight: 700; color: var(--text); }
.shop-feature {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--text-secondary);
}
.shop-feature svg {
  width: 17px; height: 17px; color: var(--success); flex-shrink: 0;
}
.shop-cta { display: flex; gap: 14px; margin-top: 18px; }
.shop-btn {
  flex: 1;
  padding: 14px 22px;
  border: none; border-radius: 14px;
  font-size: 15px; font-weight: 700; cursor: pointer;
  text-align: center; text-decoration: none;
  transition: all 0.25s ease;
}
.shop-btn-buy {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  box-shadow: 0 14px 30px -12px rgba(59,130,246,0.6);
}
.shop-btn-buy:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -12px rgba(59,130,246,0.7); }
.shop-btn-ghost {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.shop-btn-ghost:hover { background: rgba(59,130,246,0.08); }
.shop-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.shop-detail-footer {
  max-width: 1080px; margin: 0 auto;
  padding: 0 24px 36px;
  text-align: center;
  font-size: 12px; color: var(--text-tertiary);
  line-height: 2;
}

.shop-loading, .shop-error {
  padding: 100px 24px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 15px;
}
.shop-error .shop-btn { display: inline-block; flex: none; margin-top: 20px; padding: 10px 28px; }

/* ===== 首页商品卡动态渲染（data-grad 渐变）===== */
.shop-card[data-grad="blue"] .shop-img { background: linear-gradient(135deg, rgba(59,130,246,0.18), rgba(96,165,250,0.05)); }
.shop-card[data-grad="green"] .shop-img { background: linear-gradient(135deg, rgba(16,185,129,0.16), rgba(52,211,153,0.05)); }
.shop-card[data-grad="purple"] .shop-img { background: linear-gradient(135deg, rgba(168,85,247,0.16), rgba(192,132,252,0.05)); }
.shop-card[data-grad="orange"] .shop-img { background: linear-gradient(135deg, rgba(249,115,22,0.16), rgba(251,146,60,0.05)); }
.shop-card[data-grad="sky"] .shop-img { background: linear-gradient(135deg, rgba(14,165,233,0.16), rgba(56,189,248,0.05)); }
.shop-card[data-grad="pink"] .shop-img { background: linear-gradient(135deg, rgba(236,72,153,0.16), rgba(244,114,182,0.05)); }
.shop-card[data-grad="gray"] .shop-img { background: linear-gradient(135deg, rgba(100,116,139,0.16), rgba(148,163,184,0.05)); }

/* 首页商品卡：真实封面图（优先于图标） */
.shop-cover {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}

/* ===== 详情页 toast ===== */
.shop-toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px);
  padding: 12px 22px; border-radius: 100px;
  background: rgba(30,41,59,0.92); color: #fff;
  font-size: 14px; font-weight: 500; z-index: 200;
  opacity: 0; pointer-events: none;
  transition: all 0.3s ease; max-width: 86vw; text-align: center;
}
.shop-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.shop-toast.success { background: rgba(16,185,129,0.92); }
.shop-toast.error { background: rgba(239,68,68,0.94); }

/* 响应式 */
@media (max-width: 900px) {
  .shop-detail-card { grid-template-columns: 1fr; gap: 28px; padding: 24px; }
  .shop-hero { aspect-ratio: 4 / 3; }
  .shop-info-name { font-size: 24px; }
}
@media (max-width: 560px) {
  .shop-topbar { padding: 0 16px; }
  .shop-detail-wrap { padding: 20px 16px 48px; }
  .shop-info-name { font-size: 21px; }
  .shop-info-price .now { font-size: 28px; }
}
