<?php include __DIR__ . '/../header.php'; ?>

<div class="container-fluid py-4">

    <div class="mb-4">
        <h3 class="mb-1">
            <i class="bi bi-plus-circle me-2"></i>
            <?= __('categories.create.title', 'Add Category') ?>
        </h3>
        <small class="text-muted">
            <?= __('categories.create.breadcrumb', 'Catalog → Categories → Add') ?>
        </small>
    </div>

    <div class="card border-0 shadow-sm">
        <div class="card-body">

            <form method="post"
                  action="/admin/categories/store"
                  enctype="multipart/form-data">

                <?= \Core\System\Csrf::field(); ?>

                <div class="mb-3">
                    <label class="form-label">
                        <?= __('categories.form.name', 'Name') ?>
                    </label>
                    <input type="text" name="name" class="form-control" required>
                </div>

                <div class="mb-3">
                    <label class="form-label">
                        <?= __('categories.form.slug', 'Slug') ?>
                    </label>
                    <input type="text" name="slug" class="form-control"
                           placeholder="<?= __('categories.form.slug_hint', 'Auto-generated if empty') ?>">
                </div>

                <div class="mb-3">
                    <label class="form-label">
                        <?= __('categories.form.image', 'Image') ?>
                    </label>
                    <input type="file" name="image" class="form-control">
                </div>

                <div class="mb-3">
                    <label class="form-label">
                        <?= __('categories.form.status', 'Status') ?>
                    </label>
                    <select name="status" class="form-select">
                        <option value="active"><?= __('common.active', 'Active') ?></option>
                        <option value="inactive"><?= __('common.inactive', 'Inactive') ?></option>
                    </select>
                </div>

                <div class="d-flex gap-2">
                    <button class="btn btn-primary">
                        <?= __('common.save', 'Save') ?>
                    </button>
                    <a href="/admin/categories" class="btn btn-light">
                        <?= __('common.cancel', 'Cancel') ?>
                    </a>
                </div>

            </form>

        </div>
    </div>

</div>

<?php include __DIR__ . '/../footer.php'; ?>
