/* Reset básico y Fuentes */
body {
    background-color: #f4f6f9;
    font-family: 'Poppins', sans-serif;
    color: #333;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    transition: color 0.3s;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Header (Si se carga dinámicamente, este estilo puede sobrar, pero lo mantenemos por si acaso) */
.checkout-header {
    background-color: #202c56;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* CARD UNIFICADA */
.checkout-card {
    background: #fff;
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    overflow: hidden; /* Para que el header ocupe las esquinas */
    display: flex;
    flex-direction: column;
}

/* Header Integrado en la Tarjeta */
.course-header-strip {
    background: linear-gradient(135deg, #202c56 0%, #335a96 100%);
    color: white;
    padding: 25px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.course-subtitle-strip {
    font-size: 0.85rem;
    opacity: 0.8;
    margin: 0 0 5px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.course-header-strip h1 {
    font-size: 1.6rem;
    color: #c29e50;
    margin: 0;
    font-weight: 700;
}

.secure-badge-strip {
    background: rgba(255,255,255,0.15);
    padding: 8px 15px;
    border-radius: 30px;
    font-size: 0.8rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Cuerpo de la tarjeta dividido en 2 columnas */
.checkout-body {
    display: flex;
    flex-wrap: wrap; /* Responsive */
}

/* Columna Izq: Detalles */
.product-details-col {
    flex: 1.5; /* Más ancho */
    padding: 40px;
    border-right: 1px solid #f0f0f0;
}

/* Columna Der: Pago */
.payment-summary-col {
    flex: 1;
    background-color: #fafbfd; /* Color sutil para diferenciar zona de pago */
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centrar verticalmente respecto a la columna izq */
}

@media (max-width: 800px) {
    .checkout-body {
        flex-direction: column;
    }
    .product-details-col {
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
    }
    /* En móvil quitamos el centrado forzado para que fluya natural */
    .payment-summary-col {
        justify-content: flex-start;
    }
}

/* Estilos de Contenido (bloques limpios) */
.content-block {
    margin-bottom: 30px;
}

.content-block h3 {
    font-size: 1.1rem;
    color: #202c56;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.content-block h3 i {
    color: #c29e50;
}

/* Listas de Beneficios */
.benefits-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
}

.benefits-list li i {
    color: #28a745;
    margin-top: 4px;
    font-size: 1rem;
}

/* Features Pills (Estilo moderno) */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.feature-pill {
    background: #fff;
    border: 1px solid #eee;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #666;
    border-left: 3px solid #202c56;
}

.feature-pill.highlight {
    background: #fffbef;
    border-color: #f5eaca;
    border-left-color: #c29e50;
    color: #856404;
}

.feature-pill strong {
    display: block;
    color: #333;
    margin-bottom: 2px;
}

.back-link {
    color: #999;
    font-size: 0.9rem;
    font-weight: 500;
}
.back-link:hover {
    color: #202c56;
}

/* Zona de Pago */
.payment-sticky-content {
    /* position: sticky removed for vertical centering alignment */
    width: 100%;
}

.payment-summary-col h2 {
    margin: 0 0 25px 0;
    font-size: 1.3rem;
    color: #202c56;
    font-weight: 700;
}

.special-price-banner {
    margin: -10px 0 20px;
    padding: 12px 14px;
    border-radius: 10px;
    background: linear-gradient(135deg, #fff7e4 0%, #ffe6b8 100%);
    border: 1px solid #f0c976;
    color: #7c4d00;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.4;
}

/* Coupon Section */
.coupon-section {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-bottom: 25px;
}

.coupon-section label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-group {
    display: flex;
    gap: 8px;
}

.input-group input {
    flex: 1;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0 12px;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s;
}

.input-group input:focus {
    border-color: #202c56;
    box-shadow: 0 0 0 2px rgba(32, 44, 86, 0.1);
}

.input-group button {
    background: #202c56;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0 15px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.input-group button:hover {
    background: #335a96;
}

.input-group button:disabled {
    background: #ccc;
    cursor: default;
}

.coupon-message {
    font-size: 0.8rem;
    margin-top: 8px;
    min-height: 18px;
    font-weight: 600;
    margin-bottom: 0;
}

.uam-segment-section .segment-helper {
    font-size: 0.82rem;
    color: #666;
    margin: 0 0 12px;
    line-height: 1.4;
}

.uam-segment-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.uam-segment-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #2d2d2d;
    font-size: 0.9rem;
}

.uam-segment-option:hover {
    border-color: #c29e50;
    background: #fffaf0;
}

.uam-segment-option input[type="radio"] {
    accent-color: #202c56;
}

.coupon-applied {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f0fff4;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px dashed #28a745;
}

.coupon-info .code {
    font-weight: 700;
    color: #28a745;
}

.coupon-info .discount-tag {
    background: #28a745;
    color: white;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 5px;
}

.remove-coupon {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 1.2rem;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    opacity: 0.7;
}
.remove-coupon:hover { opacity: 1; }

.divider {
    border: 0;
    border-top: 1px solid #e0e0e0;
    margin: 25px 0;
}

/* Legal Section */
.legal-section {
    margin-bottom: 25px;
}

/* Custom Checkbox */
.checkbox-container {
    display: block;
    position: relative;
    padding-left: 30px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    user-select: none;
    color: #555;
    line-height: 1.4;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 2px;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: all 0.2s;
}

.checkbox-container:hover input ~ .checkmark {
    border-color: #999;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: #202c56;
    border-color: #202c56;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}

.label-text a {
    color: #1885c2;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dotted #1885c2;
}

/* Botón de Pago */
.pay-button {
    width: 100%;
    background-color: #c29e50;
    color: white;
    border: none;
    padding: 16px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pay-button:hover:not(:disabled) {
    background-color: #a8863d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(194, 158, 80, 0.4);
}

.pay-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.whatsapp-checkout-btn {
    width: 100%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 13px;
    border-radius: 8px;
    border: 1px solid #24a148;
    color: #1b7f38;
    background: #ecf8ef;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
}

.whatsapp-checkout-btn:hover {
    color: #ffffff;
    background: #1f9d43;
    border-color: #1f9d43;
    text-decoration: none;
}

/* Footer Seguro */
.secure-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: #aaa;
}

.secure-footer a {
    color: #888;
    text-decoration: underline;
    font-weight: 600;
}

.payment-methods {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
    font-size: 0.75rem;
    opacity: 0.7;
}

.payment-methods .method {
    background: #f4f6f9;
    padding: 2px 6px;
    border-radius: 4px;
}

/* ============================================
   TEMA UAM (DINAMICO)
   Se activa con body.course-theme-uam
   ============================================ */
body.course-theme-uam {
    background-color: #f6fbf5;
}

body.course-theme-uam .checkout-card {
    box-shadow: 0 10px 30px rgba(18, 63, 6, 0.12);
}

body.course-theme-uam .course-header-strip {
    background: linear-gradient(135deg, #195707 0%, #123f06 100%);
}

body.course-theme-uam .course-header-strip h1 {
    color: #ffffff;
}

body.course-theme-uam .secure-badge-strip {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

body.course-theme-uam .payment-summary-col {
    background-color: #f3faef;
}

body.course-theme-uam .content-block h3,
body.course-theme-uam .payment-summary-col h2 {
    color: #195707;
}

body.course-theme-uam .content-block h3 i,
body.course-theme-uam .benefits-list li i {
    color: #195707;
}

body.course-theme-uam .feature-pill {
    border-left-color: #195707;
}

body.course-theme-uam .feature-pill.highlight {
    background: #eff8eb;
    border-color: #d4e9cc;
    border-left-color: #195707;
    color: #205216;
}

body.course-theme-uam .back-link:hover {
    color: #195707;
}

body.course-theme-uam .input-group input:focus {
    border-color: #195707;
    box-shadow: 0 0 0 2px rgba(25, 87, 7, 0.12);
}

body.course-theme-uam .input-group button {
    background: #195707;
}

body.course-theme-uam .input-group button:hover {
    background: #123f06;
}

body.course-theme-uam .uam-segment-option:hover {
    border-color: #195707;
    background: #f2f9ef;
}

body.course-theme-uam .uam-segment-option input[type="radio"] {
    accent-color: #195707;
}

body.course-theme-uam .checkbox-container input:checked ~ .checkmark {
    background-color: #195707;
    border-color: #195707;
}

body.course-theme-uam .label-text a {
    color: #195707;
    border-bottom-color: #195707;
}

body.course-theme-uam .pay-button {
    background-color: #195707;
}

body.course-theme-uam .pay-button:hover:not(:disabled) {
    background-color: #123f06;
    box-shadow: 0 4px 12px rgba(25, 87, 7, 0.35);
}
