/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #1f2937; background: #f8fafc; line-height: 1.6; min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; border: none; outline: none; }
button { cursor: pointer; }

/* ===== Variables ===== */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --accent: #06b6d4;
  --accent-light: #22d3ee;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-light: #9ca3af;
  --bg-white: #ffffff;
  --bg-gray: #f1f5f9;
  --bg-dark: #0f172a;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --max-width: 1200px;
  --header-height: 64px;
}

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
}
.header-inner {
  max-width: var(--max-width); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 100%;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 18px; font-weight: 700; color: var(--primary);
  cursor: pointer; white-space: nowrap;
}
.logo-icon {
  width: 36px; height: 36px; background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; font-weight: 900;
}
.nav-links {
  display: flex; align-items: center; gap: 4px;
}
.nav-links a {
  padding: 8px 16px; border-radius: var(--radius); font-size: 14px;
  font-weight: 500; color: var(--text-secondary); transition: all 0.2s;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--primary); background: #eff6ff;
}
.header-actions {
  display: flex; align-items: center; gap: 12px;
}
.header-user {
  font-size: 14px; color: var(--primary); font-weight: 500; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 20px; border-radius: var(--radius); font-size: 14px;
  font-weight: 500; transition: all 0.2s; gap: 6px;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { border: 1px solid var(--border); color: var(--text-primary); background: #fff; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #0891b2; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; }
.btn-lg { padding: 12px 28px; font-size: 16px; border-radius: var(--radius-lg); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-block { width: 100%; }

/* Mobile menu */
.mobile-menu-btn {
  display: none; background: none; border: none; font-size: 24px;
  color: var(--text-primary); padding: 4px;
}

/* ===== Main Content ===== */
.main-content {
  min-height: calc(100vh - var(--header-height) - 280px);
}
.page { display: none; }
.page.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

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

/* ===== Hero Section ===== */
.hero {
  background: linear-gradient(135deg, rgba(15,23,42,0.82) 0%, rgba(30,58,138,0.78) 50%, rgba(8,145,178,0.72) 100%),
              url('/images/hero-bg.jpeg') center/cover no-repeat;
  color: #fff; padding: 100px 0; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -50%; right: -20%;
  width: 600px; height: 600px; border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.hero::after {
  content: ''; position: absolute; bottom: -30%; left: -10%;
  width: 400px; height: 400px; border-radius: 50%;
  background: rgba(6,182,212,0.1);
}
.hero-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
  position: relative; z-index: 1;
}
.hero h1 { font-size: 46px; font-weight: 800; margin-bottom: 16px; letter-spacing: -0.5px; text-shadow: 0 2px 20px rgba(0,0,0,0.3); }
.hero p { font-size: 18px; opacity: 0.92; max-width: 560px; line-height: 1.7; margin-bottom: 32px; text-shadow: 0 1px 8px rgba(0,0,0,0.2); }
.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; }

/* ===== Section Common ===== */
.section { padding: 72px 0; }
.section-gray { background: var(--bg-gray); }
.section-title {
  font-size: 28px; font-weight: 700; text-align: center; margin-bottom: 12px;
  color: var(--text-primary);
}
.section-desc {
  font-size: 16px; color: var(--text-secondary); text-align: center;
  margin-bottom: 48px; max-width: 560px; margin-left: auto; margin-right: auto;
}
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 32px;
}
.section-header h2 { font-size: 24px; font-weight: 700; }
.section-header a { font-size: 14px; color: var(--primary); font-weight: 500; }

/* ===== Section Banner ===== */
.section-banner {
  border-radius: var(--radius-xl); overflow: hidden; margin-bottom: 40px;
  position: relative; height: 200px;
}
.section-banner img {
  width: 100%; height: 100%; object-fit: cover;
}
.section-banner-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(15,23,42,0.65) 0%, rgba(37,99,235,0.45) 100%);
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  color: #fff;
}
.section-banner-overlay h2 { font-size: 28px; font-weight: 700; text-shadow: 0 2px 12px rgba(0,0,0,0.3); }
.section-banner-overlay p { font-size: 15px; opacity: 0.9; margin-top: 8px; text-shadow: 0 1px 6px rgba(0,0,0,0.2); }

