/* ========================================
   QUNHUI Products List Page Stylesheet
   产品列表页专用样式
   ======================================== */

/* Page Hero Banner */
.pl-hero {
    position: relative;
    height: 600px;
    background: linear-gradient(135deg, var(--zs-bg-dark) 0%, var(--zs-bg-dark-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.pl-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../img/1 排屑机.webp') center/cover no-repeat;
    opacity: 0.5;
}

.pl-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 22, 41, 0.08) 0%, rgba(26, 39, 68, 0.05) 100%);
    z-index: 1;
}

.pl-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.pl-hero h1 {
    color: var(--zs-white);
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 20px;
    line-height: 1.3;
}

.pl-hero h1 strong {
    color: var(--zs-primary-light);
}

.pl-hero p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Breadcrumb - 在banner底部，覆盖在图片上 */
.pl-breadcrumb {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 18px 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    z-index: 10;
}

.pl-breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    font-size: 0.875rem;
}

.pl-breadcrumb-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--zs-text-gray);
}

.pl-breadcrumb-list li:not(:last-child)::after {
    content: '/';
    color: var(--zs-text-light);
}

.pl-breadcrumb-list a {
    color: var(--zs-text-gray);
    text-decoration: none;
    transition: color 0.3s;
}

.pl-breadcrumb-list a:hover {
    color: var(--zs-primary);
}

.pl-breadcrumb-list li.active {
    color: var(--zs-text-dark);
    font-weight: 500;
}

/* Main Section */
.pl-main {
    padding: 40px 0 80px;
    background: var(--zs-white);
}

.pl-wrapper {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 40px;
    align-items: start;
}

/* Sidebar */
.pl-sidebar {
    background: var(--zs-white);
    border-radius: var(--zs-radius-lg);
    overflow: hidden;
    position: sticky;
    top: 100px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--zs-border);
}

.pl-sidebar-header {
    padding: 24px;
    background: var(--zs-white);
    color: var(--zs-text-dark);
    border-bottom: 1px solid var(--zs-border);
}

.pl-sidebar-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pl-sidebar-header h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--zs-primary);
    border-radius: 2px;
}

/* Category List */
.pl-category-list {
    list-style: none;
    padding: 8px;
    margin: 0;
}

.pl-category-item {
    margin-bottom: 4px;
    border-radius: var(--zs-radius-md);
    overflow: hidden;
    border: none;
}

.pl-category-item:last-child {
    margin-bottom: 0;
}

.pl-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--zs-text-dark);
    transition: all 0.3s;
    border-radius: var(--zs-radius-md);
    background: var(--zs-bg-light);
}

.pl-category-header:hover {
    background: rgba(0, 102, 204, 0.1);
    color: var(--zs-primary);
}

.pl-category-item.active .pl-category-header {
    color: var(--zs-white);
    background: var(--zs-primary);
}

.pl-category-arrow {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    transition: transform 0.3s;
}

.pl-category-item.active .pl-category-arrow {
    transform: rotate(180deg);
}

/* Subcategory List */
.pl-subcategory-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: transparent;
}

.pl-category-item.active .pl-subcategory-list {
    max-height: 500px;
    padding: 8px 0 8px 16px;
}

.pl-subcategory-list li {
    border: none;
    margin-bottom: 2px;
}

.pl-subcategory-list li:last-child {
    margin-bottom: 0;
}

.pl-subcategory-list a {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: var(--zs-text-gray);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s;
    border-radius: var(--zs-radius-sm);
    position: relative;
}

.pl-subcategory-list a::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--zs-border);
    border-radius: 50%;
    margin-right: 12px;
    transition: all 0.3s;
}

.pl-subcategory-list a:hover,
.pl-subcategory-list a.active {
    color: var(--zs-primary);
    background: rgba(0, 102, 204, 0.08);
}

.pl-subcategory-list a:hover::before,
.pl-subcategory-list a.active::before {
    background: var(--zs-primary);
    transform: scale(1.2);
}


/* Content Area */
.pl-content {
    min-height: 600px;
}

/* Toolbar */
.pl-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--zs-bg-light);
    border-radius: var(--zs-radius-md);
    margin-bottom: 24px;
}

.pl-toolbar-left {
    font-size: 0.9rem;
    color: var(--zs-text-gray);
}

.pl-result-count strong {
    color: var(--zs-text-dark);
    font-weight: 600;
}

.pl-toolbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* View Toggle */
.pl-view-toggle {
    display: flex;
    gap: 4px;
    background: var(--zs-white);
    padding: 4px;
    border-radius: var(--zs-radius-sm);
    border: 1px solid var(--zs-border);
}

