/*
 Theme Name:   Phlox Pro Child
 Description:  Tema Hijo para Finanzas Consulting
 Author:       Nestor Daniel Ruiz
 Template:     phlox-pro
 Version:      1.0.0
*/

.main-content-area {
    padding-top: 140px; /* Ajustado según los 134px de tu header */
}

/* Opcional: Si quieres que sea automático solo en móviles o escritorio */
@media (max-width: 991px) {
    .main-content-area {
        padding-top: 100px; /* El header suele ser más pequeño en móvil */
    }
}

/* Compensación de Header Fixed */
.main-content-area {
    margin-top: 140px; /* Ajuste basado en los 134px inspeccionados */
    padding-bottom: 50px;
}

/* Estilos para el contenido del WYSIWYG (lecciones) */
.lecciones-lista {
    list-style: none;
    padding-left: 0;
    margin-top: 10px;
}

.color-purple{
    color: #8451F4 !important;
}

.leccion-item {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: flex-start;
}

.leccion-icon {
    color: #8451F4; /* Tu púrpura */
    font-weight: bold;
    margin-right: 15px;
    font-size: 1.2rem;
}

.leccion-titulo {
    color: #333;
    font-size: 0.95rem;
}

/* Limpieza de la lista */
.lecciones-lista {
    list-style: none; /* Quitamos el bullet por defecto del navegador */
    padding: 0;
    margin: 15px 0;
}

.lecciones-lista li {
    position: relative;
    padding-left: 25px; /* Espacio para nuestro nuevo bullet */
    margin-bottom: 12px;
    color: #4a4a4a;
    font-size: 0.95rem;
    line-height: 1.4;
    display: block; /* Asegura que cada lección sea una línea */
}

/* Creación del bullet personalizado */
.lecciones-lista li::before {
    content: "•"; /* Inyectamos el punto */
    color: #8451F4; /* Tu color púrpura de marca */
    font-weight: bold;
    font-size: 1.6rem;
    position: absolute;
    left: 0;
    top: -4px; /* Ajuste fino para centrarlo con la primera línea de texto */
    line-height: 1;
}

/* Efecto hover opcional para que se vea más interactivo */
.lecciones-lista li:hover {
    color: #000;
    transition: color 0.3s ease;
}

/* Contenedor del precio */
.price-box {
    background-color: #f8faff;
    padding: 20px;
    border-radius: 15px;
    border: 1px dashed #d1d9ff;
}

.price del .woocommerce-Price-amount {
    color: #a0a0a0;
    font-size: 1.1rem;
}

.price ins {
    text-decoration: none;
}

.price ins .woocommerce-Price-amount {
    color: #482E74;
    font-size: 2.4rem;
    font-weight: 800;
}

/* Efecto para el botón de WhatsApp */
.btn-success {
    transition: transform 0.2s ease, background-color 0.3s ease;
}

.btn-success:hover {
    transform: scale(1.02);
    background-color: #1da851 !important;
}

/* Cuando el acordeón está abierto */
.accordion-button:not(.collapsed) {
    background-color: #f1ecff; /* Púrpura muy suave */
    color: #8451F4;
    box-shadow: none;
}

/* Icono del acordeón (flecha) */
.accordion-button::after {
    background-size: 1.2rem;
    transition: transform 0.3s ease;
}

/* El borde que envuelve todo el temario */
.accordion {
    border: 1px solid #eee;
    border-radius: 12px !important;
    overflow: hidden;
}

/* --- ESTILOS TARJETA DE COMPRA --- */

.card-compra {
    padding: 25px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}



/* --- CORRECCIÓN DE PRECIOS --- */

.precio {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 25px;
}

/* 1. Precio Anterior (El Tachado) */
.precio del {
    /* Quitamos cualquier borde que esté molestando */
    border: none !important; 
    text-decoration: none !important; /* Quitamos el nativo para controlarlo nosotros */
    position: relative;
    color: #8e8bb3; /* Un tono grisáceo púrpura */
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
    display: inline-block;
}

/* Creamos un tachado real que cruza el texto exactamente por la mitad */
.precio del::after {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 2px;
    background-color: #8451F4; /* Color púrpura para el tachado */
    transform: translateY(-50%);
    opacity: 0.6;
}

/* 2. Bloque de Precio Actual (El Premium) */
.precio ins {
    text-decoration: none !important;
    background: #f8faff;
    padding: 8px 20px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    display: inline-block;
    transition: transform 0.3s ease;
}

.precio ins:hover {
    transform: scale(1.05); /* Pequeño efecto al pasar el mouse */
}

/* Estilo de la cifra principal */
.precio .woocommerce-Price-amount.amount {
    color: #482E74 !important;
    font-weight: 800;
    font-size: 2.8rem;
    line-height: 1;
    display: block;
}

