<!-- FLOATING BUTTONS (NEW: Unlimited Dynamic) -->
<div class="form-card section-divider" id="section-floating_buttons">
    <h3>Floating Buttons</h3>
    <p class="text-sm text-gray-600 mb-2">Add unlimited floating buttons with number/icon, image, and link.</p>
    <div id="floatingButtonsContainer">
        <?php if (!empty($floating_buttons)): ?>
            <?php foreach ($floating_buttons as $index => $btn): ?>
                <div class="float-btn-row">
                    <div class="flex justify-between items-center mb-2">
                        <h4>Floating Button <?php echo $index; ?></h4>
                        <button type="button" class="remove-btn" onclick="removeFloatButton(this)">Remove</button>
                    </div>
                    <input type="text" name="float_number[]" value="<?php echo htmlspecialchars($btn['number'] ?? ''); ?>"
                           placeholder="Number/Icon (e.g. WhatsApp or 1)" required class="mb-1">
                    <input type="text" name="float_link[]" value="<?php echo htmlspecialchars($btn['link'] ?? ''); ?>"
                           placeholder="Link (e.g. https://wa.me/...)" required class="mb-1">
                    <label class="block">Image (≤ 2 MB)</label>
                    <input type="file" name="float_image[]" accept="image/*" class="mb-1">
                    <?php if (!empty($btn['image'])): ?>
                        <img src="<?php echo htmlspecialchars($upload_dir . $btn['image']); ?>" alt="Floating Button <?php echo $index; ?>" class="preview-img">
                    <?php endif; ?>
                </div>
            <?php endforeach; ?>
        <?php else: ?>
            <div class="float-btn-row">
                <div class="flex justify-between items-center mb-2">
                    <h4>Floating Button 1</h4>
                    <button type="button" class="remove-btn" onclick="removeFloatButton(this)">Remove</button>
                </div>
                <input type="text" name="float_number[]" value="" placeholder="Number/Icon (e.g. WhatsApp or 1)" required class="mb-1">
                <input type="text" name="float_link[]" value="" placeholder="Link (e.g. https://wa.me/...)" required class="mb-1">
                <label class="block">Image (≤ 2 MB)</label>
                <input type="file" name="float_image[]" accept="image/*" class="mb-1">
            </div>
        <?php endif; ?>
    </div>
    <button type="button" class="add-btn" onclick="addFloatButton()">Add New Floating Button</button>
    <div class="mt-2 text-sm text-gray-600">
        <p><strong>Note:</strong> Legacy WhatsApp and Call links are deprecated; use dynamic buttons above for all floating elements.</p>
    </div>
</div>