/* 产品中心专属样式 v2 */

/* ===== 分类概览横幅 ===== */
.category-overview-section {
    background: #fff;
    padding: 30px 0;
    border-bottom: 1px solid #eef0f3;
}
.category-overview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.category-overview-header h2 {
    font-size: 22px;
    font-weight: 800;
    color: #1a2b50;
    margin: 0;
}
.category-stats {
    font-size: 14px;
    color: #888;
}
.category-stats .stat-item strong {
    color: #1a73e8;
    font-size: 18px;
    font-weight: 800;
    margin: 0 2px;
}
.stat-divider { margin: 0 8px; color: #ddd; }

.category-cards-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}
.cat-overview-card {
    background: linear-gradient(135deg, #f8faff 0%, #f0f4ff 100%);
    border: 2px solid #e8eef8;
    border-radius: 12px;
    padding: 18px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
.cat-overview-card:hover {
    border-color: #1a73e8;
    box-shadow: 0 8px 24px rgba(26, 115, 232, 0.15);
    transform: translateY(-4px);
}
.cat-overview-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1a73e8, #00bcd4);
    opacity: 0;
    transition: opacity 0.3s;
}
.cat-overview-card:hover::before { opacity: 1; }
.cat-card-icon { font-size: 36px; margin-bottom: 8px; }
.cat-card-name { font-size: 15px; font-weight: 700; color: #1a2b50; margin-bottom: 4px; }
.cat-card-sub { font-size: 11px; color: #8898b3; margin-bottom: 4px; }
.cat-card-products { font-size: 12px; color: #1a73e8; font-weight: 600; }

/* ===== 左侧三级分类树导航 ===== */
.category-tree-nav {
    padding: 8px 0;
}
.cat-tree-item, .cat-tree-l1, .cat-tree-l2, .cat-tree-l3 {
    cursor: pointer;
}
.cat-tree-all {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 13px;
    color: #555;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}
.cat-tree-all:hover { background: #f0f7ff; color: #1a73e8; }
.cat-tree-all.active { background: #e8f0fe; color: #1a73e8; border-left-color: #1a73e8; font-weight: 600; }
.cat-tree-icon { font-size: 16px; }

.cat-tree-l1 { margin-bottom: 2px; }
.cat-tree-l1-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px 9px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}
.cat-tree-l1-header:hover { background: #f0f7ff; color: #1a73e8; }
.cat-tree-l1-header.active { background: #e8f0fe; color: #1a73e8; border-left-color: #1a73e8; }
.cat-tree-arrow { font-size: 10px; color: #aaa; width: 12px; flex-shrink: 0; transition: transform 0.2s; }
.cat-tree-l1-icon { font-size: 15px; }
.cat-tree-l1-name { flex: 1; }
.cat-tree-l1-count {
    background: #f0f0f0;
    color: #888;
    font-size: 10px;
    padding: 1px 7px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}
.cat-tree-l1-header.active .cat-tree-l1-count { background: #1a73e8; color: #fff; }

.cat-tree-l2-list { display: none; }
.cat-tree-l2 { margin-left: 8px; }
.cat-tree-l2-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px 7px 20px;
    font-size: 12px;
    color: #666;
    border-left: 2px solid transparent;
    transition: all 0.2s;
}
.cat-tree-l2-header:hover { background: #f8faff; color: #1a73e8; }
.cat-tree-l2-header.active { color: #1a73e8; border-left-color: #1a73e8; font-weight: 600; }
.cat-tree-l2-name { flex: 1; }

.cat-tree-l3-list { display: none; padding-bottom: 4px; }
.cat-tree-l3 {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px 5px 36px;
    font-size: 12px;
    color: #999;
    transition: all 0.2s;
}
.cat-tree-l3:hover { background: #f8faff; color: #1a73e8; }
.cat-tree-l3.active { color: #1a73e8; font-weight: 600; }
.cat-tree-l3-dot { color: #ccc; }
.cat-tree-l3-name { flex: 1; }
.cat-tree-count {
    font-size: 10px;
    color: #bbb;
    background: #f5f5f5;
    padding: 0 5px;
    border-radius: 8px;
}
.cat-tree-l3.active .cat-tree-count { background: #e8f0fe; color: #1a73e8; }

.page-header {
    background: linear-gradient(135deg, #1a73e8 0%, #00bcd4 100%);
    color: #fff;
    padding: 60px 0 40px;
    text-align: center;
}
.page-header h1 { font-size: 42px; font-weight: 900; margin-bottom: 12px; }
.page-header p { font-size: 16px; opacity: 0.9; margin-bottom: 16px; }
.breadcrumb { font-size: 13px; opacity: 0.7; }
.breadcrumb a { color: #fff; }

/* 主体布局 */
.product-main-section { padding: 30px 0; background: #f5f6f8; min-height: 600px; }

.product-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    align-items: start;
}

/* 左侧侧边栏 */
.industry-sidebar {
    background: #fff;
    border-radius: 12px;
    padding: 20px 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    position: sticky;
    top: 80px;
}

.sidebar-header { padding: 0 20px 12px; border-bottom: 1px solid #f0f0f0; margin-bottom: 8px; }
.sidebar-header h3 { font-size: 15px; font-weight: 700; color: #333; margin: 0; }

.industry-list { list-style: none; padding: 0; margin: 0; }
.industry-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    color: #555;
    border-left: 3px solid transparent;
}
.industry-item:hover { background: #f0f7ff; color: #1a73e8; }
.industry-item.active { background: #e8f0fe; color: #1a73e8; border-left-color: #1a73e8; font-weight: 600; }
.ind-icon { font-size: 16px; flex-shrink: 0; }
.ind-name { flex: 1; }
.ind-count {
    background: #e0e0e0;
    color: #666;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}
.industry-item.active .ind-count { background: #1a73e8; color: #fff; }

/* 筛选栏 v2 */
.filter-bar-v2 {
    background: #fff;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.filter-row {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.filter-row:last-child { margin-bottom: 0; }
.filter-group { display: flex; align-items: center; gap: 6px; }
.filter-group label { font-size: 13px; color: #666; font-weight: 600; white-space: nowrap; }
.filter-group select {
    padding: 7px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
    min-width: 110px;
    transition: border 0.2s;
}
.filter-group select:focus, .filter-group select:hover { border-color: #1a73e8; outline: none; }
.search-group { flex: 1; min-width: 200px; }
.search-group input {
    width: 100%;
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
}
.search-group input:focus { border-color: #1a73e8; outline: none; }

.view-toggle { display: flex; gap: 4px; margin-left: auto; }
.view-btn {
    width: 34px; height: 34px;
    border: 1px solid #e0e0e0;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.view-btn.active { background: #1a73e8; color: #fff; border-color: #1a73e8; }

/* 结果统计 */
.list-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.list-header span { font-size: 13px; color: #888; }

/* 产品网格 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

/* 产品卡片 */
.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid transparent;
}
.product-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transform: translateY(-4px);
    border-color: #1a73e8;
}

.product-image {
    height: 200px;
    background: linear-gradient(135deg, #f8f9fa 0%, #eef0f3 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-emoji { font-size: 64px; }

.product-badge {
    position: absolute;
    top: 10px; left: 10px;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
}
.product-badge.hot { background: #ff3d00; }
.product-badge.cert { background: #00c853; }
.product-badge.new { background: #1a73e8; }

.product-info { padding: 14px 16px; }
.product-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 11px;
}
.meta-industry, .meta-category {
    background: #f0f4ff;
    color: #1a73e8;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}
.meta-category { background: #f5f5f5; color: #666; }

.product-name {
    font-size: 14px;
    font-weight: 600;
    color: #222;
    line-height: 1.4;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 39px;
}
.product-brand { font-size: 12px; color: #888; margin-bottom: 8px; }

.product-specs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.spec-tag {
    background: #f5f6f8;
    color: #555;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
}

.product-cert { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; min-height: 18px; }
.cert-tag {
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 3px;
    border: 1px solid #c8e6c9;
}

.product-footer { display: flex; justify-content: space-between; align-items: flex-end; }
.price-stock { display: flex; flex-direction: column; gap: 4px; }
.product-price { font-size: 16px; font-weight: 700; color: #e53935; }
.product-price small { font-size: 11px; font-weight: 400; color: #999; }
.price-range { font-size: 14px; }
.stock-badge { font-size: 11px; padding: 1px 6px; border-radius: 3px; }
.stock-badge.in-stock { color: #00c853; }
.stock-badge.no-stock { color: #ff3d00; }

.product-actions { display: flex; gap: 6px; align-items: center; }
.moq-tag { font-size: 10px; color: #ff9800; background: #fff3e0; padding: 2px 6px; border-radius: 3px; }
.btn-cart {
    width: 30px; height: 30px;
    border: 1px solid #1a73e8;
    background: #fff;
    color: #1a73e8;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}
.btn-cart:hover { background: #1a73e8; color: #fff; }
.btn-inquire {
    padding: 5px 12px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-inquire:hover { background: #1557b0; }

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}
.page-btn, .page-num {
    padding: 8px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    color: #555;
}
.page-btn:hover, .page-num:hover { border-color: #1a73e8; color: #1a73e8; }
.page-num.active { background: #1a73e8; color: #fff; border-color: #1a73e8; }

/* 列表视图 */
.product-grid.list-mode { grid-template-columns: 1fr; }
.product-grid.list-mode .product-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    align-items: stretch;
}
.product-grid.list-mode .product-image { height: 160px; }

/* 响应式 */
@media (max-width: 1024px) {
    .product-layout { grid-template-columns: 1fr; }
    .industry-sidebar { position: static; }
    .industry-list { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 12px; }
    .industry-item { padding: 8px 12px; border-left: none; border-radius: 6px; }
    .category-cards-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
    .filter-bar-v2 { padding: 12px; }
    .filter-row { gap: 8px; }
    .filter-group { flex-wrap: wrap; }
    .product-grid { grid-template-columns: 1fr; }
    .category-cards-grid { grid-template-columns: repeat(2, 1fr); }
    .category-overview-header { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* 浮动对比栏 */
.compare-bar-floating {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    z-index: 500;
    animation: slideUp 0.3s ease;
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.compare-bar-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    overflow: hidden;
}
.compare-bar-count {
    font-size: 14px;
    font-weight: 700;
    color: #1a73e8;
    white-space: nowrap;
}
.compare-bar-tags {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    flex: 1;
}
.compare-bar-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: #f0f4ff;
    border-radius: 6px;
    font-size: 12px;
    color: #1a73e8;
    white-space: nowrap;
}
.compare-bar-tag button {
    border: none;
    background: none;
    color: #ff3d00;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    line-height: 1;
}
@media (max-width: 768px) {
    .compare-bar-floating { flex-direction: column; padding: 8px 12px; }
    .compare-bar-info { width: 100%; }
}
