/* 产品页基础样式 */
.products-page {
    padding: 40px 0;
    background-color: #fff;
}

/* 面包屑 */
.breadcrumbs {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.breadcrumbs a {
    color: #666;
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: #f9b100;
}

/* 页面标题 */
.page-header {
    margin-bottom: 40px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.page-header h1 {
    font-size: 42px;
    font-weight: 700;
    color: #1a242f;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 16px;
    color: #666;
    max-width: 800px;
}

/* 产品布局：左侧边栏 + 右侧列表 */
.products-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}

/* 左侧侧边栏 */
.sidebar {
    background-color: #f8f9fa;
    padding: 30px 25px;
    height: fit-content;
}

.sidebar h2 {
    font-size: 18px;
    font-weight: 700;
    color: #1a242f;
    text-transform: uppercase;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f9b100;
}

/* 分类列表 */
.category-list {
    list-style: none;
    margin-bottom: 40px;
}

.category-list li {
    margin-bottom: 12px;
    padding: 8px 10px;
    position: relative;
    transition: background-color 0.3s ease;
}

.category-list li.active {
    background-color: #f9b100;
}

.category-list li.active a {
    color: #fff;
}

.category-list li a {
    color: #1a242f;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-list li:hover:not(.active) {
    background-color: #eee;
}

.count {
    font-size: 12px;
    color: #888;
}

.arrow {
    color: #fff;
    font-size: 12px;
}

/* 侧边栏辅助卡片 */
.help-card, .download-card {
    background-color: #fff;
    padding: 25px 20px;
    margin-bottom: 25px;
    text-align: center;
    border: 1px solid #eee;
}

.icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #f9b100;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 24px;
}

.help-card h3, .download-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1a242f;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.help-card p, .download-card p {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.small-btn {
    padding: 8px 15px;
    font-size: 12px;
    text-transform: uppercase;
}

/* 右侧产品列表容器 */
.product-grid-container {
    width: 100%;
}

/* 列表顶部控制栏 */
.grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 25px;
}

.result-count {
    font-size: 14px;
    color: #666;
}

.grid-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sort-by {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.sort-by select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    background-color: #fff;
    font-size: 14px;
    cursor: pointer;
}

.view-toggle {
    display: flex;
    gap: 5px;
}

.view-toggle button {
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    background-color: #fff;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.view-toggle button.active {
    background-color: #f9b100;
    color: #fff;
    border-color: #f9b100;
}

.view-toggle button:hover:not(.active) {
    border-color: #f9b100;
    color: #f9b100;
}

/* 产品卡片网格 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.product-card {
    background-color: #fff;
    border: 1px solid #eee;
    padding: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.product-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1a242f;
    margin-bottom: 10px;
    line-height: 1.4;
}

.product-card p {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.4;
}

.view-details {
    display: inline-block;
    font-size: 14px;
    color: #1a242f;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.view-details:hover {
    color: #f9b100;
}

.view-details i {
    font-size: 12px;
    margin-left: 5px;
}

/* 分页控件 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.prev-btn, .next-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    background-color: #fff;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.prev-btn:hover, .next-btn:hover {
    border-color: #f9b100;
    color: #f9b100;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.page-numbers li {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-numbers li a {
    color: #1a242f;
    text-decoration: none;
    font-weight: 500;
    display: block;
    width: 100%;
    height: 100%;
    line-height: 40px;
    text-align: center;
}

.page-numbers li.active {
    background-color: #f9b100;
    color: #fff;
}

.page-numbers li a:hover:not(.active) {
    color: #f9b100;
}

.ellipsis {
    color: #666;
    font-size: 16px;
}

/* ========== 响应式适配 ========== */
@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .products-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        padding: 20px;
    }

    .category-list-container {
        grid-column: 1 / -1;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 32px;
    }

    .grid-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .sidebar {
        grid-template-columns: 1fr;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .pagination {
        flex-wrap: wrap;
    }
}

@media (max-width: 576px) {
    .page-header h1 {
        font-size: 24px;
    }

    .grid-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .page-numbers li {
        width: 30px;
        height: 30px;
    }

    .page-numbers li a {
        line-height: 30px;
        font-size: 14px;
    }

    .prev-btn, .next-btn {
        width: 30px;
        height: 30px;
    }
}