<?php
// header.php
// Purpose: meta + CSS includes ONLY, plus an EMPTY slim header bar for spacing.
// No title, no buttons, no branding.

if (!isset($pageTitle)) $pageTitle = "Smurfette's Country Delights";
if (!isset($pageClass)) $pageClass = "";

// PHP 7 compatibility (some hosts still run it)
if (!function_exists('str_starts_with')) {
  function str_starts_with($haystack, $needle) {
    $haystack = (string)$haystack;
    $needle = (string)$needle;
    if ($needle === '') return true;
    return strncmp($haystack, $needle, strlen($needle)) === 0;
  }
}
if (!function_exists('str_contains')) {
  function str_contains($haystack, $needle) {
    $haystack = (string)$haystack;
    $needle = (string)$needle;
    if ($needle === '') return true;
    return strpos($haystack, $needle) !== false;
  }
}
?>
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">

  <title><?= htmlspecialchars($pageTitle) ?></title>

  <meta name="description" content="Smurfette’s Country Delights — country heart, jukebox soul, and a little jazz on the side.">
  <meta name="theme-color" content="#120a06">

  <link rel="icon" type="image/png" href="/assets/img/logos/favicon.png">

  <!-- CSS (order matters) -->
  <link rel="stylesheet" href="/assets/css/header.css">
  <link rel="stylesheet" href="/assets/css/nav.css">
  <link rel="stylesheet" href="/assets/css/footer.css">
  <link rel="stylesheet" href="/assets/css/main.css">
  <?php if ((isset($pageClass) && strpos($pageClass, 'page-admin') !== false) || strpos($_SERVER['PHP_SELF'] ?? '', '/admin/') === 0): ?>
  <link rel="stylesheet" href="/admin/assets/admin-v2.css">
  <?php endif; ?>
</head>

<body class="<?= htmlspecialchars($pageClass) ?>">

<header class="site-header" role="banner" aria-hidden="true"></header>