/* ====================================================
   PÁGINA DE CHECKOUT: MONDELINN WHITE PREMIUM (MASTER V5)
   Solución Definitiva: Comodín de Texto Oscuro
==================================================== */
:root {
    --mondelinn-purple: #667eea;
    --mondelinn-purple-glow: rgba(102, 126, 234, 0.25);
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(102, 126, 234, 0.25);
    --glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.04), 0 4px 20px rgba(102, 126, 234, 0.1);
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --mondelinn-red: #e53e3e;
}

.mondelinn-checkout-layout { max-width: 1200px; margin: 60px auto; padding: 0 20px; min-height: 70vh; animation: fadeIn 0.6s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.mondelinn-glass-container { background: var(--glass-bg) !important; backdrop-filter: blur(20px) !important; -webkit-backdrop-filter: blur(20px) !important; border-radius: 24px !important; padding: 50px !important; box-shadow: var(--glass-shadow) !important; border: 1px solid var(--glass-border) !important; }
.checkout-header { text-align: center; margin-bottom: 40px; }
.checkout-title { color: var(--text-dark); font-size: 36px; font-weight: 700; margin: 0 0 10px 0; }
.checkout-subtitle { color: var(--text-muted); font-size: 16px; }

/* ====================================================
   1. NOTIFICACIONES (TEXTOS EN NEGRO/OSCURO FORZADO)
==================================================== */

/* Ocultar el botón azul de "Ver carrito" */
.woocommerce-message a.button.wc-forward { 
    display: none !important; 
}

/* Contenedores base */
.woocommerce-form-coupon-toggle .woocommerce-info,
.woocommerce-error, .woocommerce-info, .woocommerce-message {
    background: #ffffff !important; 
    border: 1px solid var(--glass-border) !important; 
    border-radius: 12px !important; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.02) !important; 
    padding: 16px 20px 16px 55px !important; 
    margin-bottom: 25px !important; 
    position: relative !important; 
    display: block !important; 
    animation: fadeIn 0.5s ease-out;
}

/* LA REGLA ABSOLUTA: Todo lo que esté adentro será oscuro */
.woocommerce-form-coupon-toggle .woocommerce-info,
.woocommerce-form-coupon-toggle .woocommerce-info *,
.woocommerce-error, .woocommerce-error *,
.woocommerce-info, .woocommerce-info *,
.woocommerce-message, .woocommerce-message * {
    color: var(--text-dark) !important;
    text-shadow: none !important;
}

/* Excepto la campanita / ícono, que conserva su color */
.woocommerce-error::before, .woocommerce-info::before, .woocommerce-message::before {
    position: absolute !important; left: 20px !important; top: 16px !important; margin: 0 !important;
}
.woocommerce-error::before { color: var(--mondelinn-red) !important; }
.woocommerce-info::before, .woocommerce-message::before { color: var(--mondelinn-purple) !important; }

/* Bordes y fondos específicos */
.woocommerce-form-coupon-toggle .woocommerce-info, .woocommerce-info, .woocommerce-message {
    border-top: 4px solid var(--mondelinn-purple) !important; 
}
.woocommerce-error {
    border-top: 4px solid var(--mondelinn-red) !important; 
    background: #fff5f5 !important; 
    border-color: rgba(229, 62, 62, 0.2) !important;
}

/* Estructura de las listas */
.woocommerce-error li, .woocommerce-info li, .woocommerce-message li {
    display: block !important; float: none !important; clear: both !important; font-weight: 600 !important; list-style: none !important; margin: 0 0 5px 0 !important; padding: 0 !important; text-align: left !important; line-height: 1.5 !important;
}
ul.woocommerce-error, ul.woocommerce-info, ul.woocommerce-message { margin-left: 0 !important; padding-left: 55px !important; }

/* ====================================================
   2. PANELES DE DIRECCIÓN (REPARACIÓN DE BOTONES NEGROS)
==================================================== */
.mondelinn-address-summary { display: flex !important; gap: 30px !important; margin-bottom: 40px !important; }
.mondelinn-address-summary .address-card { flex: 1 !important; background: #ffffff !important; border: 1px solid var(--glass-border) !important; border-radius: 16px !important; padding: 25px !important; box-shadow: 0 4px 15px rgba(0,0,0,0.02) !important; }
.mondelinn-address-summary .address-card h4 { color: var(--text-dark) !important; font-size: 18px !important; font-weight: 700 !important; margin: 0 0 15px 0 !important; border: none !important; }
.mondelinn-address-summary .current-address { color: var(--text-muted) !important; font-size: 15px !important; margin-bottom: 15px !important; line-height: 1.5 !important; }

button.btn-toggle-address, button.btn-manual-edit,
.woocommerce-checkout .checkout_coupon, .woocommerce-checkout .checkout-shipping-address a, .woocommerce-checkout .checkout-billing-address a, .woocommerce-checkout .woocommerce-shipping-fields a, .woocommerce-checkout .woocommerce-billing-fields a, .woocommerce-checkout a.edit, .woocommerce-checkout h3 a, #customer_details a {
    background-color: transparent !important; background: none !important; color: var(--mondelinn-purple) !important; text-decoration: underline !important; box-shadow: none !important; padding: 0 !important; font-weight: 600 !important; font-size: 14px !important; display: inline-block !important; margin-bottom: 10px !important; border: none !important; cursor: pointer !important; transition: color 0.3s ease !important;
}

button.btn-toggle-address:hover, button.btn-manual-edit:hover, .woocommerce-checkout a.edit:hover, #customer_details a:hover {
    color: #4c63d2 !important; background: transparent !important;
}