/* El símbolo de pesos $ */
.precio .woocommerce-Price-currencySymbol {
    font-size: 1.4rem;
    vertical-align: super;
    margin-right: 4px;
    color: #8451F4;
    font-weight: 600;
}

/* 2. Limpiar el Formulario de Carrito */
form.cart {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Ocultar el selector de cantidad (No aplica para cursos) */
.quantity {
    display: none !important;
}

/* 3. Botón Añadir al Carrito (Redondeado y Pro) */
.single_add_to_cart_button.button {
    background: linear-gradient(135deg, #8451F4, #482E74) !important;
    color: #fff !important;
    border: none !important;
    padding: 15px 30px !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    border-radius: 999px !important; /* Totalmente redondeado */
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    cursor: pointer;
    width: 100%;
}

.single_add_to_cart_button.button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(132, 81, 244, 0.4) !important;
}

/* 4. Ajuste para el botón de WhatsApp (Soporte) */
.wws-product-query-btn {
    border-radius: 999px !important; /* También redondeado */
    margin-bottom: 15px !important;
    width: 100%;
}

/* Estilo del enlace del carrito inyectado */
.custom-cart-link {
    background-color: #8451F4 !important; /* Tu púrpura */
    color: #fff !important;
    position: relative;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.custom-cart-link:hover {
    background-color: #482E74 !important;
    transform: translateY(-3px);
}

/* La burbuja con el número de productos */
.cart-badge-custom {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff3b3b;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 50%;
    border: 2px solid #fff;
    line-height: 1;
}

/* --- COMPENSACIÓN PARA HEADER FIXED --- */
.woocommerce-cart, .woocommerce-checkout {
    /*padding-top: 160px !important; */
    padding-bottom: 80px;
    background-color: #f8faff;
}

/* --- ESTILO DE TABLAS (CARRITO Y PEDIDO) --- */
.shop_table {
    border: none !important;
    border-radius: 15px !important;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    background: white;
}

.shop_table thead {
    background-color: #482E74 !important; /* Púrpura oscuro */
    color: white !important;
}

.shop_table thead th {
    padding: 20px !important;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

/* --- FIX TOTAL PARA SELECT2 (PAÍS Y DEPARTAMENTO) --- */
.select2-container--default .select2-selection--single {
    background-color: #fff !important;
    border: 1px solid #e9ecef !important;
    border-radius: 10px !important;
    height: 50px !important; /* Altura igual a tus inputs */
    padding: 10px !important;
    display: flex !important;
    align-items: center !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 48px !important;
    right: 10px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #444 !important;
    line-height: 1.2 !important;
}

/* --- INPUTS Y FORMULARIOS --- */
.woocommerce-checkout input.input-text, 
.woocommerce-checkout textarea {
    padding: 12px 18px !important;
    border: 1px solid #e9ecef !important;
    border-radius: 10px !important;
    background-color: #fff !important;
    font-size: 15px !important;
}

.woocommerce-checkout input.input-text {
    border-color: #8451F4 !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(132, 81, 244, 0.1);
}

.woocommerce-checkout input.input-text:focus {
    border-color: #8451F4 !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(132, 81, 244, 0.1);
}

/* --- BOTONES REDONDEADOS PRO --- */
#place_order, 
.wc-proceed-to-checkout a.checkout-button,
.woocommerce-cart .button,
.woocommerce-checkout .button {
    background: linear-gradient(135deg, #8451F4, #482E74) !important;
    color: white !important;
    border-radius: 999px !important; /* Redondeados totales */
    padding: 16px 35px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none !important;
    transition: all 0.3s ease !important;
    width: 100%;
}

#place_order:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(132, 81, 244, 0.3) !important;
}

/* --- CUPÓN Y NOTAS --- */
.woocommerce-info {
    border-top-color: #8451F4 !important;
    background-color: #f1ecff !important;
    border-radius: 10px;
}

/* --- LIMPIEZA GLOBAL DE FORMULARIOS --- */

/* 1. Unificar todos los inputs (incluyendo los de Elementor) */
.elementor-field-group .elementor-field, 
.woocommerce-checkout input.input-text,
.woocommerce-checkout textarea,
.form-control {
    background-color: #ffffff !important;
    border: 1px solid #e9ecef !important; /* Gris suave profesional */
    border-radius: 12px !important;       /* Redondeado moderno, no exagerado */
    padding: 12px 20px !important;
    color: #444 !important;
    font-family: 'Poppins', sans-serif !important;
    transition: all 0.3s ease !important;
    box-shadow: none !important;
}

/* 2. Estado Focus (Cuando el usuario escribe) */
.elementor-field-group .elementor-field:focus,
.woocommerce-checkout input.input-text:focus {
    border-color: #8451F4 !important; /* Tu púrpura de marca */
    background-color: #fff !important;
    outline: none !important;
    box-shadow: 0 0 0 4px rgba(132, 81, 244, 0.1) !important;
}

/* 3. Botones de Formulario (Enviar) */
.elementor-button[type="submit"], 
#place_order {
    background: linear-gradient(135deg, #8451F4, #482E74) !important;
    border-radius: 999px !important; /* Totalmente redondeados como querías */
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    padding: 15px 35px !important;
    border: none !important;
    transition: transform 0.2s ease, box-shadow 0.3s ease !important;
}

.elementor-button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(132, 81, 244, 0.3) !important;
}

.elementor-field-type-acceptance label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #666;
    cursor: pointer;
}

.elementor-field-type-acceptance input {
    width: 18px;
    height: 18px;
    accent-color: #8451F4; /* Color de marca para el check */
}

/* Estilos Globales Catálogo */
.fc-curso-card {
    border-radius: 20px !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.fc-curso-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(72, 46, 116, 0.15) !important;
}

.fc-card-img-wrapper {
    position: relative;
    overflow: hidden;
}

.fc-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #8451F4;
    color: white;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
}

