/* 
 * product-ranking.css
 * 产品排行榜组件样式
 * 设计理念：奖牌式排名展示，清晰的视觉层次
 */

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

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

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

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

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

/* 排行榜类型切换 */
.product-ranking__tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.product-ranking__tab {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid #475569;
    border-radius: 2rem;
    padding: 1rem 2rem;
    color: #cbd5e1;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-ranking__tab:hover {
    border-color: #60a5fa;
    color: #60a5fa;
    transform: translateY(-2px);
}

.product-ranking__tab--active {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* 排行榜容器 */
.product-ranking__list {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid #334155;
    border-radius: 1.5rem;
    overflow: hidden;
    margin-bottom: 3rem;
}

/* 表头 */
.product-ranking__list-header {
    display: grid;
    grid-template-columns: 80px 1fr 120px 120px 120px 150px;
    gap: 1rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-bottom: 2px solid #334155;
    font-weight: 700;
    color: #e2e8f0;
    align-items: center;
}

/* 排名项样式 */
.product-ranking__item {
    display: grid;
    grid-template-columns: 80px 1fr 120px 120px 120px 150px;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #334155;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
}

.product-ranking__item:hover {
    background: rgba(96, 165, 250, 0.05);
}

.product-ranking__item:last-child {
    border-bottom: none;
}

/* 前三名特殊样式 */
.product-ranking__item--gold {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(251, 191, 36, 0.05));
    border-left: 4px solid #fbbf24;
}

.product-ranking__item--silver {
    background: linear-gradient(135deg, rgba(156, 163, 175, 0.1), rgba(209, 213, 219, 0.05));
    border-left: 4px solid #9ca3af;
}

.product-ranking__item--bronze {
    background: linear-gradient(135deg, rgba(180, 83, 9, 0.1), rgba(194, 65, 12, 0.05));
    border-left: 4px solid #b45309;
}

/* 排名数字 */
.product-ranking__rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-weight: 800;
    font-size: 1.25rem;
    color: white;
}

.product-ranking__rank--1 {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
}

.product-ranking__rank--2 {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
    box-shadow: 0 4px 15px rgba(156, 163, 175, 0.3);
}

.product-ranking__rank--3 {
    background: linear-gradient(135deg, #b45309, #92400e);
    box-shadow: 0 4px 15px rgba(180, 83, 9, 0.3);
}

.product-ranking__rank--other {
    background: rgba(148, 163, 184, 0.2);
    color: #94a3b8;
    font-size: 1rem;
}

/* 产品信息 */
.product-ranking__product {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.product-ranking__product-info {
    flex: 1;
}

.product-ranking__product-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.product-ranking__product-brand {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.product-ranking__product-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.product-ranking__tag {
    padding: 0.25rem 0.75rem;
    background: rgba(96, 165, 250, 0.1);
    color: #60a5fa;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
}

.product-ranking__tag--type {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.product-ranking__tag--hot {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* 评分样式 */
.product-ranking__score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.product-ranking__score-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #f1f5f9;
}

.product-ranking__score-label {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 星级评分 */
.product-ranking__rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.product-ranking__rating-stars {
    color: #fbbf24;
    font-size: 1rem;
    letter-spacing: -1px;
}

.product-ranking__rating-value {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-left: 0.5rem;
}

/* 进度条样式 */
.product-ranking__progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.product-ranking__progress-bar {
    flex: 1;
    height: 8px;
    background: #374151;
    border-radius: 4px;
    overflow: hidden;
}

.product-ranking__progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.product-ranking__progress-text {
    font-size: 0.875rem;
    color: #94a3b8;
    min-width: 40px;
    text-align: right;
}

/* 推荐率 */
.product-ranking__recommend {
    text-align: center;
}

.product-ranking__recommend-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: #10b981;
    margin-bottom: 0.25rem;
}

.product-ranking__recommend-label {
    font-size: 0.75rem;
    color: #94a3b8;
}

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

.product-ranking__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-ranking__btn--primary {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.product-ranking__btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
}

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

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

/* 空状态 */
.product-ranking__empty {
    text-align: center;
    padding: 4rem 2rem;
    color: #94a3b8;
}

.product-ranking__empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.product-ranking__empty-title {
    font-size: 1.5rem;
    color: #e2e8f0;
    margin-bottom: 0.5rem;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .product-ranking__list-header,
    .product-ranking__item {
        grid-template-columns: 60px 1fr 100px 100px;
        gap: 0.75rem;
        padding: 1.25rem 1rem;
    }
    
    .product-ranking__list-header :nth-child(5),
    .product-ranking__list-header :nth-child(6),
    .product-ranking__item :nth-child(5),
    .product-ranking__item :nth-child(6) {
        display: none;
    }
}

@media (max-width: 768px) {
    .product-ranking__tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .product-ranking__tab {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .product-ranking__list-header,
    .product-ranking__item {
        grid-template-columns: 50px 1fr 80px;
        gap: 0.5rem;
        padding: 1rem 0.75rem;
    }
    
    .product-ranking__list-header :nth-child(4),
    .product-ranking__item :nth-child(4) {
        display: none;
    }
    
    .product-ranking__product {
        gap: 0.75rem;
    }
    
    .product-ranking__product-image {
        width: 50px;
        height: 50px;
    }
    
    .product-ranking__product-name {
        font-size: 1rem;
    }
    
    .product-ranking__actions {
        flex-direction: column;
    }
    
    .product-ranking__btn {
        width: 100%;
        justify-content: center;
    }
}

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

.product-ranking__item {
    animation: fadeInUp 0.6s ease forwards;
}

.product-ranking__item:nth-child(1) { animation-delay: 0.1s; }
.product-ranking__item:nth-child(2) { animation-delay: 0.2s; }
.product-ranking__item:nth-child(3) { animation-delay: 0.3s; }
.product-ranking__item:nth-child(4) { animation-delay: 0.4s; }
.product-ranking__item:nth-child(5) { animation-delay: 0.5s; }
.product-ranking__item:nth-child(6) { animation-delay: 0.6s; }
.product-ranking__item:nth-child(7) { animation-delay: 0.7s; }
.product-ranking__item:nth-child(8) { animation-delay: 0.8s; }
.product-ranking__item:nth-child(9) { animation-delay: 0.9s; }
.product-ranking__item:nth-child(10) { animation-delay: 1.0s; }