<?php
header('Content-Type: application/xml; charset=utf-8');
$currentProtocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http';
$currentHostRaw = $_SERVER['HTTP_HOST'] ?? ($_SERVER['SERVER_NAME'] ?? '');
$base = htmlspecialchars($currentProtocol . '://' . $currentHostRaw, ENT_XML1, 'UTF-8');
$urls = ['/', '/wabi-sabi/', '/life/', '/images/', '/ai/', '/salon/', '/contact/', '/dry-garden/', '/still-life/', '/ceramics/', '/negative-space/', '/zen-poems/'];
echo '<?xml version="1.0" encoding="UTF-8"?>' . "
";
?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<?php foreach ($urls as $path): ?>
  <url>
    <loc><?php echo $base . $path; ?></loc>
    <lastmod><?php echo date('Y-m-d'); ?></lastmod>
    <changefreq>weekly</changefreq>
    <priority><?php echo $path === '/' ? '1.0' : '0.7'; ?></priority>
  </url>
<?php endforeach; ?>
</urlset>
