<div class="row ">
   <form id="form_edit_productos" action="" method="post" accept-charset="utf-8">
      <!-- Token CSRF -->
      <input type="hidden" name="csrf_test_name" value="<?= csrf_hash(); ?>">
         <div class="row justify-content-center">
            <div class="col-lg-2 col-4">
               <div class="card " style="width:100%;">
                  <img id="img_file_input_foto_edit" class="p-2" onclick="ver_img()" alt="Foto" />
               </div>
            </div>
            <div class="col-lg-10 col-12">
               <div class="row g-2">
                  <div class="col-lg-2 col-4">
                     <div class="form-floating">
                        <input type="text" class="form-control" name="id_producto" placeholder=" " maxlength="5" required value="<?php if (isset($producto['id'])) { echo $producto['id']; } ?>">
                        <label for="id_producto">Id producto</label>
                     </div>
                  </div>
                  <div class="col-lg-2 col-8">
                     <div class="form-floating">
                        <input type="text" class="form-control" name="codigo" placeholder="Codigo" maxlength="16" style="text-transform: uppercase;" value="<?php if (isset($producto['codigo'])) { echo $producto['codigo']; } ?>">
                        <label for="codigo">Codigo</label>
                     </div>
                  </div>
                  <div class="col-lg-6 col-9">
                     <div class="form-floating">
                        <input type="text" class="form-control" name="descripcion" placeholder="Descripcion" required value="<?php if (isset($producto['descripcion'])) { echo $producto['descripcion']; } ?>">
                        <label for="descripcion">Descripcion</label>
                     </div>
                  </div>
                  <div class="col-lg-2 col-3">
                     <div class="form-floating">
                        <input type="number" step="any" class="form-control" name="stock" placeholder="Stock" maxlength="10" value="<?php if (isset($producto['stock'])) { echo $producto['stock']; } ?>">
                        <label for="stock">Stock</label>
                     </div>
                  </div>
               </div>

               <div class="row g-2">
                  <div class="col-lg-3 col-3">
                     <div class="form-floating">
                        <input type="number" step="any" class="form-control" name="costo_d_edit" placeholder="costo" maxlength="10" value="<?php if (isset($producto['costo'])) { echo $producto['costo']; } ?>">
                        <label for="costo">Costo_D</label>
                     </div>
                  </div>
                  <div class="col-lg-3 col-3">
                     <div class="form-floating">
                        <input type="number" step="any" class="form-control" name="precio_d_edit" placeholder="Precio_d" maxlength="10" value="<?php if (isset($producto['precio_d'])) { echo $producto['precio_d']; } ?>">
                        <label for="precio_d">Precio_D</label>
                     </div>
                  </div>
                  <div class="col-lg-3 col-3">
                     <div class="form-floating">
                        <input type="number" step="any" class="form-control" name="precio_bs_edit" placeholder="Precio_Bs" maxlength="20" value="<?php if (isset($producto['precio_bs'])) { echo $producto['precio_bs']; } ?>">
                        <label for="precio_bs">Precio_Bs</label>
                     </div>
                  </div>
                  <div class="col-lg-3 col-3">
                     <div class="form-floating">
                        <input type="number" step="any" class="form-control" name="tasa_productos_edit" placeholder="Tasa" maxlength="10" value="<?php if (isset($dataConfig['tasa'])) { echo $dataConfig['tasa']; } ?>">
                        <label for="tasa">Tasa</label>
                     </div>
                  </div>
               </div>

               <div class="row g-2">
                  <div class="col-lg-3 col-6">
                     <div class="form-floating">
                        <select name="categoria_edit" id="categoria_edit" class="form-select">
                           <option value="Repuestos">Repuestos</option>
                           <option value="Consumibles">Consumibles</option>
                           <option value="Servicios">Servicios</option>
                           <option value="Equipos">Equipos</option>
                           <option value="Activos">Activos</option>
                           <option value="Otros">Otros</option>
                        </select>
                        <label for="categoria">Categoria</label>
                     </div>
                  </div>
                  <div class="col-lg-3 col-6">
                     <div class="form-floating">
                        <select name="condicion_edit" id="condicion_edit" class="form-select">
                           <option value="Nuevo">Nuevo</option>
                           <option value="Usado">Usado</option>
                           <option value="Reparado">Reparado</option>
                        </select>
                        <label for="condicion">Condicion</label>
                     </div>
                  </div>
                  <div class="col-lg-3 col-6">
                     <div class="form-floating">
                        <input type="text" class="form-control" name="compatible_con" placeholder="compatible_con" style="text-transform: uppercase;" value="<?php if (isset($producto['compatible_con'])) { echo $producto['compatible_con']; } ?>">
                        <label for="compatible_con">Compatible con</label>
                     </div>
                  </div>
                  <div class="col-lg-3 col-6 align-content-end">
                     <div class="form-check form-switch">
                        <input class="form-check-input" type="checkbox" role="switch" id="check_tienda_edit" name="check_tienda_edit" <?php if (isset($productos['tienda'])) { if ($productos['tienda'] == 1) { echo 'checked'; } } ?>>
                        <label class="form-check-label" for="check_tienda">Tienda</label>
                     </div>
                  </div>
               </div>
               
            </div>
         </div>

      <div class="row g-1 mt-3">
         
         <div class="col-7">
            <label for="formFile" class="form-label">Actualizar Foto</label>
            <input class="form-control" type="file" id="file_input_foto_edit" name="foto_edit" value="<?php if (isset($producto['foto'])) { echo $producto['foto']; } ?>">
            
         </div>
         <div class="col-5 align-content-end">
            <div class="d-flex justify-content-center">
               <div class="card " style="width:40%;">
                  <img id="img_file_input_foto_edit_ver" class="p-2" onclick="ver_img()" alt="Foto" />
               </div>
            </div>
         </div>
         
      </div>


      <hr>
      <div class="d-flex justify-content-between">
         <div></div>
         <div><button type="submit" class="btn btn-secondary">Enviar</button></div>
         
      </div>
   </form>
</div>