        </div><!-- Container from header.php closed -->
    </main>
    
    <footer>
        <div class="container">
            <div class="footer-content">
                <div class="footer-section about">
                    <h3><?php echo SITE_NAME; ?></h3>
                    <p>Toko kelontong online terlengkap dengan produk berkualitas dan harga terjangkau.</p>
                    <div class="contact">
                        <span><i class="fas fa-phone"></i> &nbsp; 0812-3456-7890</span>
                        <span><i class="fas fa-envelope"></i> &nbsp; info@warungrakha.com</span>
                    </div>
                    <div class="socials">
                        <a href="#"><i class="fab fa-facebook"></i></a>
                        <a href="#"><i class="fab fa-instagram"></i></a>
                        <a href="#"><i class="fab fa-twitter"></i></a>
                    </div>
                </div>
                
                <div class="footer-section links">
                    <h3>Tautan Cepat</h3>
                    <ul>
                        <li><a href="<?php echo SITE_URL; ?>">Beranda</a></li>
                        <li><a href="<?php echo SITE_URL; ?>products/">Produk</a></li>
                        <li><a href="<?php echo SITE_URL; ?>about.php">Tentang Kami</a></li>
                        <li><a href="<?php echo SITE_URL; ?>contact.php">Kontak</a></li>
                        <li><a href="<?php echo SITE_URL; ?>terms.php">Syarat & Ketentuan</a></li>
                    </ul>
                </div>
                
                <div class="footer-section categories">
                    <h3>Kategori</h3>
                    <ul>
                        <li><a href="<?php echo SITE_URL; ?>products/?category=1">Makanan Pokok</a></li>
                        <li><a href="<?php echo SITE_URL; ?>products/?category=2">Minuman</a></li>
                        <li><a href="<?php echo SITE_URL; ?>products/?category=3">Snack</a></li>
                        <li><a href="<?php echo SITE_URL; ?>products/?category=4">Kebutuhan Rumah Tangga</a></li>
                        <li><a href="<?php echo SITE_URL; ?>products/?category=5">Toiletries</a></li>
                    </ul>
                </div>
            </div>
            
            <div class="footer-bottom">
                &copy; <?php echo date('Y'); ?> <?php echo SITE_NAME; ?> | Semua Hak Dilindungi
            </div>
        </div>
    </footer>
    
    <script src="<?php echo SITE_URL; ?>assets/js/main.js"></script>
    <script>
        // Password visibility toggle function
        function togglePassword(inputId) {
            const passwordInput = document.getElementById(inputId);
            const toggleIcon = document.getElementById(inputId + '-toggle-icon');
            
            if (passwordInput) {
                if (passwordInput.type === 'password') {
                    passwordInput.type = 'text';
                    toggleIcon.classList.remove('fa-eye');
                    toggleIcon.classList.add('fa-eye-slash');
                } else {
                    passwordInput.type = 'password';
                    toggleIcon.classList.remove('fa-eye-slash');
                    toggleIcon.classList.add('fa-eye');
                }
            }
        }
    </script>
    
    <?php if (isUserLoggedIn()): ?>
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // Get the dropdown button and content
            const dropdownBtn = document.getElementById('profileDropdownBtn');
            const dropdownContent = document.getElementById('profileDropdown');
            
            if (dropdownBtn && dropdownContent) {
                // Toggle dropdown visibility when button is clicked
                dropdownBtn.addEventListener('click', function(e) {
                    e.stopPropagation(); // Prevent click from propagating to document
                    dropdownContent.classList.toggle('show');
                });
                
                // Close dropdown when clicking elsewhere on the page
                document.addEventListener('click', function(e) {
                    if (!dropdownBtn.contains(e.target) && !dropdownContent.contains(e.target)) {
                        dropdownContent.classList.remove('show');
                    }
                });
                
                // Prevent dropdown from closing when clicking inside it
                dropdownContent.addEventListener('click', function(e) {
                    // Only stop propagation if clicking on elements that aren't links
                    // to allow navigation when clicking links
                    if (!e.target.closest('a')) {
                        e.stopPropagation();
                    }
                });
            }
        });
    </script>
    <?php endif; ?>
</body>
</html> 