/* =============================================================
   智能体市场页（v3 改版）
   武汉算力公共服务平台 · 面向企业的智能体选购门户
   ============================================================= */

/* ===== 顶部大区（hero + 筛选卡共享机器人背景，机器人延伸到智能体矩阵下方） ===== */
.market-top-zone {
    position: relative;
    background:
        url('../images/hero-robot.png') right 0 top 0 no-repeat,
        linear-gradient(180deg, #F2F5FF 0%, #FAFBFF 60%, #FFFFFF 100%);
    background-size: 1500px auto, 100% 100%;
    overflow: hidden;
}
.market-top-zone::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(90deg, #F2F5FF 0%, rgba(242,245,255,0.6) 20%, transparent 45%),
        radial-gradient(circle at 12% 18%, rgba(22,93,255,0.10) 0, transparent 35%),
        radial-gradient(circle at 60% 80%, rgba(124,58,237,0.05) 0, transparent 35%);
    pointer-events: none;
    z-index: 0;
}

/* ===== 顶部主区（hero） ===== */
.market-hero {
    position: relative;
    z-index: 1;
}
.market-hero-inner {
    position: relative;
    max-width: 1320px;
    margin: 0 auto;
    padding: 48px 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
}
.market-hero-intro {
    display: block;
    width: min(900px, 65%);
    max-width: 100%;
    height: auto;
    position: relative;
    z-index: 1;
    user-select: none;
    align-self: flex-start;
}
.market-hero-search {
    width: min(720px, 50%);
    position: relative;
    z-index: 1;
    align-self: center;
    margin: 0 auto;
    height: 52px;
}
.market-hero-search-input {
    width: 100%; height: 52px;
    padding: 0 56px 0 24px;
    border: 1.5px solid #E5E6EB;
    border-radius: 999px;
    background: #FFFFFF;
    font-size: 14px;
    color: #1D2129;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(22, 93, 255, 0.04);
}
.market-hero-search-input::placeholder { color: #C9CDD4; }
.market-hero-search-input:hover { border-color: #B7C5E0; }
.market-hero-search-input:focus {
    border-color: #165DFF;
    box-shadow: 0 4px 16px rgba(22, 93, 255, 0.12);
}
.market-hero-search-icon {
    position: absolute;
    right: 18px;
    top: 50%; transform: translateY(-50%);
    width: 22px; height: 22px;
    cursor: pointer;
    pointer-events: auto;
}

/* ===== 主体两列（左侧行业树 + 右侧筛选/卡片） ===== */
.market-body {
    position: relative;
    z-index: 1;
    max-width: 1320px;
    margin: 0 auto;
    padding: 8px 32px 48px;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    align-items: flex-start;
}

/* ===== 左侧行业树 ===== */
.market-tree-card {
    background: #F8FAFC;
    border: 1px solid #F0F1F3;
    border-radius: 16px;
    padding: 16px 0;
    position: sticky;
    top: 96px;
}
.market-tree-head {
    padding: 0 18px 12px;
    border-bottom: 1px solid #F0F1F3;
    display: flex; align-items: center; justify-content: space-between;
}
.market-tree-head .title {
    font-size: 14px; font-weight: 600; color: #1D2129;
    display: inline-flex; align-items: center; gap: 6px;
}
.market-tree-head .title i { color: #165DFF; }
.market-tree-head .count {
    font-size: 12px; color: #86909C;
    font-variant-numeric: tabular-nums;
}
.market-tree { padding: 8px 0; }
.filter-industry-group { padding: 4px 0; }
.filter-industry-group-title {
    padding: 10px 18px 4px;
    font-size: 12px;
    font-weight: 700;
    color: #86909C;
    letter-spacing: 0.5px;
}
.filter-industry-list { padding: 0 8px; }
.filter-industry-row {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 10px;
    margin-top: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #1D2129;
    cursor: pointer;
    transition: all 0.15s;
    border-radius: 6px;
}
.filter-industry-row:hover { background: #EAF4FF; color: #165DFF; }
.filter-industry-row .caret {
    width: 12px;
    font-size: 10px;
    color: #86909C;
    transition: transform 0.15s;
}
.filter-industry-row.expanded .caret { transform: rotate(90deg); }
.filter-sub-list { display: none; padding: 2px 0 4px 14px; }
.filter-sub-list.expanded { display: block; }
.filter-industry-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 5px 10px;
    font-size: 13px;
    color: #4E5969;
    cursor: pointer;
    transition: all 0.15s;
    border-radius: 6px;
}
.filter-industry-item:hover { background: #EAF4FF; color: #165DFF; }
.filter-industry-item.active {
    background: linear-gradient(135deg, #EAF4FF 0%, #DBE7FF 100%);
    color: #165DFF;
    font-weight: 600;
}
.filter-industry-item .count {
    font-size: 11px;
    color: #86909C;
    background: #FFFFFF;
    padding: 1px 6px;
    border-radius: 8px;
    font-variant-numeric: tabular-nums;
}
.filter-industry-item.active .count {
    background: #165DFF;
    color: #FFFFFF;
}

/* ===== 右侧筛选卡 ===== */
.market-filter-card {
    background: #F8FAFC;
    border: 1px solid #F0F1F3;
    border-radius: 16px;
    padding: 14px 18px;
    margin-bottom: 20px;
}
.market-filter-row {
    display: flex; align-items: flex-start;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px dashed #E5E6EB;
}
.market-filter-row:last-child { border-bottom: none; padding-bottom: 0; }
.market-filter-row:first-child { padding-top: 0; }
.market-filter-label {
    flex-shrink: 0;
    width: 72px;
    font-size: 13px;
    color: #86909C;
    padding-top: 6px;
}
.market-filter-options {
    display: flex; flex-wrap: wrap; gap: 8px;
    flex: 1;
}
.market-filter-pill {
    display: inline-flex; align-items: center; gap: 4px;
    height: 28px; padding: 0 14px;
    background: #F4F6FA;
    border: 1px solid transparent;
    border-radius: 14px;
    font-size: 12.5px;
    color: #4E5969;
    cursor: pointer;
    transition: all 0.15s;
}
.market-filter-pill:hover { background: #E6F0FF; color: #165DFF; }
.market-filter-pill.active {
    background: #E8F3FF;
    color: #165DFF;
    border-color: #165DFF;
    font-weight: 500;
}
.market-filter-pill.finance.active {
    background: #FFF1E6;
    color: #FF7A1A;
    border-color: #FF7A1A;
}
.market-filter-pill .close {
    margin-left: 2px;
    font-size: 10px;
    opacity: 0.7;
}
.market-filter-pill.active .close:hover { opacity: 1; }

/* 子场景条：跟主场景 pill 同起点（label 占 72px） */
#subScenePills {
    align-items: center;
    display: flex; flex-wrap: wrap; gap: 6px;
}
.scenario-sub-label { display: none; }
.filter-scenario-sub {
    padding: 3px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 11.5px;
    color: #6B7280;
    background: #F4F6FA;
    border: 1px solid transparent;
}
.filter-scenario-sub:hover { background: #E6F0FF; color: #1677ff; }
.filter-scenario-sub.active {
    background: #FFF1E6;
    color: #FF7A1A;
    border-color: #FFD8B3;
}

.market-filter-current {
    background: #FFFFFF;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    color: #86909C;
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
    min-height: 32px;
    border: 1px solid #F0F1F3;
}
.market-filter-current .label { color: #4E5969; font-weight: 500; }
.market-filter-current .chip {
    display: inline-flex; align-items: center; gap: 4px;
    background: #E8F3FF;
    border: 1px solid transparent;
    padding: 2px 8px;
    border-radius: 12px;
    color: #165DFF;
    font-size: 12px;
}
.market-filter-current .chip i { font-size: 10px; cursor: pointer; color: #165DFF; }
.market-filter-current .chip i:hover { color: #F53F3F; }
.market-filter-current .clear {
    margin-left: auto;
    color: #165DFF; font-size: 12px;
    cursor: pointer;
}
.market-filter-current .clear:hover { text-decoration: underline; }

/* ===== 行业小节 ===== */
.industry-group { margin-bottom: 32px; }
.industry-title {
    font-size: 18px; font-weight: 600; color: #1D2129;
    padding: 6px 0 6px 14px;
    border-left: 4px solid #165DFF;
    margin: 0 0 16px;
    display: flex; align-items: baseline; gap: 8px;
}
.industry-title small { font-size: 12px; color: #86909C; font-weight: 400; }
.industry-group.finance-group .industry-title { border-left-color: #165DFF; }

/* ===== 智能体卡片（3 列网格 · 增强卡） ===== */
.industry-agents-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.industry-agent-card {
    background: #FFFFFF;
    border: 1px solid #F0F1F3;
    border-radius: 16px;
    padding: 20px;
    transition: all 0.2s;
    display: flex; flex-direction: column;
    gap: 12px;
    position: relative;
}
.industry-agent-card.enhanced { padding: 20px 22px; }
.industry-agent-card.placeholder {
    background: #FFFFFF;
    border: 1px solid #F0F1F3;
    cursor: default;
    display: flex; align-items: center; justify-content: center;
    min-height: 220px;
    padding: 24px;
}
.industry-agent-card.placeholder:hover {
    border-color: #F0F1F3;
    box-shadow: none;
    transform: none;
}
.industry-agent-card.placeholder .placeholder-img {
    width: 240px;
    max-width: 80%;
    height: auto;
    display: block;
}
.industry-agent-card:hover {
    border-color: #C9CDD4;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}
.industry-agent-card .agent-head { display: flex; align-items: flex-start; gap: 12px; }
.industry-agent-icon {
    width: 48px; height: 48px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 22px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #165DFF, #4080FF);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden;
}
.industry-agent-icon i {
    width: 100%; height: 100%;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
}
.agent-head-text { flex: 1; min-width: 0; }
.agent-head-text h3 {
    font-size: 16px; font-weight: 600; color: #1D2129;
    margin: 0 0 4px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.agent-sub-label {
    font-size: 12px; color: #86909C;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}
.agent-en-name {
    font-size: 11px; color: #C9CDD4; font-weight: 400;
    display: block; margin-top: -2px; margin-bottom: 2px;
}
.metric-list {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column;
    gap: 6px;
}
.metric-list li {
    display: flex; align-items: flex-start; gap: 6px;
    font-size: 12.5px; color: #4E5969;
    line-height: 1.5;
}
.metric-list li i {
    color: #165DFF; font-size: 12px; margin-top: 3px;
    flex-shrink: 0;
}
.metric-list li b { color: #FF7A1A; font-weight: 700; }

.industry-agent-tags {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.industry-agent-tag {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    background: #F2F5FF;
    color: #165DFF;
    line-height: 1.5;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.industry-agent-card .agent-actions {
    display: flex; align-items: center; gap: 10px;
    margin-top: 4px;
}
.industry-agent-card .trial-btn,
.industry-agent-card .order-btn {
    display: inline-flex; align-items: center; justify-content: center;
    height: 38px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid transparent;
    text-decoration: none;
}
.industry-agent-card .trial-btn {
    flex: 0 0 auto;
    background: #FFFFFF;
    color: #165DFF;
    border-color: #165DFF;
    padding: 0 18px;
    gap: 4px;
}
.industry-agent-card .trial-btn i { font-size: 12px; }
.industry-agent-card .trial-btn:hover { background: #F2F5FF; }
.industry-agent-card .order-btn {
    flex: 1;
    background: linear-gradient(135deg, #165DFF 0%, #4080FF 100%);
    color: #fff;
    padding: 0 6px 0 16px;
    box-shadow: 0 2px 8px rgba(22, 93, 255, 0.18);
    gap: 10px;
}
.industry-agent-card .order-btn .order-btn-label { line-height: 1; }
.industry-agent-card .order-btn .order-btn-arrow {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px;
}
.industry-agent-card .order-btn:hover { box-shadow: 0 4px 12px rgba(22, 93, 255, 0.28); }

/* ===== 空态 ===== */
.market-empty {
    text-align: center;
    padding: 60px 20px;
    color: #86909C;
}
.market-empty .icon { font-size: 48px; color: #C9CDD4; margin-bottom: 12px; }
.market-empty .text { font-size: 14px; color: #4E5969; }

/* ===== 响应式 ===== */
@media (max-width: 1280px) {
    .market-top-zone { background-size: 1000px auto, 100% 100%; }
    .industry-agents-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1024px) {
    .market-body { grid-template-columns: 1fr; }
    .market-tree-card { position: static; }
    .industry-agents-grid { grid-template-columns: 1fr; }
    .market-footer-inner { flex-direction: column; gap: 24px; }
}
