<?php
require_once __DIR__ . '/../database/db.php';
$pageTitle = $pageTitle ?? 'PetCare';
$currentPage = basename($_SERVER['PHP_SELF']);
?>
<!DOCTYPE html>
<html lang="es">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title><?= htmlspecialchars($pageTitle) ?></title>
    <link rel="preconnect" href="https://fonts.googleapis.com" />
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet" />
    <link rel="stylesheet" href="styles.css" />
    <script defer src="script.js"></script>
  </head>
  <body>
    <header class="site-header">
      <div class="container nav-bar">
        <div class="brand">
          <img class="brand-logo" src="assets/images/Logo.png" alt="PetCare Logo" />
          <span>PETCARE</span>
        </div>
        <nav class="nav-links">
          <a href="index.php" <?= $currentPage === 'index.php' ? 'aria-current="page"' : '' ?>>Inicio</a>
          <a href="productos.php" <?= $currentPage === 'productos.php' ? 'aria-current="page"' : '' ?>>Productos</a>
          <a href="galeria.php" <?= $currentPage === 'galeria.php' ? 'aria-current="page"' : '' ?>>Galería</a>
          <a href="contacto.php" <?= $currentPage === 'contacto.php' ? 'aria-current="page"' : '' ?>>Contacto</a>
        </nav>
        <div class="header-actions">
          <a href="pedidos.php" class="cart-btn">Pedidos</a>
          <div class="auth-buttons">
            <a href="registro.php" class="btn btn-secondary">Registrarse</a>
            <a href="login.php" class="btn btn-outline">Iniciar sesión</a>
          </div>
        </div>
      </div>
    </header>

    <main>
