.acciones-compra {
  display: grid;
  gap: 10px;
}

.acciones-compra .btn {
  width: 100%;
}

.compra-modal {
  width: min(780px, calc(100% - 36px));
  max-height: calc(100svh - 36px);
  padding: 0;
  border: 0;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 28px 100px rgba(0, 0, 0, .42);
}

.compra-modal::backdrop {
  background: rgba(4, 4, 3, .84);
  backdrop-filter: blur(8px);
}

.compra-modal form {
  padding: clamp(34px, 6vw, 68px);
  overflow-y: auto;
}

.compra-cerrar {
  position: fixed;
}

.compra-cabecera h2 {
  margin: 0;
  max-width: 600px;
  font: 400 clamp(36px, 5vw, 54px)/1.04 Georgia, "Times New Roman", serif;
  letter-spacing: -.04em;
}

.compra-cabecera > p:last-child {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.compra-producto {
  margin: 30px 0 0;
  padding: 19px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #fff;
  border: 1px solid var(--line);
}

.compra-producto span,
.compra-producto strong {
  display: block;
  font: 400 20px Georgia, "Times New Roman", serif;
}

.compra-producto small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.modo-prueba {
  margin: 12px 0 0;
  padding: 11px 14px;
  border-left: 3px solid #a97b2f;
  background: #f7ecd7;
  color: #694918;
  font-size: 12px;
  line-height: 1.5;
}

.compra-modal fieldset {
  min-width: 0;
  margin: 34px 0 0;
  padding: 0;
  border: 0;
}

.compra-modal legend {
  width: 100%;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.form-grid {
  display: grid;
  gap: 15px;
}

.form-grid.dos {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ancho-completo,
.form-grid .ancho-completo,
.form-grid .direccion {
  grid-column: 1 / -1;
}

.compra-modal label:not(.aceptacion):not(.campo-trampa) {
  min-width: 0;
  display: grid;
  gap: 7px;
  color: #4f4c46;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
}

.compra-modal label span {
  color: var(--muted);
  font-weight: 400;
}

.compra-modal input:not([type="checkbox"]),
.compra-modal select {
  width: 100%;
  height: 48px;
  padding: 0 13px;
  border: 1px solid rgba(10, 10, 9, .18);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
}

.compra-modal input:disabled,
.compra-modal select:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.campo-trampa {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.tarifa-aviso {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.tarifa-aviso.disponible {
  color: #355f3b;
}

.tarifa-aviso.no-disponible {
  color: #8a3026;
}

.resumen-compra {
  margin-top: 32px;
  padding: 17px 20px;
  background: #fff;
  border: 1px solid var(--line);
}

.resumen-compra div {
  padding: 9px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 13px;
}

.resumen-compra strong {
  color: var(--ink);
}

.resumen-compra .resumen-total {
  margin-top: 7px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-weight: 700;
}

.resumen-total strong {
  font: 400 24px Georgia, "Times New Roman", serif;
}

.aceptacion {
  margin: 22px 0;
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  cursor: pointer;
}

.aceptacion input {
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  accent-color: var(--ink);
}

.compra-pagar {
  width: 100%;
}

.compra-pagar:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
}

.compra-error {
  min-height: 18px;
  margin: 0 0 12px;
  color: #8a3026;
  font-size: 12px;
  line-height: 1.5;
}

.compra-nota {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
  text-align: center;
}

.pago-resultado {
  position: fixed;
  z-index: 80;
  top: 20px;
  left: 50%;
  width: min(620px, calc(100% - 32px));
  padding: 20px 54px 20px 22px;
  transform: translateX(-50%);
  color: #fff;
  background: #1a1a17;
  border: 1px solid rgba(240, 217, 161, .35);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .28);
}

.pago-resultado.aprobado {
  background: #183b25;
}

.pago-resultado.error {
  background: #5a211b;
}

.pago-resultado strong,
.pago-resultado span {
  display: block;
}

.pago-resultado strong {
  margin-bottom: 5px;
  color: var(--gold-light);
  font: 400 21px Georgia, "Times New Roman", serif;
}

.pago-resultado span {
  color: rgba(255, 255, 255, .78);
  font-size: 12px;
  line-height: 1.55;
}

.pago-resultado button {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

@media (max-width: 620px) {
  .compra-modal {
    width: 100%;
    max-width: none;
    height: 100svh;
    max-height: none;
    margin: 0;
  }

  .compra-modal form {
    padding: 54px 20px 36px;
  }

  .form-grid.dos {
    grid-template-columns: 1fr;
  }

  .compra-producto {
    align-items: flex-start;
    flex-direction: column;
  }
}
