<?php

require_once __DIR__ . '/app/helpers.php';
require_once __DIR__ . '/app/analytics.php';
require_once __DIR__ . '/app/public-layout.php';

sparrow_record_analytics_event(
    'page_view',
    'page',
    null,
    'Refund & Return Policy',
    '',
    '/refund-return-policy.php'
);

$policy_css = <<<'CSS'
.policy-page h1,
.policy-page h2,
.policy-page h3 {
    color: var(--sparrow-purple-dark);
}

.policy-page-section {
    margin-top: 22px;
}

.policy-anchor-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.policy-anchor-nav a {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--sparrow-soft-pink);
    border: 1px solid var(--sparrow-border);
    color: var(--sparrow-purple-dark);
    font-weight: bold;
    font-size: 13px;
    text-decoration: none;
}

.policy-anchor-nav a:hover {
    background: #fff;
    text-decoration: none;
}

.policy-card {
    background: var(--sparrow-card);
    border: 1px solid var(--sparrow-border);
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 8px 30px rgba(70,35,60,.06);
}

.policy-card p,
.policy-card li {
    color: var(--sparrow-muted);
    line-height: 1.7;
}

.policy-card ul {
    margin-bottom: 0;
}

.policy-back-top {
    margin-top: 10px;
    text-align: right;
}

.policy-back-top a {
    color: var(--sparrow-purple-dark);
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
}

.policy-back-top a:hover {
    text-decoration: underline;
}

.policy-page .public-hero {
    text-align: center;
}

@media (max-width:850px){
    .policy-anchor-nav{
        justify-content:center;
    }
}
CSS;

sparrow_public_header(
    'Refund & Return Policy',
    'refund-policy',
    $policy_css
);
?>

<div class="policy-page" id="top">

<section class="public-card public-hero">
    <h1>Refund &amp; Return Policy</h1>

    <p>
        Thank you for supporting Sparrow &amp; Seed Creations. Every item is made
        or selected with care, and my goal is for every customer to love what they receive.
    </p>

    <p><strong>Last Updated:</strong> July 3, 2026</p>

    <div class="policy-anchor-nav">
        <a href="#custom">Custom Orders</a>
        <a href="#repairs">Repairs</a>
        <a href="#returns">Returns</a>
        <a href="#refunds">Refunds</a>
        <a href="#damaged">Damaged Items</a>
        <a href="#contact">Questions</a>
    </div>
</section>

<section class="policy-page-section" id="custom">
    <h2>Custom Orders</h2>

    <div class="policy-card">
        <p>
            Every custom order is created specifically for you and cannot be resold.
        </p>

        <ul>
            <li>Custom orders are non-refundable once production has begun.</li>
            <li>Please review all proofs and mockups carefully before approving production.</li>
            <li>Once final approval is given, changes may require additional charges or production time.</li>
        </ul>
    </div>

    <div class="policy-back-top"><a href="#top">Back to top</a></div>
</section>

<section class="policy-page-section" id="repairs">
    <h2>Repairs</h2>

    <div class="policy-card">
        <p>
            I stand behind my work and want your handmade piece to last for years.
        </p>

        <ul>
            <li>Your first repair within one year is complimentary.</li>
            <li>Additional repairs may be available for a reasonable service fee plus return shipping.</li>
            <li>Accidental damage, drops, misuse, or normal wear are evaluated on a case-by-case basis.</li>
        </ul>
    </div>

    <div class="policy-back-top"><a href="#top">Back to top</a></div>
</section>

<section class="policy-page-section" id="returns">
    <h2>Ready-to-Ship Returns</h2>

    <div class="policy-card">
        <p>
            Ready-to-ship products purchased from the online shop may be returned if:
        </p>

        <ul>
            <li>The item is unused and in its original condition.</li>
            <li>A return request is made within 14 days of delivery.</li>
            <li>The item is returned before a refund is issued.</li>
        </ul>

        <p>
            Original shipping charges are not refundable unless the return is the result of my error.
        </p>
    </div>

    <div class="policy-back-top"><a href="#top">Back to top</a></div>
</section>

<section class="policy-page-section" id="refunds">
    <h2>Refunds</h2>

    <div class="policy-card">
        <ul>
            <li>Approved refunds are issued to the original payment method.</li>
            <li>Shipping charges are generally non-refundable.</li>
            <li>Payment processing fees that cannot be recovered may be deducted from the refund.</li>
        </ul>
    </div>

    <div class="policy-back-top"><a href="#top">Back to top</a></div>
</section>

<section class="policy-page-section" id="damaged">
    <h2>Damaged or Incorrect Orders</h2>

    <div class="policy-card">
        <p>
            If your order arrives damaged or you receive the wrong item, please contact me within
            <strong>7 days</strong> of delivery.
        </p>

        <p>
            Photos of the item and packaging may be requested so I can quickly resolve the issue.
        </p>
    </div>

    <div class="policy-back-top"><a href="#top">Back to top</a></div>
</section>

<section class="policy-page-section" id="contact">
    <h2>Questions</h2>

    <div class="policy-card">
        <p>
            If you have any questions before or after placing an order, I'm always happy to help.
            Please reach out through the Contact page or the Custom Order Request form.
        </p>

        <p>
            Thank you for supporting my small business. Every purchase helps support my family and allows me to continue creating products that encourage faith, hope, and joy.
        </p>
    </div>
</section>

</div>

<?php sparrow_public_footer(); ?>