/* 文章详情页面样式 */

/* 目录样式 */
.table-of-contents {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.table-of-contents h6 {
    color: var(--bs-primary);
    margin-bottom: 10px;
    font-weight: 600;
}

.table-of-contents ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.table-of-contents li {
    margin-bottom: 5px;
}

.table-of-contents a {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.table-of-contents a:hover {
    color: var(--bs-primary);
}

/* 目录数字样式 */
.toc-number {
    display: inline-block;
    min-width: 40px;
    text-align: center;
}

.toc-day {
    background: var(--bs-primary);
    color: white;
    border-radius: 4px 4px 0 0;
    padding: 2px 4px;
    font-size: 0.7rem;
    font-weight: bold;
}

.toc-date {
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 4px 4px;
    padding: 2px 4px;
    font-size: 0.9rem;
    color: #6c757d;
}

/* 侧边栏样式 */
.right-sidebar {
    position: sticky;
    top: 20px;
    z-index: 100;
}

/* 厂商信息卡片 */
.vendor-card {
    text-align: center;
    padding: 20px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: white;
    margin-bottom: 20px;
}

.vendor-logo {
    max-width: 120px;
    max-height: 60px;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

.vendor-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bs-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 24px;
    margin: 0 auto 15px;
}

/* 文章统计 */
.article-stats {
    display: flex;
    justify-content: space-around;
    text-align: center;
    padding: 15px 0;
    border-top: 1px solid #e9ecef;
    margin-top: 15px;
}

.stat-item {
    flex: 1;
}

.stat-number {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--bs-primary);
}

.stat-label {
    font-size: 0.8rem;
    color: #6c757d;
}

/* 相关文章 */
.related-articles .article-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f1f3f4;
}

.related-articles .article-item:last-child {
    border-bottom: none;
}

.related-articles .article-thumb,
.article-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 12px;
}

.related-articles .article-info {
    flex: 1;
}

.related-articles .article-title {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 5px;
    line-height: 1.4;
    color: #333;
}

.related-articles .article-date {
    font-size: 0.8rem;
    color: #6c757d;
}

/* 文章内容样式 */
.article-content {
    line-height: 1.8;
    color: #333;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
    color: #2c3e50;
}

.article-content h2 {
    border-bottom: 2px solid var(--bs-primary);
    padding-bottom: 8px;
}

.article-content h3 {
    border-left: 4px solid var(--bs-primary);
    padding-left: 12px;
}

.article-content p {
    margin-bottom: 15px;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.article-content ul,
.article-content ol {
    margin-bottom: 15px;
    padding-left: 30px;
}

.article-content li {
    margin-bottom: 8px;
}

.article-content blockquote {
    border-left: 4px solid var(--bs-primary);
    padding-left: 20px;
    margin: 20px 0;
    color: #6c757d;
    font-style: italic;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.article-content th,
.article-content td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.article-content th {
    background: var(--bs-primary);
    color: white;
    font-weight: 600;
}

.article-content tr:hover {
    background: #f8f9fa;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .right-sidebar {
        position: relative;
        top: 0;
        margin-top: 30px;
    }

    .article-stats {
        flex-wrap: wrap;
    }

    .stat-item {
        flex: 0 0 50%;
        margin-bottom: 10px;
    }

    .related-articles .article-item {
        flex-direction: column;
        text-align: center;
    }

    .related-articles .article-thumb {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .article-content table {
        font-size: 0.9rem;
    }

    .article-content th,
    .article-content td {
        padding: 8px 10px;
    }
}