<?php
// Test file to verify the clothing page improvements
require_once 'includes/config.php';
require_once 'includes/db.php';
require_once 'includes/functions.php';

// Test database connection
try {
    $pdo->query("SELECT 1");
    echo "<h2>Database Connection: SUCCESS</h2>";
} catch (Exception $e) {
    echo "<h2>Database Connection: FAILED</h2>";
    echo "<p>Error: " . $e->getMessage() . "</p>";
}

// Test product retrieval
try {
    $products = getAllProducts($pdo);
    echo "<h2>Product Retrieval: SUCCESS</h2>";
    echo "<p>Found " . count($products) . " products in the database.</p>";
    
    // Check if we have clothing products
    $clothingProducts = getProductsByCategory($pdo, 'Clothing');
    echo "<h2>Clothing Category: SUCCESS</h2>";
    echo "<p>Found " . count($clothingProducts) . " clothing products.</p>";
} catch (Exception $e) {
    echo "<h2>Product Retrieval: FAILED</h2>";
    echo "<p>Error: " . $e->getMessage() . "</p>";
}

echo "<h2>Design Improvements Summary</h2>";
echo "<ul>";
echo "<li>Enhanced product card design with better hover effects</li>";
echo "<li>Improved filter section layout and styling</li>";
echo "<li>Better responsive design for mobile devices</li>";
echo "<li>Added category descriptions for better UX</li>";
echo "<li>Enhanced empty state messaging</li>";
echo "</ul>";

echo "<p><a href='/storeweb/products/index.php?category=Clothing'>View Improved Clothing Page</a></p>";
?>