<?php 
$pageTitle = "Contatos - CATÁLOGO 44";
include 'header.php'; 
?>

    <!-- Hero Start -->
    <div class="container-fluid bg-primary py-5 hero-header mb-5">
        <div class="row py-3">
            <div class="col-12 text-center">
                <h1 class="display-3 text-white animated zoomIn">Fale Conosco</h1>
                <a href="index.php" class="h4 text-white">Início</a>
                <i class="far fa-circle text-white px-2"></i>
                <span class="h4 text-white">Contatos</span>
            </div>
        </div>
    </div>
    <!-- Hero End -->


    <!-- Contact Start -->
    <div class="container-fluid py-5">
        <div class="container">
            <div class="row g-5">
                <div class="col-xl-4 col-lg-6 wow slideInUp" data-wow-delay="0.1s">
                    <div class="bg-light rounded h-100 p-5">
                        <div class="section-title">
                            <h5 class="position-relative d-inline-block text-primary text-uppercase">Contato</h5>
                            <h1 class="display-6 mb-4">Sinta-se à vontade para nos contatar</h1>
                        </div>
                        <div class="d-flex align-items-center mb-4">
                            <i class="bi bi-geo-alt fs-1 text-primary me-3"></i>
                            <div class="text-start">
                                <h5 class="mb-0">Nosso Endereço</h5>
                                <span><?= htmlspecialchars($enderecoLoja) ?></span>
                            </div>
                        </div>

                        <?php if (!empty($allEmails)): ?>
                            <div class="d-flex align-items-start mb-4">
                                <i class="bi bi-envelope-open fs-1 text-primary me-3"></i>
                                <div class="text-start">
                                    <h5 class="mb-0">Nossos E-mails</h5>
                                    <?php foreach ($allEmails as $email): ?>
                                        <div class="mb-1"><a href="mailto:<?= htmlspecialchars($email) ?>" class="text-secondary"><?= htmlspecialchars($email) ?></a></div>
                                    <?php endforeach; ?>
                                </div>
                            </div>
                        <?php endif; ?>

                        <?php if (!empty($allTelefones)): ?>
                            <div class="d-flex align-items-start mb-4">
                                <i class="bi bi-phone-vibrate fs-1 text-primary me-3"></i>
                                <div class="text-start">
                                    <h5 class="mb-0">Ligue para Nós</h5>
                                    <?php foreach ($allTelefones as $tel): ?>
                                        <div class="mb-1"><a href="tel:<?= preg_replace('/[^0-9]/', '', $tel) ?>" class="text-secondary"><?= htmlspecialchars($tel) ?></a></div>
                                    <?php endforeach; ?>
                                </div>
                            </div>
                        <?php endif; ?>

                        <?php if (!empty($allWhatsapps)): ?>
                            <div class="d-flex align-items-start mb-4">
                                <i class="bi bi-whatsapp fs-1 text-primary me-3"></i>
                                <div class="text-start">
                                    <h5 class="mb-0">WhatsApp</h5>
                                    <?php foreach ($allWhatsapps as $wa): ?>
                                        <div class="mb-1"><a href="https://wa.me/<?= htmlspecialchars($wa['link']) ?>" target="_blank" class="text-secondary"><?= htmlspecialchars($wa['display']) ?></a></div>
                                    <?php endforeach; ?>
                                </div>
                            </div>
                        <?php else: ?>
                             <div class="d-flex align-items-start mb-4">
                                <i class="bi bi-whatsapp fs-1 text-primary me-3"></i>
                                <div class="text-start">
                                    <h5 class="mb-0">WhatsApp</h5>
                                    <div class="mb-1"><a href="#" onclick="event.preventDefault(); alert('WhatsApp da loja está indisponível');" class="text-secondary">WhatsApp da loja está indisponível</a></div>
                                </div>
                            </div>
                        <?php endif; ?>

                        <?php if (!empty($allInstagrams) || !empty($allFacebooks)): ?>
                            <div class="d-flex align-items-start">
                                <i class="bi bi-share fs-1 text-primary me-3"></i>
                                <div class="text-start">
                                    <h5 class="mb-0">Redes Sociais</h5>
                                    <div class="d-flex flex-wrap gap-2 mt-2">
                                        <?php foreach ($allFacebooks as $fb): ?>
                                            <a class="btn btn-primary btn-sm-square rounded" href="<?= htmlspecialchars($fb['link']) ?>" target="_blank"><i class="fab fa-facebook-f"></i></a>
                                        <?php endforeach; ?>
                                        <?php foreach ($allInstagrams as $ins): ?>
                                            <a class="btn btn-primary btn-sm-square rounded" href="<?= htmlspecialchars($ins['link']) ?>" target="_blank"><i class="fab fa-instagram"></i></a>
                                        <?php endforeach; ?>
                                        <?php if (!empty($youtubeLoja)): ?>
                                            <a class="btn btn-primary btn-sm-square rounded" href="<?= htmlspecialchars($youtubeLoja) ?>" target="_blank"><i class="fab fa-youtube"></i></a>
                                        <?php endif; ?>
                                    </div>
                                </div>
                            </div>
                        <?php endif; ?>
                    </div>
                </div>
                <div class="col-xl-4 col-lg-6 wow slideInUp" data-wow-delay="0.3s">
                    <form>
                        <div class="row g-3">
                            <div class="col-12">
                                <input type="text" class="form-control border-0 bg-light px-4" placeholder="Seu Nome" style="height: 55px;">
                            </div>
                            <div class="col-12">
                                <input type="email" class="form-control border-0 bg-light px-4" placeholder="Seu E-mail" style="height: 55px;">
                            </div>
                            <div class="col-12">
                                <input type="text" class="form-control border-0 bg-light px-4" placeholder="Assunto" style="height: 55px;">
                            </div>
                            <div class="col-12">
                                <textarea class="form-control border-0 bg-light px-4 py-3" rows="5" placeholder="Sua Mensagem"></textarea>
                            </div>
                            <div class="col-12">
                                <button class="btn btn-primary w-100 py-3" type="submit">Enviar Mensagem</button>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="col-xl-4 col-lg-12 wow slideInUp" data-wow-delay="0.6s">
                    <iframe class="position-relative rounded w-100 h-100"
                        src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d122295.45263653112!2d-49.33644465494918!3d-16.680695000000002!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x935ef67319bfafdf%3A0xe7a50ca43fcbf435!2sGoi%C3%A2nia%2C%20State%20of%20Goi%C3%A1s%2C%20Brazil!5e0!3m2!1sen!2sbd!4v1603794290143!5m2!1sen!2sbd"
                        frameborder="0" style="min-height: 400px; border:0;" allowfullscreen="" aria-hidden="false"
                        tabindex="0"></iframe>
                </div>
            </div>
        </div>
    </div>
    <!-- Contact End -->

    <!-- Newsletter Start -->
    <div class="container-fluid position-relative pt-5 wow fadeInUp" data-wow-delay="0.1s" style="z-index: 1;">
        <div class="container">
            <div class="bg-primary p-5">
                <form class="mx-auto" style="max-width: 600px;">
                    <div class="input-group">
                        <input type="text" class="form-control border-white p-3" placeholder="Seu E-mail">
                        <button class="btn btn-dark px-4">Inscreva-se</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <!-- Newsletter End -->

<?php $marginTop = 'style="margin-top: -75px;"'; include 'footer.php'; ?>
