/* ===============================
   CONTENEDOR GENERAL
=============================== */

.checkout-container {
  max-width: 1100px;
  margin: 40px auto;
  padding: 30px 20px;

  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 40px;
}



/* ===============================
   TITULOS
=============================== */

.checkout-container h1 {
  grid-column: 1 / -1;

  text-align: center;
  font-size: 28px;
  margin-bottom: 10px;
}

.checkout-container h2 {
  font-size: 18px;
  margin: 20px 0 10px;
}



/* ===============================
   INFO UX
=============================== */

.checkout-info {
  grid-column: 1 / -1;

  text-align: center;
  font-size: 14px;
  color: #555;

  background: #f7f7f7;
  padding: 12px;

  border-radius: var(--border-radius);
  margin-bottom: 20px;
}

main h1, h2, button {
  font-weight: 600;
}


/* ===============================
   FORMULARIO
=============================== */

#checkoutForm {
  background: #fafafa;
  border: 1px solid #eee;

  padding: 25px;
  border-radius: var(--border-radius);
}



/* ===============================
   GRUPOS INPUT
=============================== */

.grupo {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}



/* ===============================
   INPUTS
=============================== */

#checkoutForm input {
  width: 100%;

  padding: 10px 12px;

  border: 1px solid #eee;
  border-radius: 4px;

  font-size: 14px;

  outline: none;
  transition: border 0.2s ease;
}

#checkoutForm input:focus {
  border-color: #000;
  

}



/* ===============================
   BOTON ENVIO
=============================== */

.btn-envio {
  width: 100%;

  padding: 10px;
  margin: 15px 0;

  background: var(--color-blanco);
  border: 1px solid #eee;

  border-radius: var(--border-radius);

  font-size: 14px;
  cursor: pointer;

  transition: all 0.2s ease;
}

.btn-envio:hover {
  background: #f5f5f5;
}



/* ===============================
   ENVIO BOX
=============================== */

.envio-box {
  display: none;
  margin-bottom: 15px;
}

.envio-box.show {
  display: block;
}



/* ===============================
   BOTON PAGAR
=============================== */

.btn-pagar {
  width: 100%;

  padding: 12px;
  margin-top: 15px;

  background: var(--color-primario);
  color: #fff;

  border: none;
  border-radius: var(--border-radius);

  font-size: 15px;
  font-weight: 600;

  cursor: pointer;

  transition: all 0.2s ease;
}

.btn-pagar:hover {
  background: var(--color-primario-oscuro);
}

.btn-pagar:active {
  transform: scale(0.97);
}



/* ===============================
   RESUMEN
=============================== */

.checkout-resumen {
  background: #fafafa;

  border: 1px solid #eee;
  border-radius: 6px;

  padding: 20px;

  height: fit-content;
}



.checkout-resumen h2 {
  font-size: 18px;
  margin-bottom: 15px;
}



/* ===============================
   ITEMS RESUMEN
=============================== */

.resumen-item {
  display: flex;
  justify-content: space-between;

  font-size: 14px;
  padding: 6px 0;

  border-bottom: 1px solid #eee;
}



/* ===============================
   TOTAL
=============================== */

.resumen-total{
  margin-top: 15px;

  font-size: 16px;
  text-align: right;
  font-weight: 600;
}

.resumen-total strong{
  font-weight: 600;
}

#totalCompra {
  font-weight: 600;
}


/* ===============================
   TOAST FULL
=============================== */

.toast-full {
  position: fixed;

  inset: 0;

  background: rgba(0,0,0,0.6);

  display: flex;
  justify-content: center;
  align-items: center;

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.3s ease;

  z-index: 9999;
}

.toast-full.show {
  opacity: 1;
  pointer-events: all;
}



/* ===============================
   TOAST BOX
=============================== */

.toast-box {
  background: #fff;

  padding: 35px 30px;

  border-radius: 8px;

  text-align: center;

  max-width: 320px;
  width: 90%;

  animation: pop 0.4s ease;
}

.toast-box h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.toast-box p {
  font-size: 14px;
  color: #555;
}



/* ===============================
   ANIMACION
=============================== */

@keyframes pop {

  0% {
    transform: scale(0.8);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}



/* ===============================
   RESPONSIVE MOBILE
=============================== */

@media (max-width: 900px) {

  .checkout-container {
    grid-template-columns: 1fr;
  }

}



@media (max-width: 600px) {

  .checkout-container {
    margin: 20px auto;
    padding: 15px;
  }


  .checkout-container h1 {
    font-size: 22px;
  }


  .grupo {
    flex-direction: column;
  }


  #checkoutForm {
    padding: 20px;
  }


  .checkout-resumen {
    margin-top: 25px;
  }


  .btn-pagar {
    font-size: 14px;
  }

}