.fc-titulo-curso {
    color: #482E74;
    font-size: 1.1rem;
}

.fc-precio .amount {
    color: #8451F4;
    font-weight: 800;
    font-size: 1.2rem;
}

.btn-fc-primary {
    background-color: #482E74;
    border-color: #482E74;
    color: white;
}

.btn-fc-primary:hover {
    background-color: #8451F4;
    border-color: #8451F4;
    color: white;
}

/* GRID Y CONTENEDOR */
.fc-archive-grid {
    margin-top: 50px;
}

/* LA TARJETA PREMIUM */
.fc-card-premium {
    border-radius: 30px !important; /* Bordes bien redondeados como el diseño */
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    background: #ffffff;
}

.fc-card-premium:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(132, 81, 244, 0.15) !important;
}

/* IMAGEN Y BADGE */
.fc-card-header {
    position: relative;
    padding: 15px 15px 0 15px; /* Espacio para que la imagen no toque el borde */
}

.fc-card-img {
    border-radius: 20px !important;
    object-fit: cover;
    height: 220px;
    width: 100%;
}

.fc-badge-online {
    position: absolute;
    top: 25px;
    left: 25px;
    background: rgba(255, 255, 255, 0.9);
    color: #8451F4;
    padding: 4px 15px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* TEXTOS */
.fc-course-title {
    color: #482E74; /* Tu color de marca */
    font-size: 1.25rem;
    line-height: 1.2;
    min-height: 3rem; /* Alinea los botones manteniendo títulos uniformes */
}

/* PRECIOS WOOCOMMERCE */
.fc-price-wrapper .amount {
    color: #8451F4;
    font-weight: 800;
    font-size: 1.3rem;
}

.fc-price-wrapper del .amount {
    color: #adb5bd;
    font-size: 1rem;
    font-weight: 400;
    margin-right: 8px;
}

/* BOTÓN PERSONALIZADO */
.fc-btn-purple {
    background: linear-gradient(135deg, #8451F4 0%, #482E74 100%);
    color: white !important;
    border: none;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    box-shadow: 0 10px 20px rgba(72, 46, 116, 0.2);
    transition: all 0.3s ease;
}

.fc-btn-purple:hover {
    background: linear-gradient(135deg, #482E74 0%, #8451F4 100%);
    transform: scale(1.05);
    box-shadow: 0 15px 25px rgba(72, 46, 116, 0.3);
}

/* QA 11 y 12: Corregir títulos blancos en tabla de carrito y checkout */
.woocommerce-cart-form th, 
.woocommerce-checkout-review-order-table th {
    color: #482E74 !important; /* Púrpura de marca */
    background-color: #f8f9fa; /* Fondo gris claro para contraste */
}

/* QA 5 y 7: Eliminar espacios excesivos en las tarjetas del catálogo */
.fc-card-premium {
    margin-bottom: 25px !important;
}
.fc-card-premium .card-body {
    padding-top: 10px !important;
}

/* QA 10: Alinear bullets de lecciones (flexbox para orden perfecto) */
.lecciones-lista li {
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px;
    text-align: left;
    margin-bottom: 12px;
}

/* QA 4: Efecto hover sutil para el icono del carrito */
.fc-cart-icon:hover {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* 1. Asegurar que el ícono (SVG) siempre sea blanco en hover */
.custom-cart-link:hover svg {
    fill: #ffffff !important;
}

/* 2. Mantener el fondo púrpura y el tamaño correcto en hover */
.custom-cart-link:hover {
    background-color: #8451F4 !important; /* Tu color púrpura de marca */
    transform: scale(1.1); /* Efecto de crecimiento sutil (QA Punto 4) */
    transition: all 0.3s ease;
    opacity: 1 !important; /* Evita que se ponga transparente si Elementor tiene esa regla */
}

/* 3. Ajuste para que el contenedor no cambie el color del SVG */
.elementor-social-icon.custom-cart-link svg {
    fill: #ffffff !important;
    width: 18px; /* Ajuste de tamaño según tu captura */
    height: 18px;
}

/* Contenedor principal de la rejilla */
.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 40px 0;
}

/* Tarjeta del producto */
.producto-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column; /* Permite alinear el botón al fondo */
    height: 100%;
    transition: transform 0.3s ease;
}

.producto-card:hover {
    transform: translateY(-10px);
}

/* 1. Estandarización de Imágenes */
.producto-imagen-wrapper {
    position: relative;
    height: 220px; /* Altura fija para todas las imágenes */
    overflow: hidden;
}

.producto-imagen-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Recorta la imagen para llenar el espacio sin deformarse */
}

/* Badge "Curso Online" */
.badge-curso {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255,255,255,0.9);
    color: #8451F4;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
}

