/* ============================================
   PRODUCTS LIST PAGE
   لیست محصولات
   ============================================ */

.products-page {
    max-width: 1400px;
    margin: 0 auto;
}

.page-header {
    background: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.page-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.page-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.products-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
}

/* Filter Sidebar */
.filter-sidebar {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.filter-section {
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-section h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text-primary);
}

.category-filter li {
    margin-bottom: 8px;
}

.category-filter a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
}

.category-filter a:hover,
.category-filter a.active {
    background: #fef2f4;
    color: var(--primary-color);
}

.category-filter .count {
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 2px 8px;
    border-radius: 10px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
}

.filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

/* Products Content */
.products-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    min-height: 400px;
}

/* Toolbar */
.products-toolbar {
    background: white;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

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

.sort-options > span {
    color: var(--text-secondary);
    font-size: 14px;
    margin-left: 8px;
}

.sort-btn {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    transition: var(--transition);
    background: transparent;
}

.sort-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.sort-btn.active {
    background: var(--primary-color);
    color: white;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.empty-state svg {
    margin-bottom: 20px;
    opacity: 0.3;
    color: var(--text-primary);
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-weight: 700;
}

.empty-state p {
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 30px;
    padding: 20px 0;
}

.page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    background: white;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.page-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #fef2f4;
}

.page-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-dots {
    padding: 0 8px;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1024px) {
    .products-layout {
        grid-template-columns: 1fr;
    }
    
    .filter-sidebar {
        position: static;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .sort-options {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }
    
    .sort-btn {
        white-space: nowrap;
    }
    
    .page-header h1 {
        font-size: 20px;
    }
    
    .products-content {
        padding: 16px;
    }
}