<?php
/**
 * Cookies Policy Template (Pro+ Feature)
 */
defined('ABSPATH') or exit;

/** @var string $fajaedeseo_company_name */
$fajaedeseo_company_name = get_option('fajaedeseo_company_name', get_bloginfo('name'));
/** @var string $fajaedeseo_website_url */
$fajaedeseo_website_url = get_option('fajaedeseo_website_url', home_url());
/** @var string $fajaedeseo_company_email */
$fajaedeseo_company_email = get_option('fajaedeseo_company_email', get_option('admin_email'));
/** @var string $fajaedeseo_cookies_analytics */
$fajaedeseo_cookies_analytics = get_option('fajaedeseo_cookies_analytics', '1');
/** @var string $fajaedeseo_cookies_marketing */
$fajaedeseo_cookies_marketing = get_option('fajaedeseo_cookies_marketing', '1');
/** @var string $fajaedeseo_cookies_functional */
$fajaedeseo_cookies_functional = get_option('fajaedeseo_cookies_functional', '1');
/** @var string $fajaedeseo_cookies_necessary */
$fajaedeseo_cookies_necessary = get_option('fajaedeseo_cookies_necessary', '1');
?>

<p>This Cookies Policy explains how <?php echo esc_html($fajaedeseo_company_name); ?> uses cookies on <?php echo esc_url($fajaedeseo_website_url); ?>.</p>
<p><strong>Last updated: <?php echo esc_html(date_i18n(get_option('date_format'))); ?></strong></p>

<h2>What Are Cookies?</h2>
<p>Cookies are small text files stored on your device. They help websites remember information about you and can improve your browsing experience.</p>

<?php if ($fajaedeseo_cookies_necessary === '1') : ?>
    <h2>Necessary Cookies</h2>
    <p>These cookies are essential for the functioning of our website and cannot be disabled:</p>
    <ul>
        <li><strong>Session Cookies:</strong> Used to maintain your login status and security</li>
        <li><strong>Security Cookies:</strong> Protect against fraudulent transactions and unauthorized access</li>
        <li><strong>Preference Cookies:</strong> Remember your settings and choices</li>
    </ul>
<?php endif; ?>

<?php if ($fajaedeseo_cookies_functional === '1') : ?>
    <h2>Functional Cookies</h2>
    <p>These cookies enable specific functionalities on our website:</p>
    <ul>
        <li>Video and multimedia playback</li>
        <li>Personalized content delivery</li>
        <li>User interaction logging for service improvement</li>
    </ul>
<?php endif; ?>

<?php if ($fajaedeseo_cookies_analytics === '1') : ?>
    <h2>Analytics Cookies</h2>
    <p>We use analytics cookies to understand how visitors interact with our website. This helps us optimize our services. Services we use include:</p>
    <ul>
        <li><strong>Google Analytics:</strong> Tracks page views, user behavior, and traffic sources</li>
        <li><strong>Heatmaps:</strong> Visualizes user interactions and mouse movements</li>
        <li><strong>Session Recordings:</strong> Captures user interactions for UX improvement</li>
    </ul>
<?php endif; ?>

<?php if ($fajaedeseo_cookies_marketing === '1') : ?>
    <h2>Marketing & Advertising Cookies</h2>
    <p>These cookies are used to deliver targeted advertising and track conversion rates:</p>
    <ul>
        <li><strong>Facebook Pixel:</strong> Tracks conversions and audience building</li>
        <li><strong>Google Ads:</strong> Enables remarketing and targeted campaigns</li>
        <li><strong>LinkedIn Insight Tag:</strong> Tracks B2B conversions and audience insights</li>
        <li><strong>Affiliate Tracking:</strong> Monitors referral performance</li>
    </ul>
<?php endif; ?>

<h2>Cookie Consent & Control</h2>
<p>Most web browsers allow you to control cookies through browser settings. You can:</p>
<ul>
    <li>Allow all cookies</li>
    <li>Allow only necessary cookies</li>
    <li>Delete cookies after each browsing session</li>
    <li>Block third-party cookies</li>
</ul>

<h2>GDPR Compliance</h2>
<p>For visitors from the EU, we obtain explicit consent before setting non-essential cookies as required by GDPR. You can withdraw consent at any time through our cookie banner.</p>

<h2>Contact Us</h2>
<p>For questions about our cookies policy, please contact us:</p>
<ul>
    <li>Email: <a href="mailto:<?php echo esc_attr($fajaedeseo_company_email); ?>"><?php echo esc_html($fajaedeseo_company_email); ?></a></li>
</ul>
