<?php
/**
 * =========================================================
 * Section Manifest
 * =========================================================
 * This file defines all available frontend sections,
 * their type, editability, and editable fields.
 *
 * Types:
 * - product : driven by product data (not editable here)
 * - global  : editable via Section Builder (theme_sections)
 */

return [

    /* =====================================================
     * PRODUCT-BASED SECTIONS (NOT editable from Admin)
     * ===================================================== */

    'hero' => [
        'type'       => 'product',
        'editable'   => false,
        'depends_on' => 'product',
    ],

    'gallery' => [
        'type'       => 'product',
        'editable'   => false,
        'depends_on' => 'product',
    ],

    'features' => [
        'type'       => 'product',
        'editable'   => false,
        'depends_on' => 'product',
    ],

    'pricing' => [
        'type'       => 'product',
        'editable'   => false,
        'depends_on' => 'product',
    ],

    'faq' => [
        'type'       => 'product',
        'editable'   => false,
        'depends_on' => 'product',
    ],

    'testimonials' => [
        'type'       => 'product',
        'editable'   => false,
        'depends_on' => 'product',
    ],

    'guarantee' => [
        'type'       => 'product',
        'editable'   => false,
        'depends_on' => 'product',
    ],

    'checkout' => [
        'type'       => 'product',
        'editable'   => false,
        'depends_on' => 'product',
    ],

    /* =====================================================
     * GLOBAL SECTIONS (Editable from Admin)
     * ===================================================== */

    'banner' => [
        'type'     => 'global',
        'editable' => true,
        'fields'   => [
            'title' => [
                'type'    => 'text',
                'label'   => 'sections.pricing.title',
                'default' => 'Special Offer',
            ],
            'old_price' => [
                'type'    => 'number',
                'label'   => 'sections.pricing.old_price',
                'default' => 299,
            ],
            'new_price' => [
                'type'    => 'number',
                'label'   => 'sections.pricing.new_price',
                'default' => 149,
            ],
            'discount' => [
                'type'    => 'text',
                'label'   => 'sections.pricing.discount',
                'default' => '-50% OFF',
            ],
            'button_text' => [
                'type'    => 'text',
                'label'   => 'sections.pricing.button',
                'default' => 'Order Now',
            ],
            'button_url' => [
                'type'    => 'text',
                'label'   => 'sections.pricing.button_url',
                'default' => '#checkout',
            ],
        ],
    ],

    'benefits' => [
        'type'     => 'global',
        'editable' => true,
        'fields'   => [
            'title' => [
                'type'    => 'text',
                'label'   => 'sections.benefits.title',
                'default' => 'Key Benefits',
            ],
            'items' => [
                'type'    => 'repeater',
                'label'   => 'sections.benefits.items',
                'fields'  => [
                    'icon' => [
                        'type'    => 'text',
                        'default' => '✔',
                    ],
                    'text' => [
                        'type'    => 'text',
                        'default' => '',
                    ],
                ],
            ],
        ],
    ],

    'cta' => [
        'type'     => 'global',
        'editable' => true,
        'fields'   => [
            'title' => [
                'type'    => 'text',
                'label'   => 'sections.cta.title',
                'default' => 'Ready to Order?',
            ],
            'subtitle' => [
                'type'    => 'textarea',
                'label'   => 'sections.cta.subtitle',
                'default' => 'Click the button below and complete your details',
            ],
            'button_text' => [
                'type'    => 'text',
                'label'   => 'sections.cta.button',
                'default' => 'Order Now',
            ],
            'button_url' => [
                'type'    => 'text',
                'label'   => 'sections.cta.button_url',
                'default' => '#checkout',
            ],
        ],
    ],

];