/* Contenido de la tarjeta */
.producto-contenido {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: center;
}

/* 2. Limitación visual de Títulos y Descripciones */
.producto-titulo {
    color: #482E74;
    font-size: 1.2rem;
    margin-bottom: 15px;
    min-height: 2.8em; /* Reserva espacio para 2 líneas de título */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.producto-descripcion {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
    min-height: 3em; /* Reserva espacio para 2 o 3 líneas */
}

/* Precios estilo Finanzas Consulting */
.producto-precio {
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 800;
    color: #8451F4; /* Color púrpura visto en screenshots */
}

.producto-precio ins {
    text-decoration: none;
}

.producto-precio del {
    font-size: 0.9rem;
    color: #bbb;
    margin-right: 10px;
}

/* Botón alineado al fondo */
.btn-curso {
    background: #482E74;
    color: #fff !important;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    margin-top: auto; /* Empuja el botón al final de la tarjeta */
    transition: background 0.3s ease;
}

.btn-curso:hover {
    background: #8451F4;
}

/* Estandarización del Catálogo de Cursos */
.producto-card {
    display: flex;
    flex-direction: column;
    height: 100%; /* Obliga a todas las tarjetas a ser iguales */
}

.producto-imagen-wrapper img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
    width: 100%;
}

.producto-titulo {
    min-height: 3em; /* Espacio para 2 líneas siempre */
    display: flex;
    align-items: center;
    justify-content: center;
}

.producto-descripcion {
    min-height: 4.5em; /* Espacio para 3 líneas siempre */
    margin-bottom: 15px;
}

/* Solución QA 11 y 12: Títulos visibles en Checkout */
.woocommerce-checkout-review-order-table th,
.woocommerce-cart-form th {
    color: #482E74 !important; /* Púrpura de la marca */
    background-color: #f8f9fa;
    text-transform: uppercase;
}

/* Solución QA 10: Bullets alineados */
.lecciones-lista li {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px;
}

/* Cuadrícula principal */
.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 35px;
}

/* Tarjeta con Flexbox para alinear el botón al final */
.producto-card {
    background: #ffffff;
    border-radius: 25px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 15px 35px rgba(0,0,0,0.06);
    transition: transform 0.3s ease;
}

/* 1. Tratamiento de imagen como Background */
.producto-imagen-container {
    position: relative;
    width: 100%;
    height: 200px; /* Altura fija obligatoria para todas */
    overflow: hidden;
}

.img-fondo {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Aquí está el truco: se comporta como background-size: cover */
    object-position: center;
    transition: transform 0.5s ease;
}

.producto-card:hover .img-fondo {
    transform: scale(1.1);
}

/* 2. Control de Textos (Títulos y Descripciones) */
.producto-info {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Hace que este bloque ocupe el espacio restante */
    text-align: center;
}

.producto-titulo {
    color: #482E74;
    font-size: 1.25rem;
    margin-bottom: 15px;
    min-height: 2.8em; /* Reserva espacio para 2 líneas siempre */
    display: flex;
    align-items: center;
    justify-content: center;
}

.producto-descripcion-corta {
    font-size: 0.95rem;
    color: #777;
    margin-bottom: 20px;
    min-height: 3.2em; /* Reserva espacio para 2-3 líneas siempre */
}

/* 3. Footer de la tarjeta (Precio y Botón siempre abajo) */
.producto-footer {
    margin-top: auto; /* Empuja todo este bloque al fondo de la tarjeta */
}

.producto-precio {
    margin-bottom: 15px;
    font-weight: 800;
    color: #8451F4;
    font-size: 1.2rem;
}

.btn-curso {
    display: block;
    background: #482E74;
    color: #fff !important;
    padding: 14px;
    border-radius: 50px;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.3s;
}

