        /* Modal de geolocalización simplificado */
        .geo-modal {
            display: none;
            position: fixed;
            inset: 0;
            background-color: rgba(0, 0, 0, 0.8);
            z-index: 1000;
            justify-content: center;
            align-items: center;
            padding: 1rem;
            backdrop-filter: blur(4px);
        }

        .geo-modal-content {
            background: #ffffff;
            padding: 2rem 1.5rem;
            border-radius: 1.5rem;
            max-width: 420px;
            width: 90%;
            text-align: center;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        }

        .geo-modal-icon {
            font-size: 3.5rem;
            margin-bottom: 1rem;
        }

        .geo-modal-content h2 {
            font-size: 1.5rem;
            margin-bottom: 0.5rem;
            color: #1f2937;
            font-weight: 700;
        }

        .geo-modal-content p {
            font-size: 1rem;
            color: #4b5563;
            margin-bottom: 1rem;
            line-height: 1.5;
        }

        .geo-modal-buttons {
            margin-top: 1.5rem;
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }

        .geo-modal-btn {
            padding: 0.85rem 1rem;
            border: none;
            border-radius: 1rem;
            font-size: 1rem;
            font-weight: 600;
            transition: all 0.3s ease;
            cursor: pointer;
            width: 100%;
        }

        .geo-modal-btn.primary {
            background: linear-gradient(135deg, #10b981, #059669);
            color: white;
        }

        .geo-modal-btn.secondary {
            background-color: #f3f4f6;
            color: #374151;
            border: 2px solid #e5e7eb;
        }

        .geo-modal-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(0,0,0,0.15);
        }

        .geo-modal-btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }

        /* Loading spinner */
        .loading-spinner {
            display: inline-block;
            width: 20px;
            height: 20px;
            border: 3px solid rgba(16, 185, 129, 0.3);
            border-radius: 50%;
            border-top-color: #10b981;
            animation: spin 1s ease-in-out infinite;
            margin-right: 8px;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }



        /* Modo oscuro */
        @media (prefers-color-scheme: dark) {
            .geo-modal-content {
                background-color: #1f2937;
                color: #f9fafb;
            }
            .geo-modal-content h2 {
                color: #f3f4f6;
            }
            .geo-modal-content p {
                color: #d1d5db;
            }
            .geo-modal-btn.secondary {
                background-color: #374151;
                color: #f9fafb;
                border-color: #4b5563;
            }
            .manual-location-input {
                background-color: #374151;
                color: #f9fafb;
                border-color: #4b5563;
            }
        }

        /* Responsive */
        @media (max-width: 480px) {
            .geo-modal-content {
                margin: 1rem;
                padding: 1.5rem 1rem;
                max-width: 95%;
            }
            .geo-modal-icon {
                font-size: 3rem;
            }
            .geo-modal-content h2 {
                font-size: 1.25rem;
            }
        }
        
        /* ========== ESTILOS PARA IMÁGENES EN CARRITO Y CHECKOUT ========== */

/* Carrito lateral - ESTRUCTURA VERTICAL */
.carrito-item {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 15px 0;
    border-bottom: 1px solid #e5e7eb;
}

.carrito-item:last-child {
    border-bottom: none;
}

.carrito-item-contenido {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    width: 100%;
}

