/* --- 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.ccp-template-shopper { background-color: #e8e9ef !important; }
body.ccp-template-minimalista { background-color: #e8eaed !important; }
body.ccp-template-supra { background-color: #f5e8e0 !important; }
body.ccp-template-moderna { background-color: #f5e8e0 !important; }
body.ccp-template-fluido { background-color: #f0f4f8 !important; }

/* --- Header Global (siempre visible encima) --- */
.ccp-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) --- */
.ccp-global-checkout-container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 0;
    font-family: 'Inter', 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) --- */
.ccp-global-footer {
    position: relative;
    z-index: 1000;
    padding: 40px 20px;
    transition: background-color 0.3s ease;
}

/* --- ESTILOS GLOBALES PARA MÉTODOS DE PAGO EXPRESS --- */
.ccp-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;
}

.ccp-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%);
}

.ccp-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;
}

.ccp-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;
}

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

.ccp-express-payment-methods .wc-block-components-express-payment-container,
.ccp-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 */
.ccp-express-payment-methods .wc-block-components-express-payment__event-buttons button,
.ccp-express-payment-methods .payment_methods .payment_method_paypal button,
.ccp-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 */
.ccp-express-payment-methods button[class*="paypal"],
.ccp-express-payment-methods .payment_method_paypal button {
    background-color: #0070ba !important;
    color: #ffffff !important;
    border-color: #005ea6 !important;
}

.ccp-express-payment-methods button[class*="paypal"]:hover,
.ccp-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 */
.ccp-express-payment-methods button[class*="googlepay"],
.ccp-express-payment-methods button[class*="google-pay"] {
    background-color: #4285f4 !important;
    color: #ffffff !important;
    border-color: #3367d6 !important;
}

.ccp-express-payment-methods button[class*="googlepay"]:hover,
.ccp-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 */
.ccp-express-payment-methods button[class*="applepay"],
.ccp-express-payment-methods button[class*="apple-pay"] {
    background-color: #000000 !important;
    color: #ffffff !important;
    border-color: #333333 !important;
}

.ccp-express-payment-methods button[class*="applepay"]:hover,
.ccp-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 */
.ccp-express-payment-methods button[class*="amazon"] {
    background-color: #ff9900 !important;
    color: #000000 !important;
    border-color: #e67e00 !important;
}

.ccp-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 */
.ccp-express-checkout-separator {
    margin: 32px 0;
    text-align: center;
    position: relative;
}

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

.ccp-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) {
    .ccp-express-checkout-section {
        padding: 20px;
        margin-bottom: 24px;
    }
    
    .ccp-express-payment-methods .wc-block-components-express-payment__event-buttons button,
    .ccp-express-payment-methods .payment_methods .payment_method_paypal button,
    .ccp-express-payment-methods .payment_methods .payment_method_stripe button {
        height: 44px !important;
        font-size: 13px !important;
    }
}

/* Correcciones específicas para iPhone 15 y dispositivos similares */
@media (max-width: 390px) {
    .ccp-express-checkout-section {
        padding: 16px 12px;
        margin-bottom: 20px;
        border-radius: 8px;
    }
    
    .ccp-express-checkout-title {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .ccp-express-payment-methods .wc-block-components-express-payment__event-buttons button,
    .ccp-express-payment-methods .payment_methods .payment_method_paypal button,
    .ccp-express-payment-methods .payment_methods .payment_method_stripe button {
        height: 42px !important;
        font-size: 12px !important;
        border-radius: 6px !important;
    }
    
    .ccp-express-checkout-separator {
        margin: 20px 0;
    }
    
    .ccp-express-checkout-separator span {
        font-size: 12px;
        padding: 0 12px;
    }
}

/* Asegurar que el layout global sea completamente responsivo */
@media (max-width: 390px) {
    .ccp-global-checkout-container {
        padding: 0;
        margin: 0;
        width: 100%;
        overflow-x: hidden;
    }
    
    .ccp-layout-grid {
        padding: 0;
        margin: 0;
        gap: 20px !important;
        width: 100%;
        max-width: 100%;
    }
    
    .ccp-billing-fields-wrapper .form-row,
    .ccp-billing-fields-wrapper .form-row-first,
    .ccp-billing-fields-wrapper .form-row-last {
        margin-bottom: 12px !important;
    }
    
    .ccp-billing-fields-wrapper input,
    .ccp-billing-fields-wrapper select,
    .ccp-billing-fields-wrapper textarea {
        font-size: 16px !important; /* Mantener 16px para evitar zoom en iOS */
        padding: 8px 12px !important;
        height: 44px !important;
    }
}

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

/* --- Layout Global 60/40 --- */
.ccp-layout-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 40px !important;
    width: 100% !important;
    max-width: none !important;
}

/* Asegurar que los formularios ocupen el ancho completo */
.ccp-global-checkout-container form.checkout {
    width: 100% !important;
}

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

/* Forzar la visualización de campos de facturación independientemente del tema */
.ccp-billing-fields-wrapper {
    width: 100% !important;
    display: block !important;
}

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

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

.ccp-billing-fields-wrapper input,
.ccp-billing-fields-wrapper select,
.ccp-billing-fields-wrapper textarea {
    width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
}
@media (min-width: 992px) {
    .ccp-layout-grid {
        grid-template-columns: 6fr 4fr !important;
    }
}

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

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

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

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

/* --- Estilos de Pasos (Breadcrumb) --- */
.steps-style-bold li.is-active { font-weight: 600; }
.steps-style-underlined li.is-active { font-weight: 600; border-bottom: 2px solid #6772e5; padding-bottom: 4px; }
.steps-style-pills li.is-active { background-color: #e6ebf1; padding: 6px 12px; border-radius: 9999px; font-weight: 600; }
.header-style-dark.steps-style-pills li.is-active { background-color: #4a5568; }

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

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

/* Estilos de Footer (Oscuro) */
.ccp-global-footer.header-style-dark {
    background-color: #1a202c;
}
.ccp-global-footer.header-style-dark a {
    color: #a0aec0; /* Letras claras */
}
.ccp-global-footer.header-style-dark a:hover {
    color: #fff;
}

/* Corrección para Admin Bar */
body.admin-bar .ccp-global-header { margin-top: 32px; }
@media screen and (max-width: 782px) {
    body.admin-bar .ccp-global-header { margin-top: 46px; }

/* Estilos para Testimonios */
.ccp-testimonials-container {
    margin-top: 40px;
    border-top: 1px solid #e9ecef;
    padding-top: 40px;
}

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

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

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

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

.ccp-testimonial__content {
    flex: 1;
}

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

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

/* Estilos para Order Bump */
.ccp-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;
}

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

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

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

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

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

/* Notificaciones del Order Bump */
.ccp-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;
}

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

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

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

/* Order Bump Container */
.ccp-order-bump-container {
    /* No animations - clean and simple */
}

/* --- OCULTAR CAMPOS DESHABILITADOS --- */
.ccp-hidden-field {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    pointer-events: none !important;
}
