/* ============================================================
   越智通 · 中越跨境贸易信息站
   核心样式表 v1.0 — 阿越出品
   使用方式：所有页面统一引用此CSS，无需每个页面手写style
   ============================================================ */

/* ===== DESIGN TOKENS ===== */
:root {
  /* 品牌色 */
  --brand-primary: #1a365d;
  --brand-secondary: #2b6cb0;
  --brand-accent: #e8712c;
  --brand-accent-hover: #d45f1f;

  /* 中性色 */
  --bg: #f7fafc;
  --bg-card: #ffffff;
  --text-primary: #1a202c;
  --text-secondary: #718096;
  --text-muted: #a0aec0;
  --border: #e2e8f0;
  --border-light: #edf2f7;

  /* 语义色 */
  --success: #38a169;
  --warning: #d69e2e;
  --danger: #e53e3e;
  --info: #3182ce;

  /* 间距 */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 60px;

  /* 圆角 */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-full: 999px;

  /* 阴影 */
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -2px rgba(0,0,0,.04);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04);

  /* 布局 */
  --max-w: 1200px;
  --header-h: 64px;
}

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans SC', 'Noto Sans TC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--text-primary);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--brand-secondary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--brand-accent); }

/* ===== CONTAINER ===== */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }

/* ===== TOPBAR ===== */
.topbar {
  background: var(--brand-primary); color: #fff; font-size: .85rem;
  padding: 8px 0;
}
.topbar-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 20px;
  display: flex; justify-content: space-between; align-items: center;
}
.topbar-nav { display: flex; gap: 20px; }
.topbar-nav a { color: #cbd5e0; text-decoration: none; font-size: .82rem; }
.topbar-nav a:hover { color: #fff; }
.lang-switch { display: flex; gap: 6px; }
.lang-switch a {
  color: #cbd5e0; text-decoration: none; padding: 2px 10px;
  border-radius: var(--radius-sm); font-size: .82rem;
}
.lang-switch a:hover, .lang-switch a.active { color: #fff; background: rgba(255,255,255,.15); }

/* ===== HEADER ===== */
.header {
  background: #fff; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 24px;
}
.logo {
  font-size: 1.3rem; font-weight: 700; color: var(--brand-primary);
  text-decoration: none; white-space: nowrap;
  display: flex; flex-direction: column; line-height: 1.2;
}
.logo .brand-name { font-size: 1.25rem; }
.logo .brand-name span { color: var(--brand-accent); }
.logo .brand-sub { font-size: .65rem; color: var(--text-muted); font-weight: 400; }

/* ===== SEARCH ===== */
.search-bar { flex: 1; max-width: 480px; position: relative; }
.search-bar input {
  width: 100%; padding: 10px 16px 10px 40px;
  border: 1px solid var(--border); border-radius: var(--radius-full);
  font-size: .9rem; outline: none; transition: border .2s, box-shadow .2s;
  background: var(--bg);
}
.search-bar input:focus { border-color: var(--brand-secondary); box-shadow: 0 0 0 3px rgba(43,108,176,.1); }
.search-bar .search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: .95rem; pointer-events: none;
}

/* ===== MAIN NAV ===== */
.main-nav { background: #fff; border-bottom: 1px solid var(--border); }
.nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 20px;
  display: flex; gap: 0;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.nav-item {
  position: relative; padding: 12px 18px; font-size: .88rem;
  color: var(--text-primary); text-decoration: none;
  white-space: nowrap; transition: color .2s; flex-shrink: 0;
}
.nav-item:hover, .nav-item.active { color: var(--brand-accent); }
.nav-item .badge {
  font-size: .6rem; padding: 1px 6px; border-radius: 3px;
  margin-left: 4px; font-weight: 600; vertical-align: middle;
}
.nav-item .badge.hot { background: #fed7d7; color: #c53030; }
.nav-item .badge.new { background: #c6f6d5; color: #276749; }
.nav-item .badge.soon { background: var(--border-light); color: var(--text-muted); }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--brand-primary) 0%, #2d4f7e 100%);
  color: #fff; padding: var(--space-3xl) 20px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: -50%; right: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,.03) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center;
  position: relative; z-index: 1;
}
.hero h1 { font-size: 2.2rem; font-weight: 800; line-height: 1.25; margin-bottom: 16px; }
.hero h1 .highlight { color: #fcb045; }
.hero p { font-size: 1.05rem; color: #cbd5e0; margin-bottom: 28px; line-height: 1.7; max-width: 520px; }
.hero-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand-accent); color: #fff !important;
  padding: 14px 32px; border-radius: var(--radius); font-weight: 600; font-size: 1rem;
  transition: all .2s; text-decoration: none;
}
.hero-cta:hover { background: var(--brand-accent-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(232,113,44,.3); }

/* ===== HERO STATS ===== */
.hero-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.stat-card {
  background: rgba(255,255,255,.1); backdrop-filter: blur(8px);
  border-radius: var(--radius); padding: 20px 16px; text-align: center;
}
.stat-card .num { font-size: 1.7rem; font-weight: 700; color: #fcb045; }
.stat-card .label { font-size: .78rem; color: #a0aec0; margin-top: 4px; }

/* ===== DASHBOARD ===== */
.dashboard { max-width: var(--max-w); margin: -32px auto 0; padding: 0 20px; position: relative; z-index: 10; }
.dashboard-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.db-card {
  background: #fff; border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow-lg); display: flex; gap: 12px; align-items: flex-start;
}
.db-card .db-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 2px; }
.db-card .db-label { font-size: .7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.db-card .db-value { font-size: 1.05rem; font-weight: 700; color: var(--brand-primary); margin-top: 4px; }
.db-card .db-sub { font-size: .78rem; color: var(--text-secondary); }
.db-card .db-change { font-size: .82rem; font-weight: 600; }
.db-card .db-change.up { color: var(--success); }
.db-card .db-change.down { color: var(--danger); }

/* ===== SECTION ===== */
.section { padding: var(--space-3xl) 20px; }
.section-inner { max-width: var(--max-w); margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-size: 1.55rem; color: var(--brand-primary); margin-bottom: 8px; }
.section-header p { color: var(--text-secondary); font-size: .92rem; max-width: 600px; margin: 0 auto; }

/* ===== CATEGORY GATEWAY ===== */
.gateway-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gateway-card {
  background: #fff; border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow); transition: all .25s; cursor: pointer;
  border: 1px solid var(--border);
}
.gateway-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: var(--brand-secondary); }
.gateway-card .gw-icon { font-size: 2rem; margin-bottom: 12px; }
.gateway-card h3 { font-size: 1.05rem; color: var(--brand-primary); margin-bottom: 6px; }
.gateway-card .gw-desc { font-size: .82rem; color: var(--text-secondary); margin-bottom: 10px; line-height: 1.5; }
.gateway-card .gw-tag { display: inline-block; font-size: .68rem; padding: 2px 8px; border-radius: 3px; }
.gateway-card .gw-tag.hot { background: #fed7d7; color: #c53030; font-weight: 600; }
.gateway-card .gw-tag.soon { background: var(--border-light); color: var(--text-muted); }
.gateway-card .gw-cta {
  display: inline-block; margin-top: 10px; color: var(--brand-secondary);
  font-size: .85rem; font-weight: 500; text-decoration: none;
}
.gateway-card:hover .gw-cta { color: var(--brand-accent); }

/* ===== PRODUCT CARDS ===== */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.product-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--border);
  transition: all .25s;
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.product-card .pc-img {
  width: 100%; aspect-ratio: 4/3; background: var(--border-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; color: var(--text-muted);
}
.product-card .pc-body { padding: 14px; }
.product-card h4 { font-size: .92rem; color: var(--text-primary); margin-bottom: 4px; }
.product-card .pc-meta { font-size: .78rem; color: var(--text-secondary); margin-bottom: 8px; line-height: 1.4; }
.product-card .pc-price { font-size: 1.05rem; font-weight: 700; color: var(--brand-accent); }
.product-card .pc-cta {
  display: inline-block; margin-top: 8px; font-size: .8rem;
  color: var(--brand-secondary) !important; font-weight: 500; text-decoration: none;
}
.product-card:hover .pc-cta { color: var(--brand-accent) !important; }
.view-all { text-align: center; margin-top: 28px; }

/* ===== INFO ARTICLES ===== */
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.info-card {
  background: #fff; border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
  transition: all .25s;
}
.info-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.info-card .ic-cat {
  font-size: .68rem; text-transform: uppercase; letter-spacing: 1px;
  color: var(--brand-accent); font-weight: 600; margin-bottom: 8px;
}
.info-card h3 { font-size: 1rem; margin-bottom: 8px; line-height: 1.4; }
.info-card h3 a { color: var(--text-primary); text-decoration: none; }
.info-card h3 a:hover { color: var(--brand-secondary); }
.info-card p { font-size: .82rem; color: var(--text-secondary); margin-bottom: 12px; line-height: 1.5; }
.info-card .ic-meta { font-size: .75rem; color: var(--text-muted); display: flex; gap: 16px; }

/* ===== TRUST BAR ===== */
.trust-bar { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.trust-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 40px 20px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px;
}
.trust-item { text-align: center; }
.trust-item .ti-icon { font-size: 2rem; margin-bottom: 10px; }
.trust-item h4 { font-size: .92rem; color: var(--brand-primary); margin-bottom: 6px; }
.trust-item p { font-size: .8rem; color: var(--text-secondary); line-height: 1.5; max-width: 280px; margin: 0 auto; }

/* ===== CATEGORY PAGE (品类页) ===== */
.cat-banner {
  background: linear-gradient(135deg, var(--brand-primary) 0%, #2d4f7e 100%);
  color: #fff; padding: 48px 20px;
}
.cat-banner-inner { max-width: var(--max-w); margin: 0 auto; }
.cat-banner h1 { font-size: 1.8rem; margin-bottom: 8px; }
.cat-banner p { font-size: .92rem; color: #cbd5e0; max-width: 600px; }
.cat-layout { display: grid; grid-template-columns: 240px 1fr; gap: 28px; margin-top: 28px; }

/* Sidebar */
.sidebar { }
.sidebar-card {
  background: #fff; border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
  position: sticky; top: calc(var(--header-h) + 20px);
}
.sidebar-card h4 { font-size: .85rem; color: var(--brand-primary); margin-bottom: 12px; text-transform: uppercase; letter-spacing: .5px; }
.sidebar-card a {
  display: block; padding: 8px 12px; font-size: .85rem;
  color: var(--text-primary); text-decoration: none;
  border-radius: var(--radius-sm); transition: all .2s; margin-bottom: 2px;
}
.sidebar-card a:hover, .sidebar-card a.active { background: var(--bg); color: var(--brand-accent); font-weight: 500; }

/* Product Table */
.prod-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.prod-table th { background: var(--brand-primary); color: #fff; padding: 12px 16px; text-align: left; font-size: .82rem; font-weight: 600; }
.prod-table td { padding: 12px 16px; border-bottom: 1px solid var(--border-light); font-size: .85rem; }
.prod-table tr:last-child td { border: none; }
.prod-table tr:hover td { background: #f0f4f8; }
.prod-table .price { font-weight: 700; color: var(--brand-accent); }
.prod-table .badge { font-size: .68rem; padding: 2px 8px; border-radius: 3px; }
.prod-table .badge.stock { background: #c6f6d5; color: #276749; }
.prod-table .badge.order { background: #fefcbf; color: #975a16; }

/* ===== FAQ ===== */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
  background: #fff; border-radius: var(--radius); margin-bottom: 12px;
  border: 1px solid var(--border); overflow: hidden;
}
.faq-q {
  padding: 16px 20px; font-weight: 600; font-size: .92rem;
  color: var(--text-primary); cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  transition: background .2s;
}
.faq-q:hover { background: var(--bg); }
.faq-a { padding: 0 20px 16px; font-size: .85rem; color: var(--text-secondary); line-height: 1.6; }

/* ===== CTA SECTION ===== */
.cta-section {
  background: linear-gradient(135deg, var(--brand-primary) 0%, #2d4f7e 100%);
  color: #fff; text-align: center; padding: 48px 20px;
}
.cta-section h2 { font-size: 1.4rem; margin-bottom: 8px; }
.cta-section p { color: #cbd5e0; margin-bottom: 24px; font-size: .92rem; }

/* ===== FORM ===== */
.form-card {
  max-width: 500px; margin: 0 auto; background: #fff;
  border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-xl);
}
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: .85rem; font-weight: 500; color: var(--text-primary); margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: .9rem; outline: none;
  transition: border .2s, box-shadow .2s; background: #fff;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--brand-secondary); box-shadow: 0 0 0 3px rgba(43,108,176,.1); }
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 12px 28px; border-radius: var(--radius); font-weight: 600;
  font-size: .92rem; cursor: pointer; transition: all .2s;
  border: none; text-decoration: none;
}
.btn-primary { background: var(--brand-accent); color: #fff; }
.btn-primary:hover { background: var(--brand-accent-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(232,113,44,.3); }
.btn-outline { background: transparent; border: 2px solid rgba(255,255,255,.5); color: #fff; }
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.1); }
.btn-block { width: 100%; }

/* ===== FOOTER ===== */
.footer {
  background: var(--brand-primary); color: #cbd5e0; padding: 48px 20px 24px;
}
.footer-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
}
.footer .logo { color: #fff; }
.footer .logo .brand-sub { color: #a0aec0; }
.footer-about p { font-size: .82rem; margin-top: 12px; line-height: 1.7; color: #a0aec0; }
.footer-col h4 { color: #fff; font-size: .85rem; margin-bottom: 14px; }
.footer-col a {
  display: block; color: #a0aec0; text-decoration: none;
  font-size: .82rem; padding: 5px 0; transition: color .2s;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  max-width: var(--max-w); margin: 32px auto 0; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: .78rem; display: flex; justify-content: space-between; align-items: center;
  color: #718096;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .cat-layout { grid-template-columns: 1fr; }
  .sidebar-card { position: static; }
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero h1 { font-size: 1.6rem; }
  .hero p { max-width: 100%; }
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .gateway-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .info-grid { grid-template-columns: 1fr; }
  .trust-inner { grid-template-columns: 1fr; gap: 24px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 30px; }
  .topbar-nav a:not(.lang-switch a) { display: none; }
  .search-bar { max-width: 280px; }
}

@media (max-width: 600px) {
  .hero { padding: 32px 16px; }
  .hero h1 { font-size: 1.3rem; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stat-card { padding: 12px 8px; }
  .stat-card .num { font-size: 1.2rem; }
  .dashboard { margin-top: -24px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .gateway-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .nav-inner { overflow-x: auto; }
  .search-bar { max-width: 180px; }
  .search-bar input { font-size: .82rem; }
  .header-actions .hide-mobile { display: none !important; }
  .section-header h2 { font-size: 1.25rem; }
}