.carrito-item-imagen {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.imagen-carrito-lateral {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.carrito-item-info {
    flex: 1;
    min-width: 0; /* Permite que el texto se corte */
}

.placeholder-carrito {
    font-size: 24px;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #e9ecef;
    border-radius: 8px;
}

/* Checkout - resumen de pedido - ESTRUCTURA VERTICAL */
#resumen-pedido {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.resumen-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding: 15px 0;
    border-bottom: 1px solid #e5e7eb;
    width: 100%;
}

.resumen-item:last-child {
    border-bottom: none;
}

.resumen-item-imagen {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: 10px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.imagen-checkout {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.placeholder-checkout {
    font-size: 28px;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #e9ecef;
    border-radius: 10px;
}

.resumen-item-contenido {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    min-width: 0;
}

.resumen-item-info {
    flex: 1;
    min-width: 0;
}

.resumen-item-info h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
}

.resumen-cantidad {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 6px;
}

.resumen-opciones {
    font-size: 0.85rem;
    color: #9ca3af;
    line-height: 1.4;
    margin-bottom: 4px;
}

.resumen-precio {
    font-size: 1.1rem;
    font-weight: 700;
    color: #059669;
    flex-shrink: 0;
    margin-left: 15px;
}

/* Responsive - móvil */
@media (max-width: 480px) {
    .carrito-item-imagen {
        width: 50px;
        height: 50px;
    }
    
    .placeholder-carrito {
        font-size: 20px;
    }
    
    .resumen-item {
        gap: 10px;
        padding: 12px 0;
    }
    
    .resumen-item-imagen {
        width: 60px;
        height: 60px;
    }
    
    .placeholder-checkout {
        font-size: 24px;
    }
    
    .resumen-item-contenido {
        flex-direction: column;
        gap: 8px;
    }
    
    .resumen-precio {
        margin-left: 0;
        align-self: flex-end;
    }
    
    .resumen-item-info h4 {
        font-size: 1rem;
    }
}

/* Asegurar que los contenedores principales sean verticales */
#carrito-items {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
}

.checkout-section {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.carrito-item h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.carrito-item p {
    margin: 4px 0;
    font-size: 0.9rem;
    color: #6b7280;
}

.carrito-item .opciones {
    font-size: 0.8rem;
    color: #9ca3af;
    font-style: italic;
}

/* Animaciones suaves */
.imagen-carrito-lateral,
.imagen-checkout {
    transition: opacity 0.3s ease;
}

.imagen-carrito-lateral:hover,
.imagen-checkout:hover {
    opacity: 0.9;
}

/* ========== FORZAR ESTRUCTURA VERTICAL ========== */

/* Contenedores principales del carrito */
#carrito-lateral {
    display: flex;
    flex-direction: column;
}

#carrito-items {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 0 !important;
}

/* Contenedores del checkout */
.checkout-section {
    display: flex;
    flex-direction: column;
    width: 100%;
}

#resumen-pedido {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
}

/* Asegurar que cada item del carrito sea una fila completa */
.carrito-item {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    margin-bottom: 0 !important;
    box-sizing: border-box;
}

.carrito-item-contenido {
    display: flex !important;
    flex-direction: row !important;
    width: 100% !important;
    align-items: flex-start !important;
    gap: 12px !important;
}

/* Asegurar que cada item del checkout sea una fila completa */
.resumen-item {
    display: flex !important;
    flex-direction: row !important;
    width: 100% !important;
    margin-bottom: 0 !important;
    box-sizing: border-box;
}

/* Prevenir cualquier flotación o posicionamiento raro */
.carrito-item,
.resumen-item,
.carrito-item-contenido,
.resumen-item-contenido {
    float: none !important;
    position: relative !important;
    clear: both !important;
}

/* Logo Mercado pago en checkout de pago */

.payment-method-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0.5rem;
}

.mercadopago-logo {
    display: flex;
    align-items: center;
}

.mp-badge {
    display: flex;
    align-items: center;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    background: rgba(0, 166, 251, 0.05); /* Fondo sutil opcional */
    border: 1px solid rgba(0, 166, 251, 0.2); /* Borde sutil opcional */
}

.mp-logo-oficial {
    height: 20px; /* Ajusta según el tamaño que quieras */
    width: auto;
    object-fit: contain;
}

/* Hover effect */
.radio-option:hover .mp-badge {
    background: rgba(0, 166, 251, 0.1);
    border-color: rgba(0, 166, 251, 0.3);
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

/* ============ ESTILOS PARA CHECKOUT BRICKS ============ */

.bricks-form-section {
    margin-top: 1.5rem;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    animation: slideDown 0.3s ease-out;
}

.bricks-form-container {
    background: white;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Header con logo de MercadoPago */
.bricks-form-container h4 {
    background: linear-gradient(135deg, #009ee3, #0099cc);
    margin: 0;
    padding: 1rem;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-bottom: 1px solid #e6e6e6;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.bricks-form-container .mp-header-logo {
    height: 24px;
    width: auto;
    filter: brightness(0) invert(1); /* Hacer el logo blanco */
}

/* Contenido del formulario */
.bricks-form-content {
    padding: 1.5rem;
}

/* Contenedor del Payment Brick */
#payment-brick-container {
    min-height: 300px;
    width: 100%;
}

/* Spinner de carga */
.brick-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    min-height: 200px;
}

.brick-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 158, 227, 0.2);
    border-radius: 50%;
    border-top-color: #009ee3;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 1rem;
}

.brick-loading p {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
}

/* Badge "NUEVO" */
.badge-nuevo {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    margin-left: auto;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Información de seguridad mejorada para Bricks */
.bricks-form-container .seguridad-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1.5rem;
}

