/* ==========================================================================
   AI 超市 · 全局样式
   设计语言：电商货架质感 + 商业价值主张，深色导航 + 明亮货架
   ========================================================================== */
:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #94a3b8;
  --line: #e6e9f0;
  --brand: #4f46e5;
  --brand-2: #6366f1;
  --money: #16a34a;
  --time: #2563eb;
  --risk: #ea580c;
  --shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 48px rgba(15, 23, 42, 0.14);
  --radius: 16px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- 顶部导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(8px);
  color: #fff;
}
.nav .container { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid; place-items: center; font-size: 18px;
}
.brand small { font-weight: 500; color: var(--ink-3); font-size: 12px; }
.nav-links { display: flex; gap: 20px; margin-left: auto; font-size: 14px; color: #cbd5e1; }
.nav-links a:hover { color: #fff; }
.nav-cta {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; padding: 8px 18px; border-radius: 10px; font-size: 14px; font-weight: 600;
}
.nav-cart { display: inline-flex; align-items: center; gap: 8px; }
.cart-badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: #fff; color: var(--brand); font-size: 12px; font-weight: 800;
  display: inline-grid; place-items: center; line-height: 1;
}

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(1200px 400px at 80% -10%, rgba(99,102,241,0.18), transparent),
              linear-gradient(180deg, #0f172a, #1e1b4b);
  color: #fff; padding: 72px 0 96px;
}
.hero h1 { font-size: 44px; line-height: 1.2; font-weight: 800; letter-spacing: -0.5px; }
.hero h1 .hl { color: #a5b4fc; }
.hero p.sub { margin-top: 18px; font-size: 18px; color: #cbd5e1; max-width: 720px; }
.hero .value-tags { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.value-tag {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14);
  padding: 10px 16px; border-radius: 999px; font-size: 14px; color: #e2e8f0;
}
.value-tag b { color: #fff; }
.hero-actions { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px; border-radius: 12px; font-weight: 700; font-size: 15px;
  cursor: pointer; border: none; transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; box-shadow: var(--shadow-lg); }
.btn-ghost { background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.2); }

/* ---------- 通用区块 ---------- */
.section { padding: 64px 0; }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2 { font-size: 30px; font-weight: 800; }
.section-head p { color: var(--ink-2); margin-top: 10px; font-size: 16px; }
.eyebrow {
  display: inline-block; color: var(--brand); font-weight: 700; font-size: 13px;
  letter-spacing: 1px; text-transform: uppercase; margin-bottom: 10px;
}

/* ---------- 行业货架卡片 ---------- */
.shelf-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.shelf-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); transition: transform .16s ease, box-shadow .16s ease;
  position: relative; overflow: hidden;
}
.shelf-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.shelf-card .ico {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  font-size: 26px; margin-bottom: 14px;
}
.shelf-card h3 { font-size: 18px; font-weight: 800; }
.shelf-card .tagline { color: var(--ink-2); font-size: 13px; margin-top: 6px; min-height: 38px; }
.shelf-card .meta { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; }
.shelf-card .cnt { font-size: 13px; color: var(--ink-3); }
.shelf-card .go { font-size: 13px; font-weight: 700; color: var(--brand); }

/* ---------- 行业分类 TAB 栏 ---------- */
.tabbar {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  margin-bottom: 32px;
}
.tab {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 999px;
  padding: 10px 18px; font-size: 14px; font-weight: 600; color: var(--ink-2);
  cursor: pointer; transition: all .16s ease; font-family: inherit;
}
.tab:hover { border-color: var(--tab-accent); color: var(--tab-accent); transform: translateY(-1px); }
.tab .tab-ico { font-size: 18px; }
.tab .tab-cnt {
  background: #f1f5f9; color: var(--ink-3); font-size: 12px; font-weight: 700;
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  display: inline-grid; place-items: center;
}
.tab.active {
  background: var(--tab-accent); border-color: var(--tab-accent); color: #fff;
  box-shadow: 0 8px 20px rgba(15,23,42,0.14);
}
.tab.active .tab-cnt { background: rgba(255,255,255,0.25); color: #fff; }

/* ---------- 货架面板（选中行业内联展示） ---------- */
.shelf-panel { animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.panel-head {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 0 0 22px; margin-bottom: 22px;
  box-shadow: var(--shadow); overflow: hidden;
}
.panel-banner { position: relative; height: 190px; overflow: hidden; background: #e2e8f0; }
.panel-banner img { width: 100%; height: 100%; object-fit: cover; }
.panel-banner-mask {
  position: absolute; inset: 0; display: flex; align-items: center; gap: 20px;
  padding: 0 36px; color: #fff;
}
.panel-banner-ico {
  font-size: 40px; width: 76px; height: 76px; flex-shrink: 0;
  display: grid; place-items: center; border-radius: 18px;
  background: rgba(255,255,255,0.18); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.25);
}
.panel-banner-mask h3 { font-size: 26px; font-weight: 800; text-shadow: 0 2px 8px rgba(0,0,0,0.25); }
.panel-banner-mask p { color: rgba(255,255,255,0.92); font-size: 14px; margin-top: 6px; max-width: 620px; text-shadow: 0 1px 4px rgba(0,0,0,0.2); }
.panel-pains { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding: 0 28px; }
.pain-tag { font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid; background: #fff; }

/* ---------- 差异化对比条 ---------- */
.diff { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.diff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.diff-col { padding: 40px; }
.diff-col.bad { background: #fafafa; }
.diff-col.good { background: linear-gradient(180deg, #f5f3ff, #ffffff); }
.diff-col h4 { font-size: 18px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.diff-col ul { list-style: none; }
.diff-col li { padding: 8px 0; color: var(--ink-2); display: flex; gap: 10px; }
.diff-col.bad li::before { content: "✕"; color: #ef4444; font-weight: 700; }
.diff-col.good li::before { content: "✓"; color: var(--money); font-weight: 700; }

/* ---------- 方案卡片（货架页） ---------- */
.sol-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.sol-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .16s ease, box-shadow .16s ease;
}
.sol-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.sol-card .top { padding: 24px; border-bottom: 1px dashed var(--line); }
.sol-card .top h3 { font-size: 20px; font-weight: 800; }
.sol-card .top .subtitle { color: var(--ink-2); font-size: 14px; margin-top: 6px; }
.sol-card .top .role { color: var(--ink-3); font-size: 12px; margin-top: 10px; }
.sol-card .body { padding: 20px 24px; flex: 1; }
.tool-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 12px; padding: 5px 10px; border-radius: 8px;
  background: #f1f5f9; color: var(--ink-2); border: 1px solid var(--line);
  display: inline-flex; align-items: center; gap: 6px;
}
.chip .tp { font-size: 10px; padding: 1px 6px; border-radius: 6px; font-weight: 700; }
.tp-SaaS { background: #ede9fe; color: #6d28d9; }
.tp-工具 { background: #dbeafe; color: #1d4ed8; }
.tp-大模型 { background: #dcfce7; color: #15803d; }
.sol-card .price-row {
  padding: 18px 24px; background: #fafafe; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}
.price { font-size: 22px; font-weight: 800; color: var(--ink); }
.price small { font-size: 13px; color: var(--ink-3); font-weight: 500; }

/* 组合装徽标 + 单买对比价（首页/货架方案卡片） */
.sol-card .top { position: relative; }
.combo-badge {
  display: inline-block; margin-bottom: 12px;
  background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0;
  font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
}
.price-block { display: flex; flex-direction: column; }
.price-single { font-size: 12px; color: var(--ink-3); text-decoration: line-through; margin-top: 2px; }

/* ---------- 单品市场（tools.html）---------- */
.market-layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
.market-main { min-width: 0; }

.market-toolbar { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.market-search-wrap { flex: 1; }
.market-search {
  width: 100%; padding: 13px 16px; border: 1.5px solid var(--line); border-radius: 12px;
  font-size: 15px; background: #fff; color: var(--ink); font-family: inherit;
}
.market-search:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }
.market-count-line { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.market-count-line b { color: var(--ink); font-size: 15px; }

.filter-block { margin-bottom: 14px; }
.filter-label { font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.pill-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  background: #fff; border: 1.5px solid var(--line); border-radius: 999px;
  padding: 7px 14px; font-size: 13px; font-weight: 600; color: var(--ink-2);
  cursor: pointer; transition: all .14s ease; font-family: inherit;
}
.pill:hover { border-color: var(--pill, var(--brand)); color: var(--pill, var(--brand)); }
.pill.active {
  background: var(--pill, var(--brand)); border-color: var(--pill, var(--brand));
  color: #fff; box-shadow: 0 6px 16px rgba(15,23,42,0.12);
}

.market-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 22px; }
.tool-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.tool-card.in-cart { border-color: #a7f3d0; box-shadow: 0 0 0 2px rgba(16,163,74,0.12); }
.tool-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.tool-cat { font-size: 12px; color: var(--ink-3); }
.tool-card h4 { font-size: 17px; font-weight: 800; }
.tool-desc { color: var(--ink-2); font-size: 13px; margin-top: 6px; min-height: 40px; }
.tool-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; font-size: 12px; color: var(--ink-3); }
.tool-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); gap: 10px;
}
.tool-card-price { font-size: 20px; font-weight: 800; color: var(--ink); }
.tool-card-price small { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.tool-card-actions { display: flex; align-items: center; gap: 8px; }
.mini-link {
  font-size: 12px; font-weight: 600; color: var(--brand);
  padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: #fff;
}
.mini-link:hover { border-color: var(--brand); }
.mini-link.disabled { color: var(--ink-3); border-style: dashed; cursor: default; }
.mini-add {
  font-size: 12px; font-weight: 700; color: #fff; cursor: pointer; font-family: inherit;
  padding: 7px 12px; border-radius: 8px; border: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}
.mini-add:hover { filter: brightness(1.05); }
.mini-add.added { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.empty { grid-column: 1 / -1; text-align: center; color: var(--ink-3); padding: 48px 0; }

/* 右侧购物车 */
.market-cart { position: sticky; top: 84px; }
.cart-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.cart-head {
  padding: 18px 20px; border-bottom: 1px solid var(--line);
  display: flex; align-items: baseline; justify-content: space-between;
  font-weight: 800; font-size: 16px; background: #fafafe;
}
.cart-head small { font-weight: 500; color: var(--ink-3); font-size: 12px; }
.cart-items { max-height: 44vh; overflow-y: auto; padding: 8px 20px; }
.cart-empty { text-align: center; color: var(--ink-3); padding: 40px 10px; font-size: 14px; }
.cart-empty small { color: var(--ink-3); font-size: 12px; }
.cart-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-item:last-child { border-bottom: none; }
.cart-item-name { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cart-item-cat { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.cart-del {
  border: none; background: #f1f5f9; color: var(--ink-3); cursor: pointer;
  width: 26px; height: 26px; border-radius: 8px; font-size: 13px; flex-shrink: 0;
}
.cart-del:hover { background: #fee2e2; color: #dc2626; }
.cart-foot { padding: 16px 20px; border-top: 1px solid var(--line); }
.cart-tip {
  background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534;
  font-size: 13px; line-height: 1.6; padding: 12px 14px; border-radius: 12px; margin-bottom: 14px;
}
.cart-tip a { color: #047857; font-weight: 700; }
.cart-total { display: flex; align-items: baseline; justify-content: space-between; font-size: 14px; color: var(--ink-2); }
.cart-total b { font-size: 24px; font-weight: 800; color: var(--ink); }
.cart-total b small { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.cart-clear {
  width: 100%; margin-top: 10px; background: none; border: none; cursor: pointer;
  color: var(--ink-3); font-size: 12px; font-family: inherit; padding: 6px;
}
.cart-clear:hover { color: #dc2626; }

/* ---------- 方案详情 ---------- */
.detail-hero { color: #fff; padding: 48px 0; }
.crumbs { font-size: 13px; color: rgba(255,255,255,0.7); margin-bottom: 16px; }
.crumbs a:hover { color: #fff; }
.detail-hero h1 { font-size: 34px; font-weight: 800; }
.detail-hero .subtitle { font-size: 17px; color: rgba(255,255,255,0.85); margin-top: 10px; }
.detail-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; margin-top: -40px; }
.panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px; margin-bottom: 24px;
}
.panel h3 { font-size: 18px; font-weight: 800; margin-bottom: 16px; }
.pain-list { list-style: none; }
.pain-list li { padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); display: flex; gap: 10px; }
.pain-list li:last-child { border-bottom: none; }
.pain-list li::before { content: "⚠️"; }
.workflow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.wf-step {
  background: #f1f5f9; border: 1px solid var(--line); padding: 8px 14px; border-radius: 10px;
  font-size: 13px; font-weight: 600;
}
.wf-arrow { color: var(--ink-3); font-weight: 700; }
.tool-detail { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; align-items: center; }
.tool-detail:last-child { border-bottom: none; }
.tool-detail .tname { font-weight: 700; min-width: 150px; display:flex; align-items:center; gap:8px; flex-wrap:wrap;}
.tool-detail .trole { color: var(--ink-2); font-size: 14px; flex: 1; min-width: 160px; }
.tool-link {
  font-size: 12px; font-weight: 600; color: var(--brand);
  padding: 3px 8px; border-radius: 7px; border: 1px solid var(--line);
}
.tool-link:hover { border-color: var(--brand); }
.tool-side { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.tool-price { font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.tool-buy {
  font-size: 12px; font-weight: 700; color: var(--brand); white-space: nowrap;
  padding: 6px 12px; border-radius: 8px; border: 1px solid var(--brand); background: #fff;
}
.tool-buy:hover { background: var(--brand); color: #fff; }

/* ---------- ROI 计算器 ---------- */
.calc { position: sticky; top: 84px; }
.calc .field { margin-bottom: 16px; }
.calc label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; font-weight: 600; }
.calc .input-wrap { display: flex; align-items: center; gap: 8px; }
.calc input[type="number"] {
  flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 15px; font-weight: 600; color: var(--ink); background: #fff;
}
.calc input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }
.calc .unit { font-size: 13px; color: var(--ink-3); min-width: 34px; }

.result-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
.rc { border-radius: 12px; padding: 16px; color: #fff; }
.rc .rc-label { font-size: 12px; opacity: 0.9; }
.rc .rc-val { font-size: 24px; font-weight: 800; margin-top: 4px; }
.rc.money { background: linear-gradient(135deg, #16a34a, #22c55e); }
.rc.time { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.rc.rev { background: linear-gradient(135deg, #d97706, #f59e0b); }
.rc.risk { background: linear-gradient(135deg, #dc2626, #ef4444); }
.rc.total { grid-column: 1 / -1; background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.rc.total .rc-val { font-size: 30px; }

.calc-detail { margin-top: 18px; border-top: 1px dashed var(--line); padding-top: 16px; }
.calc-detail h4 { font-size: 13px; color: var(--ink-3); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }
.calc-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; color: var(--ink-2); border-bottom: 1px dotted var(--line); }
.calc-row span:last-child { font-weight: 700; color: var(--ink); }

.payback {
  margin-top: 18px; padding: 16px; border-radius: 12px; background: #f0fdf4;
  border: 1px solid #bbf7d0; font-size: 14px; color: #166534;
}
.payback b { font-size: 18px; }

/* ---------- 页脚 ---------- */
.footer { background: #0f172a; color: #94a3b8; padding: 48px 0; font-size: 14px; }
.footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.footer a { color: #cbd5e1; }
.footer .src { font-size: 12px; color: #64748b; max-width: 520px; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .shelf-grid { grid-template-columns: repeat(2, 1fr); }
  .sol-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .diff-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .nav-links { display: none; }
  .calc { position: static; }
  .tabbar { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
  .tab { flex-shrink: 0; }
  .panel-banner { height: 150px; }
  .panel-banner-mask { padding: 0 20px; gap: 14px; }
  .panel-banner-ico { width: 56px; height: 56px; font-size: 30px; }
  .panel-banner-mask h3 { font-size: 20px; }
  .panel-banner-mask p { font-size: 12px; }
  .market-layout { grid-template-columns: 1fr; }
  .market-cart { position: static; order: -1; }
  .cart-items { max-height: none; }
}
@media (max-width: 560px) {
  .shelf-grid { grid-template-columns: 1fr; }
  .result-cards { grid-template-columns: 1fr; }
  .panel-banner-mask p { display: none; }
  .market-grid { grid-template-columns: 1fr; }
  .market-toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
}
