<?php
include('header.php');

?>

        <!--========================== Banner Section Start ==========================-->
        <section class="banner section-bg z-index-1" style="padding-top:80px;padding-bottom:80px;">
            <img src="assets/images/gradients/banner-gradient.png" alt="" class="bg--gradient white-version">
            <img src="assets/images/shapes/element-moon1.png" alt="" class="element one">
            <img src="assets/images/shapes/element-moon2.png" alt="" class="element two">
            <div class="container container-two">
               <div class="row align-items-center gy-sm-5 gy-4">
                  <div class="col-lg-6">
                     <div class="banner-inner position-relative pe-lg-5">
                        <div class="banner-content">
                           <h1 class="banner-content__title">1040+ curated digital products</h1>
                           <p class="banner-content__desc font-18">Explore the best premium themes and plugins available for sale. Our unique collection is hand-curated by experts. Find and buy the perfect premium theme  today.</p>
                           
                           <div class="search-box">
                               <form action="product.php" method="GET" >
                              <input type="text" class="common-input common-input--lg pill shadow-sm" placeholder="Search theme, plugins & more..." name="keyword">
                              <button type="submit" class="btn btn-main btn-icon icon border-0"><img src="assets/images/icons/search.svg" alt=""></button>
                              </form>
                           </div>
                           <!-- Tech List Start -->
                           <div class="tech-list">
                              <a href="productcat.php?id=1" class="tech-list__item" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="WordPress">
                              <img src="assets/images/thumbs/tech-icon1.png" alt="" class="white-version">
                              <img src="assets/images/thumbs/tech-icon-white1.png" alt="" class="dark-version">
                              </a>
                              <!--<a href="productcat.php?id=5" class="tech-list__item" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="Laravel">-->
                              <!--<img src="assets/images/thumbs/tech-icon2.png" alt="">-->
                              <!--</a>-->
                              <a href="productcat.php?id=3" class="tech-list__item" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="PHP">
                              <img src="assets/images/thumbs/tech-icon3.png" alt="" class="white-version">
                              <img src="assets/images/thumbs/tech-icon-white3.png" alt="" class="dark-version">
                              </a>
                              <a href="productcat.php?id=4" class="tech-list__item" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="HTML">
                              <img src="assets/images/thumbs/tech-icon4.png" alt="">
                              </a>
                              <!--<a href="productcat.php?id=6" class="tech-list__item" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="Sketch">-->
                              <!--<img src="assets/images/thumbs/tech-icon5.png" alt="">-->
                              <!--</a>-->
                              <!--<a href="productcat.php?id=7" class="tech-list__item" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="Figma">-->
                              <!--<img src="assets/images/thumbs/tech-icon6.png" alt="">-->
                              <!--</a>-->
                              <a href="productcat.php?id=8" class="tech-list__item" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="Bootstrap">
                              <img src="assets/images/thumbs/tech-icon7.png" alt="">
                              </a>
                              <!--<a href="productcat.php?id=9" class="tech-list__item" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="Tailwind">-->
                              <!--<img src="assets/images/thumbs/tech-icon8.png" alt="">-->
                              <!--</a>-->
                              <!--<a href="productcat.php?id=10" class="tech-list__item" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="React">-->
                              <!--<img src="assets/images/thumbs/tech-icon9.png" alt="">-->
                              <!--</a>-->
                           </div>
                           <!-- Tech List End -->
                        </div>
                     </div>
                  </div>
                  <div class="col-lg-6">
                     <div class="banner-thumb">
                        <img src="assets/images/thumbs/banner-img.png" alt="">
                        <img src="assets/images/shapes/dots.png" alt="" class="dotted-img white-version">
                        <img src="assets/images/shapes/dots-white.png" alt="" class="dotted-img dark-version">
                        <img src="assets/images/shapes/element2.png" alt="" class="element two end-0">
                        <div class="statistics animation bg-main text-center">
                           <h5 class="statistics__amount text-white">2650+</h5>
                           <span class="statistics__text text-white font-14">Customers</span>
                        </div>
                        <div class="statistics style-two bg-white text-center">
                           <h5 class="statistics__amount statistics__amount-two text-heading">1020+</h5>
                           <span class="statistics__text text-heading font-14">Themes & Plugins</span>
                        </div>
                     </div>
                  </div>
               </div>
            </div>
         </section>
         <!--========================== Banner Section End ==========================-->
         <!-- ======================== popular Section Start =========================== -->
         <section class="popular padding-y-60 overflow-hidden">
            <div class="container container-two">
               <div class="section-heading style-left mb-64">
                  <h5 class="section-heading__title">Popular Categories</h5>
               </div>
               <div class="popular-slider arrow-style-two row gy-4">
                  <div class="col-lg-2">
                     <a href="productcat.php?id=1" class="popular-item w-100">
                        <span class="popular-item__icon">
                        <img src="assets/images/icons/popular-icon1.svg" alt="">
                        </span>
                        <h6 class="popular-item__title font-18">WordPress</h6>
                        
                     </a>
                  </div>
                  <div class="col-lg-2">
                     <a href="productcat.php?id=2" class="popular-item w-100">
                        <span class="popular-item__icon">
                        <img src="assets/images/icons/popular-icon2.svg" alt="">
                        </span>
                        <h6 class="popular-item__title font-18">Plugin</h6>
                        
                     </a>
                  </div>
                  <div class="col-lg-2">
                     <a href="productcat.php?id=4" class="popular-item w-100">
                        <span class="popular-item__icon">
                        <img src="assets/images/icons/popular-icon3.svg" alt="">
                        </span>
                        <h6 class="popular-item__title font-18">HTML</h6>
                        
                     </a>
                  </div>
                  <!--<div class="col-lg-2">-->
                  <!--   <a href="productcat.php?id=11" class="popular-item w-100">-->
                  <!--      <span class="popular-item__icon">-->
                  <!--      <img src="assets/images/icons/popular-icon4.svg" alt="">-->
                  <!--      </span>-->
                  <!--      <h6 class="popular-item__title font-18">Java Script</h6>-->
                        
                  <!--   </a>-->
                  <!--</div>-->
                  <!--<div class="col-lg-2">-->
                  <!--   <a href="productcat.php?id=12" class="popular-item w-100">-->
                  <!--      <span class="popular-item__icon">-->
                  <!--      <img src="assets/images/icons/popular-icon5.svg" alt="">-->
                  <!--      </span>-->
                  <!--      <h6 class="popular-item__title font-18">Mobile App</h6>-->
                        
                  <!--   </a>-->
                  <!--</div>-->
                  <div class="col-lg-2">
                     <a href="productcat.php?id=3" class="popular-item w-100">
                        <span class="popular-item__icon">
                        <img src="assets/images/icons/popular-icon6.svg" alt="">
                        </span>
                        <h6 class="popular-item__title font-18">PHP Script</h6>
                        
                     </a>
                  </div>
                  <div class="col-lg-2">
                     <a href="productcat.php?id=1" class="popular-item w-100">
                        <span class="popular-item__icon">
                        <img src="assets/images/icons/popular-icon1.svg" alt="">
                        </span>
                        <h6 class="popular-item__title font-18">WordPress</h6>
                        
                     </a>
                  </div>
                  <div class="col-lg-2">
                     <a href="productcat.php?id=4" class="popular-item w-100">
                        <span class="popular-item__icon">
                        <img src="assets/images/icons/popular-icon3.svg" alt="">
                        </span>
                        <h6 class="popular-item__title font-18">HTML</h6>
                        
                     </a>
                  </div>
                   <div class="col-lg-2">
                     <a href="productcat.php?id=2" class="popular-item w-100">
                        <span class="popular-item__icon">
                        <img src="assets/images/icons/popular-icon2.svg" alt="">
                        </span>
                        <h6 class="popular-item__title font-18">Plugin</h6>
                        
                     </a>
                  </div>
                  <!--<div class="col-lg-2">-->
                  <!--   <a href="productcat.php?id=11" class="popular-item w-100">-->
                  <!--      <span class="popular-item__icon">-->
                  <!--      <img src="assets/images/icons/popular-icon4.svg" alt="">-->
                  <!--      </span>-->
                  <!--      <h6 class="popular-item__title font-18">Java Script</h6>-->
                        
                  <!--   </a>-->
                  <!--</div>-->
               </div>
               <div class="popular__button text-center">
                  <a href="product.php" class="font-18 fw-600 text-heading hover-text-main text-decoration-underline font-heading">Explore More</a>
               </div>
            </div>
         </section>
         <!-- ======================== popular Section End =========================== -->
         <!-- =========================== Arrival Product Section Start ========================== -->
         <section class="arrival-product padding-y-60 section-bg position-relative z-index-1">
            <img src="assets/images/gradients/product-gradient.png" alt="" class="bg--gradient white-version">
            <img src="assets/images/shapes/element2.png" alt="" class="element one">
            <div class="container container-two">
               <div class="section-heading">
                  <h3 class="section-heading__title">New Arrival Products</h3>
               </div>
               <ul class="nav common-tab justify-content-center nav-pills mb-48" id="pills-tab" role="tablist">
                  <li class="nav-item" role="presentation">
                     <button class="nav-link active" id="pills-all-tab" data-bs-toggle="pill" data-bs-target="#pills-all" type="button" role="tab" aria-controls="pills-all" aria-selected="true">All Item</button>
                  </li>
                  <li class="nav-item" role="presentation">
                     <button class="nav-link" id="pills-wordPress-tab" data-bs-toggle="pill" data-bs-target="#pills-wordPress" type="button" role="tab" aria-controls="pills-wordPress" aria-selected="false">WordPress Themes</button>
                  </li>
                  <li class="nav-item" role="presentation">
                     <button class="nav-link" id="pills-php-tab" data-bs-toggle="pill" data-bs-target="#pills-php" type="button" role="tab" aria-controls="pills-php" aria-selected="false">WordPress Plugins</button>
                  </li>
                  <li class="nav-item" role="presentation">
                     <button class="nav-link" id="pills-siteTemplate-tab" data-bs-toggle="pill" data-bs-target="#pills-siteTemplate" type="button" role="tab" aria-controls="pills-siteTemplate" aria-selected="false">PHP Scripts</button>
                  </li>
                  
               </ul>
               <div class="tab-content" id="pills-tabContent">
                  <div class="tab-pane fade show active" id="pills-all" role="tabpanel" aria-labelledby="pills-all-tab" tabindex="0">
                     <div class="row gy-4">
                        <?php
                        for($i=0;$i<8;$i++)
                        {
                        ?>
                        <div class="col-xl-3 col-lg-4 col-sm-6">
                           <div class="product-card ">
                              <div class="product-card__thumb d-flex">
                                 <a href="pdetail.php?id=<?php echo $json['category1'][$i]['id']?>" class="link w-100">
                                 <img src="<?php echo $json['category1'][$i]['pageimg']?>" alt="" class="cover-img" style="height:160px;"> 
                                 </a>
                                 <!-- <button type="button" class="product-card__wishlist"><i class="fas fa-heart"></i></button> -->
                              </div>
                              <div class="product-card__content">
                                 <h6 class="product-card__title">
                                    <a href="pdetail.php?id=<?php echo $json['category1'][$i]['id']?>" class="link"><?php echo $json['category1'][$i]['pagename']?></a>
                                 </h6>
                                 <div class="product-card__info flx-between gap-2">
                                    <span class="product-card__author">
                                    
                                    <a href="#" class="link hover-text-decoration-underline"> <?php echo $json['category1'][$i]['pagecatname']?></a>
                                    </span>
                                    <div class="flx-align gap-2">
                                       <h6 class="product-card__price mb-0">$<?php if($offerprice != ''){ echo $offerprice; }else{ echo $json['category1'][$i]['pageprice'];}?></h6>
                                       <!-- <span class="product-card__prevPrice text-decoration-line-through">$259</span> -->
                                    </div>
                                 </div>
                                 <div class="product-card__bottom flx-between gap-2">
                                    <div>
                                       <!-- <span class="product-card__sales font-14 mb-2">1200 Sales</span> -->
                                       <div class="d-flex align-items-center gap-1">
                                          <ul class="star-rating">
                                            <?php for ($j=0; $j < round($json['category1'][$i]['pagerating']); $j++) { ?>
                                             <li class="star-rating__item font-11"><i class="fas fa-star"></i></li>
                                            <?php }?>
                                          </ul>
                                          <!-- <span class="star-rating__text text-heading fw-500 font-14"> (16)</span> -->
                                       </div>
                                    </div>
                                    <a href="pdetail.php?id=<?php echo $json['category1'][$i]['id']?>" class="btn btn-outline-light btn-sm pill">Read More</a>
                                 </div>
                              </div>
                           </div>
                        </div>
                        <?php
                        }
                        ?>
                     </div>
                  </div>
                  <div class="tab-pane fade" id="pills-wordPress" role="tabpanel" aria-labelledby="pills-wordPress-tab" tabindex="0">
                     <div class="row gy-4">
                        
                        <?php
                        for($i=0;$i<8;$i++)
                        {
                        ?>
                        <div class="col-xl-3 col-lg-4 col-sm-6">
                           <div class="product-card ">
                              <div class="product-card__thumb d-flex">
                                 <a href="pdetail.php?id=<?php echo $json['wptheme'][$i]['id']?>" class="link w-100">
                                 <img src="<?php echo $json['wptheme'][$i]['pageimg']?>" alt="" class="cover-img" style="height:160px;"> 
                                 </a>
                                 <!-- <button type="button" class="product-card__wishlist"><i class="fas fa-heart"></i></button> -->
                              </div>
                              <div class="product-card__content">
                                 <h6 class="product-card__title">
                                    <a href="pdetail.php?id=<?php echo $json['wptheme'][$i]['id']?>" class="link"><?php echo $json['wptheme'][$i]['pagename']?></a>
                                 </h6>
                                 <div class="product-card__info flx-between gap-2">
                                    <span class="product-card__author">
                                    
                                    <a href="#" class="link hover-text-decoration-underline"> <?php echo $json['wptheme'][$i]['pagecatname']?></a>
                                    </span>
                                    <div class="flx-align gap-2">
                                       <h6 class="product-card__price mb-0">$<?php if($offerprice != ''){ echo $offerprice; }else{ echo $json['wptheme'][$i]['pageprice'];}?></h6>
                                       <!-- <span class="product-card__prevPrice text-decoration-line-through">$259</span> -->
                                    </div>
                                 </div>
                                 <div class="product-card__bottom flx-between gap-2">
                                    <div>
                                       <!-- <span class="product-card__sales font-14 mb-2">1200 Sales</span> -->
                                       <div class="d-flex align-items-center gap-1">
                                          <ul class="star-rating">
                                            <?php for ($j=0; $j < round($json['wptheme'][$i]['pagerating']); $j++) { ?>
                                             <li class="star-rating__item font-11"><i class="fas fa-star"></i></li>
                                            <?php }?>
                                          </ul>
                                          <!-- <span class="star-rating__text text-heading fw-500 font-14"> (16)</span> -->
                                       </div>
                                    </div>
                                    <a href="pdetail.php?id=<?php echo $json['wptheme'][$i]['id']?>" class="btn btn-outline-light btn-sm pill">Read More</a>
                                 </div>
                              </div>
                           </div>
                        </div>
                        <?php
                        }
                        ?>
                        
                     </div>
                  </div>
                  <div class="tab-pane fade" id="pills-php" role="tabpanel" aria-labelledby="pills-php-tab" tabindex="0">
                     <div class="row gy-4">
                        
                        <?php
                        for($i=0;$i<8;$i++)
                        {
                        ?>
                        <div class="col-xl-3 col-lg-4 col-sm-6">
                           <div class="product-card ">
                              <div class="product-card__thumb d-flex">
                                 <a href="pdetail.php?id=<?php echo $json['wpplugin'][$i]['id']?>" class="link w-100">
                                 <img src="<?php echo $json['wpplugin'][$i]['pageimg']?>" alt="" class="cover-img" style="height:160px;"> 
                                 </a>
                                 <!-- <button type="button" class="product-card__wishlist"><i class="fas fa-heart"></i></button> -->
                              </div>
                              <div class="product-card__content">
                                 <h6 class="product-card__title">
                                    <a href="pdetail.php?id=<?php echo $json['wpplugin'][$i]['id']?>" class="link"><?php echo $json['wpplugin'][$i]['pagename']?></a>
                                 </h6>
                                 <div class="product-card__info flx-between gap-2">
                                    <span class="product-card__author">
                                    
                                    <a href="#" class="link hover-text-decoration-underline"> <?php echo $json['wpplugin'][$i]['pagecatname']?></a>
                                    </span>
                                    <div class="flx-align gap-2">
                                       <h6 class="product-card__price mb-0">$<?php if($offerprice != ''){ echo $offerprice; }else{ echo $json['wpplugin'][$i]['pageprice'];}?></h6>
                                       <!-- <span class="product-card__prevPrice text-decoration-line-through">$259</span> -->
                                    </div>
                                 </div>
                                 <div class="product-card__bottom flx-between gap-2">
                                    <div>
                                       <!-- <span class="product-card__sales font-14 mb-2">1200 Sales</span> -->
                                       <div class="d-flex align-items-center gap-1">
                                          <ul class="star-rating">
                                            <?php for ($j=0; $j < round($json['wpplugin'][$i]['pagerating']); $j++) { ?>
                                             <li class="star-rating__item font-11"><i class="fas fa-star"></i></li>
                                            <?php }?>
                                          </ul>
                                          <!-- <span class="star-rating__text text-heading fw-500 font-14"> (16)</span> -->
                                       </div>
                                    </div>
                                    <a href="pdetail.php?id=<?php echo $json['wpplugin'][$i]['id']?>" class="btn btn-outline-light btn-sm pill">Read More</a>
                                 </div>
                              </div>
                           </div>
                        </div>
                        <?php
                        }
                        ?>
                        
                     </div>
                  </div>
                  <div class="tab-pane fade" id="pills-siteTemplate" role="tabpanel" aria-labelledby="pills-siteTemplate-tab" tabindex="0">
                     <div class="row gy-4">
                        
                        <?php
                        for($i=0;$i<4;$i++)
                        {
                        ?>
                        <div class="col-xl-3 col-lg-4 col-sm-6">
                           <div class="product-card ">
                              <div class="product-card__thumb d-flex">
                                 <a href="pdetail.php?id=<?php echo $json['phpscript'][$i]['id']?>" class="link w-100">
                                 <img src="<?php echo $json['phpscript'][$i]['pageimg']?>" alt="" class="cover-img" style="height:160px;"> 
                                 </a>
                                 <!-- <button type="button" class="product-card__wishlist"><i class="fas fa-heart"></i></button> -->
                              </div>
                              <div class="product-card__content">
                                 <h6 class="product-card__title">
                                    <a href="pdetail.php?id=<?php echo $json['phpscript'][$i]['id']?>" class="link"><?php echo $json['phpscript'][$i]['pagename']?></a>
                                 </h6>
                                 <div class="product-card__info flx-between gap-2">
                                    <span class="product-card__author">
                                    
                                    <a href="#" class="link hover-text-decoration-underline"> <?php echo $json['phpscript'][$i]['pagecatname']?></a>
                                    </span>
                                    <div class="flx-align gap-2">
                                       <h6 class="product-card__price mb-0">$<?php if($offerprice != ''){ echo $offerprice; }else{ echo $json['phpscript'][$i]['pageprice'];}?></h6>
                                       <!-- <span class="product-card__prevPrice text-decoration-line-through">$259</span> -->
                                    </div>
                                 </div>
                                 <div class="product-card__bottom flx-between gap-2">
                                    <div>
                                       <!-- <span class="product-card__sales font-14 mb-2">1200 Sales</span> -->
                                       <div class="d-flex align-items-center gap-1">
                                          <ul class="star-rating">
                                            <?php for ($j=0; $j < round($json['phpscript'][$i]['pagerating']); $j++) { ?>
                                             <li class="star-rating__item font-11"><i class="fas fa-star"></i></li>
                                            <?php }?>
                                          </ul>
                                          <!-- <span class="star-rating__text text-heading fw-500 font-14"> (16)</span> -->
                                       </div>
                                    </div>
                                    <a href="pdetail.php?id=<?php echo $json['phpscript'][$i]['id']?>" class="btn btn-outline-light btn-sm pill">Read More</a>
                                 </div>
                              </div>
                           </div>
                        </div>
                        <?php
                        }
                        ?>
                        
                     </div>
                  </div>
                  
               </div>
               <div class="text-center mt-64">
                  <a href="product.php" class="btn btn-main btn-lg pill fw-300">
                  View All Products
                  </a>
               </div>
            </div>
         </section>
         <!-- =========================== Arrival Product Section End ========================== -->
         <!-- ======================= Featured Products Start =============================== -->
         <section class="featured-product padding-y-60 position-relative z-index-1">
            <img src="assets/images/gradients/featured-gradient.png" alt="" class="bg--gradient white-version">
            <img src="assets/images/shapes/spider-net.png" alt="" class="spider-net position-absolute top-0 end-0 z-index--1 white-version">
            <img src="assets/images/shapes/spider-net-white.png" alt="" class="spider-net position-absolute top-0 end-0 z-index--1 dark-version">
            <img src="assets/images/shapes/element1.png" alt="" class="element two">
            <div class="container container-two">
               <div class="row gy-4 flex-wrap-reverse align-items-center">
                  <div class="col-xl-6">
                     <div class="row gy-4 card-wrapper">
                        <?php
                        for($i=0;$i<4;$i++)
                        {
                        ?>
                        <div class="col-sm-6">
                           <div class="product-card box-shadow">
                              <div class="product-card__thumb d-flex">
                                 <a href="pdetail.php?id=<?php echo $json['category2'][$i]['id']?>" class="link w-100">
                                 <img src="<?php echo $json['category2'][$i]['pageimg']?>" alt="" class="cover-img" style="height:160px;"> 
                                 </a>
                                 <!-- <button type="button" class="product-card__wishlist"><i class="fas fa-heart"></i></button> -->
                              </div>
                              <div class="product-card__content">
                                 <h6 class="product-card__title">
                                    <a href="pdetail.php?id=<?php echo $json['category2'][$i]['id']?>" class="link"><?php echo $json['category2'][$i]['pagename']?></a>
                                 </h6>
                                 <div class="product-card__info flx-between gap-2">
                                    <span class="product-card__author">
                                    
                                    <a href="#" class="link hover-text-decoration-underline"> <?php echo $json['category2'][$i]['pagecatname']?></a>
                                    </span>
                                    <div class="flx-align gap-2">
                                       <h6 class="product-card__price mb-0">$<?php if($offerprice != ''){ echo $offerprice; }else{ echo $json['category2'][$i]['pageprice'];}?></h6>
                                       <!-- <span class="product-card__prevPrice text-decoration-line-through">$259</span> -->
                                    </div>
                                 </div>
                                 <div class="product-card__bottom flx-between gap-2">
                                    <div>
                                       <!-- <span class="product-card__sales font-14 mb-2">1200 Sales</span> -->
                                       <div class="d-flex align-items-center gap-1">
                                          <ul class="star-rating">
                                            <?php for ($j=0; $j < round($json['category2'][$i]['pagerating']); $j++) { ?>
                                             <li class="star-rating__item font-11"><i class="fas fa-star"></i></li>
                                            <?php }?>
                                          </ul>
                                          <!-- <span class="star-rating__text text-heading fw-500 font-14"> (16)</span> -->
                                       </div>
                                    </div>
                                    <a href="pdetail.php?id=<?php echo $json['category2'][$i]['id']?>" class="btn btn-outline-light btn-sm pill">Read More</a>
                                 </div>
                              </div>
                           </div>
                        </div>
                        <?php
                        }
                        ?>
                     </div>
                  </div>
                  <div class="col-xl-1 d-xl-block d-none"></div>
                  <div class="col-xl-5">
                     <div class="section-content">
                        <div class="section-heading style-left">
                           <h3 class="section-heading__title">Featured Products</h3>
                           <p class="section-heading__desc font-18 w-sm">Every month we pick some best products for you. This month's best web themes & templates have arrived, chosen by our content specialists.</p>
                        </div>
                        <a href="product.php" class="btn btn-main btn-lg pill fw-300">
                        View All Items
                        </a>
                     </div>
                  </div>
               </div>
            </div>
         </section>
         <!-- ======================= Featured Products End =============================== -->
         <section class="seller padding-y-60">
            <div class="container container-two">
               <div class="row gy-4">
                  <div class="col-lg-12">
                     <!--<div class="seller-item position-relative z-index-1">-->
                     
                     <?php
                     if($homebanner != '')
                     {
                         echo $homebanner;
                     }
                     else
                     {
                     ?>
                     
                     <a href="https://www.amazon.com/" target="_blank">
                         <img src="home.png" class="" alt="" style="width: 100%;">
                     </a>
                    <?php
                     }
                     ?>
                        
                     <!--</div>-->
                  </div>
               </div>
            </div>
         </section>
         
         
         <!-- ======================= Selling Products Start ========================= -->
         <section class="selling-product padding-y-60 position-relative z-index-1 overflow-hidden">
            <img src="assets/images/gradients/selling-gradient.png" alt="" class="bg--gradient">
            <img src="assets/images/shapes/element2.png" alt="" class="element one">
            <img src="assets/images/shapes/element1.png" alt="" class="element two">
            <img src="assets/images/shapes/curve-pattern1.png" alt="" class="position-absolute start-0 top-0 z-index--1">
            <img src="assets/images/shapes/curve-pattern2.png" alt="" class="position-absolute end-0 top-0 z-index--1">
            <div class="container container-two">
               <div class="section-heading style-left style-white flx-between max-w-unset gap-4">
                  <div>
                     <h3 class="section-heading__title">Weekly Best selling Products</h3>
                     <p class="section-heading__desc font-18">Every month we pick some best products for you. This month's best web themes &amp; templates have arrived, chosen by our content specialists.</p>
                  </div>
                  <a href="product.php" class="btn btn-main btn-lg pill fw-300">
                  View All Items
                  </a>
               </div>
               <div class="selling-product-slider">
                  <?php 
                    for($i=0;$i<8;$i++)
                    {
                ?>
                  <div class="product-card shadow-sm overlay-none">
                     <div class="product-card__thumb d-flex max-h-unset">
                        <a href="pdetail.php?id=<?php echo $json['category3'][$i]['id']?>" class="link w-100">
                        <img src="<?php echo $json['category3'][$i]['pageimg']?>" alt="" class="cover-img" style="height:200px;"> 
                        </a>
                     </div>
                     <div class="product-card__content">
                        <h6 class="product-card__title">
                           <a href="pdetail.php?id=<?php echo $json['category3'][$i]['id']?>" class="link"><?php echo $json['category3'][$i]['pagename']?></a>
                        </h6>
                        <div class="product-card__info flx-between gap-2">
                           <span class="product-card__author">
                           
                           <a href="#" class="link hover-text-decoration-underline"> <?php echo $json['category3'][$i]['pagecatname']?></a>
                           </span>
                           <div class="flx-align gap-2">
                              <h6 class="product-card__price mb-0">$<?php if($offerprice != ''){ echo $offerprice; }else{ echo $json['category3'][$i]['pageprice'];}?></h6>
                              <!-- <span class="product-card__prevPrice text-decoration-line-through">$65</span> -->
                           </div>
                        </div>
                        <div class="product-card__bottom flx-between gap-2">
                           <div>
                              <!-- <span class="product-card__sales font-16 mb-2">1230 Sales</span> -->
                              <ul class="star-rating gap-2">
                                    <?php for ($j=0; $j < round($json['category3'][$i]['pagerating']); $j++) { ?>
                                        <li class="star-rating__item font-16"><i class="fas fa-star"></i></li>
                                    <?php }?>
                              </ul>
                           </div>
                           <div class="flx-align gap-2">
                              <a href="pdetail.php?id=<?php echo $json['category3'][$i]['id']?>" class="btn btn-outline-light download-icon btn-icon btn-icon--sm pill"> 
                              <span class="icon">
                              <img src="assets/images/icons/download.svg" alt="" class="white-version">
                              <img src="assets/images/icons/download-white.svg" alt="" class="dark-version">
                              </span>
                              </a>
                              <a href="pdetail.php?id=<?php echo $json['category3'][$i]['id']?>" class="btn btn-outline-light pill">Read More</a>
                           </div>
                        </div>
                     </div>
                  </div>
                <?php
                    }
                ?>
               </div>
            </div>
         </section>
         <!-- ======================= Selling Products End ========================= -->
         <!-- ======================= To Featured Author Start =============================== -->
         <section class="top-author padding-y-60 section-bg position-relative z-index-1">
            <img src="assets/images/gradients/featured-gradient.png" alt="" class="bg--gradient white-version">
            <img src="assets/images/shapes/spider-net.png" alt="" class="spider-net position-absolute top-0 start-0 z-index--1 white-version">
            <img src="assets/images/shapes/spider-net-white2.png" alt="" class="spider-net position-absolute top-0 start-0 z-index--1 dark-version">
            <img src="assets/images/shapes/pattern-curve-three.png" alt="" class="position-absolute top-0 end-0 z-index--1">
            <img src="assets/images/shapes/element1.png" alt="" class="element two">
            <div class="container container-two">
               <div class="row gy-4 align-items-center">
                  <div class="col-xl-5">
                     <div class="section-content">
                        <div class="section-heading style-left">
                           <h3 class="section-heading__title">Top Downloaded Products</h3>
                           <p class="section-heading__desc font-18 w-sm">Every month we pick some best products for you. This month's best web themes & templates have arrived, chosen by our content specialists.</p>
                        </div>
                        
                           <div class="author-info__content">
                             
                           </div>
                  
                        <div class="flx-align gap-2 mt-48">
                           <a href="product.php" class="btn btn-main btn-lg pill fw-300"> View Products </a>
                           <!--<button type="button" class="follow-btn btn btn-outline-light btn-lg pill">Follow</button>-->
                        </div>
                     </div>
                  </div>
                  <div class="col-xl-6">
                     <div class="circle-content position-relative">
                        <div class="circle static-circle">
                           <div class="circle__badge">
                              <img src="assets/images/icons/featured-badge.png" alt="">
                           </div>
                           <div class="circle__text">
                              <p>
                                 Top Downloaded Products
                              </p>
                           </div>
                        </div>
                        <div class="row gy-4 card-wrapper">
                           <?php
                            for($i=0;$i<4;$i++)
                            {
                            ?>
                            <div class="col-sm-6">
                               <div class="product-card box-shadow">
                                  <div class="product-card__thumb d-flex">
                                     <a href="pdetail.php?id=<?php echo $json['category4'][$i]['id']?>" class="link w-100">
                                     <img src="<?php echo $json['category4'][$i]['pageimg']?>" alt="" class="cover-img" style="height:160px;"> 
                                     </a>
                                     <!-- <button type="button" class="product-card__wishlist"><i class="fas fa-heart"></i></button> -->
                                  </div>
                                  <div class="product-card__content">
                                     <h6 class="product-card__title">
                                        <a href="pdetail.php?id=<?php echo $json['category4'][$i]['id']?>" class="link"><?php echo $json['category4'][$i]['pagename']?></a>
                                     </h6>
                                     <div class="product-card__info flx-between gap-2">
                                        <span class="product-card__author">
                                        
                                        <a href="#" class="link hover-text-decoration-underline"> <?php echo $json['category4'][$i]['pagecatname']?></a>
                                        </span>
                                        <div class="flx-align gap-2">
                                           <h6 class="product-card__price mb-0">$<?php if($offerprice != ''){ echo $offerprice; }else{ echo $json['category4'][$i]['pageprice'];}?></h6>
                                           <!-- <span class="product-card__prevPrice text-decoration-line-through">$259</span> -->
                                        </div>
                                     </div>
                                     <div class="product-card__bottom flx-between gap-2">
                                        <div>
                                           <!-- <span class="product-card__sales font-14 mb-2">1200 Sales</span> -->
                                           <div class="d-flex align-items-center gap-1">
                                              <ul class="star-rating">
                                                <?php for ($j=0; $j < round($json['category4'][$i]['pagerating']); $j++) { ?>
                                                 <li class="star-rating__item font-11"><i class="fas fa-star"></i></li>
                                                <?php }?>
                                              </ul>
                                              <!-- <span class="star-rating__text text-heading fw-500 font-14"> (16)</span> -->
                                           </div>
                                        </div>
                                        <a href="pdetail.php?id=<?php echo $json['category4'][$i]['id']?>" class="btn btn-outline-light btn-sm pill">Read More</a>
                                     </div>
                                  </div>
                               </div>
                            </div>
                            <?php
                            }
                            ?>
                        </div>
                     </div>
                  </div>
               </div>
            </div>
         </section>
         <!-- ======================= To Featured Author End =============================== -->
         <!-- ======================= Testimonial Section Start ============================ -->
        <?php
               if(count($json['testimonial'])>1)
               {
               ?>
        <section class="testimonial padding-y-120 position-relative section-bg overflow-hidden">
          <img src="assets/images/shapes/brush.png" alt="" class="element-brush">
          <div class="container container-two">
            <div class="section-heading style-left style-flex flx-between align-items-end gap-3">
              <div class="section-heading__inner w-lg">
                <h3 class="section-heading__title">Clients Feedback</h3>
              </div>
              <!--<a href="#" class="btn btn-main btn-lg pill">More Feedback</a>-->
            </div>
            <div class="testimonial-slider">
                
            <?php
            for($i=0;$i<count($json['testimonial']);$i++)
            {
            ?>
              <div class="testimonial-item hover-bg-main">
                <div class="testimonial-item__rating mb-3">
                 
                </div>
                <p class="testimonial-item__desc">“<?php echo  $json['testimonial'][$i]['tmcontent'];?>”</p>
                <div class="testimonial-item__quote">
                  <img src="assets/images/icons/quote.svg" alt="" class="quote quote-white">
                  <img src="assets/images/icons/quote-dark.svg" alt="" class="quote quote-dark">
                </div>
                <div class="client-info d-flex align-items-center gap-3">
                 
                  <div class="client-info__content">
                    <h5 class="client-info__name mb-2"><?php echo  $json['testimonial'][$i]['tmname'];?></h5>
                    
                  </div>
                </div>
              </div>
              <?php }?>
            </div>
          </div>
        </section>
        <?php }?>
        <!-- ======================= Testimonial Section End ============================ -->
         <!-- =========================== Blog Section Start ========================== -->
         <?php
               if(count($json['homeblog'])>1)
               {
               ?>
         <section class="blog padding-y-60 section-bg position-relative z-index-1 overflow-hidden">
            <img src="assets/images/shapes/pattern-five.png" class="position-absolute end-0 top-0 z-index--1" alt="">
            <div class="container container-two">
               <div class="section-heading style-left style-flex flx-between align-items-end gap-3">
                  <div class="section-heading__inner">
                     <h3 class="section-heading__title">Browse all latest blogs and articles</h3>
                  </div>
                  <a href="blog.php" class="btn btn-main btn-lg pill">Browse All Articles </a>
               </div>
               
               <div class="row gy-4">
                    <?php
                    for($i=0;$i<3;$i++)
                    {
                    ?>
                  <div class="col-lg-4 col-sm-6">
                     <div class="blog-item">
                        <div class="blog-item__thumb">
                           <a href="post.php?post_id=<?php echo $json['homeblog'][$i]['id'];?>" class="link">
                           <img src="<?php echo  $json['homeblog'][$i]['artimg'];?>" class="cover-img" alt="">
                           </a>
                        </div>
                        <div class="blog-item__content">
                           <div class="blog-item__top flx-align">
                              
                              <div class="blog-item__date font-14 flx-align gap-2 font-14 text-heading fw-500"> 
                                 <span class="icon">
                                 <img src="assets/images/icons/calendar.svg" alt="" class="white-version">
                                 <img src="assets/images/icons/calendar-white.svg" alt="" class="dark-version">
                                 </span> 
                                 <span class="text"><?php echo  $json['homeblog'][$i]['artdate'];?></span>
                              </div>
                           </div>
                           <h5 class="blog-item__title">
                              <a href="post.php?post_id=<?php echo $json['homeblog'][$i]['id'];?>" class="link"><?php echo  $json['homeblog'][$i]['arttitle'];?></a>
                           </h5>
                           <a href="post.php?post_id=<?php echo $json['homeblog'][$i]['id'];?>" class="btn btn-outline-light pill fw-600">Read More </a>
                        </div>
                     </div>
                  </div>
                    <?php }?>
               </div>
               
            </div>
         </section>
         <?php }?>
         <!-- =========================== Blog Section End ========================== -->
         <!-- ======================= Become seller section start ==================== -->
         <section class="seller padding-y-60">
            <div class="container container-two">
               <div class="row gy-4">
                  
                  
                  <div class="col-lg-12">
                     <div class="support position-relative z-index-1">
                        <img src="assets/images/shapes/spider-net-sm.png" alt="" class="spider-net position-absolute top-0 end-0 z-index--1">
                        <img src="assets/images/shapes/arrow-shape.png" alt="" class="arrow-shape">
                        <div class="row align-items-center">
                           <div class="col-lg-1 d-lg-block d-none"></div>
                           <div class="col-lg-3 col-md-4 d-md-block d-none">
                              <div class="support-thumb text-center">
                                 <img src="assets/images/thumbs/support-img.png" alt="">
                              </div>
                           </div>
                           <div class="col-lg-3 d-lg-block d-none"></div>
                           <div class="col-lg-5 col-md-8">
                              <div class="support-content">
                                 <h3 class="support-content__title mb-3">Support 24/7</h3>
                                 <p class="support-content__desc">Wanna talk? Send us a message</p>
                                 <a href="mailto:<?php echo $json['frontend']['contactemail'];?>" class="btn btn-static-black btn-lg fw-300 pill"><?php echo $json['frontend']['contactemail'];?></a>
                              </div>
                           </div>
                        </div>
                     </div>
                  </div>
               </div>
            </div>
         </section>
         <!-- ======================= Become seller section End ==================== -->


<?php
include('footer.php');
?>