/* ================================================================
   排行榜页面样式
   ================================================================ */

/* ---------- 页面标题区域 ---------- */
.ranking-archive-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 55%, #1d4ed8 100%);
    padding: 60px 0;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.ranking-archive-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='1.5'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.ranking-archive-header {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.ranking-header-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ranking-header-icon svg {
    color: #fff;
}

.ranking-archive-title {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 8px 0;
    color: #fff;
}

.ranking-archive-desc {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* ---------- 分类筛选 ---------- */
.ranking-categories {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ranking-cat-filter {
    display: flex;
    gap: 8px;
    padding: 16px 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.ranking-cat-filter::-webkit-scrollbar {
    display: none;
}

.ranking-cat-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    background: #f3f4f6;
    color: #374151;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ranking-cat-link:hover {
    background: #2563eb;
    color: #fff;
}

.ranking-cat-link.active {
    background: #2563eb;
    color: #fff;
    font-weight: 600;
}

/* ---------- 排行榜网格 ---------- */
.ranking-archive-list {
    padding: 40px 0 80px;
    background: #f9fafb;
}

.ranking-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* ---------- 排行榜卡片 ---------- */
.ranking-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.ranking-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.ranking-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ranking-card-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f3f4f6;
}

.ranking-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.ranking-card:hover .ranking-card-thumb img {
    transform: scale(1.05);
}

.ranking-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(37, 99, 235, 0.9);
    color: #fff;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
}

.ranking-badge-icon {
    font-size: 0.875rem;
}

/* ---------- 卡片内容 ---------- */
.ranking-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ranking-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 0.8125rem;
    color: #6b7280;
}

.ranking-card-meta svg {
    flex-shrink: 0;
}

.ranking-date,
.ranking-category {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ranking-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.ranking-card-title a {
    color: #111827;
    text-decoration: none;
    transition: color 0.2s ease;
}

.ranking-card-title a:hover {
    color: #2563eb;
}

.ranking-card-excerpt {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 16px;
}

/* ---------- 产品预览 ---------- */
.ranking-card-products {
    background: #f9fafb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.ranking-card-products h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 12px 0;
}

.ranking-products-preview {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ranking-product-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8125rem;
}

.ranking-product-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #2563eb;
    color: #fff;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.ranking-product-name {
    flex: 1;
    color: #374151;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-product-supplier {
    color: #6b7280;
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* ---------- 卡片底部 ---------- */
.ranking-card-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.ranking-card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #2563eb;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ranking-card-link:hover {
    gap: 12px;
    color: #1d4ed8;
}

.ranking-card-link svg {
    transition: transform 0.2s ease;
}

.ranking-card-link:hover svg {
    transform: translateX(4px);
}

/* ---------- 分页 ---------- */
.ranking-pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.ranking-pagination .nav-links {
    display: flex;
    gap: 8px;
}

.ranking-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 16px;
    background: #fff;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ranking-pagination .page-numbers:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.ranking-pagination .page-numbers.current {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

/* ---------- 无结果 ---------- */
.ranking-no-results {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.ranking-no-results-icon {
    color: #d1d5db;
    margin-bottom: 20px;
}

.ranking-no-results h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px 0;
}

.ranking-no-results p {
    font-size: 0.9375rem;
    color: #6b7280;
    margin: 0;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
    .ranking-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .ranking-archive-hero {
        padding: 40px 0;
    }
    
    .ranking-archive-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .ranking-header-icon {
        width: 56px;
        height: 56px;
    }
    
    .ranking-archive-title {
        font-size: 1.5rem;
    }
    
    .ranking-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .ranking-card-products {
        padding: 12px;
    }
    
    .ranking-product-supplier {
        display: none;
    }
}

@media (max-width: 480px) {
    .ranking-cat-filter {
        padding: 12px 0;
    }
    
    .ranking-cat-link {
        padding: 6px 16px;
        font-size: 0.8125rem;
    }
    
    .ranking-card-content {
        padding: 16px;
    }
    
    .ranking-card-title {
        font-size: 1rem;
    }
}

/* ---------- 排名类型筛选器 ---------- */
.ranking-type-filter-section {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 16px 0;
}

