<?php
// Quick test to show product count
$json_file = __DIR__ . '/data/products.json';

if (file_exists($json_file)) {
    $content = file_get_contents($json_file);
    $products = json_decode($content, true);
    echo "✅ Products JSON file found<br>";
    echo "✅ Total products: <strong>" . count($products) . "</strong><br><br>";
    
    echo "First 5 products:<br>";
    $count = 0;
    foreach ($products as $prod) {
        if ($count++ >= 5) break;
        echo "• ID {$prod['id']}: {$prod['title']} - \${$prod['price']}<br>";
    }
} else {
    echo "❌ Products JSON file NOT found at: $json_file";
}
?>
