<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('products', function (Blueprint $table) {
            $table->string('landingTitle')->nullable();
            $table->string('landingSubtitle')->nullable();
            $table->string('landingUsageTitle')->nullable();
            $table->string('packageSectionImage')->nullable();
            $table->json('faqs')->nullable();
            $table->json('qualityStandards')->nullable();
            $table->json('usageTips')->nullable();
            $table->string('landingProductImage')->nullable();
            $table->json('landingPackageImages')->nullable();
            $table->json('landingTestimonialImages')->nullable();
            $table->json('gallery')->nullable();
            $table->string('landingProblemTitle')->nullable();
            $table->json('landingProblems')->nullable();
            $table->string('landingSolutionName')->nullable();
            $table->text('landingSolutionDesc')->nullable();
            $table->json('landingSolutionBenefits')->nullable();
            $table->string('landingSolutionImage')->nullable();
            $table->string('landingBenefitsTitle')->nullable();
            $table->string('landingBenefitsSubtitle')->nullable();
            $table->json('landingWhyChooseUs')->nullable();
            $table->string('landingAuthorityTitle')->nullable();
            $table->json('landingAuthorityPoints')->nullable();
            $table->string('landingGuaranteeTitle')->nullable();
            $table->text('landingGuaranteeText')->nullable();
            $table->json('landingProcessSteps')->nullable();
            $table->string('landingCtaTitle')->nullable();
            $table->string('landingCtaSubtitle')->nullable();
            $table->string('landingTheme')->nullable();
            $table->boolean('freeDeliveryEnabled')->default(false);
            $table->json('variant_stock')->nullable();
            $table->string('landingOfferTitle')->nullable();
            $table->string('landingOfferBadge')->nullable();
            $table->string('landingReviewsTitle')->nullable();
            $table->string('landingReviewsSubtitle')->nullable();
            $table->string('landingTrustTitle')->nullable();
            $table->json('landingTrustElements')->nullable();
            $table->string('videoTestimonialUrl')->nullable();
            $table->string('videoTestimonialTitle')->nullable();
            $table->string('comparisonImage1')->nullable();
            $table->string('comparisonLabel1')->nullable();
            $table->string('comparisonImage2')->nullable();
            $table->string('comparisonLabel2')->nullable();
            $table->json('marketingCoupons')->nullable();
        });
    }

    public function down(): void
    {
        Schema::table('products', function (Blueprint $table) {
            $table->dropColumn([
                'landingTitle', 'landingSubtitle', 'landingUsageTitle', 'packageSectionImage',
                'faqs', 'qualityStandards', 'usageTips', 'landingProductImage',
                'landingPackageImages', 'landingTestimonialImages', 'gallery',
                'landingProblemTitle', 'landingProblems', 'landingSolutionName',
                'landingSolutionDesc', 'landingSolutionBenefits', 'landingSolutionImage',
                'landingBenefitsTitle', 'landingBenefitsSubtitle', 'landingWhyChooseUs',
                'landingAuthorityTitle', 'landingAuthorityPoints', 'landingGuaranteeTitle',
                'landingGuaranteeText', 'landingProcessSteps', 'landingCtaTitle',
                'landingCtaSubtitle', 'landingTheme', 'freeDeliveryEnabled',
                'variant_stock', 'landingOfferTitle', 'landingOfferBadge',
                'landingReviewsTitle', 'landingReviewsSubtitle', 'landingTrustTitle',
                'landingTrustElements', 'videoTestimonialUrl', 'videoTestimonialTitle',
                'comparisonImage1', 'comparisonLabel1', 'comparisonImage2',
                'comparisonLabel2', 'marketingCoupons'
            ]);
        });
    }
};
