body {
  margin: 0 20px;
  font-family: "Montserrat", sans-serif;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  margin-left: 2%;
  margin-right: 1%;
}


.logo img {
  width: 150px;
  height: auto;
}

.title h1 {
  font-size: 32px;
  font-weight: bold;
}
.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

#galeria {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}
  
.image-container {
  position: relative;
  margin-bottom: 20px;
  width: 200px;
  height: 200px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s;
}

.image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-container:hover {
  cursor: pointer;
  transform: scale(1.10);
}
  
.image-title {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  max-width: 200px;
  padding: 5px;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis; 
  white-space: nowrap; 
  box-sizing: border-box;
}

/* Estilo para los botones */
button.mas, button.menos {
  border: none; /* Eliminar borde */
  background: none; /* Eliminar fondo */
  padding: 0; /* Eliminar padding */
  cursor: pointer; /* Cambiar cursor a pointer */
  font-size: 40px;
  user-select: none;
}

button.menos {
  color: #d30101;
}

button.mas  {
  color: rgb(9, 207, 2);
}

.resaltado {
  background-color: yellow;
  font-weight: bold;
}

select {
  border-radius: 5px;
}

.filtros-dropdown {
  display: none;
  position: absolute;
  top: 40%;
  left: 0%;
  background-color: lightgrey;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
  border-radius: 5px;
  padding: 2%;
}

.filtros-dropdown select {
  display: block;
  width: 100%;
  padding: 8px 16px;
  border: none;
  font-size: 16px;
  font-family: "Montserrat", sans-serif;
  margin-bottom: 20px;
}

.filtros-container {
  position: relative;
}

#volverBtn {
  display: block;
  margin-top: 5%;
  margin: 0 auto;
}

#btnFiltros, #vistaGeneral, #sinStock, #volverBtn, #reiniciarFiltros, #buscarBtn {
  background-color: #4CAF50;
  color: white;
  padding: 10px 20px;
  border: none;
  cursor: pointer;
  border-radius: 5px;
  font-weight: bold;
  font-family: "Montserrat", sans-serif;  
  margin-bottom: 5%;
}

#btnFiltros:hover, #vistaGeneral:hover, #sinStock:hover, #volverBtn:hover, #reiniciarFiltros:hover, #buscarBtn:hover {
  background-color: #45a049;
}

#reiniciarFiltros {
  margin: 0 auto;
  display: block;
}

.image-container img {
  touch-action: none;
}


table {
  border-collapse: collapse;
  width: 90%;
  margin: 20px auto;
  background-color: #fff;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
th, td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #dddddd;
}
th {
  background-color: #f2f2f2;
  text-align: center;
}
tr:hover {
  background-color: #f2f2f2;
}
caption {
  font-size: 1.5em;
  font-weight: bold;
  margin: 10px;
}

/* Estilo para el input */
.stock {
  padding: 8px 10px;
  width: 15%; /* Ajusta el ancho según tu preferencia */
  border: 1px solid #dddddd;
  border-radius: 3px;
  box-sizing: border-box;
  text-align: center;
  font-size: inherit;
  transition: border-color 0.3s ease;
  appearance: none;
}

/* Eliminar botones para subir y bajar números en WebKit */
.stock::-webkit-inner-spin-button,
.stock::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Cambiar el estilo del input al enfocarlo */
.stock:focus {
  outline: none;
  border-color: #aaa; /* Cambia el color del borde al enfocar */
}

#buscador {
  margin-top: 20px;
  display: inline-block;
  align-items: center;
}

#buscarInput {
  padding: 8px;
  border: 1px solid #ccc;
  display: inline-block;
  border-radius: 4px;
  font-size: 16px;
  width: 50%;
}

#buscarBtn {
  display: inline-block;
}

/* Media query para dispositivos móviles */
@media only screen and (max-width: 600px) {
  header {
    margin-left: 0;
    margin-right: 0;
  }

  .logo img {
    width: 100px;
  }

  .title h1 {
    font-size: 20px;
  }

  .gallery {
    gap: 5px;
  }

  .image-container {
    width: 100px;
    height: 100px;
  }

  .image-title {
    font-size: 8px;
    max-width: 100px;
  }

  /* Ocultar botones de vistas en dispositivos móviles */
  #vistaGeneral,
  #sinStock {
    display: none;
  }

  table {
    font-size: 12px;
    width: 100%; /* Ajustar el ancho al 100% */
    margin: 0 auto; /* Alinear al centro */
    margin-bottom: 5%;
  }

  .stock {
    width: 100%; /* Ancho ajustado al 80% del contenedor */
  }

  /* Estilo para input y select para evitar estilos predeterminados del navegador */
  input[type="text"],
  select {
    -webkit-appearance: none; /* Desactivar apariencia de WebKit */
    -moz-appearance: none; /* Desactivar apariencia de Gecko (Firefox) */
    appearance: none; /* Desactivar apariencia predeterminada */
    background-color: white; /* Fondo transparente */
    border: 1px solid #ccc; /* Borde personalizado */
    border-radius: 3px; /* Borde redondeado */
    padding: 8px; /* Relleno */
    font-size: 16px; /* Tamaño de fuente */
    color: black;
  }

  #buscarInput {
    height: 20px;
  }

  #buscarBtn {
    padding-top: 13px;
  }
  * {
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE 10+ */
    user-select: none; /* estándar */
  }
}