{"id":3571,"date":"2025-11-22T08:03:05","date_gmt":"2025-11-22T11:03:05","guid":{"rendered":"https:\/\/xysexchange.com\/?page_id=3571"},"modified":"2025-11-27T13:44:15","modified_gmt":"2025-11-27T16:44:15","slug":"all-crypto-prices","status":"publish","type":"page","link":"https:\/\/xysexchange.com\/es\/all-crypto-prices\/","title":{"rendered":"Todos los Precios Cripto"},"content":{"rendered":"\n\n\n        <style>\n            \/* Preservar background do header\/menu WordPress - IGUAL Token Marketplace *\/\n            .site-header, #masthead, .main-header, .navbar, .main-navigation, header.site-header, header#masthead {\n                background: rgba(11, 14, 17, 0.98) !important;\n                backdrop-filter: blur(12px) !important;\n                -webkit-backdrop-filter: blur(12px) !important;\n                z-index: 9999 !important;\n                position: relative;\n            }\n\n            \/* Garantir que o header fixo\/sticky tenha fundo *\/\n            .site-header.sticky, .site-header.fixed, #masthead.sticky, #masthead.fixed,\n            .main-header.sticky, .main-header.fixed, .navbar.fixed-top {\n                background: rgba(11, 14, 17, 0.98) !important;\n                box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;\n            }\n\n            .codex-crypto-prices-container {\n                width: 100%;\n                padding: 40px 20px;\n            }\n\n            .crypto-prices-grid {\n                display: grid;\n                grid-template-columns: repeat(4, 1fr);\n                gap: 20px;\n                max-width: 1400px;\n                margin: 0 auto;\n            }\n\n            @media (max-width: 1200px) {\n                .crypto-prices-grid {\n                    grid-template-columns: repeat(3, 1fr);\n                }\n            }\n\n            @media (max-width: 768px) {\n                .crypto-prices-grid {\n                    grid-template-columns: repeat(2, 1fr);\n                    gap: 15px;\n                }\n            }\n\n            @media (max-width: 480px) {\n                .crypto-prices-grid {\n                    grid-template-columns: 1fr;\n                }\n            }\n\n            .crypto-item {\n                background: rgba(28, 28, 28, 0.3);\n                border: 1px solid rgba(124, 50, 199, 0.1);\n                border-radius: 12px;\n                padding: 20px;\n                display: flex;\n                align-items: center;\n                gap: 15px;\n                transition: all 0.3s ease;\n                backdrop-filter: blur(15px);\n                -webkit-backdrop-filter: blur(15px);\n                position: relative;\n                overflow: visible;\n                min-height: 140px;\n            }\n\n            .crypto-item:hover {\n                transform: translateY(-2px);\n                box-shadow: 0 8px 20px rgba(124, 50, 199, 0.3);\n                border-color: rgba(124, 50, 199, 0.5);\n            }\n\n            .crypto-icon {\n                width: 45px;\n                height: 45px;\n                min-width: 45px;\n                min-height: 45px;\n                object-fit: contain;\n                filter: drop-shadow(0 0 10px rgba(124, 50, 199, 0.3));\n            }\n\n            .crypto-icon.isim-icon {\n                width: 50px;\n                height: 50px;\n                min-width: 50px;\n                min-height: 50px;\n            }\n\n            .crypto-icon.placeholder {\n                background: rgba(124, 50, 199, 0.1);\n                border-radius: 50%;\n                display: flex;\n                align-items: center;\n                justify-content: center;\n                font-weight: bold;\n                color: #7c32c7;\n            }\n\n            .crypto-info {\n                flex: 1;\n                display: flex;\n                flex-direction: column;\n            }\n\n            .crypto-price-row {\n                display: flex;\n                align-items: center;\n                justify-content: space-between;\n                gap: 15px;\n                margin-top: 8px;\n                padding-right: 10px;\n            }\n\n            .crypto-symbol {\n                color: #ffffff;\n                font-size: 18px;\n                font-weight: 600;\n                margin-bottom: 4px;\n                \/* text-transform: uppercase; removido para manter iSim correto *\/\n            }\n\n            .crypto-name {\n                color: rgba(255, 255, 255, 0.6);\n                font-size: 12px;\n                margin-bottom: 8px;\n            }\n\n            .crypto-price {\n                color: #ffffff;\n                font-size: 22px;\n                font-weight: 700;\n                transition: color 0.3s ease;\n                font-family: 'Roboto Mono', monospace;\n            }\n\n            .crypto-price.price-up {\n                color: #00ff88 !important;\n                animation: priceFlash 0.5s ease;\n            }\n\n            .crypto-price.price-down {\n                color: #ff4757 !important;\n                animation: priceFlash 0.5s ease;\n            }\n\n            @keyframes priceFlash {\n                0%, 100% { opacity: 1; }\n                50% { opacity: 0.6; }\n            }\n\n            .crypto-change {\n                display: inline-block;\n                padding: 4px 8px;\n                border-radius: 4px;\n                font-size: 12px;\n                font-weight: 600;\n                margin-top: 5px;\n            }\n\n            .crypto-change.positive {\n                background: rgba(0, 255, 136, 0.1);\n                color: #00ff88;\n            }\n\n            .crypto-change.negative {\n                background: rgba(255, 71, 87, 0.1);\n                color: #ff4757;\n            }\n\n            .loading-spinner {\n                display: inline-block;\n                width: 16px;\n                height: 16px;\n                border: 2px solid rgba(124, 50, 199, 0.3);\n                border-radius: 50%;\n                border-top-color: #7c32c7;\n                animation: spin 1s linear infinite;\n                margin-left: 10px;\n            }\n\n            @keyframes spin {\n                to { transform: rotate(360deg); }\n            }\n\n            .last-update {\n                text-align: center;\n                color: rgba(255, 255, 255, 0.5);\n                font-size: 12px;\n                margin-top: 30px;\n            }\n\n            .price-skeleton {\n                background: linear-gradient(90deg, rgba(124, 50, 199, 0.1) 0%, rgba(124, 50, 199, 0.2) 50%, rgba(124, 50, 199, 0.1) 100%);\n                background-size: 200% 100%;\n                animation: shimmer 1.5s ease-in-out infinite;\n                border-radius: 4px;\n                height: 24px;\n                width: 120px;\n            }\n\n            @keyframes shimmer {\n                0% { background-position: -200% 0; }\n                100% { background-position: 200% 0; }\n            }\n\n            \/* Buy Button Styles *\/\n            .crypto-buy-btn {\n                background: #404040;\n                color: #FFFFFF;\n                border: none;\n                border-radius: 6px;\n                padding: 8px 24px;\n                font-size: 13px;\n                font-weight: 600;\n                cursor: pointer;\n                transition: all 0.3s ease;\n                white-space: nowrap;\n                min-width: 80px;\n            }\n\n            .crypto-buy-btn:hover {\n                background: #505050;\n                transform: translateY(-2px);\n                box-shadow: 0 4px 12px rgba(80, 80, 80, 0.4);\n            }\n\n            .crypto-buy-btn:active {\n                transform: translateY(0);\n            }\n\n            \/* Buy Modal Styles *\/\n            .buy-modal {\n                display: none;\n                position: fixed;\n                top: 0;\n                left: 0;\n                width: 100%;\n                height: 100%;\n                z-index: 99999;\n                align-items: center;\n                justify-content: center;\n            }\n\n            .buy-modal-overlay {\n                position: absolute;\n                top: 0;\n                left: 0;\n                width: 100%;\n                height: 100%;\n                background: url('\/wp-content\/plugins\/codex-integration\/assets\/images\/background.jpg') center center \/ cover no-repeat;\n            }\n\n            .buy-modal-container {\n                position: relative;\n                background: linear-gradient(180deg, #4a6fa5 0%, #2d3e50 100%);\n                backdrop-filter: blur(15px);\n                -webkit-backdrop-filter: blur(15px);\n                border: 1px solid rgba(124, 50, 199, 0.2);\n                border-radius: 16px;\n                padding: 25px 30px;\n                max-width: 500px;\n                width: 90%;\n                box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);\n                z-index: 100000;\n                margin: 20px 0;\n            }\n\n            .buy-modal-close {\n                position: absolute;\n                top: 15px;\n                right: 15px;\n                background: transparent;\n                border: none;\n                color: rgba(255, 255, 255, 0.6);\n                font-size: 28px;\n                cursor: pointer;\n                transition: color 0.3s ease;\n                line-height: 1;\n                padding: 0;\n                width: 30px;\n                height: 30px;\n            }\n\n            .buy-modal-close:hover {\n                color: #ffffff;\n            }\n\n            .buy-modal-header {\n                display: flex;\n                align-items: center;\n                gap: 15px;\n                margin-bottom: 20px;\n            }\n\n            .buy-modal-header .coin-icon {\n                width: 60px;\n                height: 60px;\n                filter: drop-shadow(0 0 10px rgba(124, 50, 199, 0.3));\n                flex-shrink: 0;\n            }\n\n            .buy-modal-header-info {\n                flex: 1;\n                display: flex;\n                align-items: center;\n                justify-content: space-between;\n            }\n\n            .buy-modal-header h2 {\n                color: #ffffff;\n                font-size: 24px;\n                margin: 0;\n            }\n\n            .buy-modal-header p {\n                color: rgba(255, 255, 255, 0.8);\n                font-size: 20px;\n                margin: 0;\n                font-weight: 600;\n            }\n\n            .buy-input-group {\n                margin-bottom: 15px;\n            }\n\n            .buy-input-group label {\n                display: block;\n                color: rgba(255, 255, 255, 0.8);\n                font-size: 14px;\n                margin-bottom: 8px;\n                font-weight: 600;\n            }\n\n            .buy-error-message {\n                color: #ff4757;\n                font-size: 12px;\n                margin-top: 8px;\n                display: none;\n            }\n\n            .buy-error-message.show {\n                display: block;\n            }\n\n            .buy-input-group input {\n                width: 100%;\n                padding: 12px;\n                background: rgba(255, 255, 255, 0.05);\n                border: 1px solid rgba(124, 50, 199, 0.3);\n                border-radius: 8px;\n                color: #ffffff;\n                font-size: 16px;\n                transition: all 0.3s ease;\n                box-sizing: border-box;\n            }\n\n            .buy-input-group input:focus {\n                outline: none;\n                border-color: #7c32c7;\n                background: rgba(255, 255, 255, 0.08);\n            }\n\n            .buy-total {\n                background: rgba(124, 50, 199, 0.1);\n                border: 1px solid rgba(124, 50, 199, 0.3);\n                border-radius: 8px;\n                padding: 12px 15px;\n                margin-bottom: 20px;\n                display: flex;\n                justify-content: space-between;\n                align-items: center;\n            }\n\n            .buy-total span {\n                color: rgba(255, 255, 255, 0.6);\n                font-size: 14px;\n            }\n\n            .buy-total strong {\n                color: #ffffff;\n                font-size: 20px;\n            }\n\n            .buy-payment-methods {\n                display: block;\n            }\n\n            .payment-buttons-guest,\n            .payment-buttons-logged {\n                grid-template-columns: 1fr 1fr;\n                gap: 15px;\n            }\n\n            .payment-method-btn {\n                padding: 12px 20px;\n                border: none;\n                border-radius: 8px;\n                font-weight: 600;\n                font-size: 15px;\n                cursor: pointer;\n                transition: all 0.3s ease;\n                display: flex;\n                align-items: center;\n                justify-content: center;\n                gap: 8px;\n                color: #ffffff;\n            }\n\n            .payment-method-btn.buy-metamask {\n                background: linear-gradient(135deg, #FFA85C 0%, #FF9547 100%);\n            }\n\n            .payment-method-btn.buy-pix {\n                background: linear-gradient(135deg, #32BCAD 0%, #00BDAE 100%);\n            }\n\n            .payment-method-btn.btn-login {\n                background: linear-gradient(135deg, #8B5CF6 0%, #D946EF 100%);\n            }\n\n            .payment-method-btn.btn-register {\n                background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);\n            }\n\n            .payment-method-btn:hover {\n                transform: translateY(-2px);\n                box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);\n            }\n\n            .payment-method-btn:active {\n                transform: translateY(0);\n            }\n\n            .payment-method-btn img {\n                width: 32px;\n                height: 32px;\n            }\n\n            @media (max-width: 480px) {\n                .buy-modal-container {\n                    padding: 20px;\n                }\n\n                .buy-payment-methods {\n                    grid-template-columns: 1fr;\n                }\n            }\n\n            \/* Login Modal Styles *\/\n            .login-modal-container {\n                position: relative;\n                background: linear-gradient(180deg, #4a6fa5 0%, #2d3e50 100%);\n                border-radius: 20px;\n                padding: 20px 40px;\n                max-width: 450px;\n                min-height: 420px;\n                box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);\n                z-index: 100000;\n            }\n\n            .login-modal-container .modal-header {\n                text-align: center;\n                margin-bottom: 12px;\n                border-bottom: none;\n                padding: 0;\n            }\n\n            .login-modal-container .modal-logo {\n                height: 50px;\n                display: block;\n                margin: 0 auto 8px;\n            }\n\n            .login-modal-container .modal-header h2 {\n                font-size: 28px;\n                color: #FFFFFF;\n                text-align: center;\n                margin: 4px 0;\n                font-weight: 600;\n                text-transform: lowercase;\n                line-height: 1.2;\n            }\n\n            .login-modal-container .modal-header p {\n                text-align: center;\n                color: #B0B3B8;\n                font-size: 13px;\n                margin: 4px 0 0 0;\n                line-height: 1.3;\n            }\n\n            .login-modal-container .modal-body {\n                padding: 0;\n            }\n\n            .login-modal-container .form-group {\n                margin-bottom: 10px;\n            }\n\n            .login-modal-container .form-group label {\n                display: block;\n                color: #848E9C;\n                margin-bottom: 4px;\n                font-size: 11px;\n                text-transform: uppercase;\n                letter-spacing: 1px;\n                font-weight: 600;\n            }\n\n            .login-modal-container .form-group input {\n                width: 100%;\n                padding: 9px 14px;\n                background: #E8EAF6;\n                border: 1px solid #D1D5DB;\n                border-radius: 8px;\n                color: #1E2329;\n                font-size: 13px;\n                outline: none;\n                transition: all 0.3s ease;\n                box-sizing: border-box;\n            }\n\n            .login-modal-container .form-group input:focus {\n                border-color: #8B5CF6;\n                background: #F3F4F6;\n            }\n\n            .login-modal-container .btn-login {\n                width: 100%;\n                padding: 11px;\n                background: linear-gradient(135deg, #8B5CF6 0%, #D946EF 100%);\n                border: none;\n                border-radius: 8px;\n                color: #FFFFFF;\n                font-size: 15px;\n                font-weight: 600;\n                cursor: pointer;\n                margin-top: 10px;\n                text-transform: uppercase;\n                letter-spacing: 1px;\n                transition: all 0.3s ease;\n            }\n\n            .login-modal-container .btn-login:hover {\n                background: linear-gradient(135deg, #7C3AED 0%, #C026D3 100%);\n                transform: translateY(-2px);\n                box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);\n            }\n\n            .login-modal-container .login-error-message {\n                background: rgba(246, 70, 93, 0.1);\n                border-left: 3px solid #F6465D;\n                color: #F6465D;\n                padding: 12px 16px;\n                margin: 15px 0;\n                font-size: 13px;\n                border-radius: 4px;\n                font-weight: 500;\n            }\n\n            \/* PIX Modal Styles *\/\n            .pix-modal-container {\n                position: relative;\n                background: linear-gradient(135deg, #5B7FB8 0%, #2B3E5C 100%);\n                border-radius: 20px;\n                padding: 20px 35px;\n                max-width: 900px;\n                width: 90%;\n                max-height: 70vh;\n                overflow-y: auto;\n                box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);\n                z-index: 100000;\n                margin: 30px auto;\n            }\n\n            .pix-modal-flex {\n                display: flex;\n                flex-direction: row;\n                gap: 20px;\n            }\n\n            .pix-left-section {\n                flex: 1;\n                display: flex;\n                flex-direction: column;\n                justify-content: center;\n            }\n\n            .pix-right-section {\n                flex: 1;\n                display: flex;\n                flex-direction: column;\n            }\n\n            .pix-modal-container .modal-header {\n                text-align: center;\n                margin-bottom: 10px;\n                padding: 0;\n                border: none;\n            }\n\n            .pix-modal-container .modal-logo {\n                height: 150px;\n                display: block;\n                margin: 0 auto 10px;\n            }\n\n            .pix-modal-container .modal-header h2 {\n                font-size: 26px;\n                color: #FFFFFF;\n                text-align: center;\n                margin: 4px 0;\n                font-weight: 600;\n                text-transform: lowercase;\n            }\n\n            .pix-modal-container .modal-header p {\n                text-align: center;\n                color: #B0B3B8;\n                font-size: 13px;\n                margin: 4px 0 0 0;\n            }\n\n            .pix-coin-section {\n                display: flex;\n                align-items: center;\n                justify-content: center;\n                gap: 12px;\n                margin-bottom: 12px;\n                padding: 10px;\n                background: rgba(139, 92, 246, 0.15);\n                border-radius: 12px;\n            }\n\n            .pix-coin-icon {\n                width: 50px;\n                height: 50px;\n                filter: drop-shadow(0 0 10px rgba(124, 50, 199, 0.3));\n            }\n\n            .pix-coin-name {\n                color: #FFFFFF;\n                font-size: 22px;\n                font-weight: 700;\n            }\n\n            .pix-info-section {\n                margin-bottom: 0;\n            }\n\n            .info-row {\n                display: flex;\n                justify-content: space-between;\n                align-items: center;\n                margin-bottom: 8px;\n                padding: 8px 12px;\n                background: rgba(139, 92, 246, 0.1);\n                border-radius: 8px;\n            }\n\n            .info-row label {\n                color: #E8E8E8;\n                font-size: 13px;\n                font-weight: 600;\n            }\n\n            .info-row .value-display {\n                color: #FFFFFF;\n                font-size: 15px;\n                font-weight: 700;\n            }\n\n            .pix-qr-section {\n                background: #FFFFFF;\n                padding: 10px;\n                border-radius: 12px;\n                display: flex;\n                justify-content: center;\n                align-items: center;\n                margin-bottom: 12px;\n                min-height: 180px;\n            }\n\n            .pix-key-section {\n                margin-top: 10px;\n            }\n\n            .pix-key-display {\n                display: flex;\n                gap: 8px;\n            }\n\n            .pix-key-display input {\n                flex: 1;\n                padding: 9px 12px;\n                background: #E8EAF6;\n                border: 1px solid #D1D5DB;\n                border-radius: 8px;\n                color: #1E2329;\n                font-size: 12px;\n                font-family: monospace;\n            }\n\n            .pix-key-display .copy-btn {\n                padding: 9px 14px;\n                background: linear-gradient(135deg, #A78BFA 0%, #7C3AED 100%);\n                border: none;\n                border-radius: 8px;\n                color: #FFFFFF;\n                font-size: 12px;\n                font-weight: 600;\n                cursor: pointer;\n                white-space: nowrap;\n                transition: all 0.3s ease;\n            }\n\n            .pix-key-display .copy-btn:hover {\n                background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);\n                transform: translateY(-1px);\n            }\n\n            .pix-buttons {\n                display: flex;\n                gap: 10px;\n                margin-top: 10px;\n            }\n\n            .btn-close-pix, .btn-submit-pix {\n                flex: 1;\n                padding: 10px;\n                border: none;\n                border-radius: 8px;\n                color: #FFFFFF;\n                font-size: 13px;\n                font-weight: 600;\n                cursor: pointer;\n                text-transform: uppercase;\n                letter-spacing: 1px;\n                transition: all 0.3s ease;\n            }\n\n            .btn-close-pix {\n                background: linear-gradient(135deg, #A78BFA 0%, #7C3AED 100%);\n            }\n\n            .btn-close-pix:hover {\n                background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);\n                transform: translateY(-2px);\n                box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);\n            }\n\n            .btn-submit-pix {\n                background: linear-gradient(135deg, #A78BFA 0%, #7C3AED 100%);\n            }\n\n            .btn-submit-pix:hover {\n                background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);\n                transform: translateY(-2px);\n                box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);\n            }\n\n            @media (max-width: 768px) {\n                .pix-modal-container {\n                    max-width: 95%;\n                    padding: 20px 15px;\n                    max-height: 95vh;\n                    overflow-y: auto;\n                }\n\n                .pix-modal-flex {\n                    flex-direction: column;\n                    gap: 15px;\n                }\n\n                .pix-modal-container .modal-logo {\n                    height: 50px;\n                    margin-bottom: 10px;\n                }\n\n                .pix-modal-container .modal-header {\n                    margin-bottom: 15px;\n                }\n\n                .pix-modal-container .modal-header h2 {\n                    font-size: 22px;\n                }\n\n                .pix-modal-container .modal-header p {\n                    font-size: 12px;\n                }\n\n                .pix-coin-section {\n                    padding: 10px;\n                    margin-bottom: 15px;\n                }\n\n                .pix-coin-icon {\n                    width: 40px;\n                    height: 40px;\n                }\n\n                .pix-coin-name {\n                    font-size: 18px;\n                }\n\n                .info-row {\n                    padding: 8px 10px;\n                    margin-bottom: 6px;\n                }\n\n                .info-row label {\n                    font-size: 12px;\n                }\n\n                .info-row .value-display {\n                    font-size: 14px;\n                }\n\n                .pix-qr-section {\n                    min-height: auto;\n                    padding: 10px;\n                    margin-bottom: 12px;\n                }\n\n                .pix-key-section {\n                    margin-top: 10px;\n                }\n\n                .pix-key-display input {\n                    font-size: 11px;\n                    padding: 8px 10px;\n                }\n\n                .pix-key-display .copy-btn {\n                    padding: 8px 12px;\n                    font-size: 11px;\n                }\n\n                .btn-fechar-pix {\n                    padding: 10px;\n                    font-size: 14px;\n                    margin-top: 10px;\n                }\n            }\n\n            \/* MetaMask Modal for Traditional Coins - Same style as Token modal *\/\n            .coin-metamask-container {\n                position: fixed !important;\n                top: 50% !important;\n                left: 50% !important;\n                transform: translate(-50%, -50%) !important;\n                z-index: 100000 !important;\n                max-width: 900px !important;\n                width: 90% !important;\n                background: linear-gradient(to bottom, #5A6A8A 0%, #0F1419 100%) !important;\n                border-radius: 15px !important;\n                padding: 8px 25px 10px 25px !important;\n                max-height: calc(100vh - 120px) !important;\n                overflow: visible !important;\n                box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3) !important;\n            }\n\n            #coin-metamask-modal .modal-header {\n                padding: 0;\n                margin-bottom: 6px;\n            }\n\n            #coin-metamask-modal .modal-body {\n                padding: 0;\n                overflow: visible !important;\n            }\n\n            #coin-metamask-modal .purchase-token-section {\n                display: flex;\n                align-items: center;\n                gap: 10px;\n                margin-bottom: 0;\n            }\n\n            #coin-metamask-modal .purchase-token-icon {\n                width: 35px;\n                height: 35px;\n                border-radius: 50%;\n                object-fit: cover;\n                border: 2px solid var(--accent-primary);\n            }\n\n            #coin-metamask-modal .purchase-token-symbol {\n                display: block;\n                color: var(--text-secondary);\n                font-size: 11px;\n                margin-top: 1px;\n            }\n\n            #coin-metamask-modal .modal-header h2 {\n                font-size: 16px;\n                margin: 0;\n                color: #fff;\n            }\n\n            #coin-metamask-modal .purchase-details {\n                color: #fff;\n                margin-bottom: 8px;\n                display: grid;\n                grid-template-columns: 1fr 1fr;\n                gap: 4px 20px;\n            }\n\n            #coin-metamask-modal .purchase-details .detail-row {\n                display: flex;\n                justify-content: space-between;\n                font-size: 12px;\n                line-height: 1.4;\n            }\n\n            #coin-metamask-modal .purchase-details .detail-row label {\n                font-weight: 500;\n                margin-bottom: 0;\n            }\n\n            #coin-metamask-modal .purchase-details .full-width {\n                grid-column: 1 \/ -1;\n            }\n\n            #coin-metamask-modal .purchase-details .total-row {\n                margin-top: 4px;\n                padding-top: 4px;\n                border-top: 1px solid rgba(255, 255, 255, 0.1);\n                font-weight: 600;\n                font-size: 13px;\n            }\n\n            #coin-metamask-modal #coin-quantity-input {\n                background: rgba(255, 255, 255, 0.1);\n                border: 1px solid rgba(255, 255, 255, 0.2);\n                border-radius: 6px;\n                padding: 6px 10px;\n                color: #fff;\n                font-size: 12px;\n                max-width: 120px;\n            }\n\n            #coin-metamask-modal #coin-quantity-input:focus {\n                outline: none;\n                border-color: var(--accent-primary);\n            }\n\n            #coin-metamask-modal .payment-buttons {\n                display: flex;\n                flex-direction: row;\n                justify-content: stretch;\n                gap: 10px;\n                margin-top: 8px;\n            }\n\n            #coin-metamask-modal .buy-btn-large {\n                padding: 10px 20px;\n                border: none;\n                border-radius: 8px;\n                font-weight: 600;\n                font-size: 14px;\n                cursor: pointer;\n                transition: all 0.3s;\n                display: flex;\n                align-items: center;\n                justify-content: center;\n                gap: 6px;\n                color: #fff;\n                flex: 1;\n            }\n\n            #coin-metamask-modal .buy-metamask {\n                background: linear-gradient(135deg, #F97316 0%, #EA580C 100%);\n            }\n\n            #coin-metamask-modal .buy-metamask:hover {\n                transform: translateY(-2px);\n                box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);\n            }\n\n            #coin-metamask-modal .coin-error-message {\n                background: rgba(239, 68, 68, 0.2);\n                border: 1px solid #EF4444;\n                color: #FCA5A5;\n                padding: 10px 15px;\n                border-radius: 8px;\n                font-size: 14px;\n                margin: 10px 0;\n                text-align: center;\n            }\n\n            #coin-metamask-modal .coin-error-message.success {\n                background: rgba(34, 197, 94, 0.2);\n                border: 1px solid #22C55E;\n                color: #86EFAC;\n            }\n\n            #coin-metamask-modal .coin-error-message.info {\n                background: rgba(59, 130, 246, 0.2);\n                border: 1px solid #3B82F6;\n                color: #93C5FD;\n            }\n\n            \/* Layout horizontal para desktop *\/\n            @media (min-width: 769px) {\n                #coin-metamask-modal .purchase-details {\n                    display: grid;\n                    grid-template-columns: 1fr 1fr;\n                    gap: 12px 25px;\n                }\n\n                #coin-metamask-modal .purchase-details .total-row {\n                    grid-column: 1 \/ -1;\n                }\n            }\n\n            \/* Mobile *\/\n            @media (max-width: 768px) {\n                .coin-metamask-container {\n                    width: 95% !important;\n                    padding: 15px 20px !important;\n                }\n\n                #coin-metamask-modal .purchase-token-icon {\n                    width: 40px;\n                    height: 40px;\n                }\n\n                #coin-metamask-modal .modal-header h2 {\n                    font-size: 18px;\n                }\n\n                #coin-metamask-modal .purchase-details .detail-row {\n                    font-size: 13px;\n                }\n\n                #coin-metamask-modal .buy-btn-large {\n                    width: 100%;\n                    justify-content: center;\n                }\n            }\n        <\/style>\n\n        <div class=\"codex-crypto-prices-container\">\n            <div class=\"crypto-prices-grid\" id=\"crypto-prices-grid\">\n                <!-- Preloader com skeleton -->\n                <div class=\"crypto-item\">\n                <div style=\"width: 45px; height: 45px; background: rgba(124, 50, 199, 0.1); border-radius: 50%;\"><\/div>\n                <div class=\"crypto-info\">\n                    <div class=\"price-skeleton\" style=\"width: 60px; height: 18px; margin-bottom: 8px;\"><\/div>\n                    <div class=\"price-skeleton\"><\/div>\n                <\/div>\n            <\/div><div class=\"crypto-item\">\n                <div style=\"width: 45px; height: 45px; background: rgba(124, 50, 199, 0.1); border-radius: 50%;\"><\/div>\n                <div class=\"crypto-info\">\n                    <div class=\"price-skeleton\" style=\"width: 60px; height: 18px; margin-bottom: 8px;\"><\/div>\n                    <div class=\"price-skeleton\"><\/div>\n                <\/div>\n            <\/div><div class=\"crypto-item\">\n                <div style=\"width: 45px; height: 45px; background: rgba(124, 50, 199, 0.1); border-radius: 50%;\"><\/div>\n                <div class=\"crypto-info\">\n                    <div class=\"price-skeleton\" style=\"width: 60px; height: 18px; margin-bottom: 8px;\"><\/div>\n                    <div class=\"price-skeleton\"><\/div>\n                <\/div>\n            <\/div><div class=\"crypto-item\">\n                <div style=\"width: 45px; height: 45px; background: rgba(124, 50, 199, 0.1); border-radius: 50%;\"><\/div>\n                <div class=\"crypto-info\">\n                    <div class=\"price-skeleton\" style=\"width: 60px; height: 18px; margin-bottom: 8px;\"><\/div>\n                    <div class=\"price-skeleton\"><\/div>\n                <\/div>\n            <\/div><div class=\"crypto-item\">\n                <div style=\"width: 45px; height: 45px; background: rgba(124, 50, 199, 0.1); border-radius: 50%;\"><\/div>\n                <div class=\"crypto-info\">\n                    <div class=\"price-skeleton\" style=\"width: 60px; height: 18px; margin-bottom: 8px;\"><\/div>\n                    <div class=\"price-skeleton\"><\/div>\n                <\/div>\n            <\/div><div class=\"crypto-item\">\n                <div style=\"width: 45px; height: 45px; background: rgba(124, 50, 199, 0.1); border-radius: 50%;\"><\/div>\n                <div class=\"crypto-info\">\n                    <div class=\"price-skeleton\" style=\"width: 60px; height: 18px; margin-bottom: 8px;\"><\/div>\n                    <div class=\"price-skeleton\"><\/div>\n                <\/div>\n            <\/div><div class=\"crypto-item\">\n                <div style=\"width: 45px; height: 45px; background: rgba(124, 50, 199, 0.1); border-radius: 50%;\"><\/div>\n                <div class=\"crypto-info\">\n                    <div class=\"price-skeleton\" style=\"width: 60px; height: 18px; margin-bottom: 8px;\"><\/div>\n                    <div class=\"price-skeleton\"><\/div>\n                <\/div>\n            <\/div><div class=\"crypto-item\">\n                <div style=\"width: 45px; height: 45px; background: rgba(124, 50, 199, 0.1); border-radius: 50%;\"><\/div>\n                <div class=\"crypto-info\">\n                    <div class=\"price-skeleton\" style=\"width: 60px; height: 18px; margin-bottom: 8px;\"><\/div>\n                    <div class=\"price-skeleton\"><\/div>\n                <\/div>\n            <\/div>            <\/div>\n            <div class=\"last-update\" id=\"last-update\" style=\"display: none;\">\n                \u00daltima atualiza\u00e7\u00e3o: <span id=\"update-time\">--:--:--<\/span>\n                <span class=\"loading-spinner\" id=\"loading-spinner\" style=\"display: none;\"><\/span>\n            <\/div>\n        <\/div>\n\n        <!-- Buy Modal -->\n        <div id=\"buy-modal\" class=\"buy-modal\" style=\"display: none;\">\n            <div class=\"buy-modal-overlay\"><\/div>\n            <div class=\"buy-modal-container\">\n                <button class=\"buy-modal-close\">&times;<\/button>\n                <div class=\"buy-modal-header\">\n                    <img decoding=\"async\" id=\"buy-coin-icon\" class=\"coin-icon\" src=\"\" alt=\"\">\n                    <div class=\"buy-modal-header-info\">\n                        <h2>Buy <span id=\"buy-coin-name\"><\/span><\/h2>\n                        <p>$<span id=\"buy-coin-price\"><\/span><\/p>\n                    <\/div>\n                <\/div>\n                <div class=\"buy-input-group\">\n                    <label>Amount (<span id=\"buy-coin-symbol\"><\/span>)<\/label>\n                    <input type=\"number\" id=\"buy-amount\" placeholder=\"0.00\" step=\"0.0001\">\n                    <div class=\"buy-error-message\" id=\"buy-error-message\"><\/div>\n                <\/div>\n                <div class=\"buy-total\">\n                    <span>Total:<\/span>\n                    <strong>$<span id=\"buy-total-usd\">0.00<\/span><\/strong>\n                <\/div>\n                <div class=\"buy-payment-methods\" id=\"buy-payment-methods\">\n                    <!-- Bot\u00f5es renderizados dinamicamente via JavaScript -->\n                    <div class=\"payment-buttons-guest\"><\/div>\n                    <div class=\"payment-buttons-logged\"><\/div>\n                <\/div>\n            <\/div>\n        <\/div>\n\n        <!-- Login Modal -->\n        <div id=\"crypto-login-modal\" class=\"buy-modal\" style=\"display: none;\">\n            <div class=\"buy-modal-overlay\" onclick=\"closeCryptoLoginModal()\"><\/div>\n            <div class=\"login-modal-container\">\n                <button class=\"buy-modal-close\" onclick=\"closeCryptoLoginModal()\">&times;<\/button>\n\n                <div class=\"modal-header\">\n                    <img decoding=\"async\" src=\"https:\/\/exchange.tlxfre.com\/icones\/xys_exchange.png\" alt=\"TLX Exchange\" class=\"modal-logo\">\n                    <h2>exchange<\/h2>\n                    <p>Access your account<\/p>\n                <\/div>\n\n                <div class=\"modal-body\">\n                    <form id=\"crypto-login-form\" autocomplete=\"off\">\n                        <div class=\"form-group\">\n                            <label for=\"crypto-login\">Login<\/label>\n                            <input type=\"text\" id=\"crypto-login\" name=\"Login\" autocomplete=\"off\" readonly onfocus=\"this.removeAttribute('readonly')\" required>\n                        <\/div>\n\n                        <div class=\"form-group\">\n                            <label for=\"crypto-password\">Password<\/label>\n                            <input type=\"password\" id=\"crypto-password\" name=\"Senha\" autocomplete=\"new-password\" readonly onfocus=\"this.removeAttribute('readonly')\" required>\n                        <\/div>\n\n                        <div id=\"crypto-login-error\" class=\"login-error-message\" style=\"display:none;\"><\/div>\n\n                        <button type=\"button\" class=\"btn-login\" id=\"crypto-login-btn\" onclick=\"window.handleCryptoLogin(); return false;\">LOGIN<\/button>\n                    <\/form>\n                    <div style=\"text-align:center;margin-top:16px;padding-top:12px;border-top:1px solid rgba(255,255,255,0.1);\">\n                        <span style=\"color:#848E9C;font-size:13px;\">Don't have an account?<\/span>\n                        <a href=\"https:\/\/exchange.tlxfre.com\" target=\"_blank\" style=\"color:#FCD535;font-size:13px;font-weight:600;text-decoration:none;margin-left:6px;\">Register here &rarr;<\/a>\n                    <\/div>\n                <\/div>\n            <\/div>\n        <\/div>\n\n        <!-- PIX Payment Modal (Crypto Prices) -->\n        <div id=\"pix-modal\" class=\"buy-modal\" style=\"display: none;\">\n            <div class=\"buy-modal-overlay\" onclick=\"window.closePixModalSafe && window.closePixModalSafe()\"><\/div>\n            <div class=\"pix-modal-container\">\n                <button class=\"buy-modal-close\" onclick=\"window.closePixModalSafe && window.closePixModalSafe()\">&times;<\/button>\n                <div class=\"pix-modal-flex\">\n                    <!-- Left Section: Header + Info -->\n                    <div class=\"pix-left-section\">\n                        <div class=\"modal-header\">\n                            <img decoding=\"async\" src=\"https:\/\/exchange.tlxfre.com\/icones\/xys_exchange.png\" alt=\"TLX Exchange\" class=\"modal-logo\">\n                            <h2>exchange<\/h2>\n                            <p>PIX Payment<\/p>\n                        <\/div>\n                        <div class=\"pix-coin-section\">\n                            <img decoding=\"async\" id=\"pix-coin-icon\" class=\"pix-coin-icon\" src=\"\" alt=\"\">\n                            <div class=\"pix-coin-name\" id=\"pix-coin-name\"><\/div>\n                        <\/div>\n                        <div id=\"pix-qty-editor\" class=\"pix-qty-section\" style=\"display:flex;align-items:center;gap:10px;margin-bottom:15px;\">\n                            <input type=\"number\" id=\"pix-qty-input\" min=\"1\" step=\"any\" placeholder=\"Qty\" style=\"width:80px;padding:8px 10px;border-radius:6px;border:1px solid #444;background:#1a1a2e;color:#fff;font-size:14px;\">\n                            <button id=\"pix-generate-btn\" style=\"flex:1;padding:10px 20px;background:linear-gradient(135deg,#7c3aed,#a855f7);color:#fff;border:none;border-radius:8px;font-size:15px;font-weight:bold;cursor:pointer;\">GENERATE PIX<\/button>\n                        <\/div>\n                        <div id=\"pix-qty-hint\" style=\"font-size:12px;color:#999;margin-bottom:10px;\"><\/div>\n                        <div class=\"pix-info-section\">\n                            <div class=\"info-row\">\n                                <label>Amount to Pay:<\/label>\n                                <span id=\"pix-total-amount\" class=\"value-display\">R$ 0,00<\/span>\n                            <\/div>\n                            <div class=\"info-row\">\n                                <label>Amount in USD:<\/label>\n                                <span id=\"pix-total-usd\" class=\"value-display\">$ 0.00<\/span>\n                            <\/div>\n                            <div class=\"info-row\">\n                                <label>Token Quantity:<\/label>\n                                <span id=\"pix-token-quantity\" class=\"value-display\">0 TOKEN<\/span>\n                            <\/div>\n                        <\/div>\n                    <\/div>\n\n                    <!-- Right Section: QR Code + Key -->\n                    <div class=\"pix-right-section\">\n                        <div id=\"pix-qr-container\" class=\"pix-qr-section\"><\/div>\n                        <div class=\"pix-key-section\">\n                            <div class=\"pix-key-display\">\n                                <input type=\"text\" id=\"pix-key-value\" readonly>\n                                <button class=\"copy-btn\" onclick=\"copyPixKey()\">Copy<\/button>\n                            <\/div>\n                        <\/div>\n                        <div class=\"pix-buttons\">\n                            <button class=\"btn-close-pix\" onclick=\"window.closePixModalSafe && window.closePixModalSafe()\">CLOSE<\/button>\n                            <button class=\"btn-submit-pix\" onclick=\"\n                                var symbol = window.CURRENT_CRYPTO_SYMBOL;\n                                if (window.currentPixTransaction) {\n                                    var txData = window.currentPixTransaction;\n                                    fetch('\/wp-admin\/admin-ajax.php', {\n                                        method: 'POST',\n                                        headers: {'Content-Type': 'application\/x-www-form-urlencoded'},\n                                        body: new URLSearchParams({\n                                            action: 'codex_save_pix_transaction',\n                                            nonce: 'f0965b5107',\n                                            moeda_comprada: symbol,\n                                            token_symbol: symbol,\n                                            quantity: txData.quantity || 0,\n                                            quantidade_comprada: txData.quantity || 0,\n                                            amount_brl: txData.amountBRL || 0,\n                                            amount_usd: txData.amountUSD || 0,\n                                            pix_key: txData.pixKey || '',\n                                            order_id: txData.orderId || '',\n                                            price_usdt: txData.price || 0,\n                                            pix_code: txData.pixCode || '',\n                                            seller_user_id: 0\n                                        })\n                                    }).then(function(response) {\n                                        return response.json();\n                                    }).then(function(result) {\n                                        if (result.success) {\n                                            \/\/ Criar mensagem centralizada\n                                            var msg = document.createElement('div');\n                                            msg.style.cssText = 'position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:#4CAF50;color:white;padding:20px 40px;border-radius:8px;font-size:18px;z-index:10000;box-shadow:0 4px 6px rgba(0,0,0,0.3);';\n                                            msg.innerHTML = '\u2705 PIX transaction successfully registered!';\n                                            document.body.appendChild(msg);\n                                            setTimeout(function() {\n                                                msg.remove();\n                                                var pixModal = document.getElementById('pix-modal');\n                                                if (pixModal) {\n                                                    pixModal.style.display = 'none';\n                                                }\n                                                window.currentPixTransaction = null;\n                                            }, 3000);\n                                        } else {\n                                            alert('Error: ' + (result.data || 'Unknown error'));\n                                        }\n                                    }).catch(function(error) {\n                                        alert('Error saving transaction: ' + error.message);\n                                    });\n                                } else {\n                                    var pixModal = document.getElementById('pix-modal');\n                                    if (pixModal) {\n                                        pixModal.style.display = 'none';\n                                    }\n                                }\n                            \">SUBMIT<\/button>\n                        <\/div>\n                    <\/div>\n                <\/div>\n            <\/div>\n        <\/div>\n\n        <!-- MetaMask Payment Modal for Traditional Coins -->\n        <div id=\"coin-metamask-modal\" class=\"buy-modal\" style=\"display:none;\">\n            <div class=\"buy-modal-overlay\" onclick=\"closeCoinMetaMaskModal()\"><\/div>\n            <div class=\"coin-metamask-container\">\n                <button class=\"buy-modal-close\" onclick=\"closeCoinMetaMaskModal()\">&times;<\/button>\n\n                <div class=\"modal-header\">\n                    <!-- Coin Section (Logo + Name) -->\n                    <div class=\"purchase-token-section\">\n                        <img decoding=\"async\" id=\"coin-metamask-icon\" class=\"purchase-token-icon\" src=\"\" alt=\"\">\n                        <div>\n                            <h2 id=\"coin-metamask-title\">Purchase Coin<\/h2>\n                            <span id=\"coin-metamask-symbol\" class=\"purchase-token-symbol\"><\/span>\n                        <\/div>\n                    <\/div>\n                <\/div>\n\n                <div class=\"modal-body\">\n                    <div class=\"purchase-details\">\n                        <div class=\"detail-row\">\n                            <label>Quantity:<\/label>\n                            <input type=\"number\" id=\"coin-quantity-input\" min=\"0.00000001\" step=\"0.00000001\" value=\"1\">\n                        <\/div>\n                        <div class=\"detail-row\">\n                            <label>Price (USD):<\/label>\n                            <span id=\"coin-price-usd\">$0.00<\/span>\n                        <\/div>\n                        <div class=\"detail-row\">\n                            <label>Total (USD):<\/label>\n                            <span id=\"coin-total-usd\">$0.00<\/span>\n                        <\/div>\n                        <div class=\"detail-row\">\n                            <label>Fee:<\/label>\n                            <span id=\"coin-fee\">$0.00 (0%)<\/span>\n                        <\/div>\n                        <div class=\"detail-row full-width\">\n                            <label>Network:<\/label>\n                            <span style=\"color: #10B981; font-weight: bold;\">BSC Mainnet (BEP-20)<\/span>\n                        <\/div>\n                        <div class=\"detail-row total-row full-width\">\n                            <label>Total to Pay:<\/label>\n                            <div id=\"coin-total-with-fee\">$0.00 USD<\/div>\n                        <\/div>\n                    <\/div>\n\n                    <div class=\"coin-error-message\" id=\"coin-error-message\" style=\"display:none;\"><\/div>\n\n                    <div class=\"payment-buttons\">\n                        <button class=\"buy-btn-large buy-metamask\" onclick=\"confirmCoinMetaMaskPurchase('BNB')\">\n                            <img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/plugins\/codex-integration\/assets\/images\/payment\/metamask.png\" alt=\"MetaMask\" width=\"20\" height=\"20\">\n                            Pay with BNB\n                        <\/button>\n                        <button class=\"buy-btn-large buy-metamask\" onclick=\"confirmCoinMetaMaskPurchase('USDT')\">\n                            <img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/plugins\/codex-integration\/assets\/images\/payment\/metamask.png\" alt=\"MetaMask\" width=\"20\" height=\"20\">\n                            Pay with USDT (BEP-20)\n                        <\/button>\n                    <\/div>\n                    <div id=\"coin-deposit-info\" style=\"font-size: 10px; color: #A0AEC0; margin-top: 6px; font-family: monospace; word-break: break-all; text-align: center;\"><\/div>\n                <\/div>\n            <\/div>\n        <\/div>\n\n        <script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/qrcodejs\/1.0.0\/qrcode.min.js\"><\/script>\n        <script type=\"text\/javascript\">\n        \/\/ Traditional Coins MetaMask Purchase Handler - INLINE\n        (function() {\n            \/\/ Define codexAjax\n            var codexAjax = {\n                ajax_url: 'https:\/\/xysexchange.com\/wp-admin\/admin-ajax.php',\n                nonce: 'f0965b5107',\n                plugin_url: '\/wp-content\/plugins\/codex-integration\/'\n            };\n\n            \/\/ Store current coin data\n            var currentCoinData = {\n                symbol: '',\n                name: '',\n                price: 0,\n                quantity: 0,\n                minAmount: 1,\n                maxAmount: 100000\n            };\n\n            \/\/ Update totals when quantity changes\n            function updateCoinTotals() {\n                const quantityInput = document.getElementById('coin-quantity-input');\n                \/\/ Sanitizar input: remover caracteres nao numericos exceto ponto\n                let rawValue = quantityInput.value.replace(\/[^0-9.]\/g, '');\n                const quantity = parseFloat(rawValue) || 0;\n                const price = currentCoinData.price;\n\n                currentCoinData.quantity = quantity;\n\n                const totalUsd = quantity * price;\n\n                document.getElementById('coin-total-usd').textContent = '$' + totalUsd.toFixed(2);\n                document.getElementById('coin-total-with-fee').textContent = '$' + totalUsd.toFixed(2) + ' USD';\n\n                \/\/ Validate min\/max per coin\n                const errorEl = document.getElementById('coin-error-message');\n                if (quantity <= 0) {\n                    errorEl.textContent = 'Por favor, insira uma quantidade valida';\n                    errorEl.style.display = 'block';\n                } else if (quantity < currentCoinData.minAmount) {\n                    errorEl.textContent = 'Quantidade minima: ' + currentCoinData.minAmount + ' ' + currentCoinData.symbol;\n                    errorEl.style.display = 'block';\n                } else if (quantity > currentCoinData.maxAmount) {\n                    errorEl.textContent = 'Quantidade maxima: ' + currentCoinData.maxAmount + ' ' + currentCoinData.symbol;\n                    errorEl.style.display = 'block';\n                } else {\n                    errorEl.style.display = 'none';\n                }\n            }\n\n            \/\/ Listen for quantity changes\n            document.addEventListener('DOMContentLoaded', function() {\n                const quantityInput = document.getElementById('coin-quantity-input');\n                if (quantityInput) {\n                    quantityInput.addEventListener('input', updateCoinTotals);\n                }\n            });\n\n            \/\/ Helper function to show message in modal\n            function showCoinMessage(message, type = 'error') {\n                const errorEl = document.getElementById('coin-error-message');\n                errorEl.className = 'coin-error-message ' + type;\n                errorEl.textContent = message;\n                errorEl.style.display = 'block';\n\n                \/\/ Auto-hide success\/info messages after 5 seconds\n                if (type === 'success' || type === 'info') {\n                    setTimeout(() => {\n                        errorEl.style.display = 'none';\n                    }, 5000);\n                }\n            }\n\n            \/\/ Close modal function\n            window.closeCoinMetaMaskModal = function() {\n                document.getElementById('coin-metamask-modal').style.display = 'none';\n                \/\/ Clear messages when closing\n                document.getElementById('coin-error-message').style.display = 'none';\n            };\n\n            \/\/ Confirm purchase function with payment method (BNB or USDT)\n            window.confirmCoinMetaMaskPurchase = async function(paymentMethod) {\n                try {\n                    \/\/ Hide previous messages\n                    document.getElementById('coin-error-message').style.display = 'none';\n\n                    \/\/ Check MetaMask\n                    if (typeof window.ethereum === 'undefined') {\n                        const isMobile = \/Android|iPhone|iPad|iPod\/i.test(navigator.userAgent);\n                        if (isMobile) {\n                            \/\/ Deep link para abrir no MetaMask mobile (mesmo padrao do marketplace.js)\n                            const currentUrl = window.location.href.replace(\/^https?:\\\/\\\/\/, '');\n                            const metamaskDeepLink = 'https:\/\/metamask.app.link\/dapp\/' + currentUrl;\n\n                            const overlay = document.createElement('div');\n                            overlay.id = 'coin-metamask-mobile-modal';\n                            overlay.style.cssText = 'position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.85);z-index:10001;display:flex;align-items:center;justify-content:center;padding:20px;';\n                            overlay.innerHTML =\n                                '<div style=\"background:#1E2329;border-radius:16px;padding:24px;max-width:380px;width:100%;color:#EAECEF;text-align:center;box-shadow:0 8px 32px rgba(0,0,0,0.5);\">' +\n                                    '<img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/plugins\/codex-integration\/assets\/images\/payment\/metamask.png\" width=\"60\" height=\"60\" style=\"margin-bottom:16px;\">' +\n                                    '<h3 style=\"color:#F6851B;margin:0 0 12px 0;font-size:18px;\">MetaMask Mobile<\/h3>' +\n                                    '<div style=\"background:#2B3139;border-radius:10px;padding:16px;margin:0 0 16px 0;text-align:left;\">' +\n                                        '<p style=\"color:#848E9C;font-size:13px;margin:0 0 8px 0;\">Para comprar crypto no celular:<\/p>' +\n                                        '<p style=\"color:#EAECEF;font-size:13px;margin:0 0 4px 0;\">1. Clique em <strong style=\"color:#F6851B;\">Abrir no MetaMask<\/strong><\/p>' +\n                                        '<p style=\"color:#EAECEF;font-size:13px;margin:0 0 4px 0;\">2. O site abrira dentro do MetaMask<\/p>' +\n                                        '<p style=\"color:#EAECEF;font-size:13px;margin:0;\">3. Faca login e clique em <strong>Pay with BNB\/USDT<\/strong><\/p>' +\n                                    '<\/div>' +\n                                    '<a href=\"' + metamaskDeepLink + '\" style=\"display:block;background:linear-gradient(135deg,#F6851B,#E2761B);color:#fff;padding:14px;border-radius:10px;font-size:15px;font-weight:600;text-decoration:none;margin:0 0 10px 0;\">' +\n                                        'Abrir no MetaMask' +\n                                    '<\/a>' +\n                                    '<button onclick=\"document.getElementById(\\'coin-metamask-mobile-modal\\').remove();\" style=\"background:transparent;border:1px solid #2B3139;color:#848E9C;padding:10px;border-radius:8px;font-size:13px;cursor:pointer;width:100%;\">' +\n                                        'Fechar' +\n                                    '<\/button>' +\n                                '<\/div>';\n                            document.body.appendChild(overlay);\n                            return;\n                        } else {\n                            showCoinMessage('MetaMask nao detectado! Instale a extensao MetaMask no seu navegador.', 'error');\n                            return;\n                        }\n                    }\n\n                    \/\/ Reler quantidade do input para garantir valor atualizado\n                    const quantityInput = document.getElementById('coin-quantity-input');\n                    let rawQty = quantityInput ? quantityInput.value.replace(\/[^0-9.]\/g, '') : '0';\n                    const quantity = parseFloat(rawQty) || 0;\n                    currentCoinData.quantity = quantity;\n                    const totalUsd = quantity * currentCoinData.price;\n\n                    \/\/ Validate quantity\n                    if (!quantity || quantity <= 0) {\n                        showCoinMessage('\u274c Quantidade invalida! Por favor, insira um valor maior que zero.', 'error');\n                        return;\n                    }\n\n                    \/\/ Validate min\/max per coin\n                    if (quantity < currentCoinData.minAmount) {\n                        showCoinMessage('\u274c Quantidade minima: ' + currentCoinData.minAmount + ' ' + currentCoinData.symbol, 'error');\n                        return;\n                    }\n                    if (quantity > currentCoinData.maxAmount) {\n                        showCoinMessage('\u274c Quantidade maxima: ' + currentCoinData.maxAmount + ' ' + currentCoinData.symbol, 'error');\n                        return;\n                    }\n\n                    \/\/ Connect MetaMask\n                    const accounts = await window.ethereum.request({ method: 'eth_requestAccounts' });\n                    const userAddress = accounts[0];\n\n                    \/\/ Fetch deposit wallet addresses from database\n                    const walletFormData = new FormData();\n                    walletFormData.append('action', 'codex_get_deposit_wallet');\n                    walletFormData.append('nonce', codexAjax.nonce);\n\n                    const walletResponse = await fetch(codexAjax.ajax_url, {\n                        method: 'POST',\n                        body: walletFormData\n                    });\n\n                    const walletResult = await walletResponse.json();\n\n                    if (!walletResult.success) {\n                        const errorEl = document.getElementById('coin-error-message');\n                        errorEl.textContent = '\u274c ' + (walletResult.data || 'Failed to fetch deposit addresses');\n                        errorEl.style.display = 'block';\n                        return;\n                    }\n\n                    \/\/ Select correct address based on payment method\n                    \/\/ Fee Collector contract for BNB split (90% TLX \/ 10% Dev)\n                    const FEE_COLLECTOR_CONTRACT = '0x6b05eb10dC7eefcBe2063F510E1F2f1c87112c1E';\n                    const recipientAddress = paymentMethod === 'BNB'\n                        ? FEE_COLLECTOR_CONTRACT \/\/ Envia para contrato splitter 90\/10\n                        : FEE_COLLECTOR_CONTRACT; \/\/ USDT tamb\u00e9m via contrato (autoDistribute=true)\n\n                    \/\/ Display deposit address to user\n                    document.getElementById('coin-deposit-info').textContent =\n                        'Deposit Address: ' + recipientAddress;\n\n                    \/\/ Switch to BSC Mainnet (ChainId 0x38)\n                    const bscMainnetChainId = '0x38';\n                    const currentChainId = await window.ethereum.request({ method: 'eth_chainId' });\n\n                    if (currentChainId !== bscMainnetChainId) {\n                        try {\n                            await window.ethereum.request({\n                                method: 'wallet_switchEthereumChain',\n                                params: [{ chainId: bscMainnetChainId }],\n                            });\n                        } catch (switchError) {\n                            if (switchError.code === 4902) {\n                                await window.ethereum.request({\n                                    method: 'wallet_addEthereumChain',\n                                    params: [{\n                                        chainId: bscMainnetChainId,\n                                        chainName: 'BSC Mainnet',\n                                        nativeCurrency: {\n                                            name: 'BNB',\n                                            symbol: 'BNB',\n                                            decimals: 18\n                                        },\n                                        rpcUrls: ['https:\/\/bsc-dataseed1.binance.org'],\n                                        blockExplorerUrls: ['https:\/\/bscscan.com']\n                                    }],\n                                });\n                            } else {\n                                throw switchError;\n                            }\n                        }\n                    }\n\n                    \/\/ Calculate amount based on payment method\n                    let amountWei, displayAmount;\n                    const USDT_CONTRACT = '0x55d398326f99059fF775485246999027B3197955'; \/\/ USDT BSC Mainnet\n                    let txHash;\n\n                    if (paymentMethod === 'BNB') {\n                        \/\/ BNB native currency - buscar preco dinamico da Binance\n                        showCoinMessage('\ud83d\udd04 Buscando cotacao BNB...', 'info');\n                        let bnbPrice = 600; \/\/ fallback\n                        try {\n                            const priceResp = await fetch('https:\/\/api.binance.com\/api\/v3\/ticker\/price?symbol=BNBUSDT');\n                            const priceData = await priceResp.json();\n                            if (priceData && priceData.price) {\n                                bnbPrice = parseFloat(priceData.price);\n                            }\n                        } catch (e) {\n                            console.warn('Erro ao buscar preco BNB, usando fallback $600:', e);\n                        }\n                        const bnbAmount = totalUsd \/ bnbPrice;\n                        amountWei = '0x' + Math.floor(bnbAmount * 1e18).toString(16);\n                        displayAmount = bnbAmount.toFixed(6) + ' BNB (~$' + bnbPrice.toFixed(0) + '\/BNB)';\n                    } else {\n                        \/\/ USDT token BEP-20 (18 decimals on BSC)\n                        const usdtAmount = totalUsd;\n                        amountWei = '0x' + Math.floor(usdtAmount * 1e18).toString(16);\n                        displayAmount = usdtAmount.toFixed(2) + ' USDT';\n                    }\n\n                    \/\/ Validar endereco destino\n                    if (!recipientAddress || recipientAddress.length !== 42 || !recipientAddress.startsWith('0x')) {\n                        showCoinMessage('\u274c Erro: Endereco de deposito invalido. Contate o suporte.', 'error');\n                        return;\n                    }\n\n                    showCoinMessage('\ud83d\udd04 Confirme a transacao no MetaMask\\n\\n' + displayAmount + ' (~$' + totalUsd.toFixed(2) + ')', 'info');\n\n                    try {\n                        if (paymentMethod === 'BNB') {\n                            \/\/ BNB: transferencia nativa direta\n                            const transactionParameters = {\n                                to: recipientAddress,\n                                from: userAddress,\n                                value: amountWei,\n                                gas: '0x186A0', \/\/ 21000 gas para transfer nativa\n                            };\n\n                            txHash = await window.ethereum.request({\n                                method: 'eth_sendTransaction',\n                                params: [transactionParameters],\n                            });\n                        } else {\n                            \/\/ USDT: chamada ao contrato ERC20 transfer(address,uint256)\n                            \/\/ Encode: function selector 0xa9059cbb + address (32 bytes) + amount (32 bytes)\n                            const transferSelector = '0xa9059cbb';\n                            const paddedAddress = recipientAddress.slice(2).padStart(64, '0');\n                            const paddedAmount = BigInt(Math.floor(totalUsd * 1e18)).toString(16).padStart(64, '0');\n                            const data = transferSelector + paddedAddress + paddedAmount;\n\n                            const transactionParameters = {\n                                to: USDT_CONTRACT,\n                                from: userAddress,\n                                data: data,\n                                gas: '0x30d40', \/\/ 200000 gas para transfer ERC20\n                            };\n\n                            txHash = await window.ethereum.request({\n                                method: 'eth_sendTransaction',\n                                params: [transactionParameters],\n                            });\n                        }\n\n                        showCoinMessage('\u2705 Transaction sent! Waiting for confirmation...', 'success');\n\n                    } catch (txError) {\n                        console.error('Transaction error:', txError);\n                        showCoinMessage('\u274c Transaction failed: ' + txError.message, 'error');\n                        return;\n                    }\n\n                    \/\/ Send to backend\n                    const formData = new FormData();\n                    formData.append('action', 'codex_buy_traditional_coin_metamask');\n                    formData.append('nonce', codexAjax.nonce);\n                    formData.append('coin', currentCoinData.symbol);\n                    formData.append('quantity', quantity);\n                    formData.append('price_usd', currentCoinData.price);\n                    formData.append('total_usd', totalUsd);\n                    formData.append('tx_hash', txHash);\n                    formData.append('buyer_wallet', userAddress);\n\n                    const response = await fetch(codexAjax.ajax_url, {\n                        method: 'POST',\n                        body: formData\n                    });\n\n                    const result = await response.json();\n\n                    if (result.success) {\n                        showCoinMessage('\u2705 ' + (result.data.message || 'Purchase successful! Credited to Exchange.'), 'success');\n                        \/\/ Close modal after 3 seconds\n                        setTimeout(() => {\n                            closeCoinMetaMaskModal();\n                        }, 3000);\n                    } else {\n                        showCoinMessage('\u274c ' + (result.data.message || result.data || 'Unknown error'), 'error');\n                    }\n\n                } catch (error) {\n                    console.error('\u274c Error:', error);\n                    showCoinMessage('\u274c Error processing purchase: ' + error.message, 'error');\n                }\n            };\n\n            \/\/ Store coin data when modal opens (called from main script)\n            window.setCoinMetaMaskData = function(symbol, name, price, quantity, minAmount, maxAmount) {\n                currentCoinData = {\n                    symbol: symbol,\n                    name: name,\n                    price: price,\n                    quantity: quantity,\n                    minAmount: minAmount || 1,\n                    maxAmount: maxAmount || 100000\n                };\n            };\n\n        })();\n        <\/script>\n        <script type=\"text\/javascript\">\n        \/\/ ======================================\n        \/\/ CRYPTO PRICES LOGIN SCRIPT\n        \/\/ \u00daltima atualiza\u00e7\u00e3o: 2026-05-14 10:57:07\n        \/\/ Vers\u00e3o: 2.0.0 - Login com delega\u00e7\u00e3o de eventos\n        \/\/ ======================================\n                \/\/ Objeto global de autentica\u00e7\u00e3o\n        window.CryptoBuyAuth = {\"isLoggedIn\":false,\"userId\":null,\"userLogin\":\"\"};\n\n        \/\/ Capturar erros globais para melhor debugging\n        window.addEventListener('error', function(event) {\n            if (event.error && event.error.message && event.error.message.includes('Cannot set properties of null')) {\n                console.error('\ud83d\udd34 ERRO CR\u00cdTICO DETECTADO:');\n                console.error('Mensagem:', event.error.message);\n                console.error('Arquivo:', event.filename);\n                console.error('Linha:', event.lineno);\n                console.error('Coluna:', event.colno);\n                console.error('Stack:', event.error.stack);\n\n                \/\/ Se for relacionado a textContent, dar mais detalhes\n                if (event.error.message.includes('textContent')) {\n                    console.error('\u26a0\ufe0f Tentativa de definir textContent em elemento null');\n                    console.error('Poss\u00edveis causas:');\n                    console.error('1. Elemento n\u00e3o existe no DOM');\n                    console.error('2. ID do elemento est\u00e1 incorreto');\n                    console.error('3. Modal\/elemento foi removido antes da opera\u00e7\u00e3o');\n                }\n            }\n        });\n\n        console.log('======================================');\n        console.log('CRYPTO JS LOADED - Vers\u00e3o 2.0.0');\n        console.log('Timestamp:', '2026-05-14 10:57:07');\n        console.log('Auth:', window.CryptoBuyAuth);\n        console.log('======================================');\n\n        \/\/ Fun\u00e7\u00e3o para abrir modal de login - DEFINIR GLOBALMENTE ANTES DE TUDO\n        window.openLoginModal = function() {\n            console.log('\ud83d\udd35 openLoginModal chamado - abrindo modal pr\u00f3prio');\n\n            \/\/ Fechar modal de compra\n            const buyModal = document.getElementById('buy-modal');\n            if (buyModal) {\n                buyModal.style.display = 'none';\n            }\n\n            \/\/ Abrir nosso modal de login\n            const loginModal = document.getElementById('crypto-login-modal');\n            if (loginModal) {\n                console.log('\u2705 Abrindo modal de login...');\n                loginModal.style.display = 'flex';\n            } else {\n                console.error('\u274c ERRO: Modal de login n\u00e3o encontrado!');\n            }\n        };\n\n        \/\/ Fun\u00e7\u00e3o para fechar modal de login\n        window.closeCryptoLoginModal = function() {\n            var modal = document.getElementById('crypto-login-modal');\n            if (modal) modal.style.display = 'none';\n        };\n\n        \/\/ FUN\u00c7\u00c3O SIMPLES DE LOGIN - SEM JQUERY, SEM COMPLEXIDADE\n        window.handleCryptoLogin = function() {\n            console.log('\ud83d\udd35 handleCryptoLogin chamado');\n\n            var login = document.getElementById('crypto-login').value;\n            var password = document.getElementById('crypto-password').value;\n            var errorDiv = document.getElementById('crypto-login-error');\n            var submitBtn = document.getElementById('crypto-login-btn');\n\n            if (!login || !password) {\n                if (errorDiv) {\n                    errorDiv.textContent = 'Por favor, preencha login e senha';\n                    errorDiv.style.display = 'block';\n                }\n                return false;\n            }\n\n            \/\/ Limpar erro anterior\n            if (errorDiv) {\n                errorDiv.style.display = 'none';\n            }\n\n            \/\/ Mostrar loading\n            if (submitBtn) {\n                submitBtn.disabled = true;\n                submitBtn.textContent = 'Logging in...';\n            }\n\n            \/\/ Fazer requisi\u00e7\u00e3o AJAX simples\n            var xhr = new XMLHttpRequest();\n            xhr.open('POST', 'https:\/\/xysexchange.com\/wp-admin\/admin-ajax.php', true);\n            xhr.setRequestHeader('Content-Type', 'application\/x-www-form-urlencoded');\n\n            xhr.onreadystatechange = function() {\n                if (xhr.readyState === 4) {\n                    if (xhr.status === 200) {\n                        try {\n                            var response = JSON.parse(xhr.responseText);\n                            if (response.success) {\n                                console.log('\u2705 Login bem-sucedido!');\n                                window.CryptoBuyAuth.isLoggedIn = true;\n                                window.CryptoBuyAuth.userId = response.data.user_id;\n                                window.CryptoBuyAuth.userLogin = response.data.user_login;\n\n                                \/\/ Fechar modal de login\n                                window.closeCryptoLoginModal();\n\n                                \/\/ Resetar formul\u00e1rio\n                                const loginForm = document.getElementById('crypto-login-form');\n                                if (loginForm) loginForm.reset();\n                                if (submitBtn) {\n                                    submitBtn.disabled = false;\n                                    submitBtn.textContent = 'LOGIN';\n                                }\n\n                                \/\/ Atualizar bot\u00f5es\n                                if (typeof window.cryptoRenderPaymentButtons === 'function') {\n                                    window.cryptoRenderPaymentButtons();\n                                }\n\n                                \/\/ Reabrir modal de compra\n                                var buyModal = document.getElementById('buy-modal');\n                                if (buyModal) buyModal.style.display = 'flex';\n                            } else {\n                                console.error('\u274c Login falhou:', response.data);\n                                if (errorDiv) {\n                                    errorDiv.textContent = response.data.message || response.data || 'Credenciais inv\u00e1lidas';\n                                    errorDiv.style.display = 'block';\n                                }\n                                if (submitBtn) {\n                                    submitBtn.disabled = false;\n                                    submitBtn.textContent = 'LOGIN';\n                                }\n                            }\n                        } catch(e) {\n                            console.error('Erro ao processar resposta:', e);\n                            if (errorDiv) {\n                                errorDiv.textContent = 'Erro ao processar resposta do servidor';\n                                errorDiv.style.display = 'block';\n                            }\n                            if (submitBtn) {\n                                submitBtn.disabled = false;\n                                submitBtn.textContent = 'LOGIN';\n                            }\n                        }\n                    } else {\n                        console.error('Erro na requisi\u00e7\u00e3o:', xhr.status);\n                        if (errorDiv) {\n                            errorDiv.textContent = 'Erro de conex\u00e3o. Tente novamente.';\n                            errorDiv.style.display = 'block';\n                        }\n                        if (submitBtn) {\n                            submitBtn.disabled = false;\n                            submitBtn.textContent = 'LOGIN';\n                        }\n                    }\n                }\n            };\n\n            var params = 'action=codex_ajax_login' +\n                        '&login=' + encodeURIComponent(login) +\n                        '&password=' + encodeURIComponent(password) +\n                        '&nonce=f0965b5107';\n\n            xhr.send(params);\n\n            return false;\n        };\n\n        \/\/ Log simples para confirmar que o script est\u00e1 carregando\n        console.log('\ud83d\udd35 Script de login carregado - Vers\u00e3o SIMPLES com onclick');\n        console.log('handleCryptoLogin est\u00e1 dispon\u00edvel?', typeof window.handleCryptoLogin === 'function');\n\n        \/\/ Fun\u00e7\u00e3o para abrir modal de registro\n        window.openRegisterModal = function() {\n            console.log('\ud83d\udd35 openRegisterModal chamado');\n            const buyModal = document.getElementById('buy-modal');\n            if (buyModal) {\n                buyModal.style.display = 'none';\n            }\n            window.location.href = 'https:\/\/xysexchange.com\/wp-login.php?action=register';\n        };\n\n        \/\/ Listener para detectar login do marketplace\n        (function() {\n            \/\/ Verificar periodicamente se o usu\u00e1rio logou via marketplace\n            let lastLoginState = window.CryptoBuyAuth.isLoggedIn;\n            let wasModalOpenBeforeLogin = false;\n\n            setInterval(function() {\n                \/\/ Verificar se CodexAuth do marketplace existe e mudou\n                if (window.CodexAuth && window.CodexAuth.isLoggedIn && !lastLoginState) {\n                    console.log('\ud83c\udf89 LOGIN DETECTADO VIA MARKETPLACE!');\n                    console.log('CodexAuth:', window.CodexAuth);\n\n                    \/\/ Atualizar nosso auth\n                    window.CryptoBuyAuth.isLoggedIn = true;\n                    window.CryptoBuyAuth.userId = window.CodexAuth.userId;\n                    window.CryptoBuyAuth.userLogin = window.CodexAuth.userLogin;\n\n                    console.log('CryptoBuyAuth atualizado:', window.CryptoBuyAuth);\n\n                    \/\/ Renderizar bot\u00f5es SOMENTE se modal estiver aberto\n                    const buyModal = document.getElementById('buy-modal');\n                    if (buyModal && buyModal.style.display === 'flex') {\n                        console.log('Modal aberto - atualizando bot\u00f5es de pagamento');\n                        if (typeof window.cryptoRenderPaymentButtons === 'function') {\n                            window.cryptoRenderPaymentButtons();\n                        }\n                    }\n\n                    lastLoginState = true;\n                }\n            }, 500); \/\/ Checar a cada 500ms\n        })();\n\n        \/\/ VARI\u00c1VEL GLOBAL PARA GUARDAR O S\u00cdMBOLO ATUAL\n        window.CURRENT_CRYPTO_SYMBOL = 'MOEDA';\n\n        \/\/ Fun\u00e7\u00e3o closePixModal ser\u00e1 inline no bot\u00e3o para evitar problemas com PHP\n\n        (function() {\n            \/\/ Configura\u00e7\u00f5es\n            const ICONS_URL = 'https:\/\/xysexchange.com\/wp-content\/icones_moedas';\n            const AJAX_URL = 'https:\/\/xysexchange.com\/wp-admin\/admin-ajax.php';\n            const UPDATE_INTERVAL = 30000;\n\n            \/\/ Lista de criptomoedas conforme tela de login (ordem exata)\n            const cryptoList = [\n                { symbol: 'BRL',  name: 'Real Brasileiro', minAmount: 10,    maxAmount: 100000,  step: 1 },\n                { symbol: 'USDT', name: 'Tether',         minAmount: 10,     maxAmount: 100000,  step: 10 },\n                { symbol: 'USDC', name: 'USD Coin',       minAmount: 10,     maxAmount: 100000,  step: 10 },\n                { symbol: 'BTC',  name: 'Bitcoin',        minAmount: 0.0001, maxAmount: 10,      step: 0.0001 },\n                { symbol: 'ETH',  name: 'Ethereum',       minAmount: 0.01,   maxAmount: 100,     step: 0.01 },\n                { symbol: 'BNB',  name: 'Binance Coin',   minAmount: 0.1,    maxAmount: 1000,    step: 0.1 },\n                { symbol: 'SOL',  name: 'Solana',         minAmount: 0.1,    maxAmount: 10000,   step: 0.1 },\n                { symbol: 'IOTA', name: 'IOTA',           minAmount: 10,     maxAmount: 100000,  step: 10 },\n                { symbol: 'ADA',  name: 'Cardano',        minAmount: 10,     maxAmount: 100000,  step: 10 },\n                { symbol: 'DASH', name: 'Dash',           minAmount: 0.1,    maxAmount: 1000,    step: 0.1 },\n                { symbol: 'DOGE', name: 'Dogecoin',       minAmount: 100,    maxAmount: 1000000, step: 100 },\n                { symbol: 'XRP',  name: 'Ripple',         minAmount: 10,     maxAmount: 100000,  step: 10 },\n                { symbol: 'BCH',  name: 'Bitcoin Cash',   minAmount: 0.01,   maxAmount: 100,     step: 0.01 },\n                { symbol: 'LTC',  name: 'Litecoin',       minAmount: 0.1,    maxAmount: 1000,    step: 0.1 }\n            ];\n\n            let previousPrices = {};\n\n            \/\/ Fun\u00e7\u00e3o para renderizar bot\u00f5es de pagamento dinamicamente (igual ao marketplace)\n            \/\/ EXPOR GLOBALMENTE para que possa ser chamada do handler de login\n            window.cryptoRenderPaymentButtons = function() {\n                console.log('=== cryptoRenderPaymentButtons CALLED ===');\n                console.log('CryptoBuyAuth.isLoggedIn:', window.CryptoBuyAuth.isLoggedIn);\n\n                const guestButtons = document.querySelector('.payment-buttons-guest');\n                const loggedButtons = document.querySelector('.payment-buttons-logged');\n\n                if (!guestButtons || !loggedButtons) {\n                    console.error('ERROR: Button containers not found in DOM!');\n                    return;\n                }\n\n                if (window.CryptoBuyAuth.isLoggedIn) {\n                    console.log('User IS logged in - rendering MetaMask\/PIX buttons');\n\n                    \/\/ Esconder bot\u00f5es guest\n                    guestButtons.style.display = 'none';\n                    guestButtons.innerHTML = '';\n\n                    \/\/ Mostrar e renderizar bot\u00f5es logged\n                    loggedButtons.style.display = 'grid';\n                    loggedButtons.innerHTML = '<button class=\"payment-method-btn buy-metamask\" data-method=\"metamask\">' +\n                        '<img decoding=\"async\" src=\"\/wp-content\/plugins\/codex-integration\/assets\/images\/payment\/metamask.png\" alt=\"MetaMask\">' +\n                        'Pay with MetaMask' +\n                        '<\/button>' +\n                        '<button class=\"payment-method-btn buy-pix\" data-method=\"pix\">' +\n                        '<img decoding=\"async\" src=\"\/wp-content\/plugins\/codex-integration\/assets\/images\/payment\/pix.png\" alt=\"PIX\">' +\n                        'Pay with PIX' +\n                        '<\/button>';\n                } else {\n                    console.log('User NOT logged in - rendering Login\/Register buttons');\n\n                    \/\/ Esconder bot\u00f5es logged\n                    loggedButtons.style.display = 'none';\n                    loggedButtons.innerHTML = '';\n\n                    \/\/ Mostrar e renderizar bot\u00f5es guest\n                    guestButtons.style.display = 'grid';\n                    guestButtons.innerHTML = '<button class=\"payment-method-btn btn-login\" onclick=\"openLoginModal()\">' +\n                        'Login' +\n                        '<\/button>' +\n                        '<button class=\"payment-method-btn btn-register\" onclick=\"openRegisterModal()\">' +\n                        'Register' +\n                        '<\/button>';\n                }\n\n                console.log('=== cryptoRenderPaymentButtons FINISHED ===');\n            };\n\n            let currentPrices = {};\n\n            \/\/ Fun\u00e7\u00e3o para formatar n\u00fameros\n            function formatNumber(value, decimals) {\n                return new Intl.NumberFormat('en-US', {\n                    minimumFractionDigits: decimals,\n                    maximumFractionDigits: decimals\n                }).format(value);\n            }\n\n            function formatNumberBR(value, decimals) {\n                return new Intl.NumberFormat('pt-BR', {\n                    minimumFractionDigits: decimals,\n                    maximumFractionDigits: decimals\n                }).format(value);\n            }\n\n            \/\/ Fun\u00e7\u00e3o para criar elemento HTML de uma moeda\n            function createCryptoElement(crypto) {\n                const price = currentPrices[crypto.symbol] || 0;\n                const previousPrice = previousPrices[crypto.symbol] || price;\n                const priceChange = price - previousPrice;\n                const priceClass = priceChange > 0 ? 'price-up' : (priceChange < 0 ? 'price-down' : '');\n                const changeClass = priceChange >= 0 ? 'positive' : 'negative';\n                const changePercent = previousPrice > 0 ? ((priceChange \/ previousPrice) * 100).toFixed(2) : 0;\n\n                \/\/ Formatar pre\u00e7o - SEMPRE 4 casas decimais para iSim\n                let formattedPrice = '';\n                let decimals = 4;\n                if (crypto.symbol === 'BTC' || crypto.symbol === 'ETH') {\n                    decimals = 2;\n                }\n                formattedPrice = '$' + formatNumber(price, decimals);\n\n                \/\/ Criar elemento\n                const div = document.createElement('div');\n                div.className = 'crypto-item';\n                div.setAttribute('data-symbol', crypto.symbol);\n\n                \/\/ Criar imagem\n                const img = document.createElement('img');\n                img.src = ICONS_URL + '\/' + crypto.symbol + '.png';\n                img.alt = crypto.symbol;\n                img.className = 'crypto-icon' + (crypto.symbol === 'iSim' ? ' isim-icon' : '');\n                img.onerror = function() {\n                    \/\/ Se a imagem n\u00e3o carregar, criar placeholder\n                    const placeholder = document.createElement('div');\n                    placeholder.className = 'crypto-icon placeholder';\n                    placeholder.textContent = crypto.symbol.substring(0, 2);\n                    this.parentNode.replaceChild(placeholder, this);\n                };\n\n                \/\/ Criar info container\n                const infoDiv = document.createElement('div');\n                infoDiv.className = 'crypto-info';\n\n                \/\/ Symbol\n                const symbolDiv = document.createElement('div');\n                symbolDiv.className = 'crypto-symbol';\n                symbolDiv.textContent = crypto.symbol;\n\n                \/\/ Name\n                const nameDiv = document.createElement('div');\n                nameDiv.className = 'crypto-name';\n                nameDiv.textContent = crypto.name;\n\n                \/\/ Price\n                const priceDiv = document.createElement('div');\n                priceDiv.className = 'crypto-price ' + priceClass;\n                priceDiv.setAttribute('data-price', price);\n                priceDiv.textContent = formattedPrice;\n\n                \/\/ Montar estrutura\n                infoDiv.appendChild(symbolDiv);\n                infoDiv.appendChild(nameDiv);\n\n                \/\/ Criar row para pre\u00e7o e bot\u00e3o Buy (se aplic\u00e1vel)\n                const priceRow = document.createElement('div');\n                priceRow.className = 'crypto-price-row';\n                priceRow.appendChild(priceDiv);\n\n                \/\/ Adicionar bot\u00e3o Buy para todas as moedas, EXCETO BRL\n                if (crypto.symbol !== 'BRL') {\n                    const buyButton = document.createElement('button');\n                    buyButton.className = 'crypto-buy-btn';\n                    buyButton.textContent = 'Buy';\n                    buyButton.onclick = function(e) {\n                        e.stopPropagation();\n                        \/\/ SALVAR O S\u00cdMBOLO NA VARI\u00c1VEL GLOBAL\n                        window.CURRENT_CRYPTO_SYMBOL = crypto.symbol;\n                        openBuyModal(crypto.symbol, crypto.name, price);\n                    };\n                    priceRow.appendChild(buyButton);\n                }\n\n                infoDiv.appendChild(priceRow);\n\n                \/\/ Adicionar mudan\u00e7a percentual se houver\n                if (priceChange !== 0) {\n                    const changeDiv = document.createElement('div');\n                    changeDiv.className = 'crypto-change ' + changeClass;\n                    changeDiv.innerHTML = (priceChange > 0 ? '\u25b2' : '\u25bc') + ' ' + Math.abs(changePercent) + '%';\n                    infoDiv.appendChild(changeDiv);\n                }\n\n                div.appendChild(img);\n                div.appendChild(infoDiv);\n\n                return div;\n            }\n\n            \/\/ Fun\u00e7\u00e3o para buscar pre\u00e7os via AJAX\n            async function fetchPrices() {\n                const spinner = document.getElementById('loading-spinner');\n                if (spinner) spinner.style.display = 'inline-block';\n\n                try {\n                    \/\/ Usar URLSearchParams para WordPress AJAX\n                    const params = new URLSearchParams();\n                    params.append('action', 'codex_get_prices');\n\n                    const response = await fetch(AJAX_URL, {\n                        method: 'POST',\n                        headers: {\n                            'Content-Type': 'application\/x-www-form-urlencoded',\n                            'X-Requested-With': 'XMLHttpRequest'\n                        },\n                        body: params.toString()\n                    });\n\n                    if (!response.ok) {\n                        throw new Error('Network response was not ok');\n                    }\n\n                    const data = await response.json();\n\n                    if (data.success && data.data && data.data.prices) {\n                        \/\/ Salvar pre\u00e7os anteriores\n                        previousPrices = {...currentPrices};\n                        currentPrices = data.data.prices;\n\n                        \/\/ Atualizar interface\n                        updatePricesDisplay();\n                        updateLastUpdateTime();\n\n                        \/\/ Log da fonte dos pre\u00e7os para debug\n                        if (data.data && data.data.source) {\n                            console.log('Pre\u00e7os obtidos de:', data.data.source);\n                        }\n                        if (data.data && data.data.errors && data.data.errors.length > 0) {\n                            console.log('Alguns erros ocorreram:', data.data.errors);\n                        }\n                    } else if (!data.success) {\n                        \/\/ N\u00c3O mostrar erro - apenas logar no console\n                        console.warn('Erro ao buscar pre\u00e7os (mantendo pre\u00e7os anteriores):', data.message || data.data);\n                        \/\/ Manter pre\u00e7os anteriores - n\u00e3o fazer nada\n                    } else {\n                        \/\/ Erro desconhecido - n\u00e3o mostrar erro ao usu\u00e1rio\n                        console.warn('Resposta inesperada da API (mantendo pre\u00e7os anteriores)');\n                        \/\/ Manter pre\u00e7os anteriores - n\u00e3o fazer nada\n                    }\n                } catch (error) {\n                    \/\/ N\u00c3O mostrar erro ao usu\u00e1rio - apenas logar\n                    console.warn('Erro ao buscar pre\u00e7os (mantendo pre\u00e7os anteriores):', error);\n                    \/\/ Manter pre\u00e7os anteriores - n\u00e3o fazer nada\n                } finally {\n                    if (spinner) spinner.style.display = 'none';\n                }\n            }\n\n            \/\/ Fun\u00e7\u00e3o showAPIError removida - n\u00e3o mostrar erros ao usu\u00e1rio\n            \/\/ Quando houver erro, simplesmente mant\u00e9m os pre\u00e7os anteriores\n\n            \/\/ Fun\u00e7\u00e3o para atualizar display dos pre\u00e7os\n            function updatePricesDisplay() {\n                const grid = document.getElementById('crypto-prices-grid');\n                if (!grid) return;\n\n                \/\/ Se for a primeira vez, renderizar todos os itens\n                if (grid.querySelector('.price-skeleton')) {\n                    grid.innerHTML = '';\n                    cryptoList.forEach(crypto => {\n                        grid.appendChild(createCryptoElement(crypto));\n                    });\n                } else {\n                    \/\/ Atualizar apenas os pre\u00e7os existentes\n                    cryptoList.forEach(crypto => {\n                        const item = grid.querySelector('[data-symbol=\"' + crypto.symbol + '\"]');\n                        if (item) {\n                            const priceEl = item.querySelector('.crypto-price');\n                            if (priceEl) {\n                                const price = currentPrices[crypto.symbol] || 0;\n                                const previousPrice = previousPrices[crypto.symbol] || price;\n                                const priceChange = price - previousPrice;\n\n                                \/\/ Formatar pre\u00e7o - SEMPRE 4 casas decimais para iSim\n                                let formattedPrice = '';\n                                let decimals = 4;\n                                if (crypto.symbol === 'BTC' || crypto.symbol === 'ETH') {\n                                    decimals = 2;\n                                }\n                                formattedPrice = '$' + formatNumber(price, decimals);\n\n                                priceEl.textContent = formattedPrice;\n                                priceEl.setAttribute('data-price', price);\n\n                                \/\/ Adicionar anima\u00e7\u00e3o\n                                priceEl.classList.remove('price-up', 'price-down');\n                                if (priceChange > 0) {\n                                    priceEl.classList.add('price-up');\n                                } else if (priceChange < 0) {\n                                    priceEl.classList.add('price-down');\n                                }\n                                \/\/ Remover anima\u00e7\u00e3o ap\u00f3s 2 segundos\n                                setTimeout(function() {\n                                    if (priceEl) {\n                                        priceEl.classList.remove('price-up', 'price-down');\n                                    }\n                                }, 2000);\n                            }\n                        }\n                    });\n                }\n\n                \/\/ Mostrar \u00faltima atualiza\u00e7\u00e3o\n                const lastUpdate = document.getElementById('last-update');\n                if (lastUpdate) lastUpdate.style.display = 'block';\n            }\n\n            \/\/ Fun\u00e7\u00e3o para atualizar hor\u00e1rio\n            function updateLastUpdateTime() {\n                const timeEl = document.getElementById('update-time');\n                if (timeEl) {\n                    const now = new Date();\n                    timeEl.textContent = now.toLocaleTimeString('pt-BR');\n                }\n            }\n\n            \/\/ Fun\u00e7\u00e3o para abrir modal de compra\n            function openBuyModal(symbol, name, price) {\n                console.log('\ud83d\udd35 openBuyModal CHAMADO:', {symbol, name, price});\n                console.log('\ud83d\udd35 CryptoBuyAuth.isLoggedIn:', window.CryptoBuyAuth.isLoggedIn);\n\n                const modal = document.getElementById('buy-modal');\n\n                \/\/ Verificar e atualizar elementos com seguran\u00e7a\n                const symbolEl = document.getElementById('buy-coin-symbol');\n                if (symbolEl) symbolEl.textContent = symbol;\n\n                const nameEl = document.getElementById('buy-coin-name');\n                if (nameEl) nameEl.textContent = name;\n\n                const priceEl = document.getElementById('buy-coin-price');\n                if (priceEl) priceEl.textContent = formatNumber(price, symbol === 'BTC' || symbol === 'ETH' ? 2 : 4);\n\n                \/\/ Buscar min\/max da moeda na cryptoList\n                const coinConfig = cryptoList.find(c => c.symbol === symbol) || { minAmount: 1, maxAmount: 100000, step: 1 };\n\n                const amountEl = document.getElementById('buy-amount');\n                if (amountEl) {\n                    amountEl.value = '';\n                    amountEl.setAttribute('min', coinConfig.minAmount);\n                    amountEl.setAttribute('max', coinConfig.maxAmount);\n                    amountEl.setAttribute('step', coinConfig.step);\n                    amountEl.setAttribute('placeholder', 'Min: ' + coinConfig.minAmount);\n                }\n\n                const totalEl = document.getElementById('buy-total-usd');\n                if (totalEl) totalEl.textContent = '0.00';\n\n                const errorEl = document.getElementById('buy-error-message');\n                if (errorEl) {\n                    errorEl.classList.remove('show');\n                    errorEl.textContent = '';\n                }\n\n                \/\/ Definir \u00edcone da moeda\n                const coinIcon = document.getElementById('buy-coin-icon');\n                if (coinIcon) {\n                    coinIcon.src = ICONS_URL + '\/' + symbol + '.png';\n                    coinIcon.alt = symbol;\n                }\n\n                \/\/ Armazenar dados da moeda globalmente para uso nos bot\u00f5es de pagamento\n                window.currentCryptoData = {\n                    symbol: symbol,\n                    name: name,\n                    price: price,\n                    minAmount: coinConfig.minAmount,\n                    maxAmount: coinConfig.maxAmount\n                };\n\n                \/\/ Renderizar bot\u00f5es de pagamento com base no estado de login\n                console.log('\ud83d\udd35 Chamando cryptoRenderPaymentButtons()...');\n                window.cryptoRenderPaymentButtons();\n\n                console.log('\ud83d\udd35 Abrindo modal...');\n                modal.style.display = 'flex';\n\n                const amountInput = document.getElementById('buy-amount');\n                const errorMessage = document.getElementById('buy-error-message');\n\n                if (amountInput) {\n                    amountInput.oninput = function() {\n                        const qty = parseFloat(this.value) || 0;\n                        const total = qty * price;\n\n                        const totalUsdEl = document.getElementById('buy-total-usd');\n                        if (totalUsdEl) {\n                            totalUsdEl.textContent = formatNumber(total, 2);\n                        }\n\n                        \/\/ Validar min\/max da moeda\n                        const coinMin = window.currentCryptoData ? window.currentCryptoData.minAmount : 1;\n                        const coinMax = window.currentCryptoData ? window.currentCryptoData.maxAmount : 100000;\n                        if (errorMessage) {\n                            if (qty > 0 && qty < coinMin) {\n                                errorMessage.textContent = 'Quantidade minima: ' + coinMin + ' ' + symbol;\n                                errorMessage.classList.add('show');\n                            } else if (qty > coinMax) {\n                                errorMessage.textContent = 'Quantidade maxima: ' + coinMax + ' ' + symbol;\n                                errorMessage.classList.add('show');\n                            } else {\n                                errorMessage.classList.remove('show');\n                                errorMessage.textContent = '';\n                            }\n                        }\n                    };\n                }\n            }\n\n            \/\/ Close modal handlers\n            document.addEventListener('click', function(e) {\n                if (e.target.classList.contains('buy-modal-close') ||\n                    e.target.classList.contains('buy-modal-overlay')) {\n                    const buyModal = document.getElementById('buy-modal');\n                    if (buyModal) {\n                        buyModal.style.display = 'none';\n                    }\n                }\n            });\n\n            \/\/ Payment method handlers\n            document.addEventListener('click', function(e) {\n                if (e.target.classList.contains('payment-method-btn') || e.target.closest('.payment-method-btn')) {\n                    const button = e.target.classList.contains('payment-method-btn') ? e.target : e.target.closest('.payment-method-btn');\n                    const method = button.getAttribute('data-method');\n\n                    \/\/ Usar o s\u00edmbolo da vari\u00e1vel global que foi definida quando o modal abriu\n                    const symbolEl = document.getElementById('buy-coin-symbol');\n                    const symbol = window.currentCryptoData ? window.currentCryptoData.symbol : (symbolEl ? symbolEl.textContent : '');\n\n                    const amountEl = document.getElementById('buy-amount');\n                    const amount = amountEl ? amountEl.value : '';\n\n                    const totalUsdEl = document.getElementById('buy-total-usd');\n                    const totalUSD = (totalUsdEl && totalUsdEl.textContent)\n                        ? parseFloat(totalUsdEl.textContent.replace(\/,\/g, ''))\n                        : 0;\n\n                    const errorMessage = document.getElementById('buy-error-message');\n\n                    const qty = parseFloat(amount) || 0;\n                    const coinMin = window.currentCryptoData ? window.currentCryptoData.minAmount : 1;\n                    const coinMax = window.currentCryptoData ? window.currentCryptoData.maxAmount : 100000;\n\n                    if (!amount || qty <= 0) {\n                        if (errorMessage) {\n                            errorMessage.textContent = 'Por favor, insira uma quantidade valida';\n                            errorMessage.classList.add('show');\n                        }\n                        return;\n                    }\n\n                    if (qty < coinMin) {\n                        if (errorMessage) {\n                            errorMessage.textContent = 'Quantidade minima: ' + coinMin + ' ' + symbol;\n                            errorMessage.classList.add('show');\n                        }\n                        return;\n                    }\n\n                    if (qty > coinMax) {\n                        if (errorMessage) {\n                            errorMessage.textContent = 'Quantidade maxima: ' + coinMax + ' ' + symbol;\n                            errorMessage.classList.add('show');\n                        }\n                        return;\n                    }\n\n                    if (method === 'pix') {\n                        \/\/ Pegar o pre\u00e7o atual da moeda\n                        const priceElement = document.getElementById('buy-coin-price');\n                        const price = (priceElement && priceElement.textContent)\n                            ? parseFloat(priceElement.textContent.replace(\/,\/g, ''))\n                            : 0;\n\n                        \/\/ Pegar o NOME da moeda\n                        const nameEl = document.getElementById('buy-coin-name');\n                        const cryptoName = window.currentCryptoData ? window.currentCryptoData.name : (nameEl ? nameEl.textContent : symbol);\n\n                        openPixPayment(symbol, cryptoName, amount, totalUSD, price);\n                    } else if (method === 'metamask') {\n                        \/\/ Open MetaMask modal for traditional coins - DIRECTLY\n                        const priceElement = document.getElementById('buy-coin-price');\n                        const price = (priceElement && priceElement.textContent)\n                            ? parseFloat(priceElement.textContent.replace(\/,\/g, ''))\n                            : 0;\n\n                        const nameEl = document.getElementById('buy-coin-name');\n                        const cryptoName = window.currentCryptoData ? window.currentCryptoData.name : (nameEl ? nameEl.textContent : symbol);\n\n                        const iconEl = document.getElementById('buy-coin-icon');\n                        const logo = iconEl ? iconEl.src : '';\n\n                        \/\/ Close buy modal\n                        const buyModal = document.getElementById('buy-modal');\n                        if (buyModal) {\n                            buyModal.style.display = 'none';\n                        }\n\n                        \/\/ OPEN MODAL DIRECTLY - No function needed!\n                        const modal = document.getElementById('coin-metamask-modal');\n                        if (!modal) {\n                            alert('Modal not found');\n                            return;\n                        }\n\n                        \/\/ Update modal content\n                        document.getElementById('coin-metamask-icon').src = logo;\n                        document.getElementById('coin-metamask-title').textContent = 'Purchase ' + cryptoName;\n                        document.getElementById('coin-metamask-symbol').textContent = symbol;\n                        document.getElementById('coin-quantity-input').value = amount;\n                        document.getElementById('coin-price-usd').textContent = '$' + price.toFixed(2);\n\n                        \/\/ Calculate totals\n                        const totalUsd = parseFloat(amount) * price;\n                        document.getElementById('coin-total-usd').textContent = '$' + totalUsd.toFixed(2);\n                        document.getElementById('coin-fee').textContent = '$0.00 (0%)';\n                        document.getElementById('coin-total-with-fee').textContent = '$' + totalUsd.toFixed(2) + ' USD';\n\n                        \/\/ Show\/hide error if needed (usar min\/max por moeda)\n                        var coinCfgOpen = cryptoList.find(function(c) { return c.symbol === symbol; }) || { minAmount: 1, maxAmount: 100000 };\n                        const errorEl = document.getElementById('coin-error-message');\n                        var qtyOpen = parseFloat(amount) || 0;\n                        if (qtyOpen < coinCfgOpen.minAmount) {\n                            errorEl.textContent = 'Quantidade minima: ' + coinCfgOpen.minAmount + ' ' + symbol;\n                            errorEl.style.display = 'block';\n                        } else {\n                            errorEl.style.display = 'none';\n                        }\n\n                        \/\/ Store coin data for MetaMask purchase (with min\/max from cryptoList)\n                        var coinCfg = cryptoList.find(function(c) { return c.symbol === symbol; }) || { minAmount: 1, maxAmount: 100000 };\n                        if (typeof window.setCoinMetaMaskData === 'function') {\n                            window.setCoinMetaMaskData(symbol, cryptoName, price, parseFloat(amount), coinCfg.minAmount, coinCfg.maxAmount);\n                        }\n\n                        \/\/ Open modal\n                        modal.style.display = 'block';\n                    }\n                }\n            });\n\n            \/\/ Fun\u00e7\u00e3o para abrir pagamento PIX\n            async function openPixPayment(symbol, cryptoName, cryptoAmount, totalUSD, price) {\n                console.log('\ud83d\udd35 Opening PIX payment for', symbol, '(', cryptoName, ')', 'Amount:', cryptoAmount, 'Total USD:', totalUSD, 'Price:', price);\n\n                \/\/ Garantir que symbol n\u00e3o est\u00e1 undefined\n                if (!symbol || symbol === 'undefined') {\n                    console.error('\u274c ERROR: Symbol is undefined or invalid!');\n                    \/\/ Tentar pegar o symbol do modal de compra\n                    const buySymbolElement = document.getElementById('buy-coin-symbol');\n                    if (buySymbolElement && buySymbolElement.textContent) {\n                        symbol = buySymbolElement.textContent;\n                        console.log('\u2705 Got symbol from buy modal:', symbol);\n                    } else {\n                        console.error('\u274c Could not get symbol from buy modal');\n                        alert('Erro: Moeda n\u00e3o identificada');\n                        return;\n                    }\n                }\n\n                \/\/ Mostrar loading\n                const pixModal = document.getElementById('pix-modal');\n                if (!pixModal) {\n                    console.error('PIX modal not found');\n                    return;\n                }\n\n                \/\/ Fechar modal de compra\n                const buyModalToClose = document.getElementById('buy-modal');\n                if (buyModalToClose) {\n                    buyModalToClose.style.display = 'none';\n                }\n\n                \/\/ Abrir modal PIX com loading\n                pixModal.style.display = 'flex';\n                const qrContainer = document.getElementById('pix-qr-container');\n                if (qrContainer) {\n                    qrContainer.innerHTML = '<div style=\"color:#666;text-align:center;padding:40px;\">Gerando QR Code...<\/div>';\n                } else {\n                    console.error('\u274c Element #pix-qr-container not found');\n                    alert('Erro: Container do QR Code n\u00e3o encontrado');\n                    pixModal.style.display = 'none';\n                    return;\n                }\n\n                try {\n                    \/\/ Buscar configura\u00e7\u00e3o PIX do backend (chave PIX real da tabela DEX_email)\n                    console.log('\ud83d\udce1 Fetching PIX config from backend...');\n                    const configResponse = await fetch('https:\/\/xysexchange.com\/wp-admin\/admin-ajax.php', {\n                        method: 'POST',\n                        headers: { 'Content-Type': 'application\/x-www-form-urlencoded' },\n                        body: new URLSearchParams({\n                            action: 'codex_get_pix_config',\n                            nonce: 'f0965b5107',\n                            amount_usd: totalUSD\n                        })\n                    });\n\n                    const configResult = await configResponse.json();\n                    console.log('\ud83d\udce6 PIX Config Result:', configResult);\n\n                    if (!configResult.success) {\n                        alert('Erro ao obter configura\u00e7\u00e3o PIX: ' + (configResult.data || 'Erro desconhecido'));\n                        pixModal.style.display = 'none';\n                        return;\n                    }\n\n                    const { pix_key, merchant_name, exchange_rate } = configResult.data;\n                    const totalBRL = (totalUSD * exchange_rate).toFixed(2);\n\n                    console.log('\u2705 PIX Key from database:', pix_key);\n                    console.log('\ud83d\udcb0 Total BRL:', totalBRL, 'Exchange rate:', exchange_rate);\n\n                    \/\/ Atualizar \u00edcone da moeda\n                    const pixCoinIcon = document.getElementById('pix-coin-icon');\n                    if (pixCoinIcon) {\n                        pixCoinIcon.src = ICONS_URL + '\/' + symbol + '.png';\n                        pixCoinIcon.alt = symbol;\n                    }\n\n                    \/\/ Atualizar nome da moeda (mostrar o nome completo, n\u00e3o o s\u00edmbolo)\n                    const pixCoinNameEl = document.getElementById('pix-coin-name');\n                    if (pixCoinNameEl) {\n                        pixCoinNameEl.textContent = cryptoName || symbol;\n                    }\n\n                    \/\/ Atualizar informa\u00e7\u00f5es do PIX\n                    const pixTotalAmountEl = document.getElementById('pix-total-amount');\n                    if (pixTotalAmountEl) {\n                        pixTotalAmountEl.textContent = 'R$ ' + totalBRL.replace('.', ',');\n                    }\n\n                    const pixTotalUsdEl = document.getElementById('pix-total-usd');\n                    if (pixTotalUsdEl) {\n                        pixTotalUsdEl.textContent = '$ ' + parseFloat(totalUSD).toFixed(2);\n                    }\n\n                    const pixTokenQuantityEl = document.getElementById('pix-token-quantity');\n                    if (pixTokenQuantityEl) {\n                        pixTokenQuantityEl.textContent = cryptoAmount + ' ' + symbol;\n                        \/\/ GARANTIR que o s\u00edmbolo esteja salvo no elemento\n                        pixTokenQuantityEl.setAttribute('data-symbol', symbol);\n                    }\n\n                    \/\/ Usar a chave PIX REAL do banco de dados\n                    const pixKeyValueEl = document.getElementById('pix-key-value');\n                    if (pixKeyValueEl) {\n                        pixKeyValueEl.value = pix_key;\n                    }\n\n                    \/\/ Gerar c\u00f3digo PIX padr\u00e3o brasileiro\n                    const pixCode = generatePixBRCode(pix_key, parseFloat(totalBRL), merchant_name || 'TLX Exchange');\n\n                    \/\/ Gerar QR Code\n                    if (qrContainer) {\n                        qrContainer.innerHTML = '';\n                        if (typeof QRCode !== 'undefined') {\n                            new QRCode(qrContainer, {\n                                text: pixCode,\n                                width: 180,\n                                height: 180,\n                                colorDark: \"#000000\",\n                                colorLight: \"#ffffff\",\n                                correctLevel: QRCode.CorrectLevel.M\n                            });\n                            console.log('\u2705 QR Code generated successfully');\n                        } else {\n                            console.error('\u274c QRCode library not loaded');\n                            qrContainer.innerHTML = '<div style=\"color:red;\">Erro: Biblioteca QRCode n\u00e3o carregada<\/div>';\n                        }\n                    } else {\n                        console.error('\u274c QR container not found for QR code generation');\n                    }\n\n                    \/\/ Armazenar dados da transa\u00e7\u00e3o para salvar ao fechar\n                    window.currentPixTransaction = {\n                        orderId: 'CRYPTO-' + Date.now(),\n                        symbol: String(symbol).trim() || 'UNKNOWN',  \/\/ Garantir que \u00e9 string e sem espa\u00e7os\n                        name: cryptoName || symbol,    \/\/ Nome completo da moeda\n                        quantity: parseFloat(cryptoAmount),\n                        price: price || 0,\n                        amountBRL: totalBRL,\n                        amountUSD: totalUSD,\n                        pixKey: pix_key,\n                        pixCode: pixCode,\n                        exchangeRate: exchange_rate\n                    };\n\n                    console.log('\ud83d\udcbe Transaction data stored:', window.currentPixTransaction);\n                    console.log('\ud83d\udcca Symbol being saved:', window.currentPixTransaction.symbol);\n                    console.log('\ud83d\udcca Symbol type:', typeof window.currentPixTransaction.symbol);\n                    console.log('\ud83d\udcca Name being saved:', window.currentPixTransaction.name);\n                    console.log('\ud83d\udcca Quantity being saved:', window.currentPixTransaction.quantity);\n\n                    \/\/ Verificar o que est\u00e1 na tela imediatamente ap\u00f3s definir\n                    const pixTokenQtyCheck = document.getElementById('pix-token-quantity');\n                    console.log('\ud83d\udda5\ufe0f Screen check - pix-token-quantity:', pixTokenQtyCheck ? pixTokenQtyCheck.textContent : 'Element not found');\n\n                    const pixTokenIconCheck = document.getElementById('pix-token-icon');\n                    console.log('\ud83d\udda5\ufe0f Screen check - pix-token-icon alt:', pixTokenIconCheck ? pixTokenIconCheck.alt : 'Element not found');\n\n                } catch (error) {\n                    console.error('\u274c Error in openPixPayment:', error);\n                    console.error('Stack trace:', error.stack);\n\n                    \/\/ Mensagem de erro mais detalhada\n                    let errorMessage = 'Erro ao processar pagamento PIX:\\n';\n                    errorMessage += '\u2022 Erro: ' + error.message + '\\n';\n                    errorMessage += '\u2022 Fun\u00e7\u00e3o: openPixPayment\\n';\n                    errorMessage += '\u2022 Linha: ' + (error.lineNumber || 'desconhecida') + '\\n';\n\n                    \/\/ Log detalhado no console\n                    console.error('Detalhes do erro PIX:');\n                    console.error('- Symbol:', symbol);\n                    console.error('- CryptoName:', cryptoName);\n                    console.error('- Amount:', cryptoAmount);\n                    console.error('- TotalUSD:', totalUSD);\n                    console.error('- Price:', price);\n\n                    alert(errorMessage);\n\n                    if (pixModal) {\n                        pixModal.style.display = 'none';\n                    }\n                }\n            }\n\n            \/\/ Fun\u00e7\u00e3o para gerar c\u00f3digo PIX padr\u00e3o brasileiro (BR Code)\n            function generatePixBRCode(pixKey, amount, merchantName) {\n                \/\/ Gerar c\u00f3digo PIX EMV v\u00e1lido\n\n                \/\/ Fun\u00e7\u00e3o para adicionar campo TLV\n                function addField(id, value) {\n                    const len = value.length;\n                    return id + len.toString().padStart(2, '0') + value;\n                }\n\n                let emvqr = '';\n\n                \/\/ 00 - Payload Format Indicator\n                emvqr += addField('00', '01');\n\n                \/\/ 26 - Merchant Account Information (PIX)\n                let pixData = '';\n                pixData += addField('00', 'BR.GOV.BCB.PIX');\n                pixData += addField('01', pixKey);  \/\/ Chave PIX\n                emvqr += addField('26', pixData);\n\n                \/\/ 52 - Merchant Category Code\n                emvqr += addField('52', '0000');\n\n                \/\/ 53 - Transaction Currency (986 = BRL)\n                emvqr += addField('53', '986');\n\n                \/\/ 54 - Transaction Amount\n                if (amount > 0) {\n                    emvqr += addField('54', amount.toFixed(2));\n                }\n\n                \/\/ 58 - Country Code\n                emvqr += addField('58', 'BR');\n\n                \/\/ 59 - Merchant Name\n                emvqr += addField('59', merchantName.substring(0, 25));\n\n                \/\/ 60 - Merchant City\n                emvqr += addField('60', 'SAO PAULO');\n\n                \/\/ 62 - Additional Data Field Template\n                let additionalData = addField('05', '***');  \/\/ Reference Label\n                emvqr += addField('62', additionalData);\n\n                \/\/ 63 - CRC16 (placeholder)\n                emvqr += '6304';\n\n                \/\/ Calculate CRC16\n                const crc = calculateCRC16(emvqr);\n                emvqr += crc;\n\n                return emvqr;\n            }\n\n            \/\/ Fun\u00e7\u00e3o auxiliar para padding\n            function padLeft(str, len, char) {\n                return String(str).padStart(len, char);\n            }\n\n            \/\/ Fun\u00e7\u00e3o para calcular CRC16 (CCITT)\n            function calculateCRC16(str) {\n                const polynomial = 0x1021;\n                let crc = 0xFFFF;\n\n                for (let i = 0; i < str.length; i++) {\n                    const byte = str.charCodeAt(i);\n                    crc ^= (byte << 8);\n\n                    for (let j = 0; j < 8; j++) {\n                        if ((crc & 0x8000) !== 0) {\n                            crc = (crc << 1) ^ polynomial;\n                        } else {\n                            crc = crc << 1;\n                        }\n                    }\n                }\n\n                crc = crc & 0xFFFF;\n                return crc.toString(16).toUpperCase().padStart(4, '0');\n            }\n\n            \/\/ Fun\u00e7\u00e3o para copiar chave PIX\n            window.copyPixKey = function() {\n                const pixKeyInput = document.getElementById('pix-key-value');\n                if (pixKeyInput) {\n                    pixKeyInput.select();\n                    document.execCommand('copy');\n                    alert('PIX key copied to clipboard!');\n                } else {\n                    console.error('\u274c Element #pix-key-value not found');\n                    alert('Erro: Campo da chave PIX n\u00e3o encontrado');\n                }\n            };\n\n            \/\/ Fun\u00e7\u00e3o segura para fechar modal PIX\n            window.closePixModalSafe = function() {\n                const pixModal = document.getElementById('pix-modal');\n                if (pixModal) {\n                    pixModal.style.display = 'none';\n                } else {\n                    console.error('\u274c Element #pix-modal not found');\n                }\n            };\n\n            \/\/ Fun\u00e7\u00e3o closePixModal foi movida para fora da IIFE (linha 1201)\n\n            \/\/ Inicializar quando o DOM estiver pronto\n            if (document.readyState === 'loading') {\n                document.addEventListener('DOMContentLoaded', init);\n            } else {\n                init();\n            }\n\n            function init() {\n                \/\/ Buscar pre\u00e7os imediatamente\n                fetchPrices();\n\n                \/\/ Atualizar periodicamente\n                setInterval(fetchPrices, UPDATE_INTERVAL);\n            }\n        })();\n        <\/script>\n         \n","protected":false},"excerpt":{"rendered":"\u00daltima atualiza\u00e7\u00e3o: --:--:-- &times; Buy $ Amount () Total: $0.00 &times; exchange Access your account Login Password LOGIN Don't have...","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-3571","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/xysexchange.com\/es\/wp-json\/wp\/v2\/pages\/3571","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xysexchange.com\/es\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/xysexchange.com\/es\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/xysexchange.com\/es\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xysexchange.com\/es\/wp-json\/wp\/v2\/comments?post=3571"}],"version-history":[{"count":25,"href":"https:\/\/xysexchange.com\/es\/wp-json\/wp\/v2\/pages\/3571\/revisions"}],"predecessor-version":[{"id":3635,"href":"https:\/\/xysexchange.com\/es\/wp-json\/wp\/v2\/pages\/3571\/revisions\/3635"}],"wp:attachment":[{"href":"https:\/\/xysexchange.com\/es\/wp-json\/wp\/v2\/media?parent=3571"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}