/* ========================================
   列表页和详情页样式
   ======================================== */

/* 页面头部 */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 40px 0;
}

.page-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.breadcrumb {
    font-size: 14px;
    opacity: 0.8;
}

.breadcrumb a {
    color: var(--white);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* ========================================
   列表页样式
   ======================================== */
.list-page {
    padding: 40px 0;
}

.list-container {
    display: grid;
    gap: 30px;
}

/* 筛选栏 */
.filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.filter-btn {
    padding: 8px 20px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-color);
    transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

/* 列表项 */
.list-section {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
}

.list-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.list-section-header h2 {
    font-size: 18px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.list-section-header h2 i {
    color: var(--primary-color);
}

.list-section-header a {
    color: var(--primary-color);
    font-size: 14px;
}

.list-items {
    padding: 0;
}

.list-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s;
    cursor: pointer;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item:hover {
    background: #fafbfc;
}

.list-item-img {
    width: 80px;
    height: 80px;
    min-width: 80px;
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.list-item-img i {
    font-size: 28px;
    color: var(--primary-color);
    opacity: 0.7;
}

.list-item-img img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.list-item-content {
    flex: 1;
}

.list-item-tag {
    display: inline-block;
    padding: 3px 10px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 3px;
    font-size: 12px;
    margin-bottom: 8px;
}

.list-item-title {
    font-size: 16px;
    color: var(--text-color);
    margin-bottom: 8px;
    line-height: 1.4;
}

.list-item-title:hover {
    color: var(--primary-color);
}

.list-item-desc {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.list-item-meta {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-muted);
}

.list-item-meta i {
    margin-right: 5px;
}

.list-item-price {
    font-size: 18px;
    font-weight: 700;
    color: #ff4d4f;
    margin-top: 10px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 20px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    color: var(--text-color);
    transition: all 0.3s;
}

.pagination a:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination .active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

/* ========================================
   详情页样式
   ======================================== */
.detail-page {
    padding: 40px 0;
}

.detail-container {
    display: grid;
    gap: 30px;
    min-height: 300px;
}

/* 文章内容 */
.article-content {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.article-header {
    padding: 30px;
    border-bottom: 1px solid var(--border-color);
}

.article-tag {
    display: inline-block;
    padding: 5px 15px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 15px;
}

.article-title {
    font-size: 26px;
    color: var(--text-color);
    line-height: 1.4;
    margin-bottom: 20px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 14px;
    color: var(--text-light);
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-meta i {
    color: var(--primary-color);
    opacity: 0.6;
}

.article-body {
    padding: 30px;
    border:0;
}

.article-cover {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #e6f2ff 0%, #cce5ff 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    overflow: hidden;
}

.article-cover img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.article-cover i {
    font-size: 80px;
    color: var(--primary-color);
    opacity: 0.5;
}

.article-text {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-color);
}

.article-text p {
    margin-bottom: 20px;
    text-indent:0em;
}

.article-text h3 {
    font-size: 20px;
    margin: 30px 0 15px;
    padding-left: 15px;
    border-left: 4px solid var(--primary-color);
}

.article-text ul {
    margin: 15px 0;
    padding-left: 2em;
}

.article-text li {
    margin-bottom: 10px;
    list-style: disc;
}

.article-text .highlight {
    background: #fff7e6;
    padding: 15px 20px;
    border-left: 4px solid #faad14;
    border-radius: 0 8px 8px 0;
    margin: 20px 0;
}

/* 文章底部 */
.article-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.article-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.article-tags a {
    padding: 5px 12px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 13px;
    color: var(--text-light);
    transition: all 0.3s;
}

.article-tags a:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.article-actions {
    display: flex;
    gap: 15px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 15px;
    background: #f5f5f5;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-color);
    transition: all 0.3s;
}

.action-btn:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.action-btn.liked {
    background: #fff1f0;
    color: #ff4d4f;
}

/* 相关推荐 */
.related-section {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    padding: 20px;
    margin-top: 25px;
}

.related-title {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.related-title i {
    color: var(--primary-color);
}

.related-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.related-item {
    padding: 15px;
    background: #fafafa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.related-item:hover {
    background: #f0f7ff;
}

.related-item-img {
    width: 100%;
    height: 80px;
    background: linear-gradient(135deg, #e6f2ff 0%, #cce5ff 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    overflow: hidden;
}

.related-item-img img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.related-item-img i {
    font-size: 28px;
    color: var(--primary-color);
    opacity: 0.6;
}

.related-item h4 {
    font-size: 14px;
    color: var(--text-color);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 产品详情样式 */
.product-detail {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.product-gallery {
    padding: 30px;
    display: flex;
    gap: 30px;
}

.product-main-img {
    width: 400px;
    height: 400px;
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.product-main-img img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.product-main-img i {
    font-size: 120px;
    color: var(--primary-color);
    opacity: 0.5;
}

.product-info {
    flex: 1;
}

.product-info .product-tag {
    display: inline-block;
    padding: 5px 15px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 15px;
}

.product-info h1 {
    font-size: 24px;
    color: var(--text-color);
    margin-bottom: 15px;
    line-height: 1.4;
}

.product-info .desc {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
}

.product-info .price-box {
    padding: 20px;
    background: #fff7e6;
    border-radius: 8px;
    margin-bottom: 20px;
}

.product-info .price-label {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.product-info .price {
    font-size: 32px;
    font-weight: 700;
    color: #ff4d4f;
}

.product-info .price span {
    font-size: 16px;
}

.product-info .btn-group {
    display: flex;
    gap: 15px;
}

.btn-primary {
    padding: 12px 40px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    padding: 12px 40px;
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

.product-specs {
    padding: 30px;
    border-top: 1px solid var(--border-color);
}

.product-specs h3 {
    font-size: 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-specs h3 i {
    color: var(--primary-color);
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
}

.spec-table tr {
    border-bottom: 1px solid #f0f0f0;
}

.spec-table tr:last-child {
    border-bottom: none;
}

.spec-table th,
.spec-table td {
    padding: 12px 15px;
    text-align: left;
    font-size: 14px;
}

.spec-table th {
    background: #fafafa;
    color: var(--text-light);
    font-weight: 500;
    width: 120px;
}

.spec-table td {
    color: var(--text-color);
}

/* ========================================
   侧边栏样式
   ======================================== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-widget {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.widget-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    font-size: 16px;
    font-weight: 500;
}

.widget-content {
    padding: 15px 20px;
}

/* 热门排行 */
.rank-list {
    list-style: none;
}

.rank-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}

.rank-item:last-child {
    border-bottom: none;
}

.rank-item:hover .rank-title {
    color: var(--primary-color);
}

.rank-num {
    width: 22px;
    height: 22px;
    background: #e0e0e0;
    color: var(--text-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.rank-item:nth-child(1) .rank-num {
    background: #ff4d4f;
    color: var(--white);
}

.rank-item:nth-child(2) .rank-num {
    background: #ff7a45;
    color: var(--white);
}

.rank-item:nth-child(3) .rank-num {
    background: #ffa940;
    color: var(--white);
}

.rank-title {
    font-size: 14px;
    color: var(--text-color);
    line-height: 1.4;
    transition: color 0.3s;
}

/* 分类列表 */
.category-list {
    list-style: none;
}

.category-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.category-list li:last-child {
    border-bottom: none;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-color);
    font-size: 14px;
    transition: color 0.3s;
}

.category-list a:hover {
    color: var(--primary-color);
}

.category-list .count {
    color: var(--text-muted);
    font-size: 12px;
}

/* 推荐阅读 */
.recommend-list {
    list-style: none;
}

.recommend-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}

.recommend-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.recommend-item:hover .recommend-title {
    color: var(--primary-color);
}

.recommend-img {
    width: 60px;
    height: 60px;
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.recommend-img img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.recommend-img i {
    font-size: 20px;
    color: var(--primary-color);
    opacity: 0.6;
}

.recommend-info {
    flex: 1;
}

.recommend-title {
    font-size: 14px;
    color: var(--text-color);
    line-height: 1.4;
    margin-bottom: 5px;
    transition: color 0.3s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recommend-meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* 联系方式小部件 */
.widget-content p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.widget-content .contact-phone {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0;
}

/* ========================================
   响应式样式
   ======================================== */
@media (max-width: 1024px) {
    .list-container,
    .detail-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .product-gallery {
        flex-direction: column;
        align-items: center;
    }

    .product-main-img {
        width: 100%;
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .filter-bar {
        flex-wrap: wrap;
    }

    .filter-btn {
        padding: 6px 15px;
        font-size: 13px;
    }

    .list-item {
        flex-direction: column;
        gap: 12px;
    }

    .list-item-img {
        width: 100%;
        height: 120px;
    }

    .article-title {
        font-size: 22px;
    }

    .article-meta {
        gap: 15px;
    }

    .article-footer {
        flex-direction: column;
        gap: 15px;
    }

    .related-list {
        grid-template-columns: 1fr;
    }

    .product-info .btn-group {
        flex-direction: column;
    }
}
