<!-- start home main slider -->
<div class="swiper-container home-main-slider">
    <div class="swiper-wrapper">
        <?php
        if (isset($sliders) && is_array($sliders)):
            foreach ($sliders as $key => $value):
                ?>
                <div class="swiper-slide">
                    <div class="slider-img">
                        <img src="<?php echo UPLOAD_LINK.$value['image']; ?>" alt="img">
                    </div>
                    <div class="slider-text">
                        <div class="text-buttons">
                            <div class="text">
                                <p>
                                    <?php echo $slidersLang[$key]['title']; ?>
                                </p>
                                <p><?php echo $slidersLang[$key]['description']; ?> </p>
                            </div>
                            <div class="buttons">
                                <a href="<?php  echo BASE_URL."category/view"?>">
                                    <i class="linearicons-finger-tap2"></i>
                                    <span>
                              المنتجات
                            </span>
                                </a>
                                <a href="<?php  echo BASE_URL."home/aboutus"?>">
                                    <i class="linearicons-pushpin"></i>
                                    <span>
                              من نحن
                            </span>
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
            <?php
            endforeach;
        endif;
        ?>
    </div>

    <!-- rtl code -->
    <div class="swiper-button-prev home-main-slider-prev">
        <span class="ion-android-arrow-forward"></span>
    </div>
    <div class="swiper-button-next home-main-slider-next">
        <span class="ion-android-arrow-back"></span>
    </div>
    <!-- rtl code -->

    <!-- ltr code -->
    <!-- <div class="swiper-button-next home-main-slider-next">
      <span class="ion-android-arrow-forward"></span>
    </div>
    <div class="swiper-button-prev home-main-slider-prev">
      <span class="ion-android-arrow-back"></span>
    </div> -->
    <!-- ltr code -->

    <div class="swiper-pagination home-main-slider-pagination"></div>
</div>
<!-- end home main slider -->

<!-- home about section -->
<div class="home-about-section">
    <div class="section-body">
        <div class="left-section">
            <div class="section-heading">
                <p class="heading">
            <span>
              عن
            </span>
                    <span>
              المصرية للتشكيل والمعادن
            </span>
                </p>
            </div>
            <div class="body">
                <div class="text">
                    <ul>
                        <li>
                            <p><?php echo $aboutLang['description']; ?></p>
                        </li>
                    </ul>
                </div>
                <a class="more-btn" href="<?php echo BASE_URL . "home/aboutus"; ?>">
            <span>
              المزيد
              <i class="ion-android-share"></i>
            </span>
                </a>
            </div>
        </div>
        <div class="right-section">
            <ul class="icons-ul">
                <?php
                if (isset($features) && is_array($features)):
                    foreach ($features as $key => $value):
                    ?>
                        <li>
                            <div class="img-div">
                                <img src="<?php echo UPLOAD_LINK . $value['image']; ?>" alt="img">
                            </div>
                            <span>
                              <?php echo $featuresLang[$key]['title']; ?>
                            </span>
                        </li>
                    <?php
                    endforeach;
                endif;
                ?>
            </ul>
        </div>
    </div>
</div>
<!-- /home about section -->

<!-- Products section -->
<div class="products-section">
    <div class="container">
        <div class="section-heading">
            <p>
                منتجاتنا
            </p>
        </div>

        <div class="mfa-filter-wrapper">
            <ul class="mfa-filter-btns">
                <li data-mfa-filter="__all__"><span>الكل </span></li>

                <?php
                if (isset($categories) && is_array($categories)):
                    foreach ($categories as $key => $value):
                    ?>
                        <li data-mfa-filter="cat-<?php echo $key; ?>"><span><?php echo $categoriesLang[$key]['title'] ?></span></li>
                    <?php
                    endforeach;
                endif;
                ?>
            </ul>

            <div class="mfa-filter-content">
                <ul>

                    <?php
                    if(isset($categories) && is_array($categories)):
                        foreach($categories as $key=>$value):
                            foreach($products[$key] as $key2 => $value2):
                                ?>
                                <li class="cat-<?php echo $key; ?>">
                                    <a href="<?php echo BASE_URL."offer/view/".$value2['id'] ?>">
                                        <div class="product-img">
                                            <img src="<?php echo UPLOAD_LINK.$value2['image'];  ?>" alt="img">
                                        </div>
                                        <div class="product-text">
                                            <div class="title">
                                                <p>
                                                    <?php echo $productsLang[$key][$key2]['title']; ?>
                                                </p>
                                            </div>
                                            <div class="product-description">
                                                <p><?php echo $productsLang[$key][$key2]['slug']; ?></p>
                                            </div>
                                        </div>
                                    </a>
                                </li>
                            <?php
                            endforeach;
                        endforeach;
                    endif;
                    ?>
                </ul>
                <div class="filter-loader">
                    <img src="<?php  echo IMAGES_FRONT_END_LINK;?>icons/filter-loader.gif" alt="img">
                </div>
            </div>
        </div>
    </div>
</div>
<!-- /Products section -->

<!-- gallery section -->
<div class="gallery-section">
    <div class="section-heading">
        <p>
            الصور
        </p>
    </div>
    <div class="gallery-layout">
        <div class="my-gallery">
            <?php
            if (isset($photos) && is_array($photos)):
                foreach ($photos as $key => $value):
                    ?>
                    <a href="<?php echo UPLOAD_LINK . $value['image']; ?>" data-aos="zoom-in" data-aos-duration="1500">
                        <img src="<?php echo UPLOAD_LINK . $value['image']; ?>" />
                        <p>
                            <?php echo $photosLang[$key]['name']; ?>
                        </p>
                    </a>
                <?php
                endforeach;
            endif;
            ?>
        </div>
    </div>
</div>
<!-- /gallery section -->

<!-- our clients section -->
<div class="clients-section">
    <div class="section-heading">
        <p>
           عملاءنا
        </p>
    </div>
    <div class="swiper-container home-clients-slider">
        <div class="swiper-wrapper"   style="height: 200px">
            <?php
            if (isset($clients) && is_array($clients)):
                foreach ($clients as $key => $value):
                ?>
                    <div class="swiper-slide">
                        <div class="slider-img">
                            <img src="<?php echo UPLOAD_LINK . $value['image']; ?>" alt="img">
                        </div>
                    </div>
                <?php
                endforeach;
            endif;
            ?>
        </div>
    </div>
</div>
<!-- our clients section -->