.pl-view-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.pl-view-btn svg {
    width: 20px;
    height: 20px;
    fill: var(--zs-text-light);
    transition: fill 0.3s;
}

.pl-view-btn:hover svg {
    fill: var(--zs-primary);
}

.pl-view-btn.active {
    background: var(--zs-primary);
}

.pl-view-btn.active svg {
    fill: var(--zs-white);
}

/* Product Grid View */
.pl-products {
    display: grid;
    gap: 20px;
}

.pl-products.pl-grid-view {
    grid-template-columns: repeat(4, 1fr);
}

.pl-products.pl-list-view {
    grid-template-columns: 1fr;
}

/* Product Card - Grid View */
.pl-product-card {
    background: var(--zs-white);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--zs-border);
    transition: all 0.4s var(--zs-transition);
}

.pl-product-card:hover {
    box-shadow: 0 15px 40px rgba(0, 102, 204, 0.12);
    border-color: var(--zs-primary);
    transform: translateY(-5px);
}

.pl-grid-view .pl-product-img {
    position: relative;
    padding-bottom: 100%;
    overflow: hidden;
    background: var(--zs-bg-light);
}

.pl-grid-view .pl-product-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.pl-product-card:hover .pl-product-img img {
    transform: scale(1.08);
}

.pl-grid-view .pl-product-info {
    padding: 20px;
    text-align: center;
    background: var(--zs-white);
}

.pl-grid-view .pl-product-info h4 {
    font-size: 0.9375rem;
    color: var(--zs-text-dark);
    margin-bottom: 12px;
    line-height: 1.5;
    font-weight: 600;
}

.pl-grid-view .pl-product-desc {
    display: none;
}

.pl-product-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--zs-primary);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.pl-product-link:hover {
    gap: 10px;
    color: var(--zs-primary-dark);
}

.pl-product-link svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Product Card - List View */
.pl-list-view .pl-product-card {
    display: flex;
    align-items: stretch;
}

.pl-list-view .pl-product-card:hover {
    transform: translateX(5px);
}

.pl-list-view .pl-product-img {
    width: 240px;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--zs-bg-light);
}

.pl-list-view .pl-product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.pl-list-view .pl-product-info {
    flex: 1;
    padding: 24px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pl-list-view .pl-product-info h4 {
    font-size: 1.25rem;
    color: var(--zs-text-dark);
    margin-bottom: 12px;
}

.pl-list-view .pl-product-desc {
    display: block;
    color: var(--zs-text-gray);
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 16px;
}


/* Pagination */
.pl-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    padding-top: 24px;
}

.pl-page-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--zs-white);
    border: 1px solid var(--zs-border);
    border-radius: var(--zs-radius-sm);
    cursor: pointer;
    transition: all 0.3s;
}

.pl-page-btn:hover:not(:disabled) {
    border-color: var(--zs-primary);
    color: var(--zs-primary);
}

.pl-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pl-page-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.pl-page-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pl-page-num {
    min-width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--zs-white);
    border: 1px solid var(--zs-border);
    border-radius: var(--zs-radius-sm);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--zs-text-dark);
    cursor: pointer;
    transition: all 0.3s;
}

.pl-page-num:hover {
    border-color: var(--zs-primary);
    color: var(--zs-primary);
}

.pl-page-num.active {
    background: var(--zs-primary);
    border-color: var(--zs-primary);
    color: var(--zs-white);
}

.pl-page-dots {
    padding: 0 8px;
    color: var(--zs-text-light);
}

/* Responsive Styles */
@media (max-width: 1400px) {
    .pl-products.pl-grid-view {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1200px) {
    .pl-wrapper {
        grid-template-columns: 280px 1fr;
        gap: 30px;
    }
    
    .pl-products.pl-grid-view {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .pl-hero {
        height: 400px;
    }
    
    .pl-wrapper {
        grid-template-columns: 1fr;
    }
    
    .pl-sidebar {
        position: relative;
        top: 0;
    }
    
    .pl-products.pl-grid-view {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .pl-list-view .pl-product-img {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .pl-hero {
        height: 300px;
    }
    
    .pl-main {
        padding: 30px 0 60px;
    }
    
    .pl-products.pl-grid-view {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pl-list-view .pl-product-card {
        flex-direction: column;
    }
    
    .pl-list-view .pl-product-img {
        width: 100%;
        height: 200px;
    }
    
    .pl-toolbar {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .pl-pagination {
        flex-wrap: wrap;
    }
    
    .pl-page-numbers {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .pl-products.pl-grid-view {
        grid-template-columns: 1fr;
    }
}
