/* ===== MODAL (fondo oscuro difuminado con blur) ===== */
.modal {
  display: none; /* Por defecto oculto */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(20, 20, 20, 0.55);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.35s ease-out;
}

/* ===== CONTENIDO DEL MODAL ===== */
.modal-content {
  position: relative;
  width: 95%;
  max-width: 540px;
  padding: 28px 26px;
  border-radius: 18px;
  background: #ffffffcc;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: 0 8px 32px rgba(0,0,0,0.22);
  animation: slideIn 0.4s ease-out;
  color: #22223b;
  font-family: 'Poppins', system-ui, sans-serif;
}

/* ===== BOTÓN DE CERRAR (X) ===== */
.close {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 1.7rem;
  color: #333;
  cursor: pointer;
  transition: transform 0.25s ease, color 0.25s ease;
}

.close:hover {
  transform: rotate(90deg) scale(1.1);
  color: #e63946;
}

/* ===== TÍTULO DEL MODAL ===== */
#productoTitle {
  text-align: center;
  color: #1d3557;
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: 0.7px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* ===== FORMULARIO INPUTS, TEXTAREA, SELECT ===== */
.form input,
.form textarea,
.form select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.4px solid #ddd;
  margin-bottom: 14px;
  font-size: 0.96rem;
  font-family: inherit;
  transition: all 0.25s;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
  outline: none;
}

/* Foco para inputs, textarea y selects */
.form input:focus,
.form textarea:focus,
.form select:focus {
  border-color: #43cea2;
  box-shadow: 0 0 0 4px rgba(67, 206, 162, 0.25);
}

/* ===== SELECTS Y ETIQUETAS ESPECÍFICAS ===== */
label[for="marca"],
label[for="modelo"] {
  font-weight: 600;
  color: #185a9d;
  font-size: 0.98rem;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
  display: block;
  margin-top: 9px;
  transition: color 0.25s;
}

select#marca,
select#modelo {
  appearance: none;
  background: rgba(67, 206, 162, 0.12);
  border: 1.5px solid #43cea2;
  border-radius: 10px;
  padding: 13px 33px 13px 14px;
  color: #1d3557;
  font-size: 0.97rem;
  font-family: inherit;
  margin-bottom: 14px;
  cursor: pointer;
  position: relative;
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 20px;
  box-shadow: 0 2px 10px rgba(67,206,162,0.07);
  transition: border 0.23s, box-shadow 0.24s;
}

/* Focus en selects */
select#marca:focus,
select#modelo:focus {
  border-color: #2ec4b6;
  box-shadow: 0 0 0 4px rgba(46,196,182,0.20);
}

/* Hover en selects */
select#marca:hover,
select#modelo:hover {
  border-color: #1a659e;
}

/* Opciones en desplegable */
select#marca option,
select#modelo option {
  background: #f9fff6;
  color: #185a9d;
  font-size: 0.97rem;
  font-family: inherit;
}

/* ===== BOTÓN DE ENVIAR ===== */
#productoSubmitBtn {
  background: linear-gradient(135deg, #43cea2 0%, #185a9d 100%);
  color: #fff;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  width: 100%;
  margin-top: 6px;
  font-size: 1.05rem;
  transition: transform 0.2s ease, background 0.25s ease;
  box-shadow: 0 4px 12px rgba(33, 149, 152, 0.15);
}

#productoSubmitBtn:hover {
  transform: translateY(-2px) scale(1.02);
  background: linear-gradient(135deg, #2ec4b6 0%, #1a659e 100%);
}

/* ===== IMAGEN PREVIEW ===== */
#imagenPreview {
  display: none;
  max-width: 160px;
  max-height: 120px;
  margin: 0 auto 10px auto;
  border-radius: 8px;
  border: 1px solid #ddd;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  object-fit: contain;
}

/* ===== ANIMACIONES ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from { transform: translateY(-40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
