/* 产品展示区样式 */

/* 产品展示区 */
.home-products {
    padding: 28px 0 20px;
    background: #fff;
}

.home-products-header {
    display: flex;
    align-items: center;
    margin-bottom: 26px;
}

.home-products-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.home-products-title {
    font-size: 34px;
    font-size: 22px;
    font-weight: 600;
    color: #2d2d2d;
}

.home-products-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    background: #38853b;
    margin-right: 10px;
}

.home-products-title-en {
    font-size: 18px;
    color: #5b5b5b;
    font-weight: 400;
}

.home-products-keywords {
    flex: 1;
    color: #4c4c4c;
    font-size: 14px;
    text-align: right;
    margin-right: 15px;
}

.keyword-tag {
    color: #666;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.keyword-tag:hover {
    color: #6FB344;
    text-decoration: underline;
}

.home-products-search {
    width: 190px;
    flex-shrink: 0;
}

.home-products-search input {
    width: 100%;
    height: 32px;
    border: 1px solid #b5b5b5;
    border-radius: 22px;
    padding: 0 18px;
    outline: none;
    color: #666;
    background: #fff;
}

.home-products-content {
    display: flex;
    align-items: stretch;
    gap: 34px;
}

.home-products-sidebar {
    width: 190px;
    background: #F9F9F9;
    border-radius: 10px;
    padding: 16px 16px 24px;
    display: flex;
    flex-direction: column;
    min-height: 1000px;
}

.home-products-category {
    height: 40px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #4e4e4e;
    transition: all 0.3s;
    background: linear-gradient(180deg, #ffffff 0%, #d8d8d8 100%);
    margin-bottom: 18px;
}

.home-products-category.active {
    background: linear-gradient(180deg, #51aa4e 0%, #0b6215 100%);
    color: #fff;
    font-weight: 600;
}

.home-products-category.muted {
    background: linear-gradient(180deg, #ffffff 0%, #d8d8d8 100%);
}

.home-products-subcategory-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    margin: 10px 0 24px;
    overflow: hidden;
    transition: max-height 0.3s ease, margin 0.3s ease;
    max-height: 500px;
}

.home-products-subcategory-list.is-collapsed {
    max-height: 0;
    margin: 0;
}

.home-products-subcategory-list a {
    font-size: 16px;
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.home-products-subcategory-list a.active {
    color: #4fa15b;
    font-weight: 600;
}

.home-products-qrcode {
    margin-top: auto;
    text-align: center;
    padding-top: 20px;
    padding-bottom: 0;
}

.home-products-qrcode-box {
    width: 120px;
    height: 120px;
    margin: 0 auto 10px;
    border: 8px solid #fff;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.home-products-qrcode-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.home-products-qrcode-text {
    font-size: 18px;
    color: #474747;
    margin-bottom: 4px;
}

.home-products-qrcode-tip {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
}

.home-products-main {
    flex: 1;
}

.home-products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px 20px;
}

.home-products-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.home-product-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s;
}

.home-product-card:hover {
    transform: translateY(-5px);
}

.home-product-image {
    width: 100%;
    height: 250px;
    border: 1px solid #e4e4e4;
    background: #fff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.home-product-card:hover .home-product-image img {
    transform: scale(1.05);
}

.home-product-name {
    padding-top: 14px;
    font-size: 16px;
    color: #444;
    text-align: center;
    line-height: 1.5;
}

.home-products-pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.home-products-pagination .pagination {
    display: flex;
    align-items: center;
    gap: 8px;
}

.home-products-pagination .pagination-prev,
.home-products-pagination .pagination-next,
.home-products-pagination .pagination-page {
    padding: 8px 16px;
    border: 1px solid #e4e4e4;
    border-radius: 4px;
    background: #fff;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.home-products-pagination .pagination-prev:hover,
.home-products-pagination .pagination-next:hover,
.home-products-pagination .pagination-page:not(.active):hover {
    background: #f5f5f5;
    border-color: #38853b;
    color: #38853b;
}

.home-products-pagination .pagination-page.active {
    background: #38853b;
    border-color: #38853b;
    color: #fff;
    cursor: default;
    font-weight: 600;
}

.home-products-pagination .pagination-prev.disabled,
.home-products-pagination .pagination-next.disabled {
    color: #ccc;
    border-color: #e4e4e4;
    cursor: not-allowed;
    pointer-events: none;
}

.home-products-pagination .pagination-ellipsis {
    padding: 8px 12px;
    color: #999;
}

.home-products-pagination .pagination-info {
    margin-left: 16px;
    color: #666;
    font-size: 14px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 16px;
}

/* 产品展示区移动端响应式 */
@media (max-width: 768px) {
    .home-products {
        padding: 20px 0;
    }

    .home-products-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        margin-bottom: 20px;
    }

    .home-products-title-wrap {
        justify-content: center;
    }

    .home-products-title {
        font-size: 20px;
    }

    .home-products-title-en {
        font-size: 14px;
    }

    .home-products-keywords {
        text-align: center;
        font-size: 13px;
    }

    .home-products-search {
        width: 100%;
    }

    .home-products-content {
        flex-direction: column;
        gap: 20px;
    }

    .home-products-sidebar {
        width: 100%;
        padding: 15px;
        min-height: auto;
        border-radius: 8px;
    }

    .home-products-category {
        height: 36px;
        font-size: 14px;
        margin-bottom: 12px;
    }

    .home-products-subcategory-list {
        gap: 10px;
        margin: 8px 0 16px;
    }

    .home-products-subcategory-list a {
        font-size: 14px;
        padding: 8px 12px;
        text-align: center;
        display: block;
    }

    .home-products-qrcode {
        display: none;
    }

    .home-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px;
    }

    .home-product-card {
        font-size: 14px;
    }

    .home-products-pagination {
        margin-top: 20px;
    }

    .home-products-pagination .pagination {
        flex-wrap: wrap;
        gap: 5px;
    }

    .home-products-pagination .pagination-prev,
    .home-products-pagination .pagination-next,
    .home-products-pagination .pagination-page {
        padding: 6px 12px;
        font-size: 13px;
    }

    .home-products-pagination .pagination-info {
        width: 100%;
        text-align: center;
        margin: 10px 0 0 0;
    }
}

@media (max-width: 480px) {
    .home-products-title {
        font-size: 18px;
    }

    .home-products-title::before {
        width: 3px;
        height: 16px;
        margin-right: 8px;
    }

    .home-products-keywords {
        font-size: 12px;
    }

    .keyword-tag {
        font-size: 12px;
    }

    .home-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .home-product-card {
        font-size: 13px;
    }

    .home-products-pagination .pagination-prev,
    .home-products-pagination .pagination-next,
    .home-products-pagination .pagination-page {
        padding: 5px 10px;
        font-size: 12px;
    }

    .home-products-pagination .pagination-ellipsis {
        padding: 5px 8px;
    }
}
