.lista-productos {
  width: 80%;
  margin: 0 auto;
  padding: 3rem 1rem;
}

.lista-productos h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #333;
}

/* Cada producto */
.item-producto {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 2rem;
  border-bottom: 1px solid #ddd;
  padding-bottom: 20px;
  flex-wrap: wrap; /* permite que en móvil se acomode */
  
}

.item-producto img {
  width: 10%;          /* ocupa solo el 20% del contenedor */
  height: auto;
  object-fit: cover;   /* se ajusta al contenedor y recorta si es necesario */
  border-radius: 10px;
  background: #f5f5f5;
  flex-shrink: 0;
}

.descripcion {
  flex: 1;             /* ocupa el resto (80%) */
}



.descripcion h3 {
  margin: 0 0 10px;
  color: #333;
}

.descripcion p {
  margin: 0 0 10px;
  color: #555;
  line-height: 1.4;
}

.descripcion a.btn-vermas {
  display: inline-block;
  padding: 5px 10px;
  background-color: #007bff;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  font-size: 0.9rem;
  transition: background-color 0.3s;
}

.descripcion a.btn-vermas:hover {
  background-color: #0056b3;
}

/* ----- Responsividad ----- */
@media (max-width: 1024px) {
  .item-producto img {
    width: 150px;
    height: 120px;
  }
}

@media (max-width: 768px) {
  .item-producto {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .item-producto img {
    width: 80%;
    height: auto;
  }

  .descripcion {
    width: 100%;
  }
}





/*modal--------------------------------------------*/

.modal {
  display: none; /* oculto por defecto */
  position: fixed;
  z-index: 1000;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.8);
}

.modal-content {
  display: block;
  margin: auto;
  max-width: 90%;
  max-height: 80%;
  border-radius: 10px;
}

#modal-caption {
  margin: 15px auto;
  text-align: center;
  color: #fff;
  font-size: 1rem;
}

.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: #bbb;
}
