/* ---- Contenedor principal para pagina de producto ---- */
.producto-detalles {
  display: block;
  width: 100%;
  max-width: 1000px;
  box-sizing: border-box;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 20px;
  margin: 20px auto 30px;
  overflow: hidden;
}

.producto-contenido {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 30px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Imagen a la izquierda */
.producto-imagenes {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: center;
    box-sizing: border-box;
}

.producto-imagenes img {
    display: block;
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    box-sizing: border-box;
}

/* Información a la derecha */
.producto-informacion {
    flex: 2;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.producto-informacion p {
    margin: 6px 0;
    font-size: 1rem;
    line-height: 1.4;
    color: #0077cc;
    overflow-wrap: anywhere;
}


.producto-informacion h1 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: #0077cc;
}



/* Botones */
.producto-boton1 {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.producto-boton1 a {
  flex: 1;
  text-align: center;
  padding: 12px;
  border-radius: 6px;
  background: #0077cc;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease;
}

.producto-boton1 a:hover {
  background: #005fa3;
}

.btn-volver {
  background: #555;
}

.btn-volver:hover {
  background: #333;
}

/* Formulario debajo */
.form-cotizar {
    display: none;
    width: 100%;
    max-width: 800px;
    box-sizing: border-box;
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 10px;
    margin: 30px auto 0;
    overflow: hidden;
}

.form-cotizar h2 {
  margin-bottom: 15px;
  color: #000;
  text-align: center;
}

.form-cotizar label, 
.form-cotizar p {
  display: block;
  margin-top: 10px;
  font-weight: bold;
  color: #000;
}

.form-cotizar input,
.form-cotizar textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px;
    margin-top: 5px;
    border-radius: 6px;
    border: 1px solid #ccc;
    color: #000;
}

.btn-enviar, .btn-cerrar {
  margin-top: 15px;
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.btn-enviar {
  background: #0077cc;
  color: #fff;
}

.btn-enviar:hover {
  background: #005fa3;
}

.btn-cerrar {
  background: #555;
  color: #fff;
}

.btn-cerrar:hover {
  background: #333;
}

/* Responsivo: en móvil todo en columna */
@media (max-width: 768px) {
	
  .producto-detalles {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 10px 0 20px;
    padding: 15px;
    overflow: hidden;
  }
  .producto-detalles > h1 {
    font-size: 1.4rem;
    line-height: 1.3;
    margin-bottom: 20px;
    overflow-wrap: anywhere;
  }
  
  .producto-contenido {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    gap: 20px;
    box-sizing: border-box;
  }
  
  .producto-imagenes {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .producto-imagenes img {
    width: 100%;
    max-width: 300px;
    height: auto;
    margin: 0 auto;
  }

  .producto-informacion {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .producto-boton1 {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .producto-boton1 a {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    flex: none;
  }

  .form-cotizar {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 20px 0 0;
    padding: 15px;
    overflow: hidden;
  }

  .form-cotizar input,
  .form-cotizar textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .btn-enviar,
  .btn-cerrar {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}


/* ---- Modal que aparece en catalogo ---- */
.modal-producto {
  display: none;
  position: fixed;
  z-index: 9999;              /* 👈 más alto que tu header */
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  overflow-y: auto;           /* 👈 scroll vertical si se pasa de altura */
  padding: 40px 20px;         /* 👈 espacio para que no se pegue arriba */
}

.modal-producto-content {
  background: #fff;
  border-radius: 10px;
  max-width: 900px;
  width: 90%;
  padding: 20px;
  position: relative;
  max-height: 90vh;           /* 👈 nunca más alto que la ventana */
  overflow-y: auto;           /* 👈 scroll interno si el form es largo */
}

.cerrar-producto {
  position: absolute;
  top: 10px; right: 15px;
  font-size: 28px;
  cursor: pointer;
}

@keyframes fadeInScale {
  from {opacity: 0; transform: scale(0.95);}
  to {opacity: 1; transform: scale(1);}
}

.modal-producto-content {
  animation: fadeInScale 0.3s ease;
}