/* ==================== 产品对比页面样式 ==================== */

.product-comparison-page {
    min-height: 60vh;
    padding: 60px 0;
    background-color: #f8f8f8;
}

.comparison-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部 */
.comparison-header {
    text-align: center;
    margin-bottom: 50px;
}

.comparison-title {
    font-size: 48px;
    font-weight: 700;
    color: #000;
    margin-bottom: 15px;
}

.comparison-subtitle {
    font-size: 18px;
    color: #666;
    margin: 0;
}

/* 空状态 */
.comparison-empty {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.comparison-empty svg {
    margin-bottom: 30px;
}

.comparison-empty h3 {
    font-size: 28px;
    color: #000;
    margin-bottom: 15px;
}

.comparison-empty p {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

.comparison-empty .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: #000;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.comparison-empty .btn-primary:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 对比表格 */
.comparison-table-wrapper {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.comparison-table thead tr {
    background: #f8f8f8;
    border-bottom: 2px solid #e0e0e0;
}

.comparison-table th {
    padding: 30px 20px;
    text-align: center;
    vertical-align: top;
}

.comparison-param-name-col {
    width: 20%;
    text-align: left !important;
    font-size: 18px;
    font-weight: 700;
    color: #000;
    padding: 30px 25px !important;
}

.comparison-product-col {
    width: 20%;
    position: relative;
}

.comparison-product-header {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.remove-compare-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    transition: all 0.3s ease;
    z-index: 10;
}

.remove-compare-btn svg {
    transition: transform 0.3s ease;
}

.remove-compare-btn:hover svg {
    transform: rotate(90deg);
}

.comparison-product-image {
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
    border-radius: 8px;
    overflow: hidden;
}

.comparison-product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.comparison-product-name {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    text-align: center;
    margin: 0;
}

.comparison-view-details {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: #000;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.comparison-view-details:hover {
    background: #333;
}

/* 空列 */
.comparison-empty-col {
    background: #fafafa;
}

.comparison-add-product {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 40px 20px;
    color: #999;
}

.comparison-add-product span {
    font-size: 16px;
    font-weight: 500;
}

/* 表格主体 */
.comparison-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s ease;
}

.comparison-table tbody tr:hover {
    background-color: #f9f9f9;
}

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

.comparison-table td {
    padding: 18px 20px;
    text-align: center;
    vertical-align: middle;
}

.comparison-param-name {
    text-align: left !important;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    padding: 18px 25px !important;
    background: #fafafa;
}

.comparison-value {
    font-size: 15px;
    color: #666;
    background: #fff;
}

.comparison-empty-value {
    color: #ccc;
    background: #fafafa;
}

/* 响应式 */
@media (max-width: 1400px) {
    .comparison-param-name-col {
        width: 22%;
    }
    
    .comparison-product-col {
        width: 19.5%;
    }
}

@media (max-width: 1200px) {
    .comparison-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .comparison-table {
        min-width: 1000px;
    }
    
    .comparison-param-name-col {
        width: 200px;
        min-width: 200px;
    }
    
    .comparison-product-col {
        width: 200px;
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .comparison-title {
        font-size: 32px;
    }
    
    .comparison-subtitle {
        font-size: 16px;
    }
    
    .product-comparison-page {
        padding: 40px 0;
    }
    
    .comparison-header {
        margin-bottom: 30px;
    }
    
    .comparison-table {
        min-width: 800px;
    }
    
    .comparison-product-image {
        width: 120px;
        height: 120px;
    }
    
    .comparison-product-name {
        font-size: 14px;
    }
}

/* 产品详情页对比按钮样式 */
.product-compare-section {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-add-to-compare {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    background: #fff;
    border: 2px solid #000;
    color: #000;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.btn-add-to-compare:hover {
    background: #000;
    color: #fff;
}

.btn-add-to-compare:hover svg path {
    stroke: #fff;
}

.btn-add-to-compare.added {
    background: #4caf50;
    border-color: #4caf50;
    color: #fff;
}

.btn-add-to-compare.added svg path {
    stroke: #fff;
}

.compare-btn-count {
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: #ff4444;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 11px;
}

.compare-btn-count.show {
    display: flex;
}

.btn-view-comparison {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: #000;
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-view-comparison:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

