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

$features = $product['features'] ?? [
    __('features.default_1', 'High quality materials'),
    __('features.default_2', 'Modern and elegant design'),
    __('features.default_3', 'Fast shipping and Cash on Delivery'),
    __('features.default_4', 'Money back guarantee'),
];
?>

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

        <div class="section-head text-center">
            <h2 class="section-title">
                <?= __('sections.features', 'Why Choose This Product?') ?>
            </h2>
        </div>

        <div class="features-grid">

            <?php foreach ($features as $feature): ?>
                <div class="feature-card">

                    <div class="feature-icon">
                        <svg width="24" height="24" 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="feature-content">
                        <p class="feature-text">
                            <?= htmlspecialchars($feature, ENT_QUOTES, 'UTF-8') ?>
                        </p>
                    </div>

                </div>
            <?php endforeach; ?>

        </div>

    </div>
</section>
