/* ===============================
   WOOCOMMERCE – AJUSTE HEADER FIJO
   Aplica a TODAS las páginas WC
================================ */

body.woocommerce-page main#primary,
body.woocommerce main#primary {
  margin-top: 40px;
}



.course-locked {
  max-width: 700px;
  margin: 3rem auto;
  padding: 2rem;
  border-radius: 12px;
  background: #f5f7fb;
  text-align: center;
}

.course-locked h2 {
  margin-bottom: 1rem;
}

.course-locked .btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.8rem 1.6rem;
  background: #1E2B58;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
}



/* Botón/box en Mi cuenta */
.sbc-mycourse-card {
  margin: 24px 0;
  padding: 20px;
  border-radius: 12px;
  background: #f5f7fb;
  border: 1px solid rgba(0, 0, 0, .08);
}

.sbc-mycourse-card h3 {
  margin: 0 0 8px;
}

.sbc-mycourse-card p {
  margin: 0 0 14px;
}

.sbc-mycourse-btn {
  display: inline-block;
  padding: 10px 16px;
}

.sbc-mycourse-card--locked {
  background: #fff7f7;
}



/* Enlaces/ítems bloqueados en listados */
a.sbc-locked-link {
  opacity: 0.55 !important;
  pointer-events: none !important;
  /* evita click */
  cursor: not-allowed !important;
}

a.sbc-locked-link .sbc-lock {
  margin-left: auto;
  font-size: 14px;
  line-height: 1;
  opacity: 0.95;
}

/* Para que texto + candado queden en una línea */
a.sbc-locked-link {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}


/* ==================================================
   Ocultar CTA + Contacto
   SOLO en TutorLMS y WooCommerce
================================================== */

/* WooCommerce */
body.woocommerce .cta-section,
body.woocommerce-page .cta-section,
body.woocommerce .contact-section,
body.woocommerce-page .contact-section {
  display: none !important;
}

/* TutorLMS */
/*body.single-courses .cta-section,
body.post-type-archive-courses .cta-section,
body.single-lesson .cta-section,
body.single-tutor_quiz .cta-section,
body.single-tutor_assignments .cta-section,

body.single-courses .contact-section,
body.post-type-archive-courses .contact-section,
body.single-lesson .contact-section,
body.single-tutor_quiz .contact-section,
body.single-tutor_assignments .contact-section {
  display: none !important;
}*/

/* TutorLMS: quitar CTA + contacto + footer */
/*body.tutor-lms .cta-section,
body.tutor-lms #contact.contact-section,
body.tutor-lms .contact-section,
body.tutor-lms footer.footer {
  display: none !important;
}*/


/* Ocultar descripción del producto en Checkout (Blocks) */
body.woocommerce-checkout .wc-block-components-product-metadata__description {
  display: none !important;
}

/* ==================================================
   FIX: Precios rebajados en el Checkout (Order Summary)
   Evita que los montos se rompan letra por letra o número por número
   ================================================== */

/* Contenedor principal del precio y badge en la columna derecha */
body.woocommerce-checkout .wc-block-cart-item__total-price-and-sale-badge-wrapper {
  flex-shrink: 0 !important;
  min-width: max-content !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  justify-content: center !important;
  gap: 4px !important;
}

/* Si hay un badge de descuento, ocultamos el subtotal duplicado de la columna derecha, 
   ya que el precio real y tachado se muestra debajo del título del producto */
body.woocommerce-checkout .wc-block-components-order-summary-item:has(.wc-block-components-sale-badge) .wc-block-components-order-summary-item__total-price {
  display: none !important;
}

/* Contenedor del precio del producto */
body.woocommerce-checkout .wc-block-components-product-price {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important; /* Alineado a la izquierda junto al título */
  justify-content: center !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
  gap: 4px !important;
}

/* Precio tachado (antiguo) */
body.woocommerce-checkout .wc-block-components-product-price del {
  font-size: 0.85em !important;
  color: #888 !important;
  text-decoration: line-through !important;
  opacity: 0.8;
  line-height: 1 !important;
}

/* Precio final (rebajado) */
body.woocommerce-checkout .wc-block-components-product-price ins {
  text-decoration: none !important;
  font-weight: 600 !important;
  color: #111 !important;
  line-height: 1 !important;
}

/* Asegurar que los valores de totales y subtotales tampoco se rompan */
body.woocommerce-checkout .wc-block-components-totals-item__value,
body.woocommerce-checkout .wc-block-components-totals-item__description {
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
  flex-shrink: 0 !important;
}

/* Ajuste de badge de ahorro para que quede perfectamente alineado y no flote */
body.woocommerce-checkout .wc-block-components-sale-badge {
  white-space: nowrap !important;
  margin-top: 4px !important;
  position: relative !important;
  right: 0 !important;
  text-align: right !important;
}

body.woocommerce-checkout .wc-block-components-totals-coupon__discount-value,
body.woocommerce-checkout .wc-block-components-totals-discount__value {
  white-space: nowrap !important;
}
