    <!-- Footer Start -->
    <div class="container-fluid bg-dark text-light py-5 wow fadeInUp" data-wow-delay="0.3s">
        <div class="container pt-5">
            <div class="row g-5 pt-4">
                <div class="col-lg-3 col-md-6">
                    <h3 class="text-white mb-4">Políticas da Loja</h3>
                    <div class="d-flex flex-column justify-content-start">
                        <a class="text-light mb-2" href="politica.php?slug=politica_entrega"><i class="bi bi-arrow-right text-primary me-2"></i> Política de Entrega</a>
                        <a class="text-light mb-2" href="politica.php?slug=politica_troca_devolucao"><i class="bi bi-arrow-right text-primary me-2"></i> Política de Troca e Devolução</a>
                        <a class="text-light mb-2" href="politica.php?slug=politica_reembolso"><i class="bi bi-arrow-right text-primary me-2"></i> Política de Reembolso</a>
                        <a class="text-light mb-2" href="politica.php?slug=politica_privacidade"><i class="bi bi-arrow-right text-primary me-2"></i> Política de Privacidade</a>
                        <a class="text-light mb-2" href="politica.php?slug=termos_uso"><i class="bi bi-arrow-right text-primary me-2"></i> Termos de Uso</a>
                    </div>
                </div>
                <div class="col-lg-3 col-md-6">
                    <h3 class="text-white mb-4">Departamentos</h3>
                    <div class="d-flex flex-column justify-content-start">
                    <?php
                    // Ensure the connection is open or open it
                    if(!isset($conn)) {
                        include( '../adm/config/db.php' );
                    }
                    $sql_cat = "SELECT id, nome FROM categorias ORDER BY id ASC";
                    $res_cat = $conn->query($sql_cat);
                    if ($res_cat && $res_cat->num_rows > 0) {
                        while ($row_cat = $res_cat->fetch_assoc()) {
                            echo '<a class="text-light mb-2" href="departamento.php?categoria_id=' . htmlspecialchars($row_cat['id']) . '"><i class="bi bi-arrow-right text-primary me-2"></i> ' . htmlspecialchars($row_cat['nome']) . '</a>';
                        }
                    }
                    ?>
                    </div>
                </div>  
                <div class="col-lg-3 col-md-6">
                    <h3 class="text-white mb-4">Seus Contatos</h3>
                    <p class="mb-2"><i class="bi bi-geo-alt text-primary me-2"></i><?= htmlspecialchars($enderecoLoja) ?></p>
                    
                    <?php if (!empty($allEmails)): ?>
                        <?php foreach ($allEmails as $email): ?>
                            <p class="mb-2 small"><i class="bi bi-envelope-open text-primary me-2"></i><?= htmlspecialchars($email) ?></p>
                        <?php endforeach; ?>
                    <?php endif; ?>

                    <?php if (!empty($allTelefones)): ?>
                        <?php foreach ($allTelefones as $tel): ?>
                            <p class="mb-2 small"><i class="bi bi-telephone text-primary me-2"></i><?= htmlspecialchars($tel) ?></p>
                        <?php endforeach; ?>
                    <?php endif; ?>
                </div>

                <div class="col-lg-3 col-md-6">
                    <h3 class="text-white mb-4">Redes Sociais</h3>
                    <div class="d-flex flex-wrap gap-2"> 
                        <?php if (!empty($allWhatsapps)): ?>
                            <?php foreach ($allWhatsapps as $wa): ?>
                                <a class="btn btn-primary btn-lg-square rounded" href="https://wa.me/<?= htmlspecialchars($wa['link']) ?>" target="_blank" title="<?= htmlspecialchars($wa['display']) ?>"><i class="fab fa-whatsapp"></i></a> 
                            <?php endforeach; ?>
                        <?php else: ?>
                            <a class="btn btn-primary btn-lg-square rounded" href="#" onclick="event.preventDefault(); alert('WhatsApp da loja está indisponível');" title="WhatsApp da loja está indisponível"><i class="fab fa-whatsapp"></i></a>
                        <?php endif; ?>

                        <?php if (!empty($allFacebooks)): ?>
                            <?php foreach ($allFacebooks as $fb): ?>
                                <a class="btn btn-primary btn-lg-square rounded" href="<?= htmlspecialchars($fb['link']) ?>" target="_blank" title="<?= htmlspecialchars($fb['display']) ?>"><i class="fab fa-facebook-f"></i></a> 
                            <?php endforeach; ?>
                        <?php endif; ?>

                        <?php if (!empty($allInstagrams)): ?>
                            <?php foreach ($allInstagrams as $ins): ?>
                                <a class="btn btn-primary btn-lg-square rounded" href="<?= htmlspecialchars($ins['link']) ?>" target="_blank" title="<?= htmlspecialchars($ins['display']) ?>"><i class="fab fa-instagram"></i></a> 
                            <?php endforeach; ?>
                        <?php endif; ?>

                        <?php if (!empty($youtubeLoja)): ?>
                            <a class="btn btn-primary btn-lg-square rounded" href="<?= htmlspecialchars($youtubeLoja) ?>" target="_blank" title="YouTube"><i class="fab fa-youtube"></i></a> 
                        <?php endif; ?>
                    </div>
                    <img src="img/certificado1-1024x1024.png" style="width:150px; height:auto; display:block; margin-top:12px;" alt="Certificado"/>
                </div>
  </div>
        </div>
    </div>
    <div class="container-fluid footer-payments-shipping wow fadeInUp" data-wow-delay="0.1s">
        <div class="container">
            <div class="payment-row">
                <h5>Meios de pagamento</h5>
                <div class="icon-list">
                    <img src="img/visa.png" alt="Visa">
                    <img src="img/mastercard.png" alt="Mastercard">
                    <img src="img/amex.png" alt="American Express">
                    <img src="img/boleto.png" alt="Boleto">
                    <img src="img/aura.png" alt="Aura">
                    <img src="img/elo.png" alt="Elo">
                    <img src="img/hipercard.png" alt="Hipercard">
                    <img src="img/discover.png" alt="Discover">
                    <img src="img/diners.png" alt="Diners">
                    <img src="img/pix.png" alt="Pix">
                </div>
            </div>
        </div>
    </div>

    <div class="container-fluid text-light py-4 bg-dark">
        <div class="container">
            <div class="row g-0">
                <div class="col-md-6 text-center text-md-start">
                    <p class="mb-md-0" style="font-size: 0.75rem;"><a class="text-white text-decoration-none" href="#">&reg; &copy; Nome da Loja</a> . Todos os direitos reservados.</p>
                </div>
                <div class="col-md-6 text-center text-md-end">
                    <p class="mb-0" style="font-size: 0.75rem;">by <a class="text-white text-decoration-none" href="https://catalogo44.com.br" target="_blank">https://catalogo44.com.br</a><br>
                    Powered by <a class="text-white text-decoration-none" href="https://arantestecnologia.com.br" target="_blank">arantestecnologia.com.br ∴</a></p>
                </div>
            </div>
        </div>
    </div>
    <!-- Footer End -->


    <!-- Back to Top -->
    <a href="#" class="btn btn-lg btn-primary btn-lg-square rounded back-to-top"><i class="bi bi-arrow-up"></i></a>


    <!-- JavaScript Libraries -->
    <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/js/bootstrap.bundle.min.js"></script>
    <script src="lib/wow/wow.min.js"></script>
    <script src="lib/easing/easing.min.js"></script>
    <script src="lib/waypoints/waypoints.min.js"></script>
    <script src="lib/owlcarousel/owl.carousel.min.js"></script>
    <script src="lib/tempusdominus/js/moment.min.js"></script>
    <script src="lib/tempusdominus/js/moment-timezone.min.js"></script>
    <script src="lib/tempusdominus/js/tempusdominus-bootstrap-4.min.js"></script>
    <script src="https://cdn.jsdelivr.net/gh/mcstudios/glightbox/dist/js/glightbox.min.js"></script>


    <!-- Template Javascript -->
    <script src="js/main.js?v=<?= time() ?>"></script>
    <script>
        // Customização de tema removida para o painel de admin
    </script>

    <!-- LGPD Cookie Banner -->
    <style>
    .cookie-banner {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: var(--dark); /* Usa a cor escura do tema */
        color: var(--light);
        padding: 12px 20px;
        z-index: 9999;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
        font-family: 'Inter', sans-serif;
    }
    .cookie-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 15px;
        max-width: 1200px;
        margin: 0 auto;
        text-align: center;
        font-size: 0.95rem;
    }
    @media (min-width: 768px) {
        .cookie-content {
            flex-direction: row;
            justify-content: center;
            gap: 30px;
        }
    }
    .btn-cookie {
        background-color: var(--primary); /* Usa a cor principal do tema */
        color: #ffffff;
        font-weight: 700;
        font-size: 0.85rem;
        border-radius: 20px;
        padding: 6px 25px;
        border: none;
        transition: opacity 0.3s ease;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    .btn-cookie:hover {
        opacity: 0.8;
        color: #ffffff;
    }
    </style>
    <div id="cookieConsentBanner" class="cookie-banner" style="display: none;">
        <div class="cookie-content">
            <p class="mb-0">Ao navegar por este site <strong>você aceita o uso de cookies</strong> para agilizar a sua experiência de compra.</p>
            <button id="btnAcceptCookies" class="btn btn-cookie">ENTENDI</button>
        </div>
    </div>
    <script>
    document.addEventListener("DOMContentLoaded", function() {
        if (!localStorage.getItem('cookieConsent_cat44')) {
            document.getElementById('cookieConsentBanner').style.display = 'block';
        }
        
        document.getElementById('btnAcceptCookies').addEventListener('click', function() {
            localStorage.setItem('cookieConsent_cat44', 'true');
            var banner = document.getElementById('cookieConsentBanner');
            banner.style.opacity = '0';
            setTimeout(function() {
                banner.style.display = 'none';
            }, 300);
        });
    });
    </script>
</body>

</html>
