<?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::create('homepage_themes', function (Blueprint $table) {
            $table->id();
            $table->string('name')->unique(); // dark, light, professional, colorful, minimal
            $table->string('label')->nullable(); // Display name
            $table->text('description')->nullable();
            $table->boolean('is_active')->default(false);
            $table->integer('sort_order')->default(0);
            
            // Theme CSS variables
            $table->text('hero_bg_gradient')->nullable();
            $table->string('hero_title_color')->nullable();
            $table->string('hero_subtitle_color')->nullable();
            $table->string('primary_color')->nullable();
            $table->string('accent_color')->nullable();
            $table->string('background_color')->nullable();
            $table->string('text_color')->nullable();
            $table->string('border_color')->nullable();
            
            // Additional theme options
            $table->string('hero_style')->default('modern'); // modern, classic, gradient, animated
            $table->string('card_style')->default('elevated'); // elevated, flat, outlined
            $table->string('button_style')->default('gradient'); // gradient, solid, outlined
            $table->boolean('show_animations')->default(true);
            $table->string('font_family')->default('Inter');
            
            // Custom CSS
            $table->text('custom_css')->nullable();
            $table->text('hero_html_override')->nullable(); // Custom hero HTML
            
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('homepage_themes');
    }
};
