<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
          <ol class="carousel-indicators">
            <li data-target="#carouselExampleIndicators" data-slide-to="0"class="active"></li>
            <li data-target="#carouselExampleIndicators" data-slide-to="1"></li> 
            <li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
          </ol>
          <div class="carousel-inner">
            <div class="carousel-item active">
              <img src="<?php echo base_url('assets/img/EH_logo.jpg') ?>" class="d-block w-100" alt="...">
            </div>
            <div class="carousel-item">
              <img src="<?php echo base_url('assets/img/EH_logo1.jpg') ?>" class="d-block w-100" alt="...">
            </div>
            <div class="carousel-item">
              <img src="<?php echo base_url('assets/img/EH_logo2.jpg') ?>" class="d-block w-100" alt="...">
            </div>
          </div>

          <a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
            <span class="carousel-control-prev-icon" aria-hidden="true"></span>
            <span class="sr-only">Previous</span>
          </a>
          <a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
            <span class="carousel-control-next-icon" aria-hidden="true"></span>
            <span class="sr-only">Next</span>
          </a>
    </div>
<div class="container-fluid mb-4"> 

   <div class="row text-center mt-4"> 
      <div class="ml-2 row">
      <?php foreach ($data as $brg) : ?>
          <div class="col mb-5">
              <div class="card" style="width: 16rem;">
                <div class="d-flex" style="width: 250px; height: 200px; overflow: hidden; align-items: center; justify-content: center;">
                    <img src="<?php echo base_url().'/uploads/'.$brg->gambar ?>" class="img-fluid" alt="...">
                </div>
                <div class="card-body">
                  <div class="row">
                    <div class="col">
                      <h5 class="card-title mb-1"><b><?php echo $brg->nama_brg ?></b></h5>
                      <span class="mb-3" style="color: red;">Rp. <?php echo number_format($brg->harga+$brg->keuntungan, 0,',','.') ?></span> <br>
                      <small>
                        <?php 
                          $shortdsc = substr($brg->keterangan, 0, 50);
                          $shortdsc .= "...";
                          echo $shortdsc; 
                        ?>
                      </small>
                    </div>
                  </div>
                  <div class="row mt-2">
                    <div class="col">
                      <?php echo anchor('dashboard/tambah_ke_keranjang/' .$brg->id_brg,'<div class="btn btn-sm btn-primary btn-block">Tambah</div>') ?>
                    </div>
                    <div class="col">
                      <?php echo anchor('dashboard/detail/' .$brg->id_brg,'<div class="btn btn-sm btn-secondary btn-block">Detail</div>') ?>
                    </div>
                  </div>
                </div>
              </div>
            </div>
    <?php endforeach; ?>

    
    </div>
  </div>
</div>

