<?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-fitness-gym' ); ?></h2>

					<p><?php esc_html_e( 'Copy Code & Save 20% OFF!', 'prime-fitness-gym' ); ?></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/50337343471908:1?channel=buy_button' ); ?>" target="_blank" rel="noopener noreferrer">
							➤
							<span>
								<?php esc_html_e( 'Buy Now', 'prime-fitness-gym' ); ?>
							</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-fitness-gym' ); ?>"
				>

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

			</div>

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

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

					<br>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

				</div>

			</div>

			<div class="admin-buttons">

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

				<a 
					href="<?php echo esc_url( 'https://webnotick.com/cart/50337343471908:1?channel=buy_button' ); ?>" 
					target="_blank" 
					rel="noopener noreferrer"
					class="button button-hero button2"
				>
					<?php esc_html_e( 'Buy Now', 'prime-fitness-gym' ); ?>
				</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
}
?>