.btn-curso:hover {
    background: #8451F4;
}

/* Rejilla Principal */
.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    padding: 30px 0;
}

/* Tarjeta Estilo Premium */
.producto-card {
    background: #fff;
    border-radius: 25px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%; /* Obliga a todas las tarjetas a igualar altura */
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* 1. La Imagen como Background (Solución al alto desigual) */
.producto-header-bg {
    height: 230px; /* Altura fija para todas las imágenes */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    transition: transform 0.4s ease;
}

.producto-card:hover .producto-header-bg {
    transform: scale(1.05);
}

.badge-curso {
    position: absolute;
    top: 20px;
    left: 20px;
    background: #8451F4; /* Púrpura de marca */
    color: #fff;
    padding: 6px 15px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: bold;
}

/* 2. Cuerpo y Textos Uniformes */
.producto-body {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.producto-titulo {
    color: #482E74;
    font-size: 1.25rem;
    margin-bottom: 12px;
    min-height: 2.8em; /* Reserva espacio para 2 líneas */
}

.producto-extracto {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 20px;
    min-height: 3.2em; /* Reserva espacio para 3 líneas */
}

/* 3. Footer alineado al fondo */
.producto-footer {
    margin-top: auto;
}

.producto-precio {
    margin-bottom: 15px;
    font-weight: 800;
    color: #8451F4;
    font-size: 1.2rem;
}

.btn-curso-fc {
    display: block;
    background: #482E74;
    color: #fff !important;
    padding: 14px;
    border-radius: 50px;
    font-weight: bold;
    text-decoration: none;
    transition: 0.3s;
}

.btn-curso-fc:hover {
    background: #8451F4;
}

/* --- FIX QA 11 Y 12: Títulos visibles en Checkout --- */
.woocommerce-checkout-review-order-table th, 
.woocommerce-cart-form th {
    color: #482E74 !important; /* Púrpura oscuro en lugar de blanco */
    background: #f8f9fa !important;
    text-transform: uppercase;
}

/* Contenedor de la imagen */
.fc-card-header {
    height: 210px !important; /* Altura fija para todas */
    overflow: hidden !important;
    position: relative;
    background-color: #f8f9fa; /* Fondo neutro mientras carga */
}

/* La imagen actuando como fondo */
.fc-card-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* Esto es lo que simula el background-size: cover */
    object-position: center !important; /* Centra el recorte */
    display: block;
}

/* Layout General */
.curso-layout {
    display: flex;
    gap: 40px;
}

.curso-main {
    flex: 2;
}

.curso-sidebar {
    flex: 1;
    position: sticky;
    top: 100px;
    height: fit-content;
}

.custom-cart-link path{
    fill: #401676 !important;
}

/* 1. Reducir el margen que estrecha el carrito en Desktop */
.elementor-1554 .elementor-element.elementor-element-d07a522 > .elementor-widget-container {
    margin: 20px !important; /* Bajamos de 60px a 20px para ganar 80px de ancho total */
}

/* Estilo para el mensaje de aviso (Modal-like) */
.woocommerce-notices-wrapper .woocommerce-message, 
.woocommerce-notices-wrapper .woocommerce-error {
    border-radius: 12px !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border: none !important;
    border-left: 5px solid #8451F4 !important; /* Morado FC */
    background-color: #fdfdff !important;
    padding: 20px !important;
    margin-bottom: 30px !important;
}

/* Fix para el botón dentro del mensaje */
.woocommerce-notices-wrapper .button.wc-forward {
    background-color: #482E74 !important;
    color: #fff !important;
    border-radius: 50px !important;
    padding: 10px 20px !important;
}

/* Estilo para el aviso de "Añadido al carrito" en la página de producto */
.woocommerce-message[role="alert"] {
    background-color: #f8faff !important;
    border-top: 4px solid #8451F4 !important; /* El morado de la marca */
    color: #482E74 !important;
    padding: 20px !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 20px rgba(132, 81, 244, 0.15) !important;
    margin-bottom: 30px !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.woocommerce-message .button.wc-forward {
    background-color: #482E74 !important;
    color: #fff !important;
    border-radius: 50px !important;
    padding: 10px 25px !important;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.8rem;
}

/* Contenedor del aviso como "Toast" flotante */
.woocommerce-notices-wrapper {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    max-width: 400px;
    width: 90%;
}

/* El diseño del mensaje verde (Éxito) */
.woocommerce-notices-wrapper .woocommerce-message {
    background: #ffffff !important;
    color: #482E74 !important; /* Morado Oscuro */
    border: none !important;
    border-left: 6px solid #8451F4 !important; /* Morado Vibrante */
    box-shadow: 0 15px 35px rgba(0,0,0,0.15) !important;
    border-radius: 15px !important;
    padding: 25px 40px 25px 25px !important;
    font-weight: 500;
    position: relative;
    animation: slideInRight 0.5s ease-out;
}

/* Botón de cerrar (X) */
.close-notice {
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
    font-size: 22px;
    color: #bbb;
    z-index: 10;
    transition: color 0.3s;
}

.close-notice:hover {
    color: #8451F4;
}

/* El botón de "Ver Carrito" dentro del aviso */
.woocommerce-notices-wrapper .button.wc-forward {
    display: inline-block !important;
    margin-top: 10px !important;
    background: #482E74 !important;
    color: #fff !important;
    border-radius: 50px !important;
    padding: 8px 20px !important;
    font-size: 13px !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.woocommerce-notices-wrapper .button.wc-forward:hover {
    background: #8451F4 !important;
    transform: translateY(-2px);
}

/* --- ESTILOS DEL MENSAJE (SIN TOCAR TU CATÁLOGO) --- */
/* --- ESQUELETO DEL MENSAJE (INMUNE) --- */
/* --- ESTILOS DEL BÚNKER ANTI-PHLOX --- */
#fc-bunker-permanente {
    position: fixed !important;
    top: 120px !important;
    right: 20px !important;
    z-index: 99999999 !important; /* Capa superior absoluta */
    width: 350px;
    max-width: 90vw;
}

.fc-msj-protegido {
    display: block !important; /* Vence al JS de Phlox */
    opacity: 1 !important;     /* Vence al JS de Phlox */
    background: #ffffff !important;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 15px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.18);
    border-left: 6px solid #8451F4;
    position: relative;
    transition: none !important;
}

.fc-msj-content {
    color: #2A1A5E !important; /* Texto oscuro para legibilidad */
    font-weight: 700;
}

/* El botón de Ver Carrito dentro del mensaje */
.fc-msj-content a.button {
    display: block !important;
    background: #8451F4 !important;
    color: #fff !important;
    text-align: center;
    margin-top: 12px;
    padding: 10px !important;
    border-radius: 50px;
    text-decoration: none;
}

.fc-cerrar-bunker {
    position: absolute;
    top: 5px;
    right: 10px;
    cursor: pointer;
    font-size: 20px;
    color: #999;
}

/* ESTILO PARA EL BOTÓN ACTUALIZAR CARRITO */
button[name="update_cart"] {
    background-color: #8451F4 !important;
    color: white !important;
    opacity: 1 !important;
    cursor: pointer !important;
}

/* Habilitar visualmente el botón de actualizar */
button[name="update_cart"] {
    opacity: 1 !important;
    cursor: pointer !important;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Forzar visibilidad permanente del aviso */
.woocommerce-notices-wrapper.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 100000;
}

.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-error {
    box-shadow: 0 10px 40px rgba(0,0,0,0.2) !important;
    border-radius: 15px !important;
    padding: 30px !important;
    animation: none !important; /* Detener animaciones de salida del tema */
}

/* Botón de cerrar manual */
.close-notice:hover {
    color: #8451F4 !important;
    transform: scale(1.2);
}

/* --- FIX COLOR DE TEXTO EN AVISOS (QA) --- */
.fc-toast-content {
    color: #482E74 !important; /* Forzamos el morado oscuro para que no sea blanco */
    font-weight: 600 !important;
}

/* Si es un error, el texto debe ser legible */
.fc-type-error .fc-toast-content {
    color: #721c24 !important; /* Rojo oscuro profesional para errores */
}

/* --- ESTILO DEL ÍCONO RECUPERADO --- */
.custom-cart-link {
    background-color: #8451F4 !important;
    border-radius: 50% !important;
    width: 26px !important;
    height: 26px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
}

.custom-cart-link svg {
    fill: none !important;
    stroke: #ffffff !important; /* Asegura que el ícono sea blanco */
}

/* La burbuja del número */
.cart-badge-custom {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff3b3b;
    color: white !important;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 50%;
    border: 2px solid #fff;
    line-height: 1;
}

/* Asegurar que el mensaje no se oculte */
#fc-toast-container {
    position: fixed !important;
    top: 110px !important;
    right: 20px !important;
    z-index: 9999999 !important;
    width: 350px;
}

.fc-premium-toast {
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15) !important;
    padding: 20px !important;
    margin-bottom: 10px;
    border-left: 6px solid #8451F4;
}

