/* 内容页面样式 */

/* 文章详情页 */
.article-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    padding: 40px 0;
}

.article-detail {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    overflow: hidden;
}

.article-header {
    padding: 32px 32px 24px 32px;
    border-bottom: 1px solid #e2e8f0;
}

.article-title {
    font-size: 28px;
    color: #1e293b;
    margin: 0 0 20px 0;
    line-height: 1.3;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #64748b;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-item i {
    font-size: 16px;
    color: #94a3b8;
}

.category-link {
    color: #2563ff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.category-link:hover {
    color: #1e40af;
}

.article-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.article-tags i {
    color: #94a3b8;
    font-size: 14px;
}

.article-cover {
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-content {
    padding: 32px;
    line-height: 1.8;
    color: #374151;
    font-size: 16px;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: #1e293b;
    margin: 24px 0 16px 0;
    line-height: 1.4;
}

.article-content h1 { font-size: 24px; }
.article-content h2 { font-size: 22px; }
.article-content h3 { font-size: 20px; }
.article-content h4 { font-size: 18px; }
.article-content h5 { font-size: 16px; }
.article-content h6 { font-size: 14px; }

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

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
}

.article-content blockquote {
    border-left: 4px solid #2563ff;
    padding: 16px 20px;
    margin: 20px 0;
    background: #f8fafc;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #475569;
}

.article-content code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #dc2626;
}

.article-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

.article-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

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

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

.article-footer {
    padding: 24px 32px 32px 32px;
    border-top: 1px solid #e2e8f0;
}

.article-share {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.share-title {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.share-buttons {
    display: flex;
    gap: 8px;
}

.share-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 16px;
}

.share-btn.weixin {
    background: #07c160;
    color: #fff;
}

.share-btn.weibo {
    background: #e6162d;
    color: #fff;
}

.share-btn.qq {
    background: #12b7f5;
    color: #fff;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.article-nav {
    display: flex;
    gap: 16px;
}

.article-nav a {
    flex: 1;
    padding: 16px 20px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.article-nav a:hover {
    background: #f8fafc;
    border-color: #2563ff;
    transform: translateY(-2px);
}

.nav-label {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}

.nav-title {
    display: block;
    color: #1e293b;
    font-size: 14px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 侧边栏 */
.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-widget {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    overflow: hidden;
}

.widget-title {
    padding: 20px 20px 16px 20px;
    margin: 0;
    font-size: 18px;
    color: #1e293b;
    border-bottom: 1px solid #e2e8f0;
}

.author-info {
    padding: 20px;
    text-align: center;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 12px;
    border: 3px solid #e2e8f0;
}

.author-name {
    font-size: 16px;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.author-bio {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

.related-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-item {
    border-bottom: 1px solid #f1f5f9;
}

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

.related-item a {
    display: block;
    padding: 16px 20px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.related-item a:hover {
    background: #f8fafc;
}

.related-title {
    display: block;
    color: #1e293b;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.related-date {
    display: block;
    font-size: 12px;
    color: #94a3b8;
}

/* 产品详情页 */
.product-detail {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    padding: 40px;
    margin-bottom: 40px;
}

.product-gallery {
    margin-bottom: 32px;
}

.main-image {
    width: 100%;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: #2563ff;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info h1 {
    font-size: 28px;
    color: #1e293b;
    margin: 0 0 20px 0;
    line-height: 1.3;
}

.product-price {
    margin-bottom: 24px;
}

.price {
    font-size: 32px;
    font-weight: bold;
    color: #dc2626;
}

.original-price {
    font-size: 18px;
    color: #94a3b8;
    text-decoration: line-through;
    margin-left: 12px;
}

.product-meta {
    margin-bottom: 32px;
}

.meta-item {
    display: flex;
    margin-bottom: 12px;
    font-size: 14px;
}

.meta-item .label {
    color: #64748b;
    min-width: 80px;
}

.meta-item .value {
    color: #1e293b;
}

.product-description {
    margin-bottom: 32px;
}

.product-description h3 {
    font-size: 20px;
    color: #1e293b;
    margin: 0 0 16px 0;
}

.description-content {
    color: #374151;
    line-height: 1.7;
    font-size: 15px;
}

.product-specifications {
    margin-bottom: 32px;
}

.product-specifications h3 {
    font-size: 20px;
    color: #1e293b;
    margin: 0 0 16px 0;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.specs-table th,
.specs-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.specs-table th {
    background: #f8fafc;
    color: #1e293b;
    font-weight: 600;
    font-size: 14px;
}

.specs-table td {
    color: #374151;
    font-size: 14px;
}

.specs-table tr:last-child th,
.specs-table tr:last-child td {
    border-bottom: none;
}

.product-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* 相关产品 */
.related-products {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    padding: 32px;
}

.related-products h2 {
    font-size: 24px;
    color: #1e293b;
    margin: 0 0 24px 0;
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .article-wrapper {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .article-sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .article-header,
    .article-content,
    .article-footer {
        padding: 20px;
    }
    
    .article-title {
        font-size: 24px;
    }
    
    .article-meta {
        gap: 12px;
    }
    
    .product-detail {
        padding: 24px;
    }
    
    .main-image {
        height: 300px;
    }
    
    .product-info h1 {
        font-size: 24px;
    }
    
    .price {
        font-size: 28px;
    }
    
    .article-nav {
        flex-direction: column;
    }
    
    .share-buttons {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .article-header,
    .article-content,
    .article-footer {
        padding: 16px;
    }
    
    .article-title {
        font-size: 20px;
    }
    
    .product-detail {
        padding: 16px;
    }
    
    .main-image {
        height: 250px;
    }
    
    .thumbnail {
        width: 60px;
        height: 60px;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
} 