/* 
 * product-compare.css
 * 产品对比组件样式
 * 设计理念：专业的数据表格风格，清晰的对比视觉效果
 */

/* 主容器样式 */
.product-compare {
    padding: 4rem 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    position: relative;
}

.product-compare__container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* 标题区域 */
.product-compare__header {
    text-align: center;
    margin-bottom: 3rem;
}

.product-compare__title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-compare__subtitle {
    font-size: 1.25rem;
    color: #cbd5e1;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* 产品选择器样式 */
.product-compare__selector {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid #334155;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 3rem;
}

.product-compare__selector-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.product-compare__selector-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e2e8f0;
}

.product-compare__selector-limit {
    font-size: 0.875rem;
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
}

/* 产品选择网格 */
.product-compare__selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.product-compare__selection-card {
    background: #1e293b;
    border: 2px dashed #475569;
    border-radius: 0.75rem;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.product-compare__selection-card:hover {
    border-color: #60a5fa;
    background: rgba(96, 165, 250, 0.05);
}

.product-compare__selection-card--selected {
    border: 2px solid #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.product-compare__selection-card--selected::after {
    content: '✓';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 24px;
    height: 24px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

.product-compare__empty-slot {
    text-align: center;
    color: #94a3b8;
}

.product-compare__empty-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.product-compare__empty-text {
    font-size: 0.875rem;
}

/* 产品信息样式 */
.product-compare__product-info {
    text-align: center;
}

.product-compare__product-image {
    width: 60px;
    height: 60px;
    border-radius: 0.5rem;
    object-fit: cover;
    margin: 0 auto 0.75rem;
    background: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.product-compare__product-name {
    font-size: 1rem;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 0.25rem;
}

.product-compare__product-brand {
    font-size: 0.875rem;
    color: #94a3b8;
}

.product-compare__product-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: #60a5fa;
    margin-top: 0.5rem;
}

/* 对比表格样式 */
.product-compare__table-container {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid #334155;
    border-radius: 1rem;
    overflow: hidden;
}

.product-compare__table {
    width: 100%;
    border-collapse: collapse;
}

.product-compare__table-header {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-bottom: 2px solid #334155;
}

.product-compare__table-category {
    background: rgba(96, 165, 250, 0.1);
    border-bottom: 1px solid #334155;
}

.product-compare__category-cell {
    padding: 1.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: #e2e8f0;
    text-align: left;
    border-right: 1px solid #334155;
    width: 200px;
    vertical-align: middle;
}

.product-compare__category-cell::before {
    content: attr(data-icon);
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

.product-compare__product-header {
    padding: 1.5rem;
    text-align: center;
    border-right: 1px solid #334155;
    background: rgba(30, 41, 59, 0.8);
}

.product-compare__product-header:last-child {
    border-right: none;
}

.product-compare__feature-cell {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #334155;
    border-right: 1px solid #334155;
    color: #cbd5e1;
    font-size: 0.875rem;
}

.product-compare__feature-cell:last-child {
    border-right: none;
}

.product-compare__feature-value {
    text-align: center;
    font-weight: 600;
    color: #f1f5f9;
}

/* 评分样式 */
.product-compare__rating {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.product-compare__rating-star {
    color: #fbbf24;
    font-size: 1rem;
}

.product-compare__rating-value {
    margin-left: 0.5rem;
    font-weight: 700;
    color: #f1f5f9;
}

/* 标签样式 */
.product-compare__tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(96, 165, 250, 0.1);
    color: #60a5fa;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
}

/* 行动按钮 */
.product-compare__actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 3rem;
}

.product-compare__btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.product-compare__btn--primary {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
}

.product-compare__btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.product-compare__btn--secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    border: 1px solid #475569;
}

.product-compare__btn--secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #60a5fa;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .product-compare__table-container {
        overflow-x: auto;
    }
    
    .product-compare__table {
        min-width: 800px;
    }
}

@media (max-width: 768px) {
    .product-compare__selection-grid {
        grid-template-columns: 1fr;
    }
    
    .product-compare__actions {
        flex-direction: column;
    }
    
    .product-compare__btn {
        width: 100%;
        justify-content: center;
    }
}