.woocommerce-error li{
    color: #8451F4 !important;
    padding-left: 20px !important;
}

/* --- FIX CARRITO MOBILE (DIMENSIONES EXACTAS) --- */
.cart-injection.mobile-header-cart {
    position: absolute !important;
    top: -18px;
    right: -54px;
    width: 64px;
    height: 64px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    z-index: 99;
}

.custom-cart-link {
    width: 30px !important;
    height: 30px !important;
    background-color: #8451F4 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.custom-cart-link svg {
    width: 54px !important; /* Valor solicitado, aunque el link sea 30px, el overflow lo mostrará */
    height: 54px !important;
    stroke: white !important;
    fill: none !important;
}

/* --- FIX MENSAJE DEL CARRITO (ESTILO PREMIUM) --- */
.fc-toast-content {
    color: #482E74 !important; /* Morado oscuro para que sea legible */
    font-weight: 700 !important;
    font-size: 15px !important;
}

/* El botón de "Ver Carrito" dentro de la notificación */
.fc-toast-content a.button.wc-forward {
    display: block !important;
    background: #8451F4 !important;
    color: #ffffff !important;
    text-align: center;
    padding: 10px 20px !important;
    border-radius: 50px !important;
    margin-top: 15px !important;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: bold;
    text-decoration: none !important;
}

