
<section class="page-section bg-light-alfa-30" data-background="<?= base_url() ?>assets/section-bg-5.jpg">
    <div class="relative container align-left">

        <div class="row">
            <?php
            $cari = $this->input->post('keyword');
            ?>
            <div class="col-md-8">
                <h1 class="hs-line-11 font-alt mb-20 mb-xs-0">Data Produk</h1>
                <div class="hs-line-4 font-alt black">
                    Hasil Pencarian "<?= $cari ?>"
                </div>
            </div>

            <div class="col-md-4 mt-30">
                <div class="mod-breadcrumbs font-alt align-right">
                    <a href="<?= base_url() ?>toko">Toko</a>&nbsp;/&nbsp;<a href="#">Searching</a>&nbsp;/&nbsp;<span><?= $cari ?></span>
                </div>

            </div>
        </div>

    </div>
</section>
<!-- End Head Section -->
<!-- Section -->
<section class="page-section pt-10">
    <div class="container relative">

        <div class="row">

            <!-- Content -->
            <div class="col-sm-8">
                <div  id="main_content">
                    <div class="row multi-columns-row">

                        <!-- Shop Item -->
                        <?php if (!empty($posts)): foreach ($posts as $pdk): ?>
                                <div class="col-md-4 col-lg-4 mb-60 mb-xs-40">

                                    <div class="post-prev-img">

                                        <a href="<?= base_url() ?>toko/produk/<?= $pdk->id ?>/<?php echo url_title($pdk->product_name) ?>.html">
                                            <img src="<?= base_url() ?>assets/product_image/<?= $pdk->product_image ?>" alt="" /></a>

                                        <div class="intro-label">
                                            <span class="label label-danger bg-red">Sale</span>
                                        </div>

                                    </div>

                                    <div class="post-prev-title font-alt align-center">
                                        <a href="<?= base_url() ?>toko/produk/<?= $pdk->id ?>/<?php echo url_title($pdk->product_name) ?>.html">
                                            <?= $pdk->product_name ?></a>
                                    </div>

                                    <div class="post-prev-text align-center">

                                        <strong><?= number_format($pdk->price) ?></strong>
                                    </div>

                                    <div class="post-prev-more align-center">
                                        <a href="<?= base_url() ?>toko/produk/<?= $pdk->id ?>/<?php echo url_title($pdk->product_name) ?>.html" class="btn btn-mod btn-gray btn-round">
                                            <i class="fa fa-shopping-cart"></i> Detail
                                        </a>
                                    </div>

                                </div>
                                <!-- End Shop Item -->
                                <?php
                            endforeach;
                        else:
                            ?>
                            <p>Produk belum ada</p>
                        <?php endif; ?> 

                    </div>
                    <div class="loading" style="display: none;">
                        <div class="content">
                            <center>
                                <img src="<?php echo base_url() . 'assets/loading.gif'; ?>" width="4"/>
                            </center>
                        </div>
                    </div>
                    <center>
                        <?php echo $this->ajax_pagination->create_links(); ?>
                    </center>
                    <br/>
                </div>
            </div>
            <!-- End Content -->

            <!-- Sidebar -->
            <div class="col-sm-4 col-md-3 col-md-offset-1 sidebar">

                <!-- Widget -->
                <div class="widget">

                    <h5 class="widget-title font-alt">Cart</h5>

                    <div class="widget-body">


                    </div>

                </div>
                <!-- End Widget -->

                <!-- Widget -->
                <div class="widget">

                    <h5 class="widget-title font-alt">Shop Categories</h5>

                    <div class="widget-body">
                        <ul class="clearlist widget-menu">
                            <li>
                                <a href="<?= base_url() ?>toko/kategori/Tinta.html?id=1" title="">Tinta</a>
                            </li>
                           <!-- <li>
                                <a href="<?= base_url() ?>toko/kategori/Toner.html?id=2" title="">Toner</a>

                            </li> -->
                            <li>
                                <a href="<?= base_url() ?>toko/kategori/Compatible.html?id=3" title="">Compatible</a>

                            </li>
                            <li>
                                <a href="<?= base_url() ?>toko/kategori/Ciss.html?id=4" title="">Ciss</a>

                            </li>
                            <li>
                                <a href="<?= base_url() ?>toko/kategori/Photo-paper.html?id=5" title="">Photo Paper</a>
                            </li>
                        </ul>
                    </div>

                </div>
                <!-- End Widget -->

                <!-- Widget -->
                <div class="widget">

                    <h5 class="widget-title font-alt">Bestsellers</h5>

                    <div class="widget-body">
                        <ul class="clearlist widget-posts">
                            <ul class="clearlist widget-posts">

                                <!-- Preview item -->
                                <?php
                                foreach ($feature as $fre) {
                                    ?>
                                    <li class="clearfix">
                                        <a href=""><img src="<?= base_url() ?>assets/product_image/<?= $fre->product_image ?>" width="20%" alt="" class="widget-posts-img" /></a>
                                        <div class="widget-posts-descr">
                                            <a href="#" title=""><?= $fre->product_name ?></a>
                                            <div>

                                            </div>
                                            <div>
                                                <a href="#" class="btn btn-mod btn-gray btn-round"><i class="fa fa-shopping-cart"></i> Add to cart</a> 
                                            </div>
                                        </div>
                                    </li>
                                    <!-- End Preview item -->
                                    <?php
                                }
                                ?>

                            </ul>

                        </ul>
                    </div>

                </div>
                <!-- End Widget -->

                <div class="widget">

                    <h5 class="widget-title font-alt">
                        <a href="<?= base_url() ?>cara_belanja.html">
                            <i class="fa fa-chevron-circle-right"></i> cara belanja
                        </a>
                    </h5>

                </div>
                <div class="widget">

                    <a href="https://www.bukalapak.com/amazinkstore">
                        <img class="img-responsive" src="<?= base_url() ?>assets/images/logo-bukalapak.png">
                    </a>
                    <a href="https://www.tokopedia.com/amazink">
                        <img class="img-responsive" src="<?= base_url() ?>assets/images/LOGO-TOKOPEDIA.png">
                    </a>

                </div>

            </div>
            <!-- End Sidebar -->
        </div>

    </div>
</section>
<!-- End Section -->
