<?php
// Layout produit_showcase — design ProductShowcase : bande navy avec toggle de
// variantes (pills) + carte packshot (image + tagline + nom + description).
// Exposé au BO (rend le composant bespoke via le registry générique, paramétré
// par ces champs).

defined('ABSPATH') || exit;

$l = 'produit_showcase';

return cvb_layout($l, 'Showcase produit (toggle variantes)', [
    cvb_clone_entete($l),

    // Repeater custom : nom UNIQUE préfixé par le tag du layout (anti-collision
    // WPGraphQL-ACF) → type ...ProduitShowcaseShowcaseVariantes.
    cvb_repeater("field_cvb_{$l}_showcase_variantes", 'showcase_variantes', 'Variantes', [
        cvb_field("field_cvb_{$l}_showcase_variantes_nom", 'nom', 'Nom', 'text', [
            'instructions' => 'Ex. « CovaTherm 20 ».',
        ]),
        cvb_field("field_cvb_{$l}_showcase_variantes_usage", 'usage', 'Usage / sur-titre', 'text', [
            'instructions' => 'Ex. « La durabilité maximale ».',
        ]),
        cvb_field("field_cvb_{$l}_showcase_variantes_description", 'description', 'Description', 'textarea', ['rows' => 3]),
        cvb_image("field_cvb_{$l}_showcase_variantes_image", 'image', 'Packshot'),
    ], ['max' => 4]),

    cvb_field("field_cvb_{$l}_note", 'note', 'Note de bas de section', 'textarea', ['rows' => 2]),
]);