/* Restaurar bordes del catálogo (30px como en la imagen del cliente) */
.fc-card-premium {
    border-radius: 30px !important;
    border: none !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08) !important;
}

.aux-elementor-footer .cart-injection.mobile-header-cart {
    position: absolute !important;
    top: -13px;
    right: -64px;
    width: 64px !important;
    height: 64px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    z-index: 99;
}

.aux-elementor-footer .custom-cart-link {
    width: 40px !important;
    height: 40px !important;
    background-color: #8451F4 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* --- FORZAR PERMANENCIA DE MENSAJES --- */
#fc-external-notif-root {
    position: fixed !important;
    top: 100px !important;
    right: 20px !important;
    z-index: 99999999 !important; /* Por encima de todo */
}

.fc-notif-card {
    display: block !important; /* Evita que el JS del tema lo oculte */
    opacity: 1 !important;     /* Evita desvanecimiento */
    visibility: visible !important;
    background: #ffffff !important;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    border-left: 6px solid #8451F4;
    min-width: 320px;
}

/* El texto debe ser oscuro para ser legible */
.fc-notif-body {
    color: #2A1A5E !important;
    font-weight: 600;
}

/* El botón dentro del mensaje */
.fc-notif-body a.button {
    display: inline-block !important;
    background: #8451F4 !important;
    color: #fff !important;
    margin-top: 10px;
    padding: 8px 20px;
    border-radius: 50px;
    text-decoration: none;
}

/* --- FIX CARRITO MOBILE SOLICITADO --- */
.elementor-element-2234cf8 .cart-injection.mobile-header-cart {
    position: absolute !important;
    right: -68px;
    width: 64px !important;
    height: 64px !important;
}

/* --- ESTILOS DE NOTIFICACIÓN INMUNE --- */
#fc-contenedor-inmune {
    position: fixed !important;
    top: 100px !important;
    right: 20px !important;
    z-index: 2147483647 !important; /* El Z-index más alto posible */
    width: 340px;
}

.fc-caja-msj {
    display: block !important; /* Forzamos permanencia */
    opacity: 1 !important;
    background: #ffffff !important;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border-left: 6px solid #8451F4;
    position: relative;
}

.fc-contenido-msj {
    color: #2A1A5E !important; /* Texto oscuro para que no sea blanco sobre blanco */
    font-weight: 700;
}

.fc-contenido-msj a.button {
    display: block !important;
    background: #8451F4 !important;
    color: #fff !important;
    text-align: center;
    padding: 8px !important;
    margin-top: 12px;
    border-radius: 50px;
    text-decoration: none;
}

.fc-btn-cerrar {
    position: absolute;
    top: 5px;
    right: 10px;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    color: #ccc;
}

/* --- ESQUELETO OBLIGATORIO PARA QUE NO DESAPAREZCA --- */
#fc-area-fija-privada {
    position: fixed !important;
    top: 110px !important;
    right: 20px !important;
    z-index: 9999999 !important;
    width: 350px;
}

.fc-tarjeta-estatica {
    background: #ffffff !important;
    display: block !important; /* Ganarle al JS del tema */
    opacity: 1 !important;     /* Ganarle al JS del tema */
    visibility: visible !important;
    padding: 20px;
    margin-bottom: 10px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    border-left: 6px solid #8451F4;
    position: relative;
}

/* El texto para que el cliente lo lea (Oscuro) */
.fc-cuerpo-msj {
    color: #2A1A5E !important; 
    font-weight: 700;
}

/* El botón de cerrar X */
.fc-btn-cerrar {
    position: absolute;
    top: 5px;
    right: 10px;
    cursor: pointer;
    font-size: 18px;
    color: #999;
}

/* El botón de Ver Carrito dentro del mensaje */
.fc-cuerpo-msj a.button {
    display: block !important;
    background: #8451F4 !important;
    color: #fff !important;
    text-align: center;
    margin-top: 10px;
    padding: 8px !important;
    border-radius: 50px;
    text-decoration: none;
}

