+
+ {category === 'all' ? 'All Books' : `${category} Books`}
+
+
+
+ {/* Category Filter */}
+
+
+
+
+
+
+ {/* Search Input */}
+
+
+
+
+
+ {/* Sort Order */}
+
+
+
+
+
+
+
+ {paginatedBooks.length > 0 ? (
+
({
+ id: book.id,
+ name: book.name,
+ price: book.price,
+ imageSrc: book.imageSrc,
+ imageAlt: book.imageAlt
+ // Add other necessary product props, e.g., onFavorite, onProductClick
+ }))}
+ className="mb-8"
+ />
+ ) : (
+
+ No books found for this category or search term.
+
+ )}
+
+ {/* Pagination */}
+ {totalPages > 1 && (
+
+ handlePageChange(currentPage - 1)}
+ disabled={currentPage === 1}
+ ariaLabel="Previous page"
+ className="w-10 h-10 p-0 flex items-center justify-center bg-secondary-cta hover:bg-secondary-cta/80 disabled:opacity-50 disabled:cursor-not-allowed"
+ textClassName="sr-only"
+ >
+
+
+ {Array.from({ length: totalPages }, (_, i) => i + 1).map(page => (
+
+ ))}
+ handlePageChange(currentPage + 1)}
+ disabled={currentPage === totalPages}
+ ariaLabel="Next page"
+ className="w-10 h-10 p-0 flex items-center justify-center bg-secondary-cta hover:bg-secondary-cta/80 disabled:opacity-50 disabled:cursor-not-allowed"
+ textClassName="sr-only"
+ >
+
+
+
+ )}
+
+