<?php
if (!isset($section_settings)) {
    return;
}

$title = $section_settings['title'] ?? __('sections.benefits.title', 'What Makes This Product Special');

$items = $section_settings['items'] ?? [
    ['icon' => 'check', 'text' => __('sections.benefits.b1', 'Improves your daily life')],
    ['icon' => 'check', 'text' => __('sections.benefits.b2', 'High-quality materials built to last')],
    ['icon' => 'check', 'text' => __('sections.benefits.b3', 'Designed for comfort and efficiency')],
];
?>

<section class="home-section benefits-section" id="benefits">
    <div class="container">

        <div class="section-head text-center">
            <h2 class="section-title">
                <?= htmlspecialchars($title, ENT_QUOTES, 'UTF-8') ?>
            </h2>
        </div>

        <div class="benefits-grid">

            <?php foreach ($items as $item): ?>
                <div class="benefit-card">

                    <div class="benefit-icon">
                        <svg width="26" height="26" viewBox="0 0 24 24" fill="none">
                            <path d="M20 6L9 17L4 12"
                                  stroke="currentColor"
                                  stroke-width="2"
                                  stroke-linecap="round"
                                  stroke-linejoin="round"/>
                        </svg>
                    </div>

                    <div class="benefit-text">
                        <?= htmlspecialchars($item['text'], ENT_QUOTES, 'UTF-8') ?>
                    </div>

                </div>
            <?php endforeach; ?>

        </div>

    </div>
</section>
