<?php if (!empty($sections_data)) : ?>
<?php foreach ($sections_data as $section) : ?>
<div class="menu-section">
<h2><?php echo esc_html($section['name']); ?></h2>
<?php if (!empty($section['subsections'])) : ?>
<?php foreach ($section['subsections'] as $subsection) : ?>
<div class="menu-subsection">
<h3><?php echo esc_html($subsection['title']); ?></h3>
<p><?php echo esc_html($subsection['description']); ?></p>
<?php if (!empty($subsection['image'])) : ?>
<div class="subsection-image">
<?php echo wp_get_attachment_image($subsection['image'], 'full'); ?>
</div>
<?php endif; ?>
<?php if (!empty($subsection['dishes'])) : ?>
<ul class="dish-list">
<?php foreach ($subsection['dishes'] as $dish) : ?>
<li><?php echo esc_html($dish['name']); ?></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</div>
<?php endforeach; ?>
<?php endif; ?>
</div>
<?php endforeach; ?>
<?php endif; ?>