<section>
        <div class="w-100 pt-60 pb-120 position-relative">
            <div class="container">
                <div class="product-detail position-relative w-100">
                    <div class="row mrg30">
                        <div class="col-md-12 col-sm-12 col-lg-7">
                            <div class="product-detail-imgs position-relative w-100">
                                <span class="bg-color4 rounded-pill position-absolute"><?php echo round(100-($pro->oprice*100/$pro->price));?>% OFF</span>
                                <ul class="product-detail-img-nav list-unstyled mb-0">
                                    
                                <li><div class="product-detail-mini-img overflow-hidden"><img class="img-fluid w-100" src="<?php echo base_url().'assets/images/products/'.$pro->img;?>" alt="Product Detail Mini Image 1"></div></li>
                                <?php 
                            $this->db->select("*");
                            $this->db->from("pgallery");
                           // $this->db->group_by("pcolor");
                            $this->db->where("pid",$pro->pid);
                            ///$this->db->where("pcolor!=","");
                            $res=$this->db->get()->result();//
                            $i=1;foreach($res as $res){?>
                                    <li class="img_<?php echo $res->pcolor;?>"><div class="product-detail-mini-img overflow-hidden"><img class="img-fluid w-100" src="<?php echo base_url().'assets/images/products/'.$res->pg_img;?>" alt="Product Detail Mini Image 1"></div></li><?php }?> 
                                    
                                </ul>
                                <ul class="product-detail-big-imgs list-unstyled mb-0">
                                    
                                <li><div class="product-detail-big-img overflow-hidden"><a href="<?php echo base_url().'assets/images/products/'.$pro->img;?>" data-fancybox="gallery" title=""><img class="img-fluid w-100" src="<?php echo base_url().'assets/images/products/'.$pro->img;?>" alt="Product Detail Big Image 1"><i class="fi fi-rr-eye rounded-circle"></i></a></div></li>
                                    <?php  $this->db->select("*");
                            $this->db->from("pgallery");
                           // $this->db->group_by("pcolor");
                            $this->db->where("pid",$pro->pid);
                            ///$this->db->where("pcolor!=","");
                            $res=$this->db->get()->result();//
                            foreach($res as $res){?>
                                    <li  class="img_<?php echo $res->pcolor;?>"><div class="product-detail-big-img overflow-hidden"><a href="<?php echo base_url().'assets/images/products/'.$res->pg_img;?>" data-fancybox="gallery" title=""><img class="img-fluid w-100" src="<?php echo base_url().'assets/images/products/'.$res->pg_img;?>" alt="Product Detail Big Image 1"><i class="fi fi-rr-eye rounded-circle"></i></a></div></li>
                                    <?php }?> 
                                </ul>
                            </div><!-- Product Detail Images -->
                        </div>
                        <div class="col-md-12 col-sm-12 col-lg-5">
                            <div class="product-detail-info position-relative w-100">
                                <div class="product-rate-review d-flex flex-wrap align-items-center">
                                    <span class="d-inline-block rate"><i class="fas fa-star on"></i><i class="fas fa-star on"></i><i class="fas fa-star on"></i><i class="fas fa-star on"></i><i class="fas fa-star off"></i></span>
                                    <a class="d-inline-block review-link" href="javascript:void(0);" title="">(1 customer review)</a>
                                </div>
                                <h2 class="mb-0"><?php echo $pro->title;?></h2>
                                <span class="d-block price">₹<?php echo $pro->oprice;?>  <del>₹<?php echo $pro->price;?></del></span>
                                <ul class="product-stock-info list-unstyled mb-0">
                                    <li>In stock</li>
                                    <li>Free delivery available</li>
                                    <li>Sales 30% Off Use Code: MOTIVE30</li>
                                </ul>
                                <p class="mb-0"><?php echo $pro->sdesc;?></p>
                                <div class="products-color d-flex flex-wrap align-items-center w-100">
                                    <span>Colors:</span>
                                    <a class="bg-color6 active" href="javascript:void(0);" title=""></a>
                                    <a class="bg-color7" href="javascript:void(0);" title=""></a>
                                    <a class="bg-color8" href="javascript:void(0);" title=""></a>
                                </div>
                                <?php if($pro->psizes!="" && $pro->psizes!="NA"){?>
                                <div class="products-size d-flex flex-wrap align-items-center w-100">
                                    <span>Size:</span>
                                    <?php $sizes=explode(",",$pro->psizes);
                                            $i=1;foreach($sizes as $size){?>
                                    <a href="javascript:void(0);" title="<?php echo $size;?>"><?php echo $size;?></a>
                                    <?php $i++;}?>
                                </div><?php }?>
                                <div class="product-bottom d-flex flex-wrap align-items-center w-100 pt-5">
                                    <div class="product-quanty">
                                        <input type="number" class="qty" value="01">
                                    </div>
                                    <button class="theme-btn bg-color1" type="submit">Add to Cart<span></span><span></span><span></span><span></span></button>
                                    <a class="heart-btn d-inline-block rounded-circle" href="wishlist.html" title=""><i class="fi-rr-heart"></i></a>
                                </div>
                            </div>
                        </div>
                    </div>
                </div><!-- Product Detail -->
            </div>
        </div>
    </section>
    <section>
        <div class="w-100 pt-110 bg-color5 pb-120 position-relative">
            <div class="container">
                <div class="product-tabs position-relative w-100">
                    <ul class="nav nav-tabs">
                        <li class="nav-item"><button class="nav-link active" data-bs-toggle="tab" data-bs-target="#product-detail-tab1-1" type="button">Description</button></li>
                        
                        <li class="nav-item"><button class="nav-link" data-bs-toggle="tab" data-bs-target="#product-detail-tab1-3" type="button">Reviews</button></li>
                    </ul>
                    <div class="tab-content">
                        <div class="tab-pane fade show active" id="product-detail-tab1-1">
                            <div class="product-detail-tab-content w-100">
                                <div class="row mrg30">
                                    <div class="col-md-12 col-sm-12 col-lg-12">
                                        <h4 class="mb-0">Specifications:</h4>
                                        <p class="mb-0"><?php echo $pro->desc;?></p>
                                    </div>
                                
                                    <div class="col-md-12 col-sm-12 col-lg-12">
                                        <ul class="product-detail-list d-flex flex-wrap list-unstyled mb-0">
                                            <li>
                                                <div class="product-desc-info-box w-100">
                                                    <span class="rounded-circle"><i class="fi fi-rr-box-alt"></i></span>
                                                    <h4 class="mb-0">Easy Returns</h4>
                                                </div>
                                            </li>
                                            <li>
                                                <div class="product-desc-info-box w-100">
                                                    <span class="rounded-circle"><i class="fi fi-rr-thumbs-up"></i></span>
                                                    <h4 class="mb-0">Quality Service</h4>
                                                </div>
                                            </li>
                                            <li>
                                                <div class="product-desc-info-box w-100">
                                                    <span class="rounded-circle"><i class="fi fi-rr-shield-check"></i></span>
                                                    <h4 class="mb-0">Original Product</h4>
                                                </div>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="tab-pane fade" id="product-detail-tab1-3">
                            <div class="product-detail-tab-content w-100">
                                <div class="row mrg30">
                                    <div class="col-md-12 col-sm-12 col-lg-12">
                                        <h4 class="mb-0">01 Review for this product</h4>
                                        <ul class="comments list-unstyled mb-0 w-100">
                                            <li>
                                                <div class="comment d-flex flex-wrap w-100">
                                                    <img class="img-fluid rounded-circle" src="<?php echo base_url();?>assets/images/resources/review-img1.jpg" alt="Review Image 1" height="60" width="60">
                                                    <div class="comment-detail">
                                                        <h5>Eleanor Pena</h5>
                                                        <span class="d-inline-block rate"><i class="fas fa-star on"></i><i class="fas fa-star on"></i><i class="fas fa-star on"></i><i class="fas fa-star on"></i><i class="fas fa-star off"></i></span>
                                                        <p>“We’ve created a full-stack structure for our working workflow processes, were from the funny the century initial all the made, have spare to negatives. ”</p>
                                                    </div>
                                                </div><!-- Comments -->
                                            </li>
                                            <li>
                                                <div class="comment d-flex flex-wrap w-100">
                                                    <img class="img-fluid rounded-circle" src="<?php echo base_url();?>assets/images/resources/review-img2.jpg" alt="Review Image 2" height="60" width="60">
                                                    <div class="comment-detail">
                                                        <h5>Devon Lane</h5>
                                                        <span class="d-inline-block rate"><i class="fas fa-star on"></i><i class="fas fa-star on"></i><i class="fas fa-star on"></i><i class="fas fa-star on"></i><i class="fas fa-star on"></i></span>
                                                        <p>“We’ve created a full-stack structure for our working workflow processes, were from the funny the century initial all the made, have spare to negatives. ”</p>
                                                    </div>
                                                </div><!-- Comments -->
                                            </li>
                                            <li>
                                                <div class="comment d-flex flex-wrap w-100">
                                                    <img class="img-fluid rounded-circle" src="<?php echo base_url();?>assets/images/resources/review-img3.jpg" alt="Review Image 3" height="60" width="60">
                                                    <div class="comment-detail">
                                                        <h5>Courtney Henry</h5>
                                                        <span class="d-inline-block rate"><i class="fas fa-star on"></i><i class="fas fa-star on"></i><i class="fas fa-star on"></i><i class="fas fa-star off"></i><i class="fas fa-star off"></i></span>
                                                        <p>“We’ve created a full-stack structure for our working workflow processes, were from the funny the century initial all the made, have spare to negatives. ”</p>
                                                    </div>
                                                </div><!-- Comments -->
                                            </li>
                                        </ul><!-- Comments -->
                                    </div>
                                    
                                </div>
                            </div>                            
                        </div>
                    </div>                      
                </div><!-- Product Tabs -->
            </div>
        </div>
    </section>
    <section>
        <div class="w-100 pt-110 pb-120 position-relative">
            <div class="container">
                <div class="sec-title-wrap d-flex flex-wrap align-items-end justify-content-between w-100">
                    <div class="sec-title position-relative">
                        <span class="d-block text-color4">- The Week's</span>
                        <h2 class="mb-0">Related Products</h2>
                    </div><!-- Section Title -->
                   
                </div><!-- Section Title Wrap -->
                <div class="products-wrap res-row position-relative w-100">
                    <div class="row mrg30">
                    <?php 
									$this->db->select("*");
									$this->db->from('products');		
									//$this->db->join("mcategory","products.cid=mcategory.mid");
									//$this->db->join("category","products.sid=category.cid","left");
									$this->db->where("products.feat!=","");
									$this->db->where("products.pid!=",$pro->pid);
									$this->db->where("products.cid",$pro->cid);
									$this->db->where("products.sid",$pro->sid);
									$this->db->order_by("products.pid","desc");
                                    $this->db->limit(10);
									$feat=$this->db->get()->result();
                                    //echo "<pre>";print_r($feat);
									foreach($feat as $featp){?>
                         <div class="col-md-4 col-sm-6 col-lg-3">
                            <div class="product-box position-relative w-100">
                                <div class="product-img overflow-hidden position-relative w-100">
                                    <a href="<?php echo base_url().'product/'.$featp->prod_slug;?>" title=""><img class="img-fluid w-100" src="<?php echo base_url().'assets/images/products/'.$featp->img;?>" alt="Product Image 1"></a>
                                    <div class="product-btns position-absolute">
                                        <a class="wishlist-btn" href="wishlist.html" title=""><i class="fi fi-rr-heart"></i></a>
                                        <a class="cart-btn" href="#" title=""><i class="fi-rr-shopping-bag"></i></a>
                                        <a class="expand-btn" href="<?php echo base_url();?>assets/images/resources/product-img2-1.jpg" data-fancybox title=""><i class="fi fi-rr-picture"></i></a>
                                    </div>
                                </div>
                                <div class="product-info w-100">
                                    <h4 class="mb-0"><a href="<?php echo base_url().'product/'.$featp->prod_slug;?>" title=""><?php echo $featp->title;?></a></h4>
                                    <span class="price">₹<?php echo $featp->oprice;?></span>
                                    <del class="text-danger">₹<?php echo $featp->price;?></del>
                                    <!-- <div class="products-color d-flex flex-wrap">
                                        <a class="bg-color6 active" href="javascript:void(0);" title=""></a>
                                        <a class="bg-color7" href="javascript:void(0);" title=""></a>
                                        <a class="bg-color8" href="javascript:void(0);" title=""></a>
                                    </div> -->
                                </div>
                            </div>
                        </div>
                        <?php }?> 
                    </div>
                </div><!-- Products Wrap -->
            </div>
        </div>
    </section>
   