<!-- app/Modules/Frontend/Views/partials/_whatsapp.php -->
<?php
$whatsappNumber = $settings['whatsapp_number'] ?? null;
if (!empty($whatsappNumber)):
    $cleanNumber = preg_replace('/[^0-9]/', '', $whatsappNumber);
    if (strlen($cleanNumber) >= 9):
?>
<a 
  href="https://wa.me/<?= $cleanNumber ?>?text=<?= urlencode("Hi! I'm interested in a Mount Kenya trek.") ?>" 
  class="fixed bottom-6 right-6 w-16 h-16 bg-[#25d366] rounded-full flex items-center justify-center text-white text-2xl shadow-lg z-50 hover:bg-[#128c7e] transition"
  target="_blank" 
  rel="noopener noreferrer" 
  aria-label="Chat on WhatsApp"
>
  💬
</a>
<?php
    endif;
endif;
?>