/* ===== Feature Cards ===== */
.feature-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.feature-card {
  background: var(--bg-white); border-radius: var(--radius-xl); padding: 0;
  border: 1px solid var(--border); transition: all 0.3s; overflow: hidden;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.feature-card-img {
  width: 100%; height: 180px; object-fit: cover;
  background: var(--bg-gray);
}
.feature-card-body { padding: 24px 28px 28px; }
.feature-card-body h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.feature-card-body p { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }

/* ===== Product Grid ===== */
.category-tabs {
  display: flex; gap: 8px; margin-bottom: 32px; flex-wrap: wrap;
}
.category-tab {
  padding: 8px 20px; border-radius: 999px; font-size: 14px; font-weight: 500;
  background: var(--bg-white); border: 1px solid var(--border);
  color: var(--text-secondary); cursor: pointer; transition: all 0.2s;
}
.category-tab:hover { border-color: var(--primary); color: var(--primary); }
.category-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.product-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.product-card {
  background: var(--bg-white); border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border); transition: all 0.3s; cursor: pointer;
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.product-img {
  width: 100%; aspect-ratio: 4/3; background: linear-gradient(135deg, #f0f4ff 0%, #f8fafc 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; color: var(--text-light); position: relative; overflow: hidden;
}
.product-img img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.product-tag {
  position: absolute; top: 10px; left: 10px;
  padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600;
  background: linear-gradient(135deg, #2563eb, #06b6d4); color: #fff;
  letter-spacing: 0.5px;
}
.product-info {
  padding: 14px 16px 16px; display: flex; flex-direction: column;
  flex: 1; min-height: 0;
}
.product-name {
  font-size: 14px; font-weight: 600; color: var(--text-dark);
  line-height: 1.5; margin-bottom: 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; text-overflow: ellipsis; min-height: 42px;
}
.product-desc {
  font-size: 12px; color: var(--text-secondary); margin-bottom: 10px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.product-merchant {
  font-size: 12px; color: var(--primary); margin-bottom: 8px;
  cursor: pointer; display: flex; align-items: center; gap: 4px;
  opacity: 0.85; transition: opacity 0.2s;
}
.product-merchant:hover { opacity: 1; text-decoration: underline; }
.product-bottom {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-top: auto;
}
.product-price {
  font-family: 'DIN Alternate', 'Helvetica Neue', Arial, sans-serif;
  font-size: 22px; font-weight: 800; color: #ef4444;
  letter-spacing: -0.5px; line-height: 1;
}
.product-price .yen {
  font-size: 14px; font-weight: 600; margin-right: 1px;
  vertical-align: baseline;
}
.product-price .price-range {
  font-size: 14px; font-weight: 600;
}

/* ===== Product Detail ===== */
.product-detail { padding: 40px 0; }
.product-detail-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  background: var(--bg-white); border-radius: var(--radius-xl); padding: 32px;
  border: 1px solid var(--border);
}
.product-detail-img {
  aspect-ratio: 1; background: var(--bg-gray); border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 80px; color: var(--text-light); overflow: hidden;
}
.product-detail-img img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-lg); }
.product-detail-info { display: flex; flex-direction: column; }
.product-detail-info h1 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.product-detail-info .detail-desc { color: var(--text-secondary); margin-bottom: 16px; font-size: 15px; }
.detail-price-box {
  background: #fef2f2; padding: 16px 20px; border-radius: var(--radius);
  margin-bottom: 20px;
}
.detail-price-box .label { font-size: 13px; color: var(--text-secondary); }
.detail-price-box .price { font-size: 28px; font-weight: 800; color: var(--danger); }
.detail-merchant {
  display: flex; align-items: center; gap: 12px; padding: 16px;
  background: var(--bg-gray); border-radius: var(--radius); margin-bottom: 20px;
  cursor: pointer; transition: all 0.2s;
}
.detail-merchant:hover { background: #e2e8f0; }
.detail-merchant-logo {
  width: 40px; height: 40px; border-radius: var(--radius);
  background: var(--primary); color: #fff; display: flex;
  align-items: center; justify-content: center; font-weight: 700;
}
.detail-merchant-name { font-weight: 600; font-size: 15px; }
.detail-merchant-label { font-size: 12px; color: var(--text-secondary); }
.detail-specs { margin-bottom: 24px; }
.detail-spec-row {
  display: flex; padding: 10px 0; border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.detail-spec-row .label { width: 100px; color: var(--text-secondary); flex-shrink: 0; }
.detail-spec-row .value { color: var(--text-primary); }
.detail-actions { display: flex; gap: 12px; margin-top: auto; }
.detail-actions .btn { flex: 1; padding: 14px; font-size: 16px; }

/* ===== News ===== */
.news-list { display: flex; flex-direction: column; gap: 16px; }
.news-card {
  display: flex; gap: 24px; background: var(--bg-white);
  border-radius: var(--radius-lg); padding: 24px;
  border: 1px solid var(--border); transition: all 0.3s; cursor: pointer;
}
.news-card:hover { box-shadow: var(--shadow-md); border-color: transparent; }
.news-card-img {
  width: 240px; height: 160px; border-radius: var(--radius);
  background: var(--bg-gray); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; color: var(--text-light); overflow: hidden;
}
.news-card-img img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.news-card-body { flex: 1; display: flex; flex-direction: column; }
.news-tag {
  display: inline-flex; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 500; margin-bottom: 10px; width: fit-content;
}
.news-tag.ai { background: #eff6ff; color: var(--primary); }
.news-tag.tech { background: #ecfeff; color: var(--accent); }
.news-tag.industry { background: #fef3c7; color: #d97706; }
.news-card-body h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.news-card-body p { font-size: 14px; color: var(--text-secondary); flex: 1; line-height: 1.7; }
.news-meta { display: flex; gap: 20px; font-size: 13px; color: var(--text-light); margin-top: 12px; }

/* News Detail */
.news-detail { padding: 40px 0; }
.news-detail-inner {
  max-width: 800px; margin: 0 auto; background: var(--bg-white);
  border-radius: var(--radius-xl); padding: 40px;
  border: 1px solid var(--border);
}
.news-detail-inner h1 { font-size: 26px; font-weight: 700; margin-bottom: 20px; line-height: 1.5; }
.news-detail-meta {
  display: flex; gap: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border);
  margin-bottom: 24px; font-size: 14px; color: var(--text-secondary);
}
.news-detail-meta span { display: flex; align-items: center; gap: 6px; }
.news-detail-content { font-size: 15px; line-height: 1.9; color: var(--text-primary); }
.news-detail-content p { margin-bottom: 16px; }

/* Publish Form */
.publish-form { max-width: 700px; margin: 0 auto; }

/* ===== Merchant ===== */
.merchant-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px;
}
.merchant-card {
  background: var(--bg-white); border-radius: var(--radius-xl);
  border: 1px solid var(--border); transition: all 0.3s; cursor: pointer;
  overflow: hidden; display: flex; flex-direction: column; text-align: center;
  text-decoration: none; color: inherit;
}
.merchant-card:hover { transform: translateY(-6px); box-shadow: 0 12px 32px rgba(37,99,235,0.15); border-color: transparent; }
.merchant-card-logo {
  aspect-ratio: 1; width: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; position: relative; overflow: hidden;
}
.merchant-card-logo::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.15) 0%, transparent 60%);
}
.merchant-card-icon {
  width: 80px; height: 80px; border-radius: 20px;
  background: rgba(255,255,255,0.2); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px; position: relative; z-index: 1;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.merchant-card-icon-text {
  font-size: 36px; font-weight: 900; color: #fff; line-height: 1;
}
.merchant-card-sub {
  font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.85);
  position: relative; z-index: 1; letter-spacing: 2px;
}
.merchant-card-info {
  padding: 20px 16px; text-align: center;
}
.merchant-card-name { font-size: 15px; font-weight: 600; line-height: 1.5; color: var(--text-dark); margin-bottom: 8px; }
.merchant-card-link { font-size: 13px; color: var(--primary); font-weight: 500; }
.merchant-card:hover .merchant-card-link { text-decoration: underline; }

/* Merchant Detail */
.merchant-detail { padding: 40px 0; }
.merchant-detail-card {
  background: var(--bg-white); border-radius: var(--radius-xl); padding: 40px;
  border: 1px solid var(--border);
}
.merchant-detail-header {
  display: flex; align-items: center; gap: 24px; margin-bottom: 32px;
  padding-bottom: 24px; border-bottom: 1px solid var(--border);
}
.merchant-detail-logo {
  width: 80px; height: 80px; border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 800; color: #fff;
}
.merchant-detail-header h1 { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.merchant-detail-header .slogan { color: var(--text-secondary); font-size: 15px; }

/* ===== Join Form ===== */
.join-section { padding: 60px 0; }
.form-card {
  max-width: 720px; margin: 0 auto; background: var(--bg-white);
  border-radius: var(--radius-xl); padding: 40px; border: 1px solid var(--border);
}
.form-card h2 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.form-card .form-desc { color: var(--text-secondary); margin-bottom: 32px; font-size: 15px; }
.form-group { margin-bottom: 20px; }
.form-label {
  display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px;
  color: var(--text-primary);
}
.form-label .required { color: var(--danger); margin-left: 2px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 14px; color: var(--text-primary);
  background: var(--bg-white); transition: border-color 0.2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-hint { font-size: 12px; color: var(--text-light); margin-top: 4px; }

/* ===== About ===== */
.about-hero {
  background: linear-gradient(135deg, #1e3a8a, #2563eb, #0891b2);
  color: #fff; padding: 64px 0; text-align: center;
}
.about-hero h1 { font-size: 36px; font-weight: 800; margin-bottom: 12px; }
.about-hero p { font-size: 16px; opacity: 0.9; max-width: 600px; margin: 0 auto; }
.about-content { padding: 60px 0; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.about-text h2 { font-size: 22px; font-weight: 700; margin-bottom: 16px; }
.about-text p { font-size: 15px; color: var(--text-secondary); line-height: 1.8; margin-bottom: 16px; }
.about-values { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.value-card {
  padding: 20px; background: var(--bg-white); border-radius: var(--radius-lg);
  border: 1px solid var(--border); text-align: center;
}
.value-card .icon { font-size: 28px; margin-bottom: 8px; }
.value-card h4 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.value-card p { font-size: 12px; color: var(--text-secondary); }

/* ===== Auth Pages ===== */
.auth-page {
  min-height: calc(100vh - var(--header-height) - 260px);
  display: flex; align-items: center; justify-content: center; padding: 40px 24px;
}
.auth-card {
  width: 100%; max-width: 420px; background: var(--bg-white);
  border-radius: var(--radius-xl); padding: 40px; border: 1px solid var(--border);
}
.auth-card h2 { font-size: 24px; font-weight: 700; margin-bottom: 8px; text-align: center; }
.auth-card .auth-subtitle { color: var(--text-secondary); margin-bottom: 28px; text-align: center; font-size: 14px; }
.auth-card .form-group { margin-bottom: 16px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-secondary); }
.auth-footer a { color: var(--primary); font-weight: 500; }
.auth-footer a:hover { text-decoration: underline; }

/* ===== Footer ===== */
.site-footer {
  background: var(--bg-dark); color: #cbd5e1; padding: 48px 0 0;
}
.footer-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand .logo { color: #fff; margin-bottom: 12px; }
.footer-brand p { font-size: 13px; line-height: 1.7; color: #94a3b8; }
.footer-col h4 { color: #fff; font-size: 14px; font-weight: 600; margin-bottom: 16px; }
.footer-col a { display: block; font-size: 13px; color: #94a3b8; margin-bottom: 10px; transition: color 0.2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  padding: 20px 0; text-align: center; font-size: 13px; color: #64748b;
}
.footer-bottom a { color: #94a3b8; margin: 0 8px; }
.footer-bottom a:hover { color: #fff; }

/* ===== Content Pages (售后服务/协议/隐私) ===== */
.content-page { padding: 48px 0; }
.content-page-inner {
  max-width: 800px; margin: 0 auto; background: var(--bg-white);
  border-radius: var(--radius-xl); padding: 40px; border: 1px solid var(--border);
}
.content-page-inner h1 { font-size: 26px; font-weight: 700; margin-bottom: 24px; }
.content-page-inner h2 { font-size: 18px; font-weight: 600; margin: 24px 0 12px; color: var(--text-primary); }
.content-page-inner p { font-size: 15px; color: var(--text-secondary); line-height: 1.8; margin-bottom: 12px; }

/* ===== Breadcrumb ===== */
.breadcrumb { padding: 16px 0; font-size: 13px; color: var(--text-light); }
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 8px; }

/* ===== Back Button ===== */
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; color: var(--text-secondary); margin-bottom: 20px;
  cursor: pointer; transition: color 0.2s;
}
.back-btn:hover { color: var(--primary); }

/* ===== Toast ===== */
.toast-container { position: fixed; top: 80px; right: 24px; z-index: 9999; }
.toast {
  padding: 12px 20px; border-radius: var(--radius); margin-bottom: 8px;
  font-size: 14px; font-weight: 500; color: #fff;
  animation: slideIn 0.3s ease; min-width: 200px;
  box-shadow: var(--shadow-lg);
}
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-info { background: var(--primary); }
@keyframes slideIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }

/* ===== Cart Badge ===== */
.cart-badge {
  position: relative;
}
.cart-badge .count {
  position: absolute; top: -6px; right: -8px;
  background: var(--danger); color: #fff; font-size: 10px;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .merchant-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute;
    top: var(--header-height); left: 0; right: 0;
    background: #fff; padding: 12px 24px; border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .mobile-menu-btn { display: block; }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 15px; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr; }
  .merchant-grid { grid-template-columns: 1fr; }
  .product-detail-grid { grid-template-columns: 1fr; }
  .news-card { flex-direction: column; }
  .news-card-img { width: 100%; height: 200px; }
  .about-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .detail-actions { flex-direction: column; }
  .section { padding: 48px 0; }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .hero-btns { flex-direction: column; }
  .hero-btns .btn { width: 100%; }
}

/* ===== Mall Search Bar ===== */
.mall-search-bar {
  display: flex; gap: 12px; max-width: 560px; margin: 0 auto 24px;
}
.mall-search-input {
  flex: 1; padding: 10px 16px; border: 1px solid #e2e8f0; border-radius: 8px;
  font-size: 14px; outline: none; transition: border-color .2s;
}
.mall-search-input:focus { border-color: var(--primary); }
.mall-search-btn {
  padding: 10px 24px; background: var(--primary); color: #fff; border: none;
  border-radius: 8px; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: background .2s;
}
.mall-search-btn:hover { background: var(--primary-dark); }

/* ===== Loading / Empty States ===== */
.loading-state {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 48px 0; color: var(--text-secondary); font-size: 14px;
}
.loading-spinner {
  width: 24px; height: 24px; border: 3px solid #e2e8f0;
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 64px 0; color: var(--text-secondary);
}
.empty-icon { font-size: 48px; margin-bottom: 16px; }

/* ===== Pagination ===== */
.pagination {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 32px; flex-wrap: wrap;
}
.page-btn {
  min-width: 36px; height: 36px; padding: 0 10px;
  border: 1px solid #e2e8f0; background: #fff; border-radius: 6px;
  font-size: 14px; cursor: pointer; transition: all .2s; color: var(--text-primary);
}
.page-btn:hover:not(:disabled):not(.active) { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }
.page-ellipsis { padding: 0 4px; color: var(--text-tertiary); }

/* ===== Card Merchant Link ===== */
.card-merchant {
  display: inline-block; font-size: 12px; color: var(--primary);
  margin-bottom: 4px; transition: color .2s;
}
.card-merchant:hover { color: var(--primary-dark); text-decoration: underline; }

/* ===== Detail Classify Tag ===== */
.detail-classify {
  display: inline-block; font-size: 12px; padding: 2px 10px;
  background: rgba(37,99,235,.08); color: var(--primary);
  border-radius: 999px; margin-bottom: 12px;
}
.detail-original-price {
  font-size: 14px; color: var(--text-tertiary);
  text-decoration: line-through; margin-left: 8px;
}
.detail-content-section {
  margin-top: 40px; padding-top: 32px; border-top: 1px solid #e2e8f0;
}
.detail-content-section h2 {
  font-size: 18px; margin-bottom: 16px; color: var(--text-primary);
}
.detail-content-body {
  line-height: 1.8; color: var(--text-secondary); font-size: 14px;
}

/* ===== Cart Page ===== */
.cart-page { max-width: 1200px; margin: 0 auto; padding: 32px 24px 80px; }
.cart-page-title { font-size: 24px; font-weight: 700; color: var(--text-primary); margin-bottom: 24px; }
.cart-list { display: flex; flex-direction: column; gap: 16px; }
.cart-item {
  display: flex; align-items: center; gap: 16px;
  background: #fff; border-radius: 12px; padding: 16px 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06); transition: box-shadow 0.2s;
}
.cart-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
  font-size: 15px; font-weight: 600; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px;
}
.cart-item-sku { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.cart-item-price {
  font-family: "DIN Alternate", "Helvetica Neue", monospace;
  font-size: 18px; font-weight: 800; color: #ef4444;
}
.cart-item-price .yuan { font-size: 13px; font-weight: 600; }
.cart-item-qty {
  font-size: 14px; color: var(--text-secondary); font-weight: 500;
  flex-shrink: 0;
}
.cart-delete-btn {
  font-size: 13px; color: #9ca3af; cursor: pointer; background: none;
  border: none; padding: 4px 8px; transition: color 0.15s;
}
.cart-delete-btn:hover { color: #ef4444; }
.cart-bottom {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #fff; border-top: 1px solid #e5e7eb;
  padding: 12px 24px; display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.06); z-index: 100;
}
.cart-bottom-left { display: flex; align-items: center; gap: 12px; }
.cart-bottom-left input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }
.cart-select-all { font-size: 14px; color: var(--text-secondary); cursor: pointer; }
.cart-bottom-right { display: flex; align-items: center; gap: 20px; }
.cart-total { font-size: 14px; color: var(--text-secondary); }
.cart-total-price {
  font-family: "DIN Alternate", "Helvetica Neue", monospace;
  font-size: 24px; font-weight: 800; color: #ef4444;
}
.cart-total-price .yuan { font-size: 14px; font-weight: 600; }
.cart-checkout-btn {
  background: var(--primary); color: #fff; border: none;
  padding: 10px 32px; border-radius: 8px; font-size: 16px;
  font-weight: 600; cursor: pointer; transition: background 0.15s;
}
.cart-checkout-btn:hover { background: #1d4ed8; }
.cart-checkout-btn:disabled { background: #93c5fd; cursor: not-allowed; }
.cart-empty {
  text-align: center; padding: 80px 0; color: var(--text-muted);
}
.cart-empty-icon { font-size: 64px; margin-bottom: 16px; opacity: 0.3; }
.cart-empty p { font-size: 16px; margin-bottom: 16px; }
.cart-empty a { color: var(--primary); text-decoration: none; font-weight: 600; }
.cart-empty a:hover { text-decoration: underline; }
.cart-unlogin {
  text-align: center; padding: 80px 0; color: var(--text-muted);
}
.cart-unlogin p { font-size: 16px; margin-bottom: 16px; }
.cart-unlogin a { color: var(--primary); text-decoration: none; font-weight: 600; }
@media (max-width: 768px) {
  .cart-item { flex-wrap: wrap; gap: 12px; }
  .cart-item-info { flex-basis: 100%; }
}
.detail-content-body img { max-width: 100%; border-radius: 8px; margin: 12px 0; }

/* ===== Checkout Page ===== */
.checkout-page { background: var(--bg-secondary); min-height: 60vh; padding: 24px 0 48px; }
.checkout-loading { text-align: center; padding: 80px 0; color: var(--text-muted); }
.checkout-loading .spinner { width: 36px; height: 36px; border: 3px solid var(--border-color); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 16px; }
.checkout-section { background: #fff; border-radius: 12px; padding: 24px; margin-bottom: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.checkout-section-title { font-size: 16px; font-weight: 600; color: var(--text-primary); margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }
.checkout-section-title svg { color: var(--primary); }

/* Address Form */
.checkout-address-form { display: flex; flex-direction: column; gap: 16px; }
.checkout-form-row { display: flex; gap: 16px; }
.checkout-form-group { display: flex; flex-direction: column; gap: 6px; }
.checkout-form-group label { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.checkout-form-group .required { color: var(--color-danger); }
.checkout-form-group input,
.checkout-form-group textarea { border: 1px solid var(--border-color); border-radius: 8px; padding: 10px 14px; font-size: 14px; color: var(--text-primary); transition: border-color .2s; outline: none; font-family: inherit; resize: vertical; }
.checkout-form-group input:focus,
.checkout-form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.checkout-form-group input::placeholder,
.checkout-form-group textarea::placeholder { color: var(--text-muted); }

/* Product Items */
.checkout-product-item { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border-color); }
.checkout-product-item:last-child { border-bottom: none; }
.checkout-product-index { width: 28px; height: 28px; border-radius: 50%; background: var(--bg-secondary); display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--text-secondary); flex-shrink: 0; }
.checkout-product-info { flex: 1; min-width: 0; }
.checkout-product-title { font-size: 15px; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.checkout-product-meta { display: flex; gap: 16px; margin-top: 6px; font-size: 13px; color: var(--text-secondary); }
.checkout-product-price { font-size: 16px; font-weight: 700; color: var(--color-danger); white-space: nowrap; font-family: 'DIN Alternate', 'Roboto Mono', monospace; }

/* Summary */
.checkout-summary { background: linear-gradient(135deg, #f0f7ff, #f8fafc); }
.checkout-summary-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-size: 14px; color: var(--text-secondary); }
.checkout-summary-total { border-top: 1px dashed var(--border-color); margin-top: 8px; padding-top: 16px; }
.checkout-summary-total span:first-child { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.checkout-summary-total span:last-child { font-size: 22px; font-weight: 700; color: var(--color-danger); font-family: 'DIN Alternate', 'Roboto Mono', monospace; }

/* Actions */
.checkout-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; gap: 16px; }
.checkout-actions .btn-accent { min-width: 200px; justify-content: center; }

/* Small spinner for button */
.spinner-sm { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: middle; }

/* Responsive */
@media (max-width: 768px) {
  .checkout-form-row { flex-direction: column; gap: 12px; }
  .checkout-actions { flex-direction: column; }
  .checkout-actions .btn-accent { width: 100%; }
  .checkout-product-item { gap: 10px; }
  .checkout-product-title { font-size: 14px; }
}
/* 商家卡片图片支持 */
.merchant-card-logo {
  position: relative;
}
.merchant-card-logo img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.merchant-card-logo:has(img)::after {
  z-index: 0;
}