<?php
/**
 * @var \App\View\AppView $this
 * @var \App\Model\Entity\LandingPage $landing
 */
?>
<style>
    .form input,
    .form textarea,
    .form select {
        display: block;
        width: 100%;
        margin-bottom: 15px;
    }
    .row {
        margin-left: auto;
        margin-right: auto;
        max-width: 900px;
        padding: 0 15px;
    }
    @media (max-width: 768px) {
        .row {
            max-width: 100%;
            padding: 0 10px;
        }
    }
</style>

<div class="row">
    <aside class="column">
        <div class="side-nav">
            <h4 class="heading"><?= __('Actions') ?></h4>
            <?= $this->Form->postLink(
                __('Delete'),
                ['action' => 'delete', $landing->id],
                ['confirm' => __('Are you sure you want to delete # {0}?', $landing->id), 'class' => 'side-nav-item']
            ) ?>
            <?= $this->Html->link(__('List Landing Pages'), ['action' => 'index'], ['class' => 'side-nav-item']) ?>
        </div>
    </aside>

    <div class="column column-80">
        <div class="blocks form content">
            <?= $this->Form->create($landing) ?>
            <fieldset>
                <legend><?= __('Edit Landing Page') ?></legend>
                <div style="display:flex; gap:10px; flex-wrap:wrap;">
                    <div style="flex:1; min-width:200px;">
                        <?= $this->Form->control('featured_products', ['label' => __('Featured Products (comma-separated IDs)'), 'required' => true]) ?>
                    </div>
                </div>
            </fieldset>
            <?= $this->Form->button(__('Save')) ?>
            <?= $this->Form->end() ?>
        </div>
    </div>
</div>
<br><br><br><br><br><br>
