---
products:
    new:
        limit: {{theme_settings.homepage_new_products_count}}
    featured:
        limit: {{theme_settings.homepage_featured_products_count}}
    top_sellers:
        limit: {{theme_settings.homepage_top_products_count}}
carousel: {{theme_settings.homepage_show_carousel}}
blog:
    recent_posts:
        limit: {{theme_settings.homepage_blog_posts_count}}
---
{{#partial "hero"}}
    {{{region name="home_below_menu"}}}
    {{#and carousel carousel.slides.length}}
        {{> components/carousel arrows=theme_settings.homepage_show_carousel_arrows play_pause_button=theme_settings.homepage_show_carousel_play_pause_button}}
    {{/and}}
    {{{region name="home_below_carousel"}}}
{{/partial}}

{{#partial "page"}}

    {{#each shipping_messages}}
        {{> components/common/alert/alert-info message}}
    {{/each}}

<div class="main full">
    {{#if products.featured}}
        {{> components/products/featured products=products.featured columns=theme_settings.homepage_featured_products_column_count}}
    {{/if}}
    {{{region name="home_below_featured_products"}}}

    {{#if products.top_sellers}}
        {{> components/products/top products=products.top_sellers columns=theme_settings.homepage_top_products_column_count}}
    {{/if}}
    {{{region name="home_below_top_products"}}}

    {{#if products.new}}
        {{> components/products/new products=products.new columns=theme_settings.homepage_new_products_column_count}}
    {{/if}}
    {{{region name="home_below_new_products"}}}
</div>
{{/partial}}
{{> layout/base}}
