/* ============================================================ MODALES */
.modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 14px;
  background: rgba(20, 14, 10, 0.52);
  backdrop-filter: blur(5px)
}

.modal-contenido {
  width: min(100%, 560px);
  max-height: 88vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #fffaf4 0%, #f7eee2 100%);
  border: 1px solid rgba(220, 194, 162, 0.9);
  border-radius: 20px;
  padding: 18px 16px;
  box-shadow: var(--shadow-lg)
}

.modal-grande {
  width: min(100%, 760px)
}

.modal-contenido h2 {
  margin: 0 0 14px;
  font-size: 22px;
  color: var(--title)
}

.modal-contenido h3 {
  color: var(--title)
}

.modal-contenido label {
  display: block;
  margin: 10px 0 6px;
  font-size: 13px;
  font-weight: 800;
  color: #5b4330
}

.modal-contenido input,
.modal-contenido textarea,
.modal-contenido select {
  width: 100%;
  border: 1px solid #d9c4a4;
  border-radius: 12px;
  min-height: 42px;
  padding: 10px 12px;
  font-size: 14px;
  background: #fffdfa;
  color: #2e241a;
  outline: none
}

.modal-contenido textarea {
  min-height: 96px
}

.modal-botones {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px
}

.modal-botones button {
  flex: 1;
  min-width: 120px;
  min-height: 42px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 800
}

/* confirmación genérica */
.modal-confirmacion {
  width: min(100%, 400px);
  max-height: none;
  text-align: center;
  padding: 28px 22px 22px
}

.modal-confirmacion h2 {
  margin-bottom: 10px
}

.texto-confirmacion {
  margin: 0;
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.45
}

#btn-confirmar-generico {
  background: linear-gradient(135deg, var(--danger), var(--danger-2))
}

/* modal imagen */
#modal-imagen {
  align-items: center !important;
  justify-content: center !important;
  padding: 18px !important;
  background: rgba(10, 10, 12, 0.82)
}

.modal-imagen-contenido {
  width: min(100%, 980px);
  max-height: 92vh;
  margin: 0 auto;
  padding: 52px 14px 14px;
  border-radius: 18px;
  background: rgba(14, 14, 16, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.4);
  position: relative
}

.btn-cerrar-imagen {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 28px;
  line-height: 1;
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3
}

.btn-cerrar-imagen:hover {
  background: rgba(0, 0, 0, 0.88)
}

.imagen-ampliada {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  margin: 0 auto;
  display: block;
  border-radius: 10px
}

/* detalle */
.detalle-producto-bloque {
  border: 1px solid #e6d5c2;
  background: #fffdf9;
  border-radius: var(--radius-md);
  padding: 14px
}

.detalle-texto-producto {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.45
}

/* ============================================================ IMAGEN/ARCHIVO */
.fila-imagen-botones {
  display: flex;
  gap: 8px;
  flex-wrap: wrap
}

.btn-archivo {
  display: inline-flex;
  align-items: center;
  justify-content: center
}

.btn-archivo.azul {
  background: linear-gradient(135deg, #5d8fd6, #416daf);
  color: #fff
}

.btn-archivo.verde {
  background: linear-gradient(135deg, var(--green), var(--green-2));
  color: #fff
}