.ranking-type-filter {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.ranking-type-link {
    display: inline-block;
    padding: 8px 20px;
    background: #f3f4f6;
    color: #374151;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.ranking-type-link:hover,
.ranking-type-link.active {
    background: #2563eb;
    color: #fff;
}

/* ---------- 排名类型标签 ---------- */
.ranking-type-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.ranking-type-daily {
    background: #dbeafe;
    color: #1d4ed8;
}

.ranking-type-monthly {
    background: #fef3c7;
    color: #d97706;
}

.ranking-type-yearly {
    background: #d1fae5;
    color: #059669;
}

/* ---------- 响应式：排名类型筛选器 ---------- */
@media (max-width: 768px) {
    .ranking-type-filter-section {
        padding: 12px 0;
    }
    
    .ranking-type-filter {
        gap: 8px;
    }
    
    .ranking-type-link {
        padding: 6px 16px;
        font-size: 0.8125rem;
    }
    
    .ranking-card-meta {
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* ================================================================
   排行榜详情页样式
   ================================================================ */

/* ---------- 详情页布局 ---------- */
.ranking-single {
    padding: 40px 0;
    background: #f9fafb;
}

.ranking-single-header {
    background: #fff;
    padding: 32px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.ranking-breadcrumb {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 16px;
}

.ranking-breadcrumb a {
    color: #2563eb;
    text-decoration: none;
}

.ranking-breadcrumb .separator {
    margin: 0 8px;
}

.ranking-single-title {
    font-size: 2rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 16px 0;
    line-height: 1.3;
}

.ranking-single-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.ranking-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.ranking-type-daily {
    background: #dbeafe;
    color: #1d4ed8;
}

.ranking-type-monthly {
    background: #fef3c7;
    color: #d97706;
}

.ranking-type-yearly {
    background: #d1fae5;
    color: #059669;
}

.ranking-date,
.ranking-author {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: #6b7280;
}

.ranking-date svg,
.ranking-author svg {
    flex-shrink: 0;
}

/* ---------- 特色图片 ---------- */
.ranking-single-thumbnail {
    margin-bottom: 24px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.ranking-single-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

/* ============================================================
   排行榜详情页 - 整体布局
   ============================================================ */

/* 内容区域：左侧主内容 + 右侧边栏 */
.ranking-body-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    margin-top: 32px;
    align-items: start;
}

/* 左侧主内容 */
.ranking-main-content {
    min-width: 0;
}

/* 文章正文 */
.ranking-content-body {
    background: #fff;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    font-size: 1rem;
    line-height: 1.8;
    color: #374151;
    margin-bottom: 24px;
}

.ranking-content-body h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 32px 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.ranking-content-body h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 24px 0 12px 0;
}

.ranking-content-body p {
    margin-bottom: 16px;
}

.ranking-content-body ul {
    margin: 16px 0;
    padding-left: 24px;
}

.ranking-content-body li {
    margin-bottom: 8px;
    color: #4b5563;
}

/* 产品卡片列表区域 */
.ranking-products-section {
    background: #fff;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e5e7eb;
}

.ranking-products-section .section-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.section-count {
    font-size: 0.875rem;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 4px 12px;
    border-radius: 20px;
}

.ranking-products-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 24px 0;
}

.ranking-table-wrapper {
    overflow-x: auto;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.ranking-table thead {
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
}

.ranking-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

.ranking-table tbody tr {
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.2s;
}

.ranking-table tbody tr:hover {
    background: #f9fafb;
}

.ranking-table td {
    padding: 16px;
    vertical-align: middle;
}

.rank-col {
    width: 80px;
    text-align: center;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.875rem;
    background: #f3f4f6;
    color: #374151;
}

.rank-gold {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #fff;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.rank-silver {
    background: linear-gradient(135deg, #d1d5db, #9ca3af);
    color: #fff;
    box-shadow: 0 2px 8px rgba(156, 163, 175, 0.3);
}

.rank-bronze {
    background: linear-gradient(135deg, #fcd34d, #d97706);
    color: #fff;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
}

.product-col {
    min-width: 250px;
}

.product-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.product-details {
    flex: 1;
}

.product-name {
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.product-name a {
    color: #111827;
    text-decoration: none;
    transition: color 0.2s;
}

.product-name a:hover {
    color: #2563eb;
}

.product-model {
    font-size: 0.8125rem;
    color: #6b7280;
}

.supplier-col {
    min-width: 120px;
}

.supplier-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.supplier-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.supplier-link {
    font-size: 0.75rem;
    color: #2563eb;
    text-decoration: none;
}

.score-col {
    width: 120px;
}

.rating-stars {
    display: flex;
    gap: 2px;
}

.star {
    color: #d1d5db;
    font-size: 1rem;
}

.star.filled {
    color: #fbbf24;
}

.action-col {
    width: 100px;
    text-align: center;
}

/* ---------- 侧边栏 ---------- */
.ranking-sidebar {
    position: sticky;
    top: 24px;
}

.sidebar-widget {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
}

.widget-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

.related-rankings {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-rankings li {
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.related-rankings li:last-child {
    border-bottom: none;
}

.related-rankings a {
    color: #374151;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.related-rankings a:hover {
    color: #2563eb;
}

.ranking-categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ranking-categories-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.ranking-categories-list li:last-child {
    border-bottom: none;
}

.ranking-categories-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #374151;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.ranking-categories-list a:hover {
    color: #2563eb;
}

.ranking-categories-list .count {
    color: #9ca3af;
    font-size: 0.8125rem;
}

/* ---------- 响应式：详情页 ---------- */
@media (max-width: 1024px) {
    .ranking-single-content {
        grid-template-columns: 1fr;
    }
    
    .ranking-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .ranking-single {
        padding: 20px 0;
    }
    
    .ranking-single-header {
        padding: 20px;
    }
    
    .ranking-single-title {
        font-size: 1.5rem;
    }
    
    .ranking-single-meta {
        gap: 12px;
    }
    
    .ranking-content-wrapper {
        padding: 20px;
    }
    
    .ranking-table {
        font-size: 0.875rem;
    }
    
    .ranking-table th,
    .ranking-table td {
        padding: 12px 8px;
    }
    
    .product-thumb {
        width: 40px;
        height: 40px;
    }
    
    .product-name {
        font-size: 0.8125rem;
    }
    
    .supplier-link {
        display: none;
    }
}

@media (max-width: 480px) {
    .ranking-single-header {
        padding: 16px;
    }
    
    .ranking-single-title {
        font-size: 1.25rem;
    }
    
    .ranking-content-wrapper {
        padding: 16px;
    }
    
    .ranking-products-title {
        font-size: 1.25rem;
    }
    
    .ranking-table-wrapper {
        margin: 0 -16px;
        padding: 0 16px;
    }
}

/* ============================================================
   单个产品卡片（新）
   ============================================================ */
.product-card {
    position: relative;
    padding: 24px;
    margin-bottom: 20px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.product-card:last-child {
    margin-bottom: 0;
}

.product-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.09);
    border-color: #c7d2fe;
}

/* 排名徽章 */
.product-card__rank {
    position: absolute;
    top: -1px;
    left: -1px;
}

.rank-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    height: 36px;
    padding: 0 16px;
    border-radius: 16px 0 12px 0;
    font-weight: 700;
    font-size: 0.875rem;
    background: #e5e7eb;
    color: #374151;
}

.product-card.is-gold .rank-tag {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #fff;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.35);
}

.product-card.is-silver .rank-tag {
    background: linear-gradient(135deg, #d1d5db, #9ca3af);
    color: #fff;
    box-shadow: 0 2px 10px rgba(156, 163, 175, 0.35);
}

.product-card.is-bronze .rank-tag {
    background: linear-gradient(135deg, #fcd34d, #d97706);
    color: #fff;
    box-shadow: 0 2px 10px rgba(217, 119, 6, 0.35);
}

/* 卡片主体 */
.product-card__body {
    margin-top: 12px;
}

.product-card__main {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

/* 产品图片 */
.product-card__img {
    flex-shrink: 0;
    width: 160px;
}

.product-card__img a {
    display: block;
    width: 160px;
    height: 160px;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.product-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s;
}

.product-card__img a:hover img {
    transform: scale(1.06);
}

/* 产品信息 */
.product-card__info {
    flex: 1;
    min-width: 0;
}

.product-card__name {
    font-size: 1.1875rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.5;
}

.product-card__name a {
    color: #111827;
    text-decoration: none;
    transition: color 0.2s;
}

.product-card__name a:hover {
    color: #2563eb;
}

.product-card__model {
    display: inline-block;
    padding: 3px 10px;
    background: #f3f4f6;
    border-radius: 6px;
    font-size: 0.8125rem;
    color: #6b7280;
    margin-bottom: 14px;
}

/* 信息块 */
.product-card__block {
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    border-left: 3px solid transparent;
}

.block-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.block-text {
    font-size: 0.875rem;
    line-height: 1.65;
}

/* 产品介绍 */
.block-desc {
    background: #f0f9ff;
    border-left-color: #0ea5e9;
}

.block-desc .block-label { color: #0369a1; }
.block-desc .block-text { color: #0c4a6e; }

/* 推荐理由 */
.block-reason {
    background: #fef9c3;
    border-left-color: #eab308;
}

.block-reason .block-label { color: #a16207; }
.block-reason .block-text { color: #713f12; }

/* 特色优势 */
.block-features {
    background: #f0fdf4;
    border-left-color: #22c55e;
}

.block-features .block-label { color: #15803d; }
.block-features .block-text { color: #14532d; }

/* 操作区 */
.product-card__action {
    flex-shrink: 0;
    width: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 16px 12px;
    background: #f9fafb;
    border-radius: 10px;
}

.action-supplier,
.action-rating {
    text-align: center;
    width: 100%;
}

.action-label {
    display: block;
    font-size: 0.6875rem;
    color: #9ca3af;
    margin-bottom: 3px;
}

.action-value {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
}

.stars {
    display: flex;
    justify-content: center;
    gap: 1px;
}

.star {
    font-size: 0.9375rem;
    color: #d1d5db;
}

.star.is-active {
    color: #fbbf24;
}

/* 卡片按钮 */
.btn-card {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s;
}

.btn-detail {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
}

.btn-detail:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
    color: #fff;
}

.btn-quote {
    background: #fff;
    color: #2563eb;
    border: 1.5px solid #2563eb;
}

.btn-quote:hover {
    background: #2563eb;
    color: #fff;
}

/* ============================================================
   侧边栏
   ============================================================ */
.ranking-sidebar {
    position: sticky;
    top: 20px;
}

.sidebar-widget {
    margin-bottom: 32px;
    padding: 24px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.widget-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

/* 相关排行榜列表 */
.related-rankings-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-rankings-list li {
    margin-bottom: 8px;
}

.related-rankings-list li:last-child {
    margin-bottom: 0;
}

.related-ranking-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #374151;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.related-ranking-link:hover {
    background: #f3f4f6;
    color: #2563eb;
}

.related-type-badge {
    flex-shrink: 0;
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
}

.related-type-badge.type-daily {
    background: #dbeafe;
    color: #1e40af;
}

.related-type-badge.type-monthly {
    background: #fef3c7;
    color: #92400e;
}

.related-type-badge.type-yearly {
    background: #d1fae5;
    color: #065f46;
}

.related-title {
    flex: 1;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 分类列表 */
.sidebar-cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-cat-list li {
    margin-bottom: 4px;
}

.sidebar-cat-list li:last-child {
    margin-bottom: 0;
}

.sidebar-cat-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #374151;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.sidebar-cat-list a:hover {
    background: #f3f4f6;
    color: #2563eb;
}

.cat-count {
    font-size: 0.8125rem;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 1px 8px;
    border-radius: 10px;
}

/* ============================================================
   底部相关排行榜推荐（已移除）
   ============================================================ */
/* 此部分已在 single-ranking.php 中移除 */

/* ============================================================
   通用徽章配色
   ============================================================ */
.badge-daily,
.bottom-badge.badge-daily,
.sidebar-badge.badge-daily {
    background: #dbeafe;
    color: #1e40af;
}

.badge-monthly,
.bottom-badge.badge-monthly,
.sidebar-badge.badge-monthly {
    background: #fef3c7;
    color: #92400e;
}

.badge-yearly,
.bottom-badge.badge-yearly,
.sidebar-badge.badge-yearly {
    background: #d1fae5;
    color: #065f46;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1024px) {
    .ranking-body-layout {
        grid-template-columns: 1fr;
    }

    .ranking-sidebar {
        position: static;
    }

    .product-card__main {
        flex-wrap: wrap;
    }

    .product-card__action {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .ranking-main-content {
        min-width: 100%;
    }

    .ranking-content-body {
        padding: 20px;
    }

    .ranking-products-section {
        padding: 20px;
    }

    .product-card {
        padding: 16px;
    }

    .product-card__main {
        flex-direction: column;
        gap: 16px;
    }

    .product-card__img {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .product-card__img a {
        width: 140px;
        height: 140px;
    }

    .product-card__action {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .ranking-products-section .section-title {
        font-size: 1.125rem;
    }

    .product-card__name {
        font-size: 1.0625rem;
    }

    .product-card__block {
        padding: 8px 10px;
        font-size: 0.8125rem;
    }
}

/* ============================================================
   嵌入在文章内容中的产品列表样式
   ============================================================ */
.ranking-products-embed-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 40px 0 24px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
    color: #111827;
}

.ranking-products-embed {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 32px 0;
}

.ranking-product-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.ranking-product-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
    border-color: #bfdbfe;
}

/* 排名徽章 - 定位到产品图片左上角 */
.rank-badge-wrapper {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 10px;
    border-radius: 22px; /* 圆角矩形，更适合显示中文 */
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 2px solid #fff;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.ranking-product-card.rank-gold .rank-badge {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.5);
}

.ranking-product-card.rank-silver .rank-badge {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.5);
}

.ranking-product-card.rank-bronze .rank-badge {
    background: linear-gradient(135deg, #d97706, #b45309);
    box-shadow: 0 2px 8px rgba(180, 83, 9, 0.5);
}

/* 产品图片和供应商包装器 */
.product-image-supplier-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 160px;
    flex-shrink: 0;
    align-items: center;
    position: relative;
}

/* 产品图片 */
.product-image-wrapper {
    width: 160px;
    height: 160px;
    border-radius: 12px;
    overflow: hidden;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
    position: relative;
}

.product-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ranking-product-card:hover .product-thumb {
    transform: scale(1.05);
}

/* 统计信息（图片下方、供应商信息上方） */
.product-stats-under-image {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2px;
    padding: 0px 2px;
    background: transparent;
    border-radius: 0;
    border: none;
    font-size: 0.625rem;
    color: #6b7280;
    width: 100%;
    box-sizing: border-box;
    line-height: 1;
    min-height: 14px;
}

.stat-item {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    font-size: 0.625rem;
    white-space: nowrap;
    padding: 0 1px;
}

.stat-views { color: #6b7280; }
.stat-favorites { color: #ef4444; }
.stat-likes { color: #3b82f6; }

/* 供应商信息（图片下方） */
.product-supplier-under-image {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 6px 10px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    font-size: 0.75rem;
    color: #6b7280;
    width: 100%;
    box-sizing: border-box;
}

.supplier-info-compact {
    display: flex;
    align-items: center;
    gap: 4px;
    line-height: 1.3;
}

.supplier-label {
    font-weight: 600;
    color: #374151;
    font-size: 0.75rem;
}

.supplier-name {
    color: #2563eb;
    font-weight: 500;
    font-size: 0.75rem;
}

.supplier-rating-compact {
    color: #f59e0b;
    font-weight: 600;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 2px;
}

/* 产品信息 */
.product-info-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 0; /* 防止内容溢出 */
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.product-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.3;
    color: #111827;
}

.product-name a {
    color: #111827;
    text-decoration: none;
    transition: color 0.2s;
}

.product-name a:hover {
    color: #2563eb;
}

.product-model {
    font-size: 0.9375rem;
    color: #6b7280;
    margin: 0;
    padding: 4px 12px;
    background: #f3f4f6;
    border-radius: 6px;
    display: inline-block;
}

.product-description {
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.6;
    margin: 0;
    padding: 8px 12px;
    background: #f0f9ff;
    border-radius: 8px;
    border-left: 3px solid #0ea5e9;
    border: 1px solid #7dd3fc;
}

.product-description strong {
    color: #0369a1;
    margin-right: 8px;
    font-size: 0.9375rem;
    font-weight: 700;
}

.product-recommendation {
    font-size: 0.875rem;
    color: #713f12;
    line-height: 1.6;
    margin: 0;
    padding: 8px 12px;
    background: #fef9c3;
    border-radius: 8px;
    border: 1px solid #fde047;
    border-left: 3px solid #eab308;
    transition: all 0.3s ease;
}

.product-recommendation:hover {
    background: #fef9c3;
    border-color: #facc15;
}

.product-recommendation strong {
    color: #a16207;
    margin-right: 8px;
    font-size: 0.9375rem;
    font-weight: 700;
}

.product-features {
    font-size: 0.875rem;
    color: #14532d;
    line-height: 1.6;
    margin: 0;
    padding: 8px 12px;
    background: #f0fdf4;
    border-radius: 8px;
    border: 1px solid #86efac;
    border-left: 3px solid #22c55e;
}

.product-features strong {
    color: #15803d;
    margin-right: 8px;
    font-size: 0.9375rem;
    font-weight: 700;
}

/* 查看详情按钮 */
.btn-view {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: 12px;
    align-self: flex-start;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-view:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
    color: #fff;
    transform: translateY(-2px);
}

/* 响应式 */
@media (max-width: 768px) {
    .ranking-product-card {
        flex-direction: column;
        padding: 12px;
        gap: 8px; /* 减少整体间距 */
    }
    
    .rank-badge-wrapper {
        position: absolute;
        top: 8px;
        left: 8px;
    }
    
    .rank-badge {
        min-width: 36px;
        height: 36px;
        padding: 0 8px;
        border-radius: 18px;
        font-size: 0.75rem; /* 显示名次文字 */
        font-weight: 700;
        border-width: 2px;
    }
    
    .product-image-supplier-wrapper {
        width: 100%;
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
    }
    
    .product-image-wrapper {
        width: 140px;
        height: 140px;
        flex-shrink: 0;
        border-radius: 10px;
    }
    
    .product-stats-under-image {
        font-size: 0.625rem;
        padding: 4px 6px;
        gap: 2px;
    }
    
    .product-supplier-under-image {
        font-size: 0.6875rem;
        padding: 4px 8px;
        gap: 2px;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        margin-bottom: 4px; /* 减少与产品标题的间距 */
    }
    
    .supplier-info-compact {
        flex-direction: row;
        gap: 6px;
    }
    
    .product-info-wrapper {
        gap: 4px; /* 减少内部元素间距 */
        width: 100%;
        margin-top: 0; /* 移除顶部间距 */
    }
    
    .product-name {
        font-size: 1rem;
        margin-top: 0 !important;
        padding-top: 0 !important;
        margin-bottom: 4px !important; /* 减少底部间距 */
    }
    
    .product-model {
        margin-bottom: 4px !important; /* 减少与下方元素的间距 */
    }
    
    .product-recommendation,
    .product-features,
    .product-description {
        padding: 6px 10px;
        font-size: 0.8125rem;
        margin-top: 4px; /* 减少顶部间距 */
    }
    
    .btn-view {
        width: 100%;
        text-align: center;
        padding: 10px 20px;
        font-size: 0.875rem;
        margin-top: 8px; /* 减少顶部间距 */
    }
}
    
/* 无线端优化：侧边栏移到内容下方 */
@media (max-width: 768px) {
    .ranking-body-layout {
        display: flex;
        flex-direction: column;
    }
    
    .ranking-sidebar {
        position: static;
        order: 2; /* 侧边栏在内容之后 */
        margin-top: 24px;
    }
    
    .ranking-main-content {
        order: 1; /* 主内容在侧边栏之前 */
    }
    
    /* 产品卡片优化：图片与边框对齐 */
    .product-image-wrapper {
        border-radius: 10px;
        border-width: 2px;
    }
    
    /* 供应商信息一排显示 */
    .product-supplier-under-image {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        padding: 8px 12px;
    }
    
    .supplier-info-compact {
        flex-direction: row;
        align-items: center;
        gap: 6px;
    }
    
    .supplier-label,
    .supplier-name,
    .supplier-rating-compact {
        display: inline;
    }
    
    /* 优化产品信息区域 */
    .product-info-wrapper {
        padding: 0 4px;
    }
    
    /* 优化按钮显示 */
    .btn-view {
        display: block;
        width: 100%;
        text-align: center;
        margin-top: 12px;
    }
}

/* 超小屏幕优化（480px及以下） */
@media (max-width: 480px) {
    .ranking-product-card {
        padding: 10px;
        gap: 10px;
    }
    
    .product-image-supplier-wrapper {
        flex-direction: column;
        align-items: center;
    }
    
    .product-image-wrapper {
        width: 120px;
        height: 120px;
    }
    
    .product-supplier-under-image {
        width: 100%;
        flex-direction: row;
        justify-content: center;
    }
    
    .product-name {
        font-size: 0.9375rem;
    }
    
    .product-model {
        font-size: 0.8125rem;
    }
    
    .product-description,
    .product-recommendation,
    .product-features {
        font-size: 0.8125rem;
        padding: 6px 8px;
    }
}
