<div class="breadcrumb-area mb-50">
        <div class="container">
            <div class="row">
                <div class="col">
                    <div class="breadcrumb-container">
                        <ul>
                            <li><a href="#"><i class="fa fa-home"></i> Home</a></li>
                            <li><a href="#"><?php echo str_replace("-"," ",$this->uri->segment(1));?></a></li>
                            <li><a href="#"><?php echo str_replace("-"," ",$this->uri->segment(2));?></a></li>
                            <li class="active"><?php echo str_replace("-"," ",$this->uri->segment(3));?></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <div class="single-product-content ">
        <div class="container">
            <!--=======  single product content container  =======-->
            <div class="single-product-content-container mb-35">
                <div class="row">
                    <div class="col-lg-6 col-md-12 col-xs-12 d-flex flex-custom-xs-wrap flex-sm-nowrap mb-sm-35"> 
                        <!--Modal Tab Menu Start-->
                        <div class="product-small-image-list"> 
                            <div class="nav small-image-slider-single-product" role="tablist">
                                <div class="single-small-image img-full">
                                    <a data-toggle="tab" id="single-slide-tab-1" href="#single-slide1">
                                   <img src="<?php echo base_url();?>assets/images/products/<?php echo $pro->img;?>" class="img-fluid" alt=""></a>
                                </div>
                                <?php $i=2;$imgs=explode(",",$pro->extimgs);
								foreach($imgs as $img){?>
                                <div class="single-small-image img-full">
                                    <a data-toggle="tab" id="single-slide-tab-<?php echo $i;?>" href="#single-slide<?php echo $i;?>">
                                    <img src="<?php echo base_url();?>assets/images/products/<?php echo $img;?>" class="img-fluid" alt=""></a>
                                </div>
                                <?php $i++;}?>
                            </div>
                        </div>
                        <!--Modal Tab Menu End-->
                        <!-- product quickview image gallery -->
                        <div class="product-image-slider">
                            <!--Modal Tab Content Start-->
                            <div class="tab-content product-large-image-list">
                                <div class="tab-pane fade show active" id="single-slide1" role="tabpanel" aria-labelledby="single-slide-tab-1">
                                    <!--Single Product Image Start-->
                                    <div class="single-product-img easyzoom img-full">
                <img src="<?php echo base_url();?>assets/images/products/<?php echo $pro->img;?>" class="img-fluid" alt="">
                <a href="<?php echo base_url();?>assets/images/products/<?php echo $pro->img;?>" class="big-image-popup"><i class="fa fa-search-plus"></i></a>
                                    </div>
                                    <!--Single Product Image End-->
                                </div>
                                <?php $i=2;foreach($imgs as $img){?>
                                <div class="tab-pane fade" id="single-slide<?php echo $i;?>" role="tabpanel" aria-labelledby="single-slide-tab-2">
                                    <!--Single Product Image Start-->
                                    <div class="single-product-img easyzoom img-full">
                <img src="<?php echo base_url();?>assets/images/products/<?php echo $img;?>" class="img-fluid" alt="">
                <a href="<?php echo base_url();?>assets/images/products/<?php echo $img;?>" class="big-image-popup"><i class="fa fa-search-plus"></i></a>
                                    </div>
                                    <!--Single Product Image End-->
                                </div>
                                <?php $i++;}?>
                            </div>
                            <!--Modal Content End-->

                        </div>
                        <!-- end of product quickview image gallery -->
                    </div>
                    <div class="col-lg-6 col-md-12 col-xs-12">
                        <!-- product quick view description -->
                        <div class="product-feature-details">
                            <h2 class="product-title mb-15"><?php echo $pro->title;?></h2>

                            <p class="product-rating">
                                <i class="fa fa-star active"></i>
                                <i class="fa fa-star active"></i>
                                <i class="fa fa-star active"></i>
                                <i class="fa fa-star active"></i>
                                <i class="fa fa-star"></i>

                                <a href="#">(1 customer review)</a>
                            </p>
        
                            <h2 class="product-price mb-15 pbox<?php echo $pro->pid;?>"> 
                            	<?php if($pro->prod_type=="Normal"){if($pro->oprice!=""){?>
                                <span class="main-price"><i class="fa fa-inr"></i> <?php echo $pro->price;?></span>
                                <span class="discounted-price"><i class="fa fa-inr"></i><?php echo $pro->oprice;?></span>
                                                        <?php }else{?>
                               <span class="discounted-price"><i class="fa fa-inr"></i><?php echo $pro->price;?></span>
                                                        <?php }}else{$prices=explode(",",$pro->prices);$oprices=explode(",",$pro->oprices);
                                                        if($pro->oprices!=""){?>
                               <span class="main-price"><i class="fa fa-inr"></i> <?php echo $prices[0];?></span>
                               <span class="discounted-price"><i class="fa fa-inr"></i><?php echo $oprices[0];?></span>
                                                        <?php }else{?>
                               <span class="discounted-price"><i class="fa fa-inr"></i><?php echo $prices[0];?></span>
                                                <?php }}?>
                                <!--<span class="main-price">$12.90</span> 
                                <span class="discounted-price"> $10.00</span>-->
                            </h2>
        
                            <!--<p class="product-description mb-20">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco,Proin lectus ipsum, gravida et mattis vulputate, tristique ut lectus</p>-->
							<form action="" method="post" class="addtocart">
                            <input type="hidden" name="pid" value="<?php echo $pro->pid;?>" />
                        
                            <div class="size mb-20">Size: <br>
                                 <?php if($pro->prod_type=="Variant"){$type=explode(",",$pro->packs);$colsize=7;?>
                                                <select name="type" class="form-control prod_type" id="<?php echo $pro->pid;?>"><?php
                                                $i=0;foreach($type as $t){
									echo '<option value="'.$i.'">'.$t.'</option>';
                                                $i++;}?></select><?php }else{$colsize=12;}?>
                            </div>

                            <div class="cart-buttons mb-20">
                                <div class="pro-qty mr-20 mb-xs-20">
                                    <input type="text" name="qty" value="1">
                                </div>
                                <div class="add-to-cart-btn">
                                    <button type="submit" class="btn btn-success"><i class="fa fa-shopping-cart"></i> Add to Cart</button>
                                </div>
                            </div>
							</form>
                            <div class="single-product-action-btn mb-20">
                                <a href="<?php echo $pro->pid;?>" class="wishlist" data-tooltip="Add to wishlist"> <span class="icon_heart_alt"></span> </a>
                            </div>
                            <!--<div class="single-product-category mb-20">
                                <h3>Categories: <span><a href="shop-left-sidebar.html">Fast Foods</a>, <a href="shop-left-sidebar.html">Vegetables</a></span></h3>
                            </div>-->
                            <div class="social-share-buttons">
                                <h3>share this product</h3>
                                <ul>
                                    <li><a class="twitter" href="#"><i class="fa fa-whatsapp"></i></a></li>
                                    <li><a class="facebook" href="#"><i class="fa fa-facebook"></i></a></li>
                                </ul>
                            </div>
                        </div>
                        <!-- end of product quick view description -->
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="single-product-tab-section mb-35">
        <div class="container">
            <div class="row">
                <div class="col-lg-12">
                    <div class="tab-slider-wrapper">
                        <nav>
                            <div class="nav nav-tabs" id="nav-tab" role="tablist">
                                <a class="nav-item nav-link active" id="description-tab" data-toggle="tab" href="#description" role="tab"
                                    aria-selected="true">Description</a>
                               <!-- <a class="nav-item nav-link" id="review-tab" data-toggle="tab" href="#review" role="tab"
                                    aria-selected="false">Reviews (3)</a>-->
                            </div>
                        </nav>
                        <div class="tab-content" id="nav-tabContent">
                            <div class="tab-pane fade show active" id="description" role="tabpanel" aria-labelledby="description-tab">
                                <p class="product-desc"><?php echo $pro->sdesc;?></p>
                            </div>
                            <div class="tab-pane fade" id="features" role="tabpanel" aria-labelledby="features-tab">
                                <table class="table-data-sheet">
                                    <tbody>
                                        <tr class="odd">

                                            <td>Name</td>
                                            <td>Kaoreet lobortis sagittis laoreet</td>
                                        </tr>
                                        <tr class="even">

                                            <td>Color</td>
                                            <td>Yellow</td>
                                        </tr>
                                       
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <!--=====  End of single product tab  ======-->
    
    <!--=============================================
	=            Related Product slider         =
	=============================================-->
	
	<div class="slider related-product-slider mb-35">
        <div class="container">
            <div class="row">
                <div class="col-lg-12">
                    <div class="section-title">
                        <h3>Related Product</h3>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-lg-12">
                    <div class="related-product-slider-wrapper">
                    	<?php 
						$this->db->select("*");
						$this->db->from('products');		
						$this->db->join("category","products.cid=category.cid");
						//$this->db->join("subcategory","products.sid=subcategory.sid");
						$this->db->where("products.feat","yes");
						$this->db->where("products.cid",$pro->cid);
						$this->db->where("products.pid!=",$pro->pid);
						$feat=$this->db->get()->result();
						foreach($feat as $featp){?>
                        <div class="gf-product related-slider-product">
                           <div class="image">
												<a href="<?php echo base_url().str_replace(" ","-",$featp->cat_name).'/details/'.str_replace(" ","-",$featp->title).'/'.$featp->pid;?>">
                                    <span class="onsale">Sale!</span>
                                    <img src="<?php echo base_url();?>assets/images/products/<?php echo $featp->img;?>" class="img-fluid" alt="">
												</a>
												<div class="product-hover-icons">
													<a href="<?php echo $featp->pid;?>" class="wishlist" data-tooltip="Add to wishlist"> <span class="icon_heart_alt"></span> </a>
												</div>
											</div>
						   <div class="product-content">
												<!--<div class="product-categories">
													<a href="shop-left-sidebar.html">Fast Foods</a>,
													<a href="shop-left-sidebar.html">Vegetables</a>
												</div>-->
												<h3 class="product-title"><a href="<?php echo base_url().str_replace(" ","-",$featp->cat_name).'/details/'.str_replace(" ","-",$featp->title).'/'.$featp->pid;?>"><?php echo $featp->title;?></a></h3>
												<div class="price-box pbox<?php echo $featp->pid;?>">
                                                <?php if($featp->prod_type=="Normal"){if($featp->oprice!=""){?>
                        <span class="main-price"><i class="fa fa-inr"></i> <?php echo $featp->price;?></span>
                        <span class="discounted-price"><i class="fa fa-inr"></i><?php echo $featp->oprice;?></span>
                                                <?php }else{?>
                       <span class="discounted-price"><i class="fa fa-inr"></i><?php echo $featp->price;?></span>
                                                <?php }}else{$prices=explode(",",$featp->prices);$oprices=explode(",",$featp->oprices);
												if($featp->oprices!=""){?>
                       <span class="main-price"><i class="fa fa-inr"></i> <?php echo $prices[0];?></span>
                       <span class="discounted-price"><i class="fa fa-inr"></i><?php echo $oprices[0];?></span>
                                                <?php }else{?>
                       <span class="discounted-price"><i class="fa fa-inr"></i><?php echo $prices[0];?></span>
                                                <?php }}?>
												</div>
                                                <div class="row">
                                                <div class="col-md-5">
                                                <?php if($featp->prod_type=="Variant"){$type=explode(",",$featp->packs);$colsize=7;?>
                                                <select class="form-control prod_type" id="<?php echo $featp->pid;?>"><?php
                                                $i=0;foreach($type as $t){
									echo '<option value="'.$i.'">'.$t.'</option>';
                                                $i++;}?></select><?php }else{$colsize=12;}?></div> <div class="col-md-<?php echo $colsize;?>">
                                                <button class="btn btn-xs btn-success"><i class="fa fa-shopping-cart"></i> Add to Cart</button>
                                                </div></div>
											</div>
                        </div>
                        <?php }?>
                    </div>
                </div>
            </div>
        </div>
    </div>