.bricks-form-container .seguridad-badge {
    color: #009ee3;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.bricks-form-container .seguridad-detalles p {
    margin: 0.2rem 0;
    color: #6c757d;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Nota del checkout */
.checkout-note {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 4px;
    padding: 0.75rem;
    margin-top: 1rem;
    text-align: center;
}

.checkout-note small {
    color: #1565c0;
    font-size: 0.8rem;
    line-height: 1.4;
}

/* Modificaciones al método de pago para destacar Bricks - SIN :has() */
.radio-option[data-bricks="true"] {
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    border: 2px solid #009ee3;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.radio-option[data-bricks="true"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #009ee3, #673ab7);
}

.radio-option[data-bricks="true"] .payment-method-content {
    font-weight: 600;
    color: #009ee3;
}

/* Alternativa compatible con todos los navegadores */
.bricks-payment-option {
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    border: 2px solid #009ee3;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.bricks-payment-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #009ee3, #673ab7);
}

.bricks-payment-option .payment-method-content {
    font-weight: 600;
    color: #009ee3;
}

/* Animaciones suaves */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mejoras responsive para Bricks */
@media (max-width: 768px) {
    .bricks-form-content {
        padding: 1rem;
    }
    
    .bricks-form-container h4 {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .bricks-form-container .mp-header-logo {
        height: 20px;
    }
    
    .brick-loading {
        padding: 1.5rem 1rem;
        min-height: 150px;
    }
    
    .brick-loading .loading-spinner {
        width: 30px;
        height: 30px;
        border-width: 3px;
    }
    
}

/* ========== FIX PARA MODAL DE MÉTODO DE PAGO ========== */

/* Modal container - forzar tamaño controlado */
#modal-checkout {
    display: none !important;
    position: fixed !important;
    inset: 0 !important;
    background-color: rgba(0, 0, 0, 0.8) !important;
    z-index: 1000 !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 1rem !important;
    backdrop-filter: blur(4px) !important;
    overflow-y: auto !important;
}

/* Modal content - tamaño máximo controlado */
#modal-checkout .modal-content {
    background: #ffffff !important;
    padding: 1.5rem !important;
    border-radius: 1rem !important;
    max-width: 600px !important;
    width: 90% !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    position: relative !important;
    margin: auto !important;
}

/* Botón cerrar */
#modal-checkout .close {
    position: absolute !important;
    top: 15px !important;
    right: 20px !important;
    font-size: 28px !important;
    font-weight: bold !important;
    color: #999 !important;
    cursor: pointer !important;
    z-index: 1001 !important;
    line-height: 1 !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    width: auto !important;
    height: auto !important;
}

#modal-checkout .close:hover {
    color: #333 !important;
    text-decoration: none !important;
}

/* Título del modal */
#modal-checkout h2 {
    font-size: 1.5rem !important;
    margin: 0 0 1.5rem 0 !important;
    color: #1f2937 !important;
    font-weight: 700 !important;
    padding-right: 40px !important; /* Espacio para el botón cerrar */
}

/* Secciones del checkout */
.checkout-section {
    margin-bottom: 1.5rem !important;
    padding-bottom: 1rem !important;
    border-bottom: 1px solid #e5e7eb !important;
}

.checkout-section:last-of-type {
    border-bottom: none !important;
}

.checkout-section h3 {
    font-size: 1.1rem !important;
    margin: 0 0 1rem 0 !important;
    color: #374151 !important;
    font-weight: 600 !important;
}

/* Radio buttons más compactos */
.radio-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
}

.radio-option {
    display: flex !important;
    align-items: center !important;
    padding: 0.75rem !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 0.5rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    background: white !important;
}

.radio-option:hover {
    border-color: #d1d5db !important;
    background: #f9fafb !important;
}

.radio-option input[type="radio"] {
    margin-right: 0.75rem !important;
    width: 16px !important;
    height: 16px !important;
}

/* Bricks section más compacta */
.bricks-form-section {
    margin-top: 1rem !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
}