.address-options-drawer { margin-top: 20px !important; padding-top: 20px !important; border-top: 1px dashed rgba(102, 126, 234, 0.2) !important; display: flex; flex-direction: column; gap: 12px; }
button.btn-usar-direccion { background: #f8fafc !important; border: 1px solid rgba(102, 126, 234, 0.2) !important; border-radius: 12px !important; padding: 14px 16px !important; text-align: left !important; cursor: pointer !important; transition: all 0.3s ease !important; color: var(--text-muted) !important; font-size: 14px !important; width: 100% !important; box-shadow: none !important; display: block !important; }
button.btn-usar-direccion strong { color: var(--text-dark) !important; font-weight: 600 !important; }
button.btn-usar-direccion:hover { background: #ffffff !important; border-color: var(--mondelinn-purple) !important; transform: translateY(-2px) !important; box-shadow: 0 4px 12px var(--mondelinn-purple-glow) !important; }
button.btn-usar-direccion:hover strong { color: var(--mondelinn-purple) !important; }

/* ====================================================
   3. INPUTS Y FORMULARIOS
==================================================== */
.woocommerce-checkout input[type="text"], .woocommerce-checkout input[type="email"], .woocommerce-checkout input[type="tel"], .woocommerce-checkout input[type="password"], .woocommerce-checkout textarea, .woocommerce-checkout select, .woocommerce-checkout .select2-selection {
    background-color: #f8fafc !important; border: 1px solid rgba(102, 126, 234, 0.3) !important; border-radius: 12px !important; padding: 14px 16px !important; color: var(--text-dark) !important; box-shadow: none !important; width: 100% !important; box-sizing: border-box !important; font-family: inherit !important; transition: all 0.3s ease !important; height: auto !important;
}
.woocommerce-checkout textarea { min-height: 120px !important; resize: vertical !important; }
.woocommerce-checkout input:focus, .woocommerce-checkout textarea:focus, .woocommerce-checkout select:focus, .woocommerce-checkout .select2-container--open .select2-selection {
    border-color: var(--mondelinn-purple) !important; background-color: #ffffff !important; box-shadow: 0 0 0 3px var(--mondelinn-purple-glow) !important; outline: none !important;
}

/* ====================================================
   4. DISEÑO DE COLUMNAS Y TABLA DE PEDIDO
==================================================== */
.woocommerce-checkout .col2-set { display: flex !important; gap: 40px !important; margin-bottom: 40px !important; }
.woocommerce-checkout .col2-set .col-1, .woocommerce-checkout .col2-set .col-2 { flex: 1 !important; width: 100% !important; max-width: 100% !important; float: none !important; }
.woocommerce-checkout h3, #order_review_heading { color: var(--text-dark) !important; font-size: 20px !important; font-weight: 700 !important; margin-bottom: 20px !important; border-bottom: none !important; padding-bottom: 10px !important; }

#order_review { background: #ffffff !important; border-radius: 16px !important; border: 1px solid var(--glass-border) !important; padding: 25px !important; box-shadow: 0 4px 15px rgba(0,0,0,0.03) !important; margin-bottom: 30px !important; }
.woocommerce-checkout-review-order-table { width: 100% !important; border: none !important; background: transparent !important; }
.woocommerce-checkout-review-order-table th, .woocommerce-checkout-review-order-table td { padding: 15px 10px !important; border-top: none !important; border-left: none !important; border-right: none !important; border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important; background: transparent !important; color: var(--text-muted) !important; }
.woocommerce-checkout-review-order-table th { color: var(--text-dark) !important; font-weight: 600 !important; text-transform: uppercase !important; font-size: 13px !important; }
.woocommerce-checkout-review-order-table .order-total td strong { font-size: 20px !important; color: var(--mondelinn-purple) !important; }

/* ====================================================
   5. MÉTODOS DE PAGO Y BOTÓN FINAL
==================================================== */
#payment, .mp-checkout-container { background: #ffffff !important; border-radius: 16px !important; padding: 25px !important; border: 1px solid var(--glass-border) !important; box-shadow: 0 4px 15px rgba(0,0,0,0.02) !important; }
#payment ul.payment_methods { border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important; padding: 0 0 20px 0 !important; margin: 0 0 20px 0 !important; }
#payment div.payment_box { background: rgba(102, 126, 234, 0.05) !important; color: var(--text-muted) !important; border-radius: 12px !important; padding: 15px !important; box-shadow: none !important; }

#payment #place_order, .mercadopago-button, .mp-button {
    background: var(--mondelinn-purple) !important; color: #ffffff !important; padding: 18px 40px !important; border: none !important; border-radius: 12px !important; font-size: 16px !important; font-weight: 700 !important; cursor: pointer !important; transition: all 0.3s ease !important; width: 100% !important; text-align: center !important; text-transform: uppercase !important; letter-spacing: 0.5px !important; box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2) !important;
}
#payment #place_order:hover, .mercadopago-button:hover, .mp-button:hover {
    transform: translateY(-2px) scale(1.02) !important; box-shadow: 0 8px 20px var(--mondelinn-purple-glow) !important; background: #5a6ed6 !important;
}

/* ====================================================
   6. RESPONSIVE DESIGN
==================================================== */
@media (max-width: 992px) { .woocommerce-checkout .col2-set { flex-direction: column !important; gap: 0 !important; } }
@media (max-width: 768px) { .mondelinn-glass-container { padding: 30px 20px !important; } .checkout-title { font-size: 28px !important; } #order_review { padding: 15px !important; } .mondelinn-address-summary { flex-direction: column !important; gap: 20px !important; } }