/**
 * Theme Name: Blocksy Child
 * Description: Blocksy Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: blocksy
 */

/**
 * Turbocharge AI SEO for hamandtees.com
 * Brand: Ham and Tees | Shipping: $4.25 | Returns: Defective Only (15 Days)
 */
add_filter( 'rank_math/snippet/rich_snippet_product_entity', function( $entity ) {
    // 1. Force Brand
    $entity['brand'] = 'Ham and Tees';

    // 2. Shipping Details ($4.25 Standard)
    $entity['offers']['shippingDetails'] = [
        '@type' => 'OfferShippingDetails',
        'shippingRate' => [
            '@type' => 'MonetaryAmount',
            'value' => '4.25',
            'currency' => 'USD'
        ],
        'deliveryTime' => [
            '@type' => 'ShippingDeliveryTime',
            'handlingTime' => [
                '@type' => 'QuantitativeValue',
                'minValue' => 0,
                'maxValue' => 1,
                'unitCode' => 'DAY'
            ],
            'transitTime' => [
                '@type' => 'QuantitativeValue',
                'minValue' => 5,
                'maxValue' => 7,
                'unitCode' => 'DAY'
            ]
        ]
    ];

    // 3. Return Policy (Damaged/Incorrect Only - 15 Days)
    $entity['offers']['hasMerchantReturnPolicy'] = [
        '@type' => 'MerchantReturnPolicy',
        'applicableCountry' => 'US',
        'returnPolicyCategory' => 'https://schema.org/MerchantReturnFiniteReturnWindow',
        'merchantReturnDays' => 15,
        'returnMethod' => 'https://schema.org/ReturnByMail',
        'itemDefectReturnFees' => 'https://schema.org/FreeReturn',
        'customerRemorseReturnFees' => 'https://schema.org/ReturnFeesCustomerResponsibility',
        'returnFees' => 'https://schema.org/ReturnFeesCustomerResponsibility'
    ];

    return $entity;
});

