<?php
require_once __DIR__ . '/lib/bootstrap.php';
?>

<?php include 'header.php'; ?>
<?php include 'catbar.php'; ?>
<?php include 'attrbar.php'; ?>

<?php
$searchTerm = isset($_GET['search']) ? trim((string)$_GET['search']) : '';
$activeCategory = isset($_GET['category']) ? $_GET['category'] : 'all';

if ($searchTerm === '' && $activeCategory === 'all') {
    include 'ad_recommendation.php';
}
?>

<?php include 'compcards.php'; ?>

<?php include 'footer.php'; ?>
