/* ========================================
   产品列表页面 - 企业级布局样式
   ======================================== */

.pl-page {
    background: #f8fafc;
    min-height: 100vh;
    padding: 40px 0 80px;
    overflow-x: hidden;
}

.pl-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    box-sizing: border-box;
    align-items: start;
}

/* ========================================
   左侧分类导航
   ======================================== */
.pl-sidebar {
    position: sticky;
    top: 20px;
    align-self: flex-start;
    height: auto;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.pl-sidebar::-webkit-scrollbar {
    width: 4px;
}

.pl-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.pl-sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.pl-sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: #f1f5f9;
    color: #1f2937;
    border-radius: 0;
    font-weight: 600;
    font-size: 15px;
}

.pl-sidebar-header svg {
    opacity: 0.9;
}

.pl-category-nav {
    background: #fff;
    border-radius: 0;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.pl-category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    color: #4b5563;
    text-decoration: none;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}

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

.pl-category-item:hover {
    background: #f8fafc;
    color: #000;
    padding-left: 24px;
}

.pl-category-item.active {
    background: #f8fafc;
    color: #000;
    font-weight: 600;
    border-left: 3px solid #000;
}

.pl-category-name {
    font-size: 14px;
}

.pl-category-count {
    background: #f1f5f9;
    color: #64748b;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.pl-category-item.active .pl-category-count {
    background: #000;
    color: #fff;
}

/* ========================================
   联系方式组件
   ======================================== */
.pl-contact-card {
    margin-top: 20px;
    background: #fff;
    border-radius: 0;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.pl-contact-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: #f1f5f9;
    color: #1f2937;
    font-weight: 600;
    font-size: 14px;
}

.pl-contact-header svg {
    opacity: 0.9;
}

.pl-contact-body {
    padding: 16px 20px;
}

.pl-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.pl-contact-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 0;
    color: #000;
    flex-shrink: 0;
}

.pl-contact-info {
    flex: 1;
    min-width: 0;
}

.pl-contact-label {
    display: block;
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.pl-contact-value {
    display: block;
    font-size: 13px;
    color: #1f2937;
    text-decoration: none;
    word-break: break-all;
    transition: color 0.2s;
}

.pl-contact-value:hover {
    color: #000;
}

.pl-contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 16px;
    padding: 12px 20px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.pl-contact-btn:hover {
    background: #333;
}

/* 浅色按钮样式 */
.pl-contact-btn.pl-contact-btn-light {
    background: #f1f5f9;
    color: #1f2937;
    border: 1px solid #e2e8f0;
}

.pl-contact-btn.pl-contact-btn-light:hover {
    background: #e2e8f0;
    color: #000;
}

/* ========================================
   右侧主内容区
   ======================================== */
.pl-main {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.pl-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    padding: 16px 24px;
    border-radius: 0;
    border: 1px solid #e2e8f0;
    margin-bottom: 24px;
}

.pl-result-info {
    color: #6b7280;
    font-size: 14px;
}

.pl-result-info strong {
    color: #000;
    font-weight: 600;
}

.pl-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.pl-sort {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pl-sort label {
    color: #6b7280;
    font-size: 14px;
}

.pl-sort select {
    padding: 8px 32px 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 0;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") no-repeat right 10px center;
    background-size: 16px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    appearance: none;
    transition: border-color 0.2s;
}

.pl-sort select:hover {
    border-color: #000;
}

.pl-view-toggle {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: #f1f5f9;
    border-radius: 0;
}

.pl-view-toggle .pl-view-btn {
    padding: 8px;
    border: none;
    background: transparent;
    color: #94a3b8;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s;
}

.pl-view-toggle .pl-view-btn:hover {
    color: #64748b;
}

.pl-view-toggle .pl-view-btn.active {
    background: #fff;
    color: #000;
}

/* ========================================
   产品网格
   ======================================== */
.pl-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.pl-product-card {
    background: #fff;
    border-radius: 0;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.pl-product-card:hover {
    transform: translateY(-6px);
    border-color: #000;
}

.pl-product-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.pl-product-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f8fafc;
}

.pl-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.3s ease;
}

.pl-product-card:hover .pl-product-image img {
    transform: scale(1.1);
    filter: brightness(1.05);
}

.pl-product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #94a3b8;
}

.pl-product-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 6px;
}

.pl-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pl-badge-hot {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
}

.pl-badge-new {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
}

.pl-badge-recommend {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
}


.pl-product-info {
    padding: 20px;
}

.pl-product-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pl-product-desc {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pl-product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.pl-product-action {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #000;
    font-size: 13px;
    font-weight: 500;
    transition: gap 0.2s ease;
}

.pl-product-card:hover .pl-product-action {
    gap: 10px;
}

/* ========================================
   分页
   ======================================== */
.pl-pagination {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.pl-pagination .pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.pl-pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e2e8f0;
    border-radius: 0;
    background: #fff;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.pl-pagination .page-link:hover:not(.active):not(.disabled):not(.page-ellipsis) {
    background: #f1f5f9;
    border-color: #000;
    color: #000;
}

.pl-pagination .page-link.active {
    background: #000;
    border-color: #000;
    color: #fff;
}

.pl-pagination .page-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pl-pagination .page-link.page-ellipsis {
    border: none;
    background: transparent;
    min-width: 30px;
    cursor: default;
}

.pl-pagination .page-prev,
.pl-pagination .page-next {
    min-width: 40px;
}

.pl-pagination .pagination-info {
    font-size: 13px;
    color: #6b7280;
}

/* ========================================
   空状态
   ======================================== */
.pl-empty-state {
    text-align: center;
    padding: 80px 40px;
    background: #fff;
    border-radius: 0;
    border: 1px solid #e2e8f0;
}

.pl-empty-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

.pl-empty-state h3 {
    font-size: 24px;
    color: #374151;
    margin: 0 0 12px;
}

.pl-empty-state p {
    color: #6b7280;
    margin: 0 0 24px;
}

.pl-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: #000;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.pl-empty-btn:hover {
    background: #333;
    transform: translateY(-2px);
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 1200px) {
    .pl-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .pl-container {
        grid-template-columns: 1fr;
    }
    
    .pl-sidebar {
        position: static;
    }
    
    .pl-category-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        padding: 16px;
    }
    
    .pl-category-item {
        padding: 8px 16px;
        border: 1px solid #e2e8f0;
        border-radius: 20px;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .pl-category-item.active {
        border-left: 1px solid #3b82f6;
        border-color: #3b82f6;
        background: #eff6ff;
    }
    
    .pl-category-count {
        display: none;
    }
}

@media (max-width: 768px) {
    .pl-page {
        padding: 24px 0 60px;
    }
    
    .pl-container {
        padding: 0 16px;
    }
    
    .pl-toolbar {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .pl-toolbar-actions {
        justify-content: space-between;
    }
    
    .pl-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .pl-product-info {
        padding: 16px;
    }
    
    .pl-product-title {
        font-size: 14px;
    }
    
    .pl-product-desc {
        display: none;
    }
}

@media (max-width: 480px) {
    .pl-products-grid {
        grid-template-columns: 1fr;
    }
}
