Loja
    .bot-button {
        width: 80px;
        height: 80px;
        border-radius: 50%;
        border: none;
        cursor: pointer;
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
        transition: transform 0.3s ease;
        background: url('https://f.ezycourse.net/3064/cm711z7bm05chzt9n774xdnpi.png') center/cover;
    }
    
    .bot-button:hover {
        transform: scale(1.1);
    }
    
    .chat-window {
        position: fixed;
        bottom: 120px;
        right: 20px;
        width: 350px;
        height: 500px;
        background: white;
        border-radius: 15px;
        box-shadow: 0 8px 25px rgba(0,0,0,0.2);
        display: none;
        flex-direction: column;
        z-index: 1001;
    }
    
    .chat-header {
        background: linear-gradient(135deg, #ff6b9d, #ffa726, #42a5f5);
        color: white;
        padding: 15px;
        border-radius: 15px 15px 0 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .chat-messages {
        flex: 1;
        padding: 15px;
        overflow-y: auto;
        background: #f8f9fa;
    }
    
    .message {
        margin-bottom: 10px;
        padding: 10px;
        border-radius: 10px;
        max-width: 80%;
    }
    
    .bot-message {
        background: #e3f2fd;
        align-self: flex-start;
    }
    
    .user-message {
        background: #42a5f5;
        color: white;
        align-self: flex-end;
        margin-left: auto;
    }
    
    .chat-input {
        display: flex;
        padding: 15px;
        border-top: 1px solid #eee;
    }
    
    .chat-input input {
        flex: 1;
        padding: 10px;
        border: 1px solid #ddd;
        border-radius: 20px;
        outline: none;
    }
    
    .chat-input button {
        margin-left: 10px;
        padding: 10px 15px;
        background: #42a5f5;
        color: white;
        border: none;
        border-radius: 20px;
        cursor: pointer;
    }
    
    .loading {
        display: none;
        text-align: center;
        padding: 10px;
        color: #666;
    }
    
    .hotel-card {
        border: 1px solid #ddd;
        border-radius: 10px;
        padding: 15px;
        margin: 10px 0;
        background: white;
    }
    
    .rating {
        color: #ffa726;
        font-weight: bold;
    }
    
    .download-link {
        display: inline-block;
        background: #4caf50;
        color: white;
        padding: 10px 20px;
        text-decoration: none;
        border-radius: 5px;
        margin-top: 10px;
    }
</style>
The Special Service Which We Provide

Our Specialties

image

HIGH TICKET FREEDOM

Lorem, ipsum dolor sit amet consectetur adipisicing elit. Mollitia, quis! Iste debitis id nulla, nesciunt minus enim, ea sed, doloremque
image

Career Mentoring

Lorem, ipsum dolor sit amet consectetur adipisicing elit. Mollitia, quis! Iste debitis id nulla, nesciunt minus enim, ea sed, doloremque
image

Work & Life Balance

Lorem, ipsum dolor sit amet consectetur adipisicing elit. Mollitia, quis! Iste debitis id nulla, nesciunt minus enim, ea sed, doloremque
class BotCrustaceo { constructor() { this.isOpen = false; this.init(); this.setupAutoOpen(); } init() { this.createBotHTML(); this.setupEventListeners(); this.addWelcomeMessage(); } createBotHTML() { const botHTML = `
🦞 Bot Crustáceo - APM Viagens
🦞 A pesquisar informações atualizadas...
`; document.body.insertAdjacentHTML('beforeend', botHTML); } setupEventListeners() { document.getElementById('botButton').addEventListener('click', () => this.toggleChat()); document.getElementById('messageInput').addEventListener('keypress', (e) => { if (e.key === 'Enter') this.sendMessage(); }); } setupAutoOpen() { setTimeout(() => { if (!this.isOpen) { this.toggleChat(); this.addBotMessage("Olá! 🦞 Sou o Bot Crustáceo da APM Viagens. Posso ajudar-te com informações atualizadas sobre hotéis e destinos. Que destino te interessa?"); } }, 2000); } toggleChat() { const chatWindow = document.getElementById('chatWindow'); this.isOpen = !this.isOpen; chatWindow.style.display = this.isOpen ? 'flex' : 'none'; } addWelcomeMessage() { this.addBotMessage("🦞 Bem-vindo! Pergunta-me sobre qualquer hotel ou destino e vou buscar as avaliações mais recentes do Booking e Google Reviews!"); } async sendMessage() { const input = document.getElementById('messageInput'); const message = input.value.trim(); if (!message) return; this.addUserMessage(message); input.value = ''; this.showLoading(true); try { const response = await this.processMessage(message); this.addBotMessage(response); } catch (error) { this.addBotMessage("Desculpa, ocorreu um erro. Tenta novamente! 🦞"); } this.showLoading(false); } async processMessage(message) { // Detectar se é pergunta sobre hotel específico if (this.isHotelQuery(message)) { return await this.getHotelInfo(message); } // Detectar se é pergunta sobre destino if (this.isDestinationQuery(message)) { return await this.getDestinationInfo(message); } // Resposta genérica return this.getGenericResponse(message); } isHotelQuery(message) { const hotelKeywords = ['hotel', 'resort', 'pousada', 'alojamento', 'hospedagem']; return hotelKeywords.some(keyword => message.toLowerCase().includes(keyword)); } isDestinationQuery(message) { const destinations = ['cancun', 'punta cana', 'paris', 'lisboa', 'porto', 'madrid', 'barcelona']; return destinations.some(dest => message.toLowerCase().includes(dest)); } async getHotelInfo(message) { // Simular web scraping (em produção, aqui farias o scraping real) const hotelData = await this.simulateHotelScraping(message); return this.formatHotelResponse(hotelData); } async simulateHotelScraping(query) { // Simular delay de scraping await new Promise(resolve => setTimeout(resolve, 2000)); // Dados simulados (em produção, vêm do Booking/Google) return { name: "Hotel Exemplo", rating: 4.2, totalReviews: 1247, recentReviews: 89, strongPoints: [ "Localização excelente", "Staff muito simpático", "Pequeno-almoço variado", "Piscina limpa" ], weakPoints: [ "WiFi instável", "Ar condicionado barulhento", "Check-in demorado" ], priceRange: "€80-120/noite", lastUpdated: new Date().toLocaleDateString('pt-PT') }; } formatHotelResponse(data) { const response = `

🏨 ${data.name}

⭐ ${data.rating}/5 (${data.totalReviews} avaliações)

Últimas ${data.recentReviews} avaliações analisadas

✅ Pontos Fortes:

    ${data.strongPoints.map(point => `
  • ${point}
  • `).join('')}

⚠️ Pontos Fracos:

    ${data.weakPoints.map(point => `
  • ${point}
  • `).join('')}

Preço médio: ${data.priceRange}

Dados atualizados: ${data.lastUpdated}

📄 Gerar Proposta PDF
`; return response; } async getDestinationInfo(message) { return `🌍 Informações sobre o destino em desenvolvimento. Em breve vou conseguir dar-te dados atualizados sobre os melhores hotéis da região!`; } getGenericResponse(message) { const responses = [ "🦞 Pergunta-me sobre um hotel específico e vou buscar as avaliações mais recentes!", "🏨 Que destino te interessa? Posso ajudar com informações atualizadas!", "🌍 Diz-me o nome de um hotel ou destino e vou analisar as avaliações dos últimos 12 meses!" ]; return responses[Math.floor(Math.random() * responses.length)]; } generatePDF(hotelName) { // Gerar PDF com jsPDF const { jsPDF } = window.jspdf; const doc = new jsPDF(); doc.setFontSize(20); doc.text('APM Viagens - Proposta', 20, 30); doc.setFontSize(12); doc.text(`Hotel: ${hotelName}`, 20, 50); doc.text('Análise baseada em avaliações recentes', 20, 70); // Criar blob e link de download const pdfBlob = doc.output('blob'); const url = URL.createObjectURL(pdfBlob); this.addBotMessage(`

✅ Proposta gerada com sucesso!

📥 Clica aqui para fazer download `); } addUserMessage(message) { const messagesDiv = document.getElementById('chatMessages'); messagesDiv.innerHTML += `
${message}
`; messagesDiv.scrollTop = messagesDiv.scrollHeight; } addBotMessage(message) { const messagesDiv = document.getElementById('chatMessages'); messagesDiv.innerHTML += `
${message}
`; messagesDiv.scrollTop = messagesDiv.scrollHeight; } showLoading(show) { document.getElementById('loading').style.display = show ? 'block' : 'none'; } } // Inicializar o bot quando a página carregar document.addEventListener('DOMContentLoaded', function() { window.botCrustaceo = new BotCrustaceo(); });