/* 产品选型工具样式 - 修复版 */
.product-filter-area {
    background: var(--bg-light);
    min-height: 100vh;
}

/* 筛选器容器 - 去掉蓝色边框 */
.product-filter-container {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.filter-header h3 {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.25rem;
    margin: 0;
}

/* 筛选器网格布局 */
.filter-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    align-items: end;
}

.filter-item {
    display: flex;
    flex-direction: column;
    position: relative;
}

.filter-item label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Nice Select 样式优化 - 修复图标重叠和选中状态 */
.nice-select {
    width: 100%;
    height: 40px;
    line-height: 38px;
    padding: 0 40px 0 12px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: var(--transition-normal);
    cursor: pointer;
    position: relative;
    z-index: 10;
    user-select: none;
    display: block;
    box-sizing: border-box;
}

.nice-select:hover {
    border-color: var(--primary-color);
}

.nice-select:focus,
.nice-select.open {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem var(--primary-alpha-20);
}


.nice-select .current {
    color: var(--text-primary);
    font-size: 0.875rem;
    line-height: 38px;
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* 下拉列表样式 */
.nice-select .list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    z-index: 9999;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 2px;
    display: none;
}

.nice-select.open .list {
    display: block;
    z-index: 9999;
}

/* 修复选项颜色问题 */
.nice-select .list .option {
    padding: 0.5rem 0.75rem;
    color: var(--text-primary);
    background: var(--bg-white);
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 0.875rem;
    line-height: 1.5;
    border: none;
    display: block;
    z-index:10!important;
}

.nice-select .list .option:hover {
    background: var(--bg-hover);
    color: var(--primary-color);
}

.nice-select .list .option.selected {
    background: var(--primary-color);
    color: var(--text-white);
}

.nice-select .list .option.focus {
    background: var(--bg-hover);
    color: var(--primary-color);
}

/* 确保原生 select 完全隐藏 */
.filter-item select {
    display: none;
}

/* 搜索结果统计 */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-white);
    padding: 1rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.results-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.results-count strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* 视图切换按钮 */
.view-controls {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-normal);
    font-size: 0.875rem;
}

.view-btn:hover {
    background: var(--bg-hover);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.view-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-white);
}

/* 加载状态 */
.loading-state {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    border-color: var(--primary-color);
    border-right-color: transparent;
}

/* 无结果状态 */
.no-results {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.no-results h4 {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* 按钮样式 */
.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-white);
    transition: var(--transition-normal);
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: var(--text-white);
}

.btn-outline-primary {
    background: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transition: var(--transition-normal);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-white);
}

/* 分页样式 */
.pagination .page-link {
    color: var(--text-secondary);
    border-color: var(--border-light);
    background: var(--bg-white);
    transition: var(--transition-normal);
}

