<?php
if (!isset($section_settings)) {
    return;
}

$title       = $section_settings['title']       ?? __('sections.cta.title', 'Ready to Order?');
$subtitle    = $section_settings['subtitle']    ?? __('sections.cta.subtitle', 'Fill in your details and confirm your order now');
$button_text = $section_settings['button_text'] ?? __('sections.cta.button', 'Order Now');
$button_url  = $section_settings['button_url']  ?? '#checkout';
$note        = $section_settings['note']        ?? __('sections.cta.note', 'Cash on Delivery • Fast Shipping • Money Back Guarantee');
?>

<section class="home-section cta-section" id="cta">
    <div class="container">

        <div class="cta-box">

            <h2 class="cta-title">
                <?= htmlspecialchars($title, ENT_QUOTES, 'UTF-8') ?>
            </h2>

            <p class="cta-subtitle">
                <?= htmlspecialchars($subtitle, ENT_QUOTES, 'UTF-8') ?>
            </p>

            <a href="<?= htmlspecialchars($button_url, ENT_QUOTES, 'UTF-8') ?>"
               class="btn-primary cta-btn">
                <?= htmlspecialchars($button_text, ENT_QUOTES, 'UTF-8') ?>
            </a>

            <?php if ($note): ?>
                <div class="cta-note">
                    <?= htmlspecialchars($note, ENT_QUOTES, 'UTF-8') ?>
                </div>
            <?php endif; ?>

        </div>

    </div>
</section>

