/* FlowHub - Shop Page */
.shop-wrapper { min-height: 100vh; background: var(--bg-primary, #0a0a1a); padding: 20px; }
.shop-header {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1200px; margin: 0 auto 24px; padding: 16px 0;
}
.shop-header h1 { font-size: 24px; color: var(--text-primary, #e2e8f0); }
.shop-header-right { display: flex; align-items: center; gap: 16px; }
.server-select-inline select { padding: 8px 12px; background: var(--bg-input, #0f0f2a); border: 1px solid var(--border-color, #1e1e3a); border-radius: 8px; color: var(--text-primary, #e2e8f0); font-size: 13px; outline: none; }

.cart-btn {
  position: relative; padding: 10px 16px; background: var(--accent, #6366f1); color: #fff;
  border: none; border-radius: 8px; cursor: pointer; font-size: 18px;
  display: flex; align-items: center; gap: 6px; transition: background 0.2s;
}
.cart-btn:hover { background: var(--accent-hover, #4f46e5); }
.cart-count {
  position: absolute; top: -6px; right: -6px; width: 20px; height: 20px;
  background: #ef4444; color: #fff; border-radius: 50%; font-size: 11px;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}

.shop-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px; max-width: 1200px; margin: 0 auto;
}

.shop-card {
  background: var(--glass-bg, rgba(255,255,255,0.72)); /* 移除 backdrop-filter:blur(16px):30+卡片每幀重算模糊=滾動卡頓源;淺底下 blur 幾乎看不出,拿掉外觀近乎不變 */
  border: 1px solid var(--border-color, #1e1e3a); border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden; transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: flex; flex-direction: column; /* 內容長短不一時,價格/按鈕靠 margin-top:auto 對齊底部,同排卡片等高 */
}
.shop-card:hover { transform: translateY(-4px); border-color: rgba(99,102,241,0.35); box-shadow: var(--shadow-md); }
.shop-card-img { height: 200px; background: #eef1f8; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.shop-card-img img { width: 100%; height: 100%; object-fit: cover; }
.shop-card-img .no-img { font-size: 48px; color: #cbd5e1; }
.shop-card-body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.shop-card-body h3 { font-size: 16.5px; color: var(--text-primary, #e2e8f0); margin-bottom: 8px; }
/* 說明=商品內容清單(多行);pre-line 每個 item 各一行、放大 14.5px+加粗+換較深 secondary 色(muted #64748b 太淡不明顯)、不截斷 */
.shop-desc { font-size: 14.5px; line-height: 1.7; font-weight: 500; color: var(--text-secondary, #334155); margin-bottom: 12px; white-space: pre-line; }
.shop-price { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.price-old { text-decoration: line-through; color: var(--text-muted, #475569); font-size: 13px; }
.price-now { color: #b45309; font-weight: 700; font-size: 18px; }
.shop-stock { font-size: 12px; color: var(--text-muted, #475569); margin-bottom: 12px; }
.shop-price, .shop-stock { flex-shrink: 0; }
.shop-card-actions { display: flex; justify-content: center; margin-top: auto; } /* 推到卡片底部,同排按鈕對齊 */
.add-to-cart { width: 100%; }

.qty-control { display: flex; align-items: center; gap: 0; }
.qty-btn { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: var(--bg-input, #0f0f2a); border: 1px solid var(--border-color, #1e1e3a); color: var(--text-primary, #e2e8f0); cursor: pointer; font-size: 16px; transition: all 0.2s; }
.qty-btn.minus { border-radius: 6px 0 0 6px; }
.qty-btn.plus { border-radius: 0 6px 6px 0; }
.qty-btn:hover { background: var(--accent, #6366f1); border-color: var(--accent, #6366f1); }
.qty-num { padding: 0 14px; height: 32px; display: flex; align-items: center; background: var(--bg-input, #0f0f2a); border-top: 1px solid var(--border-color, #1e1e3a); border-bottom: 1px solid var(--border-color, #1e1e3a); color: var(--text-primary, #e2e8f0); font-size: 14px; font-weight: 600; }

.shop-empty { flex-direction: column; align-items: center; justify-content: center; padding: 80px 20px; color: var(--text-muted, #475569); }
.shop-empty i { font-size: 60px; margin-bottom: 16px; opacity: 0.3; }
.shop-empty p { font-size: 16px; }

/* ── 訂閱方案 Hero Banner ── */
.shop-hero {
  max-width: 1200px; margin: 0 auto 40px; text-align: center; padding: 48px 24px;
  background: linear-gradient(135deg, rgba(99,102,241,0.12) 0%, rgba(59,130,246,0.08) 50%, rgba(139,92,246,0.1) 100%);
  border: 1px solid rgba(99,102,241,0.15); border-radius: 20px;
  position: relative; overflow: hidden;
}
.shop-hero::before {
  content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(99,102,241,0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(139,92,246,0.06) 0%, transparent 50%);
  pointer-events: none;
}
.shop-hero-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.9; position: relative; }
.shop-hero h2 {
  font-size: 28px; color: var(--text-primary, #f1f5f9); margin-bottom: 8px;
  font-weight: 700; letter-spacing: 1px; position: relative;
}
.shop-hero p {
  font-size: 15px; color: var(--text-secondary, #94a3b8); max-width: 500px;
  margin: 0 auto; line-height: 1.6; position: relative;
}

/* ── 訂閱方案卡片佈局 ── */
.shop-grid.pricing-layout {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px; max-width: 800px;
}

.plan-card {
  background: var(--glass-bg, rgba(255,255,255,0.72)); backdrop-filter: blur(20px);
  border: 1px solid var(--border-color, #1e1e3a); border-radius: 16px;
  box-shadow: var(--shadow-sm);
  padding: 32px 28px; text-align: center; position: relative;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  display: flex; flex-direction: column;
}
.plan-card:hover {
  transform: translateY(-6px);
  border-color: rgba(99,102,241,0.4);
  box-shadow: 0 12px 40px rgba(99,102,241,0.18);
}
.plan-card.recommended {
  border-color: rgba(99,102,241,0.4);
  background: linear-gradient(180deg, rgba(99,102,241,0.10) 0%, rgba(255,255,255,0.85) 40%);
}

.plan-badge {
  position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff;
  padding: 4px 20px; border-radius: 0 0 10px 10px; font-size: 11px;
  font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
}

.plan-icon {
  width: 56px; height: 56px; margin: 12px auto 16px;
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.1));
  border: 1px solid rgba(99,102,241,0.2); border-radius: 14px;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
}

.plan-name { font-size: 20px; font-weight: 700; color: var(--text-primary, #f1f5f9); margin-bottom: 4px; }
.plan-cycle { font-size: 13px; color: var(--text-muted, #475569); margin-bottom: 20px; }

.plan-price-area { margin-bottom: 24px; }
.plan-price-old {
  font-size: 14px; color: var(--text-muted, #475569);
  text-decoration: line-through; margin-bottom: 4px;
}
.plan-price {
  font-size: 36px; font-weight: 800; color: var(--text-primary, #f1f5f9);
  line-height: 1.1;
}
.plan-price .currency { font-size: 18px; font-weight: 600; vertical-align: top; margin-right: 2px; color: var(--text-secondary, #94a3b8); }
.plan-price .period { font-size: 14px; font-weight: 400; color: var(--text-muted, #475569); margin-left: 4px; }
.plan-save {
  display: inline-block; margin-top: 8px; padding: 3px 12px; border-radius: 20px;
  background: rgba(34,197,94,0.14); border: 1px solid rgba(34,197,94,0.30);
  color: #15803d; font-size: 12px; font-weight: 600;
}

.plan-divider {
  width: 100%; height: 1px; margin: 0 0 20px;
  background: linear-gradient(90deg, transparent, rgba(15,23,42,0.12), transparent);
}

.plan-features { list-style: none; padding: 0; margin: 0 0 28px; text-align: left; flex: 1; }
.plan-features li {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; font-size: 13px; color: var(--text-secondary, #94a3b8);
}
.plan-features li i {
  font-size: 16px; width: 20px; text-align: center; flex-shrink: 0;
}
.plan-features li i.check { color: #16a34a; }
.plan-features li i.cross { color: #94a3b8; }

.plan-cta {
  width: 100%; padding: 12px 24px; border-radius: 10px; font-size: 15px;
  font-weight: 600; border: none; cursor: pointer; transition: all 0.25s;
}
.plan-cta.primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff;
  box-shadow: 0 4px 16px rgba(99,102,241,0.3);
}
.plan-cta.primary:hover {
  box-shadow: 0 6px 24px rgba(99,102,241,0.45); transform: translateY(-1px);
}
.plan-cta.ghost {
  background: transparent; color: var(--text-primary, #f1f5f9);
  border: 1px solid var(--border-color, #1e1e3a);
}
.plan-cta.ghost:hover {
  border-color: rgba(99,102,241,0.4); background: rgba(99,102,241,0.06);
}

@media (max-width: 768px) {
  .shop-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
  .shop-grid.pricing-layout { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .shop-header { flex-direction: column; gap: 12px; align-items: flex-start; }
  .shop-hero { padding: 32px 16px; }
  .shop-hero h2 { font-size: 22px; }
}
