<?php
/**
 * Template Name: Home Page
 */

get_header();
?>

<main id="primary">

    <?php 
    $butcher_meatshop_main_slider_wrap = absint(get_theme_mod('butcher_meatshop_enable_slider', 0));
    if($butcher_meatshop_main_slider_wrap == 1): 
    ?>
        <section id="main-slider-wrap wow fadeInDown" data-wow-duration="1.5s">
            <div class="owl-carousel">
                <?php for ($butcher_meatshop_main_i = 1; $butcher_meatshop_main_i <= 3; $butcher_meatshop_main_i++): ?>
                    <?php if ($butcher_meatshop_slider_image = get_theme_mod('butcher_meatshop_slider_image'.$butcher_meatshop_main_i)): ?>
                        <div class="main-slider-inner-box">
                            <img src="<?php echo esc_url($butcher_meatshop_slider_image); ?>" alt="<?php echo esc_attr(get_theme_mod('butcher_meatshop_slider_heading'.$butcher_meatshop_main_i)); ?>">
                            <div class="main-slider-content-box">
                                <div class="main-inner-text wow zoomIn" data-wow-duration="2s">
                                    <?php if ($butcher_meatshop_heading = get_theme_mod('butcher_meatshop_slider_heading' . $butcher_meatshop_main_i)): ?>
                                        <h1><?php echo esc_html($butcher_meatshop_heading); ?></h1>
                                    <?php endif; ?>
                                    <?php if ($butcher_meatshop_text = get_theme_mod('butcher_meatshop_slider_text'.$butcher_meatshop_main_i)): ?>
                                        <p><?php echo esc_html($butcher_meatshop_text); ?></p>
                                    <?php endif; ?>
                                    <div class="main-slider-button">
                                        <?php if ( get_theme_mod('butcher_meatshop_slider_button1_link'.$butcher_meatshop_main_i) ||  get_theme_mod('butcher_meatshop_slider_button1_text'.$butcher_meatshop_main_i )) : ?><a class="btn-1" href="<?php echo esc_url( get_theme_mod('butcher_meatshop_slider_button1_link'.$butcher_meatshop_main_i) ); ?>"><?php echo esc_html( get_theme_mod('butcher_meatshop_slider_button1_text'.$butcher_meatshop_main_i) ); ?></a><?php endif; ?>
                                    </div>
                                </div>
                            </div>
                        </div>
                    <?php endif; ?>
                <?php endfor; ?>
            </div>
            <!-- custom pagination -->
            <div class="custom-pagination">
                <span class="pagination-item active" data-slide="<?php echo esc_attr( 0 ); ?>">
                    <?php echo esc_html__( '01', 'butcher-meatshop' ); ?>
                </span>
                <span class="pagination-item" data-slide="<?php echo esc_attr( 1 ); ?>">
                    <?php echo esc_html__( '02', 'butcher-meatshop' ); ?>
                </span>
                <span class="pagination-item" data-slide="<?php echo esc_attr( 2 ); ?>">
                    <?php echo esc_html__( '03', 'butcher-meatshop' ); ?>
                </span>
            </div>
        </section>
    <?php endif; ?>
   <?php
    if (get_theme_mod('butcher_meatshop_gallery_sec_enable', 0) != '') : ?>
        <section id="service">
            <div class="container">
                <div class="match-heading">
                    <?php if (!empty(get_theme_mod('butcher_meatshop_service_sub_heading'))) : ?>
                        <h2 class="about-h2"><?php echo esc_html(get_theme_mod('butcher_meatshop_service_sub_heading')); ?></h2>
                    <?php endif; ?>
                    <?php if (!empty(get_theme_mod('butcher_meatshop_service_about_us'))) : ?>
                        <p class="gallery-content">
                            <?php echo esc_html(get_theme_mod('butcher_meatshop_service_about_us')); ?>
                        </p>
                    <?php endif; ?>
                </div>
                <div class="flex-row">
                    <div class="gallery-col-1 wow zoomIn" data-wow-duration="2s">
                        <?php
                            $butcher_meatshop_gallery_first = get_theme_mod('butcher_meatshop_gallery_first');
                            if (!empty($butcher_meatshop_gallery_first)) { ?>
                            <div class="gallery-banner1">
                                <img src="<?php echo esc_url($butcher_meatshop_gallery_first); ?>" alt="<?php esc_attr_e('Background Image', 'butcher-meatshop'); ?>" />
                            </div>
                        <?php } ?>
                    </div>
                    <div class="gallery-col-2 wow zoomIn" data-wow-duration="2s">
                        <?php
                            $butcher_meatshop_gallery_sec = get_theme_mod('butcher_meatshop_gallery_sec');
                            if (!empty($butcher_meatshop_gallery_sec)) { ?>
                            <div class="gallery-banner1">
                                <img src="<?php echo esc_url($butcher_meatshop_gallery_sec); ?>" alt="<?php esc_attr_e('Background Image', 'butcher-meatshop'); ?>" />
                            </div>
                        <?php } ?>
                    </div>
                    <div class="gallery-col-3 wow zoomIn" data-wow-duration="2s">
                        <?php
                            $butcher_meatshop_gallery_third = get_theme_mod('butcher_meatshop_gallery_third');
                            if (!empty($butcher_meatshop_gallery_third)) { ?>
                            <div class="gallery-banner1">
                                <img src="<?php echo esc_url($butcher_meatshop_gallery_third); ?>" alt="<?php esc_attr_e('Background Image', 'butcher-meatshop'); ?>" />
                            </div>
                        <?php } ?>
                        <?php
                            $butcher_meatshop_gallery_fourth = get_theme_mod('butcher_meatshop_gallery_fourth');
                            if (!empty($butcher_meatshop_gallery_fourth)) { ?>
                            <div class="gallery-banner1">
                                <img src="<?php echo esc_url($butcher_meatshop_gallery_fourth); ?>" alt="<?php esc_attr_e('Background Image', 'butcher-meatshop'); ?>" />
                            </div>
                        <?php } ?>
                    </div>
                    <div class="gallery-col-4 wow zoomIn" data-wow-duration="2s">
                        <?php
                            $butcher_meatshop_gallery_fifth = get_theme_mod('butcher_meatshop_gallery_fifth');
                            if (!empty($butcher_meatshop_gallery_fifth)) { ?>
                            <div class="gallery-banner1">
                                <img src="<?php echo esc_url($butcher_meatshop_gallery_fifth); ?>" alt="<?php esc_attr_e('Background Image', 'butcher-meatshop'); ?>" />
                            </div>
                        <?php } ?>
                        <?php
                            $butcher_meatshop_gallery_sixth = get_theme_mod('butcher_meatshop_gallery_sixth');
                            if (!empty($butcher_meatshop_gallery_sixth)) { ?>
                            <div class="gallery-banner1">
                                <img src="<?php echo esc_url($butcher_meatshop_gallery_sixth); ?>" alt="<?php esc_attr_e('Background Image', 'butcher-meatshop'); ?>" />
                            </div>
                        <?php } ?>
                    </div>
                </div>
            </div>
        </section>
    <?php endif; ?>
</main>
<?php
get_footer();
?>