<?php
/**
 * Welcome Page Template
 *
 * @package YourTheme
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

function welcome_page() {
	$template_uri = esc_url( get_template_directory_uri() );
	?>

	<div id="welcome">
		<div class="admin-wrap">

			<div class="discount-box">

				<div class="discount-content">
					<h2><?php esc_html_e( 'Get Special Discount', 'prime-home-renovation' ); ?></h2>

					<p><?php esc_html_e( 'Copy Code & Save 20% OFF!', 'prime-home-renovation' ); ?></p>

					<div class="coupon-code" onclick="copyCouponCode(this)">
						<?php echo esc_html( 'SAVE20NOW' ); ?>
					</div>

					<div class="buy-button">

						<a href="<?php echo esc_url( 'https://webnotick.com/cart/50531385508132:1?channel=buy_button' ); ?>" target="_blank" rel="noopener noreferrer">
							➤
							<span>
								<?php esc_html_e( 'Buy Now', 'prime-home-renovation' ); ?>
							</span>
						</a>

					</div>

				</div>

			</div>

			<div class="admin-images">

				<img 
					src="<?php echo esc_url( $template_uri . '/wellcome-theme/assets/img/classic.png' ); ?>" 
					alt="<?php esc_attr_e( 'Classic Homepage', 'prime-home-renovation' ); ?>"
				>

				<img 
					src="<?php echo esc_url( $template_uri . '/wellcome-theme/assets/img/modern.png' ); ?>" 
					alt="<?php esc_attr_e( 'Modern Homepage', 'prime-home-renovation' ); ?>"
				>

			</div>

			<div class="theme-guide-box">

				<div class="theme-guide-title">
					<h2><?php esc_html_e( 'Homepage Design Settings', 'prime-home-renovation' ); ?></h2>

					<br>

					<p>
						<?php esc_html_e( 'Easily customize your homepage layout and website appearance using the options below.', 'prime-home-renovation' ); ?>
					</p>
				</div>

				<div class="theme-guide-grid">

					<div class="theme-guide-item">
						<span>1</span>

						<h3><?php esc_html_e( 'Select Homepage', 'prime-home-renovation' ); ?></h3>

						<p>
							<?php esc_html_e( 'Choose between Classic Homepage or Modern Homepage layout design.', 'prime-home-renovation' ); ?>
						</p>
					</div>

					<div class="theme-guide-item">
						<span>2</span>

						<h3><?php esc_html_e( 'Classic & Modern Sections', 'prime-home-renovation' ); ?></h3>

						<p>
							<?php esc_html_e( 'Customize homepage layout with flexible section ordering.', 'prime-home-renovation' ); ?>
						</p>
					</div>

					<div class="theme-guide-item">
						<span>3</span>

						<h3><?php esc_html_e( 'Theme Color', 'prime-home-renovation' ); ?></h3>

						<p>
							<?php esc_html_e( 'Enable or disable custom theme colors for buttons and sections.', 'prime-home-renovation' ); ?>
						</p>
					</div>

					<div class="theme-guide-item">
						<span>4</span>

						<h3><?php esc_html_e( 'Section Order', 'prime-home-renovation' ); ?></h3>

						<p>
							<?php esc_html_e( 'Drag and drop homepage sections to reorder them easily.', 'prime-home-renovation' ); ?>
						</p>
					</div>

					<div class="theme-guide-item">
						<span>5</span>

						<h3><?php esc_html_e( 'Enable / Disable Sections', 'prime-home-renovation' ); ?></h3>

						<p>
							<?php esc_html_e( 'Show or hide homepage sections instantly using checkboxes.', 'prime-home-renovation' ); ?>
						</p>
					</div>

					<div class="theme-guide-item">
						<span>6</span>

						<h3><?php esc_html_e( 'Live Preview', 'prime-home-renovation' ); ?></h3>

						<p>
							<?php esc_html_e( 'All changes appear instantly in the customizer preview window.', 'prime-home-renovation' ); ?>
						</p>
					</div>

				</div>

			</div>

			<div class="admin-buttons">

				<a 
					href="<?php echo esc_url( 'https://www.webnotickdemo.com/prime-home-renovation/' ); ?>" 
					target="_blank" 
					rel="noopener noreferrer"
					class="button button-primary button-hero"
				>
					<?php esc_html_e( 'View Demo', 'prime-home-renovation' ); ?>
				</a>

				<a 
					href="<?php echo esc_url( 'https://webnotick.com/cart/50531385508132:1?channel=buy_button' ); ?>" 
					target="_blank" 
					rel="noopener noreferrer"
					class="button button-hero button2"
				>
					<?php esc_html_e( 'Buy Now', 'prime-home-renovation' ); ?>
				</a>

			</div>

		</div>
	</div>

	<script>
		function copyCouponCode(element) {

			const text = element.innerText;

			navigator.clipboard.writeText(text);

			element.innerText = "Copied!";

			setTimeout(() => {
				element.innerText = text;
			}, 1000);
		}
	</script>

	<?php
}
?>                       