/* --- Estilos Globales para el Checkout v1.2 --- */

/* --- Reseteo y Fondo Global --- */
html, body {
    margin: 0 !important;
    padding: 0 !important;
    background-color: #f6f9fc !important; /* Fallback si no hay template específico */
}

/* --- Fondo específico por template (override por cada template) --- */
body.ckfylt25-template-shopper { background-color: #e8e9ef !important; }
body.ckfylt25-template-minimalista { background-color: #e8eaed !important; }
body.ckfylt25-template-supra { background-color: #f5e8e0 !important; }
body.ckfylt25-template-moderna { background-color: #f5e8e0 !important; }
body.ckfylt25-template-fluido { background-color: #f0f4f8 !important; }

/* --- Header Global (siempre visible encima) --- */
.ckfylt25-global-header {
    position: relative;
    z-index: 1000;
    padding: 0 20px;
    transition: background-color 0.3s ease;
}

/* --- Contenedor Principal (transparente para mostrar el fondo del body) --- */
.ckfylt25-global-checkout-container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 40px 20px;
    /* Use a performant, privacy-friendly system font stack */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    font-size: 16px;
    background: transparent !important; /* Transparente para mostrar el fondo del body */
    position: relative;
    z-index: 1;
}

/* --- Footer Global (siempre visible encima) --- */
.ckfylt25-global-footer {
    position: relative;
    z-index: 1000;
    padding: 40px 20px;
    transition: background-color 0.3s ease;
}

/* --- ESTILOS GLOBALES PARA MÉTODOS DE PAGO EXPRESS --- */
.ckfylt25-express-checkout-section {
    background-color: #ffffff;
    border: 2px solid #e6ebf1;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.ckfylt25-express-checkout-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 50%, #ec4899 100%);
}

.ckfylt25-express-checkout-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 16px 0;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

.ckfylt25-express-checkout-title::after {
    content: 'EXPRESS CHECKOUT';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    padding: 0 12px;
    font-size: 12px;
    color: #6366f1;
    font-weight: 700;
}

.ckfylt25-express-payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ckfylt25-express-payment-methods .wc-block-components-express-payment-container,
.ckfylt25-express-payment-methods .woocommerce-checkout-payment .payment_methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Estilos para botones de pago express individuales */
.ckfylt25-express-payment-methods .wc-block-components-express-payment__event-buttons button,
.ckfylt25-express-payment-methods .payment_methods .payment_method_paypal button,
.ckfylt25-express-payment-methods .payment_methods .payment_method_stripe button {
    width: 100% !important;
    height: 48px !important;
    border-radius: 8px !important;
    border: 1px solid #d1d5db !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
    position: relative !important;
    overflow: hidden !important;
}

/* PayPal Express Button */
.ckfylt25-express-payment-methods button[class*="paypal"],
.ckfylt25-express-payment-methods .payment_method_paypal button {
    background-color: #0070ba !important;
    color: #ffffff !important;
    border-color: #005ea6 !important;
}

.ckfylt25-express-payment-methods button[class*="paypal"]:hover,
.ckfylt25-express-payment-methods .payment_method_paypal button:hover {
    background-color: #005ea6 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 112, 186, 0.3) !important;
}

/* Google Pay Button */
.ckfylt25-express-payment-methods button[class*="googlepay"],
.ckfylt25-express-payment-methods button[class*="google-pay"] {
    background-color: #4285f4 !important;
    color: #ffffff !important;
    border-color: #3367d6 !important;
}

.ckfylt25-express-payment-methods button[class*="googlepay"]:hover,
.ckfylt25-express-payment-methods button[class*="google-pay"]:hover {
    background-color: #3367d6 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3) !important;
}

/* Apple Pay Button */
.ckfylt25-express-payment-methods button[class*="applepay"],
.ckfylt25-express-payment-methods button[class*="apple-pay"] {
    background-color: #000000 !important;
    color: #ffffff !important;
    border-color: #333333 !important;
}

.ckfylt25-express-payment-methods button[class*="applepay"]:hover,
.ckfylt25-express-payment-methods button[class*="apple-pay"]:hover {
    background-color: #333333 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

/* Amazon Pay Button */
.ckfylt25-express-payment-methods button[class*="amazon"] {
    background-color: #ff9900 !important;
    color: #000000 !important;
    border-color: #e67e00 !important;
}

.ckfylt25-express-payment-methods button[class*="amazon"]:hover {
    background-color: #e67e00 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3) !important;
}

/* Separador "OR" entre express checkout y formulario regular */
.ckfylt25-express-checkout-separator {
    margin: 32px 0;
    text-align: center;
    position: relative;
}

.ckfylt25-express-checkout-separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #e5e7eb;
}

.ckfylt25-express-checkout-separator span {
    background-color: #ffffff;
    padding: 0 16px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive para Express Checkout */
@media (max-width: 768px) {
    .ckfylt25-express-checkout-section {
        padding: 20px;
        margin-bottom: 24px;
    }
    
    .ckfylt25-express-payment-methods .wc-block-components-express-payment__event-buttons button,
    .ckfylt25-express-payment-methods .payment_methods .payment_method_paypal button,
    .ckfylt25-express-payment-methods .payment_methods .payment_method_stripe button {
        height: 44px !important;
        font-size: 13px !important;
    }
}

@media (min-width: 992px) {
    .ckfylt25-global-checkout-container {
        max-width: 1400px;
    }
}

.ckfylt25-layout-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 40px !important;
    width: 100% !important;
    max-width: none !important;
}

.ckfylt25-global-checkout-container form.checkout {
    width: 100% !important;
}

.ckfylt25-global-checkout-container .woocommerce-billing-fields,
.ckfylt25-global-checkout-container .woocommerce-billing-fields__field-wrapper {
    width: 100% !important;
}

.ckfylt25-billing-fields-wrapper {
    width: 100% !important;
    display: block !important;
}

.ckfylt25-billing-fields-wrapper .woocommerce-billing-fields,
.ckfylt25-billing-fields-wrapper .woocommerce-billing-fields__field-wrapper {
    width: 100% !important;
    display: block !important;
}

.ckfylt25-billing-fields-wrapper .form-row,
.ckfylt25-billing-fields-wrapper .form-row-first,
.ckfylt25-billing-fields-wrapper .form-row-last {
    width: 100% !important;
    float: none !important;
    clear: both !important;
    margin-bottom: 16px !important;
    display: block !important;
}

.ckfylt25-billing-fields-wrapper input,
.ckfylt25-billing-fields-wrapper select,
.ckfylt25-billing-fields-wrapper textarea {
    width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
}

@media (min-width: 992px) {
    .ckfylt25-layout-grid {
        grid-template-columns: 6fr 4fr !important;
    }
}

.ckfylt25-header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}
.ckfylt25-header-logo img {
    max-height: 45px;
    width: auto;
}
.ckfylt25-site-title-link {
    font-size: 22px;
    font-weight: 700;
    text-decoration: none;
}
.ckfylt25-header-breadcrumb ol {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}
.ckfylt25-header-breadcrumb li:not(:last-child)::after {
    content: '>';
    margin-left: 12px;
    color: #cad1d9;
}
.ckfylt25-header-breadcrumb a {
    text-decoration: none;
}

.header-style-classic { background-color: #fff; border-bottom: 1px solid #e6ebf1; }
.header-style-classic .ckfylt25-site-title-link { color: #32325d; }
.header-style-classic .ckfylt25-header-breadcrumb li { color: #8898aa; }
.header-style-classic .ckfylt25-header-breadcrumb li.is-active { color: #32325d; }
.header-style-classic .ckfylt25-header-breadcrumb a { color: #525f7f; }

.header-style-centered { background-color: #fff; border-bottom: 1px solid #e6ebf1; }
.header-style-centered .ckfylt25-header-content { flex-direction: column; height: auto; padding: 20px 0; }
.header-style-centered .ckfylt25-header-logo { margin-bottom: 16px; }
.header-style-centered .ckfylt25-site-title-link { color: #32325d; }
.header-style-centered .ckfylt25-header-breadcrumb li { color: #8898aa; }
.header-style-centered .ckfylt25-header-breadcrumb li.is-active { color: #32325d; }
.header-style-centered .ckfylt25-header-breadcrumb a { color: #525f7f; }

.header-style-dark { background-color: #2d3748; }
.header-style-dark .ckfylt25-site-title-link { color: #fff; }
.header-style-dark .ckfylt25-header-breadcrumb li { color: #a0aec0; }
.header-style-dark .ckfylt25-header-breadcrumb li.is-active { color: #fff; }
.header-style-dark .ckfylt25-header-breadcrumb a { color: #e2e8f0; }
.header-style-dark .ckfylt25-header-breadcrumb li:not(:last-child)::after { color: #4a5568; }

.ckfylt25-footer-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center; /* Centrar contenido */
}
.ckfylt25-footer-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    justify-content: center; /* Centrar los links */
    gap: 24px; /* Espacio entre links */
}
.ckfylt25-footer-nav a {
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.ckfylt25-global-footer.header-style-classic,
.ckfylt25-global-footer.header-style-centered {
    background-color: #f8f9fa;
    border-top: 1px solid #e6ebf1;
}
.ckfylt25-global-footer.header-style-classic a,
.ckfylt25-global-footer.header-style-centered a {
    color: #525f7f; /* Letras oscuras */
}
.ckfylt25-global-footer.header-style-classic a:hover,
.ckfylt25-global-footer.header-style-centered a:hover {
    color: #32325d;
}

.ckfylt25-global-footer.header-style-dark {
    background-color: #1a202c;
}
.ckfylt25-global-footer.header-style-dark a {
    color: #a0aec0; /* Letras claras */
}
.ckfylt25-global-footer.header-style-dark a:hover {
    color: #fff;
}

body.admin-bar .ckfylt25-global-header { margin-top: 32px; }
@media screen and (max-width: 782px) {
    body.admin-bar .ckfylt25-global-header { margin-top: 46px; }
}

.ckfylt25-testimonials-container {
    margin-top: 40px;
    border-top: 1px solid #e9ecef;
    padding-top: 40px;
}

.ckfylt25-testimonial {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.ckfylt25-testimonial:last-child {
    margin-bottom: 0;
}

.ckfylt25-testimonial__image {
    flex-shrink: 0;
}

.ckfylt25-testimonial__image img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e9ecef;
}

.ckfylt25-testimonial__content {
    flex: 1;
}

.ckfylt25-testimonial__text p {
    margin: 0 0 8px 0;
    font-size: 16px;
    line-height: 1.6;
    color: #6c757d;
    font-style: italic;
}

.ckfylt25-testimonial__author {
    font-size: 14px;
    font-weight: 500;
    color: #212529;
}

.ckfylt25-order-bump-container {
    position: relative;
    margin: 20px 0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.ckfylt25-order-bump-container:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.ckfylt25-order-bump-container.adding-to-cart {
    opacity: 0.6;
    pointer-events: none;
}

.ckfylt25-order-bump-container .ckfylt25-order-bump-btn {
    transition: all 0.2s ease;
    position: relative;
}

.ckfylt25-order-bump-container .ckfylt25-order-bump-btn:hover {
    transform: translateY(-1px);
}

.ckfylt25-order-bump-container .button-success {
    background: #28a745 !important;
}

.ckfylt25-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 16px;
    border-radius: 4px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
    font-size: 14px;
}

.ckfylt25-notification-success {
    background: #28a745;
}

.ckfylt25-notification-error {
    background: #dc3545;
}

@media (max-width: 768px) {
    .ckfylt25-order-bump-container {
        margin: 15px 0;
        padding: 15px;
    }
    
    .ckfylt25-order-bump-container > div {
        flex-direction: column;
        gap: 12px;
    }
    
    .ckfylt25-order-bump-container h3 {
        font-size: 15px !important;
    }
    
    .ckfylt25-order-bump-container p {
        font-size: 13px !important;
    }
    
    .ckfylt25-order-bump-container .ckfylt25-order-bump-btn {
        width: 100%;
        padding: 10px 16px !important;
    }
}

/* No animations for order bump container - keep it clean and simple */

/* Styles moved to checkout-override.css to prevent conflicts */

/* Prevenir que overlays bloqueen el botón de pago */
#place_order {
    position: relative !important;
    z-index: 9999 !important;
    pointer-events: auto !important;
}

/* Asegurar que los métodos de pago sean accesibles */
#payment {
    position: relative !important;
    z-index: 999 !important;
    pointer-events: auto !important;
}

.wc_payment_methods {
    position: relative !important;
    z-index: 999 !important;
    pointer-events: auto !important;
}

/* Prevenir que blockUI interfiera con el pago */
.blockUI {
    z-index: 1 !important;
}

.blockUI.blockOverlay {
    z-index: 1 !important;
}

/* Asegurar que el formulario de checkout sea accesible */
form.checkout {
    position: relative !important;
    z-index: 10 !important;
}

/* Prevenir que otros overlays bloqueen elementos críticos */
.ckfylt25-minimalista-container {
    position: relative !important;
    z-index: 10 !important;
}

/* Asegurar que el botón de pago mantenga su funcionalidad */
#place_order:not(:disabled) {
    cursor: pointer !important;
    pointer-events: auto !important;
}

/* Prevenir que elementos de loading interfieran */
.woocommerce-checkout.processing #place_order {
    position: relative !important;
    z-index: 9999 !important;
}
