<!doctype html>
<html lang="pl">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title><?= $e($title ?? 'orderPRO') ?></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=Roboto:wght@400;500;700&display=swap" rel="stylesheet">
  <style>
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    body {
      font-family: 'Roboto', sans-serif;
      background: #f5f7fa;
      color: #2d3748;
      line-height: 1.6;
      min-height: 100vh;
    }
    .public-page {
      max-width: 720px;
      margin: 0 auto;
      padding: 48px 24px;
    }
    @media (max-width: 768px) {
      .public-page { padding: 24px 16px; }
    }
  </style>
</head>
<body>
  <main class="public-page">
    <?php $flashEntries = \App\Core\Support\Flash::all(); ?>
    <?php if (!empty($flashEntries)): ?>
      <div class="alerts-stack" data-flash-stack>
        <?php foreach ($flashEntries as $flashEntry): ?>
          <?php $type = (string) ($flashEntry['type'] ?? 'info'); ?>
          <?php $message = (string) ($flashEntry['message'] ?? ''); ?>
          <?php $dismissible = true; ?>
          <?php include __DIR__ . '/../components/alert.php'; ?>
        <?php endforeach; ?>
      </div>
    <?php endif; ?>
    <?= $content ?>
  </main>
  <script src="/assets/js/modules/alert-dismiss.js?ver=<?= filemtime(dirname(__DIR__, 3) . '/public/assets/js/modules/alert-dismiss.js') ?: 0 ?>"></script>
</body>
</html>