.elementor-element-d07a522 .woocommerce-notices-wrapper {
    position: relative;
}



/* Solo aplicar el 'sticky' en pantallas grandes */
@media (min-width: 992px) {
    .sticky-top-desktop {
        position: sticky;
        top: 100px; /* Ajusta según la altura de tu menú */
        z-index: 8;
    }
}

/* Ajustes para la tarjeta en móvil */
@media (max-width: 991px) {
    .card-compra {
        margin-top: 40px; /* Separación cuando queda al final */
        border: 1px solid #eee;
    }
}

/* Estilo para el título del curso */
h1.color-purple {
    font-weight: 800 !important; /* Más grosor para impacto visual */
    line-height: 1.15 !important; /* Evita que las letras se toquen, pero mantiene fuerza */
    letter-spacing: -0.02em;      /* Un toque moderno (las letras más juntas) */
    color: #8451F4 !important;    /* Tu color de marca */
    margin-bottom: 20px !important;
}

/* Ajuste específico para pantallas pequeñas */
@media (max-width: 768px) {
    h1.color-purple {
        font-size: 1.2rem !important; /* Tamaño legible sin ocupar toda la pantalla */
        text-align: left;              /* Alineación limpia a la izquierda */
        margin-top: 10px;
    }

    .aux-elementor-footer .elementor-widget-social-icons{
        margin-left: -50px;
    }

    .elementor-menu-toggle .elementor-55 .elementor-element.elementor-element-2234cf8 div.elementor-menu-toggle svg {
        fill: #401676;
    }

    .elementor-menu-toggle .cart-injection.mobile-header-cart {
        position: absolute !important;
        top: -18px;
        right: 18px !important;
        width: 64px;
        height: 64px;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 99;
    }

    .elementor-element-2234cf8 .cart-injection.mobile-header-cart {
        position: absolute !important;
        right: 30px !important;
        width: 64px !important;
        height: 64px !important;
    }

    .elementor-menu-toggle svg{
        fill: #8451F4 !important;
    }

    .elementor-nav-menu--toggle .mobile-header-cart {
        position: absolute !important;
        top: -14px;
        right: 36px;
    }

    .cart_totals h2{
        font-size: 1.2em;
    }
    .woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) #respond input#submit, .woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) a.button, .woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) button.button, .woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) input.button, :where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce #respond input#submit, :where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce a.button, :where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce button.button, :where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce input.button {
        font-size: 70%;
    }

    #add_payment_method .wc-proceed-to-checkout a.checkout-button, .woocommerce-cart .wc-proceed-to-checkout a.checkout-button, .woocommerce-checkout .wc-proceed-to-checkout a.checkout-button {
        font-size: 1.2em;
    }
    .e-con.e-flex {
        margin: 0;
        padding: 0;
    }
}
/* Ajuste para móviles (pantallas menores a 767px) */
@media (max-width: 767px) {
    .elementor-element-3b23bf7 .elementor-heading-title {
        font-size: 1.8rem !important; /* Reduce el tamaño de 2.7em a algo más manejable */
        line-height: 1.2 !important;  /* Da un poco más de aire entre líneas */
        text-align: center;           /* Asegura que esté centrado si es necesario */
    }

    /* Ajusta el contenedor del título */
    .elementor-element-3b23bf7 {
        margin-bottom: 10px !important;
        padding-bottom: 0px !important;
    }

    /* Ajusta el contenedor de los cursos que viene después */
    .elementor-element-3d10670 {
        margin-top: -20px !important; /* Margen negativo para subir el contenido */
        padding-top: 0px !important;
    }

    .curso-layout {
        flex-direction: column-reverse; /* Esto sube el sidebar al inicio */
        gap: 20px;
    }

    .curso-sidebar {
        position: relative; /* Quitamos el sticky en móvil */
        top: 0;
    }

    .card-compra {
        margin-bottom: 30px;
    }

    /* Asegura que el bloque de compra ocupe todo el ancho en móvil */
    .precio-mobile, .woo-form-wrapper {
        width: 100%;
        text-align: center;
    }
    
    /* Si usaste una tarjeta dentro del bloque móvil */
    .card-compra-mobile {
        margin: 20px 0;
        padding: 15px;
        border: 1px solid #eee;
        border-radius: 15px;
    }

        .elementor-1554 .elementor-element.elementor-element-d07a522 > .elementor-widget-container {
        margin: 10px 5px !important; /* Margen mínimo a los lados para usar todo el ancho del celular */
        padding: 0 !important;
    }
    
    /* Aseguramos que el botón de finalizar compra ocupe el 100% y no se parta */
    .woocommerce-checkout-payment #place_order, 
    .checkout-button {
        width: 100% !important;
        white-space: nowrap; /* Evita que el texto se parta en dos líneas */
    }


}