 <?php
    session_start();
    include('../conexion.php');
    include('../include/sesiones.php'); ?>
 <div class="row no-gutters shop_wrapper">
     <?php
        $fam_id = $_GET['fam_id'];
        $art_id = $_GET['art_id'];
        $casa3 = mysqli_query($con, "SELECT *,a.art_id as art_id_art FROM articulos a, articulos_has_bodegas ab where a.familias_fam_id='$fam_id' and a.art_id=ab.articulos_art_id and a.empresa='$emp_id' and ab.empresa='$emp_id' and a.art_tipo='articulo' and a.art_online='Activo' and a.art_estado='Activo' and ab.art_cantidad>0 and a.art_id!='$art_id' group by a.art_id order by rand() limit 4 ") or die(mysqli_error($con));
        while ($load1 = mysqli_fetch_array($casa3)) {
            $nombre_archivo = '../../img/articulos/' . $load1['art_id_art'] . '.jpg';  ?>
         <div class="col-lg-3">
             <?php include("funcion_tarjetas.php")?>
         </div>
         <input name="art_id" type="hidden" id="art_id" value="<?php echo $load1['art_id_art']; ?>" />
     <?php
        }
        ?>
 </div>
 <div class="modal fade" id="modal_box" tabindex="-1" role="dialog" aria-hidden="true">
     <div class="modal-dialog modal-dialog-centered" role="document">
         <div class="modal-content">
             <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
                 <span aria-hidden="true">&times;</span>
             </button>
             <div class="modal_body">
                 <div id="modal_detalle"></div>
             </div>
         </div>
     </div>
 <script>
      $(".btn_detalle").click(function() {
         id = $(this).data("id");
         $.get("./php_tienda/modal_detalles.php", "id=" + id, function(data) {
             $("#modal_detalle").html(data);
         });
         $('#modal_box').modal('show');
     });
 </script>