.pagination .page-link:hover {
    color: var(--primary-color);
    background: var(--bg-hover);
    border-color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-white);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .filter-row {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .filter-row {
        grid-template-columns: repeat(3, 1fr);
    }

    .product-filter-container {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .filter-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .results-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .view-controls {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .filter-row {
        grid-template-columns: 1fr;
    }

    .product-filter-container {
        padding: 1rem;
        border-radius: var(--radius-sm);
    }

    .filter-grid {
        gap: 1rem;
    }

    .filter-row {
        gap: 0.75rem;
    }

    .nice-select {
        height: 36px;
        line-height: 34px;
        font-size: 0.8rem;
    }

    .nice-select .current {
        line-height: 34px;
    }
}

/* 滚动条优化 */
.nice-select .list::-webkit-scrollbar {
    width: 4px;
}

.nice-select .list::-webkit-scrollbar-track {
    background: var(--bg-light);
}

.nice-select .list::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 2px;
}

.nice-select .list::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-filter-container {
    animation: fadeIn 0.3s ease-out;
}

/* 防止选择框重叠的额外样式 */
.filter-item {
    position: relative;
    z-index: auto;
}

.filter-item .nice-select.open {
    z-index: 9999;
}

/* 修复可能的字体颜色问题 */
.nice-select .list .option.selected:hover {
    background: var(--primary-hover);
    color: var(--text-white);
}


/* 产品卡片样式 */
.product-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    height: 100%;
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.product-card-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.product-model {
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.product-series {
    color: var(--primary-color);
    font-size: 0.875rem;
}

.product-card-body {
    flex: 1;
}

.product-specs {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.spec-label {
    color: var(--text-muted);
    font-weight: 500;
}

.spec-value {
    color: var(--text-primary);
    text-align: right;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
    word-break: break-all;
}

.product-card-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

/* 列表视图样式 */
.product-list-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-list-item {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: var(--transition-normal);
}

.product-list-item:hover {
    box-shadow: var(--shadow-md);
}

.product-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.product-list-specs {
    margin-bottom: 1rem;
}

.product-list-action {
    text-align: right;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .product-card {
        padding: 1rem;
    }

    .spec-item {
        font-size: 0.8rem;
    }

    .product-list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* 产品表格样式 */
.product-table-wrapper {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border-color:var(--bs-body-color);
}

.product-table {
    margin-bottom: 0;
    font-size: 0.875rem;
}



.product-table thead {
    background-color: var(--bg-light);
}

.product-table thead th {
    border-bottom: 2px solid var(--border-light);
    color: var(--bg-white);
    font-weight: 600;
    padding: 0.75rem 0.5rem;
    white-space: nowrap;
    font-size: 0.8rem;
    text-align: center; /* 修改：从 left 改为 center */
    vertical-align: middle; /* 添加：垂直居中 */
}


/* 调整第一列（产品型号）的宽度 */
.product-table thead th:first-child,
.product-table tbody td:first-child {
    width: 150px; /* 固定宽度 */
    max-width: 150px;
}


.product-table tbody tr {
    transition: var(--transition-fast);
    cursor: pointer;
}

.product-table tbody tr:hover {
    background-color: var(--bg-hover);
}

.product-table tbody td {
    padding: 0.75rem 0.5rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    font-size: 0.6rem;
    text-align: center; /* 添加：内容居中 */
}

.product-table tbody tr:last-child td {
    border-bottom: none;
}

/* 产品型号链接样式 - 调整 */
.product-model {
    font-weight: 500;
}

.model-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.7rem; /* 减小字号 */
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.model-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}


/* 调整列宽分配 - 给传感器类型更多空间 */
.product-table thead th:nth-child(2), /* 有效像素 */
.product-table tbody td:nth-child(2) {
    width: 100px;
}

.product-table thead th:nth-child(3), /* 靶面尺寸 */
.product-table tbody td:nth-child(3) {
    width: 140px; /* 从120px增加到140px */
}

.product-table thead th:nth-child(4), /* 快门方式 */
.product-table tbody td:nth-child(4) {
    width: 90px; /* 从100px减少到90px */
}

.product-table thead th:nth-child(5), /* 帧率 */
.product-table tbody td:nth-child(5) {
    width: 100px;
}

.product-table thead th:nth-child(6), /* 传感器类型 */
.product-table tbody td:nth-child(6) {
    width: 140px;
    white-space: normal;
    word-break: break-word;
    line-height: 1.4;
}

.product-table thead th:nth-child(7), /* 传输接口 */
.product-table tbody td:nth-child(7) {
    width: 100px;
    white-space: normal;
    word-break: break-word;
}

.product-table thead th:nth-child(8), /* 像元尺寸 */
.product-table tbody td:nth-child(8) {
    width: 100px;
}

.product-table thead th:nth-child(9), /* 色彩 */
.product-table tbody td:nth-child(9) {
    width: 60px; /* 从80px减少到60px */
    text-align: center;
}

/* 色彩图标样式 - 调整大小 */
.color-icon {
    display: inline-block;
    width: 16px; /* 从20px减小到16px */
    height: 16px; /* 从20px减小到16px */
    border-radius: 50%;
    position: relative;
    vertical-align: middle;
}

/* 表格布局优化 */
.product-table {
    table-layout: fixed; /* 固定表格布局 */
    width: 100%;
}

/* 响应式调整 */
@media (max-width: 1400px) {
    .product-table thead th:first-child,
    .product-table tbody td:first-child {
        width: 130px; /* 在较小屏幕上进一步减小 */
    }

    .product-table thead th,
    .product-table tbody td {
        padding: 0.5rem 0.25rem; /* 进一步减小内边距 */
    }
}

@media (max-width: 1800px) {
    .product-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .product-table {
        min-width: 1700px; /* 减小最小宽度 */
    }
}

@media (max-width: 768px) {
    .product-table {
        min-width: 1000px;
    }

    .product-table thead th,
    .product-table tbody td {
        font-size: 0.75rem; /* 移动端更小的字号 */
        padding: 0.4rem 0.25rem;
    }

    .model-link {
        font-size: 0.75rem;
    }

    .color-icon {
        width: 14px;
        height: 14px;
    }
}

/* 紧凑模式（可选） */
.product-table.compact-mode thead th,
.product-table.compact-mode tbody td {
    padding: 0.5rem 0.25rem;
    font-size: 0.75rem;
}

.product-table.compact-mode .model-link {
    font-size: 0.75rem;
}

/* 确保内容不会溢出 */
.product-table tbody td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 对于可能较长的内容，设置最大宽度 */
.product-table tbody td:nth-child(7) { /* 传输接口列 */
    white-space: normal;
    word-break: break-word;
}

/* 色彩图标样式 */
.color-cell {
    text-align: center;
}

.color-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    position: relative;
    vertical-align: middle;
}

/* 彩色图标 - 渐变圆圈 */
.color-icon-rgb {
    background: conic-gradient(
            from 0deg,
            #ff0000 0deg,
            #ff8800 60deg,
            #ffff00 120deg,
            #00ff00 180deg,
            #0088ff 240deg,
            #0000ff 300deg,
            #ff0000 360deg
    );
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 黑白图标 - 半黑半白 */
.color-icon-mono {
    background: linear-gradient(90deg, #000000 50%, #ffffff 50%);
    border: 1px solid #ccc;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 响应式表格 */
@media (max-width: 1200px) {
    .product-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .product-table {
        min-width: 900px;
    }
}

@media (max-width: 768px) {
    .product-table {
        min-width: 1000px;
        font-size: 0.5rem;
    }

    .product-table thead th,
    .product-table tbody td {
        padding: 0.5rem;
    }
}

/* 表格加载动画 */
@keyframes tableRowFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-table tbody tr {
    animation: tableRowFadeIn 0.3s ease-out;
}

/* 为每行添加渐进的动画延迟 */
.product-table tbody tr:nth-child(1) { animation-delay: 0.05s; }
.product-table tbody tr:nth-child(2) { animation-delay: 0.1s; }
.product-table tbody tr:nth-child(3) { animation-delay: 0.15s; }
.product-table tbody tr:nth-child(4) { animation-delay: 0.2s; }
.product-table tbody tr:nth-child(5) { animation-delay: 0.25s; }
.product-table tbody tr:nth-child(6) { animation-delay: 0.3s; }
.product-table tbody tr:nth-child(7) { animation-delay: 0.35s; }
.product-table tbody tr:nth-child(8) { animation-delay: 0.4s; }
.product-table tbody tr:nth-child(9) { animation-delay: 0.45s; }
.product-table tbody tr:nth-child(10) { animation-delay: 0.5s; }
.product-table tbody tr:nth-child(11) { animation-delay: 0.55s; }
.product-table tbody tr:nth-child(12) { animation-delay: 0.6s; }
.product-table tbody tr:nth-child(13) { animation-delay: 0.65s; }
.product-table tbody tr:nth-child(14) { animation-delay: 0.7s; }
.product-table tbody tr:nth-child(15) { animation-delay: 0.75s; }

/* 固定表头（可选） */
.product-table-wrapper.sticky-header {
    max-height: 600px;
    overflow-y: auto;
}

.product-table-wrapper.sticky-header thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: var(--bg-light);
}

/* 表格排序指示器（如果需要添加排序功能） */
.product-table thead th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 1.5rem;
}

.product-table thead th.sortable:hover {
    background-color: var(--bg-hover);
}

.product-table thead th.sortable::after {
    content: '\f0dc';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 0.5rem;
    opacity: 0.3;
}

.product-table thead th.sortable.asc::after {
    content: '\f0de';
    opacity: 1;
}

.product-table thead th.sortable.desc::after {
    content: '\f0dd';
    opacity: 1;
}