.bricks-form-container {
    background: white !important;
    border: 1px solid #e6e6e6 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

.bricks-form-container h4 {
    background: linear-gradient(135deg, #009ee3, #0099cc) !important;
    margin: 0 !important;
    padding: 0.75rem 1rem !important;
    color: white !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    border-bottom: 1px solid #e6e6e6 !important;
}

.bricks-form-content {
    padding: 1rem !important;
}

/* Payment brick container compacto */
#payment-brick-container {
    min-height: 200px !important;
    width: 100% !important;
}

/* Botones de acción más compactos */
.checkout-actions {
    display: flex !important;
    gap: 1rem !important;
    justify-content: flex-end !important;
    margin-top: 1.5rem !important;
    padding-top: 1rem !important;
    border-top: 1px solid #e5e7eb !important;
}

.checkout-actions .btn {
    padding: 0.75rem 1.5rem !important;
    border-radius: 0.5rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    border: none !important;
    transition: all 0.2s ease !important;
}

.checkout-actions .btn-secondary {
    background: #f3f4f6 !important;
    color: #374151 !important;
}

.checkout-actions .btn-success {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: white !important;
}

/* Responsive para móvil */
@media (max-width: 768px) {
    #modal-checkout .modal-content {
        width: 95% !important;
        padding: 1rem !important;
        max-height: 95vh !important;
        margin: 0.5rem auto !important;
    }
    
    #modal-checkout h2 {
        font-size: 1.25rem !important;
        margin-bottom: 1rem !important;
    }
    
    .checkout-section {
        margin-bottom: 1rem !important;
    }
    
    .checkout-section h3 {
        font-size: 1rem !important;
    }
    
    .radio-option {
        padding: 0.5rem !important;
    }
    
    .bricks-form-container h4 {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.85rem !important;
    }
    
    .bricks-form-content {
        padding: 0.75rem !important;
    }
    
    #payment-brick-container {
        min-height: 150px !important;
    }
    
    .checkout-actions {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    
    .checkout-actions .btn {
        width: 100% !important;
        padding: 0.75rem !important;
    }
}

@media (max-width: 480px) {
    #modal-checkout .modal-content {
        width: 98% !important;
        padding: 0.75rem !important;
        border-radius: 0.5rem !important;
    }
    
    #modal-checkout .close {
        top: 10px !important;
        right: 15px !important;
        font-size: 24px !important;
    }
}

/* Forzar display cuando está activo */
#modal-checkout.show,
#modal-checkout[style*="display: block"],
#modal-checkout[style*="display:block"] {
    display: flex !important;
}

/* Badge "NUEVO" más compacto */
.badge-nuevo {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52) !important;
    color: white !important;
    font-size: 0.6rem !important;
    font-weight: 700 !important;
    padding: 0.15rem 0.3rem !important;
    border-radius: 3px !important;
    margin-left: auto !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Logo MercadoPago más pequeño */
.mp-header-logo {
    height: 20px !important;
    width: auto !important;
    filter: brightness(0) invert(1) !important;
}

.mp-logo-simple {
    height: 16px !important;
    width: auto !important;
    margin-left: 0.5rem !important;
}

/* Información de seguridad más compacta */
.seguridad-info {
    background: #f8f9fa !important;
    border: 1px solid #e9ecef !important;
    border-radius: 6px !important;
    padding: 0.75rem !important;
    margin-top: 1rem !important;
}

.seguridad-badge {
    color: #009ee3 !important;
    font-weight: 600 !important;
    margin-bottom: 0.25rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
    font-size: 0.8rem !important;
}

.seguridad-detalles p {
    margin: 0.1rem 0 !important;
    color: #6c757d !important;
    font-size: 0.7rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
}

/* Resumen final compacto */
.final-summary {
    background: #f8f9fa !important;
    border: 1px solid #e9ecef !important;
    border-radius: 0.5rem !important;
    padding: 1rem !important;
    margin-top: 1rem !important;
}

.summary-line {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 0.5rem !important;
    font-size: 0.9rem !important;
}

.summary-line.total-line {
    border-top: 1px solid #dee2e6 !important;
    padding-top: 0.5rem !important;
    margin-top: 0.5rem !important;
    font-size: 1rem !important;
}

/* Asegurar que otros modales no interfieran */
.modal:not(#modal-checkout) {
    /* Mantener estilos existentes para otros modales */
}

/* Loading spinner compacto */
.brick-loading {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 1rem !important;
    min-height: 120px !important;
}

.brick-loading .loading-spinner {
    width: 30px !important;
    height: 30px !important;
    border: 3px solid rgba(0, 158, 227, 0.2) !important;
    border-radius: 50% !important;
    border-top-color: #009ee3 !important;
    animation: spin 1s ease-in-out infinite !important;
    margin-bottom: 0.5rem !important;
}

.brick-loading p {
    color: #6c757d !important;
    font-size: 0.8rem !important;
    margin: 0 !important;
}