/* CONTENEDOR GENERAL */
.checkout-container {
  display: grid;
  grid-template-columns: 2fr 1.2fr;
  gap: 2rem;
  padding: 40px;
  background: #f5f5f5;
}

/* CONTROL DE ERRORES */
.checkout-error-global {
  margin-top: 0.5rem;
  color: #b3261e;
  font-size: 0.9rem;
}
.campo-error {
  border-color: #b3261e !important;
}

/* TARJETA DE FORMULARIO */
.checkout-form,
.checkout-summary {
  background: white;
  padding: 30px;
  border-radius: 14px;
  box-shadow: 0 5px 18px rgba(0,0,0,0.08);
}

/* TITULOS */
.checkout-form h2,
.checkout-summary h2 {
  font-size: 1.6rem;
  color: var(--color-verde-cec);
  margin-bottom: 20px;
  font-weight: 700;
}

/* INPUTS */
.form-group {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
}

.form-row {
  display: flex;
  gap: 15px;
  justify-content: space-between;
}

.group-row-2 {
  width: 100%;
}
.group-padd-left{
  padding-left: 1rem;
}
.group-padd-right{
  padding-right: 1rem;
}
.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
}

.form-group input {
  /*width: 100%;*/
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-size: 1rem;
  transition: 0.25s;
}

.form-group input:focus,
.coupon-row input:focus {
  border-color: var(--color-verde-cec);
  box-shadow: 0 0 0 2px rgba(20,77,23,.2);
  outline: none;
}

/* CURSO */
.course-item {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
}

.course-item img {
  width: 95px;
  height: 65px;
  object-fit: cover;
  border-radius: 10px;
}

.course-info {
  flex: 1;
}

.course-title {
  font-size: 1rem;
  font-weight: 600;
  color: #111;
  margin: 0;
}

.course-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-verde-cec);
  margin-top: 3px;
}

/* CUPÓN */
.coupon-box {
  margin-top: 20px;
}

.coupon-row {
  display: flex;
  gap: 10px;
}

.coupon-row input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.btn-apply {
  background: var(--color-verde-cec);
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.btn-apply:hover {
  background: #0e3a10;
}

/* TOTAL */
.total-box {
  margin-top: 25px;
  display: flex;
  justify-content: space-between;
  font-size: 1.2rem;
  font-weight: 700;
  color: #111;
  border-top: 1px solid #ddd;
  padding-top: 15px;
}

.total-price {
  color: var(--color-verde-cec);
}

/* BOTÓN DE PAGO */
.btn-checkout {
  margin-top: 25px;
  width: 100%;
  background: var(--color-verde-cec);
  color: white;
  padding: 15px;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.25s;
}

.btn-checkout:hover {
  background: #0e3a10;
}

/* ============================
     RESPONSIVE DESIGN
   ============================ */

/* Tablets: reorganiza las columnas */
@media (max-width: 992px) {
  .checkout-container {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .checkout-form, 
  .checkout-summary {
    padding: 25px;
  }

  .course-item img {
    width: 80px;
    height: 55px;
  }
}

/* Celulares grandes */
@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
  }

  .checkout-container {
    gap: 1.5rem;
  }

  .btn-checkout {
    font-size: 1rem;
    padding: 13px;
  }

  .course-title {
    font-size: 0.95rem;
  }
}

/* Celulares pequeños */
@media (max-width: 480px) {
  .checkout-container {
    padding: 15px;
  }

  .checkout-form h2,
  .checkout-summary h2 {
    font-size: 1.3rem;
  }

  .checkout-form,
  .checkout-summary {
    padding: 20px;
    border-radius: 12px;
  }

  .course-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .course-item img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 12px;
  }

  .course-info {
    margin-top: 8px;
  }

  .coupon-row {
    flex-direction: column;
  }

  .coupon-row button {
    width: 100%;
  }

  .total-box {
    font-size: 1rem;
  }

  .btn-checkout {
    padding: 12px;
    font-size: 1rem;
  }
}
