<?php
add_action( 'admin_menu', 'fse_cloths_rental_getting_started' );
function fse_cloths_rental_getting_started() {
	add_theme_page( esc_html__('Get Started', 'fse-cloths-rental'), esc_html__('Get Started', 'fse-cloths-rental'), 'edit_theme_options', 'fse-cloths-rental-guide-page', 'fse_cloths_rental_test_guide');
}

// Add a Custom CSS file to WP Admin Area (kept global: also styles theme-activation admin notices).
function fse_cloths_rental_admin_theme_style() {
	wp_enqueue_style( 'custom-admin-style', esc_url( get_template_directory_uri() ) . '/inc/get-started/get-started.css', array(), wp_get_theme( 'fse-cloths-rental' )->get( 'Version' ) );
}
add_action( 'admin_enqueue_scripts', 'fse_cloths_rental_admin_theme_style' );

// Countdown + copy-to-clipboard script, only on the Get Started page itself.
function fse_cloths_rental_admin_theme_script( $hook ) {
	if ( 'appearance_page_fse-cloths-rental-guide-page' !== $hook ) {
		return;
	}
	$fse_cloths_rental_theme = wp_get_theme( 'fse-cloths-rental' );
	wp_enqueue_script( 'fse-cloths-rental-get-started', esc_url( get_template_directory_uri() ) . '/inc/get-started/js/get-started.js', array(), $fse_cloths_rental_theme->get( 'Version' ), true );
	wp_localize_script( 'fse-cloths-rental-get-started', 'fseClothsRentalGetStarted', array(
		'countdownMinHours' => 48,
		'countdownMaxHours' => 72,
		'copiedText'        => esc_html__( 'Copied!', 'fse-cloths-rental' ),
		'copyText'          => esc_html__( 'Copy', 'fse-cloths-rental' ),
	) );
}
add_action( 'admin_enqueue_scripts', 'fse_cloths_rental_admin_theme_script' );

//guidline for about theme
function fse_cloths_rental_test_guide() {
	$fse_cloths_rental_theme        = wp_get_theme( 'fse-cloths-rental' );
	$fse_cloths_rental_theme_name   = $fse_cloths_rental_theme->get( 'Name' );
	$fse_cloths_rental_description  = $fse_cloths_rental_theme->get( 'Description' );
	$fse_cloths_rental_hero_tagline = wp_trim_words( $fse_cloths_rental_description, 25, '...' );
	$fse_cloths_rental_screenshot   = esc_url( get_template_directory_uri() ) . '/inc/get-started/images/screenshot.png';
	$fse_cloths_rental_premium_img  = esc_url( get_template_directory_uri() ) . '/inc/get-started/images/bundle.png';
?>
	<div class="pm-wrap">

		<div class="pm-quicklinks">
			<a href="<?php echo esc_url( home_url() ); ?>" target="_blank"><?php esc_html_e( 'Visit Site', 'fse-cloths-rental' ); ?></a>
			<span class="pm-sep">/</span>
			<a href="<?php echo esc_url( FSE_CLOTHS_RENTAL_THEME_DOC ); ?>" target="_blank"><?php esc_html_e( 'Free Setup Guide', 'fse-cloths-rental' ); ?></a>
			<span class="pm-sep">/</span>
			<a href="<?php echo esc_url( FSE_CLOTHS_RENTAL_PRO_THEME_DOC ); ?>" target="_blank"><?php esc_html_e( 'Pro Setup Guide', 'fse-cloths-rental' ); ?></a>
			<span class="pm-sep">/</span>
			<a href="<?php echo esc_url( FSE_CLOTHS_RENTAL_SUPPORT ); ?>" target="_blank"><?php esc_html_e( 'Support Forum', 'fse-cloths-rental' ); ?></a>
			<span class="pm-sep">/</span>
			<a href="<?php echo esc_url( FSE_CLOTHS_RENTAL_REVIEW ); ?>" target="_blank"><?php esc_html_e( 'Rate Us', 'fse-cloths-rental' ); ?> &#9733;</a>
		</div>

		<div class="pm-grid">
			<div class="pm-main">

				<div class="pm-hero">
					<div class="pm-hero-content">
						<span class="pm-pill"><?php esc_html_e( 'Premium WordPress Theme', 'fse-cloths-rental' ); ?></span>
						<p class="pm-hero-eyebrow"><?php esc_html_e( 'Welcome to', 'fse-cloths-rental' ); ?></p>
						<h1 class="pm-hero-title"><?php echo esc_html( $fse_cloths_rental_theme_name ); ?></h1>
						<p class="pm-hero-desc"><?php echo esc_html( $fse_cloths_rental_hero_tagline ); ?></p>
						<div class="pm-hero-actions">
							<a class="pm-btn pm-btn-primary" href="<?php echo esc_url( FSE_CLOTHS_RENTAL_BUY_NOW ); ?>" target="_blank">
								<span class="dashicons dashicons-awards"></span><?php esc_html_e( 'Upgrade To Pro', 'fse-cloths-rental' ); ?>
							</a>
							<a class="pm-btn pm-btn-outline" href="<?php echo esc_url( FSE_CLOTHS_RENTAL_PRO_DEMO ); ?>" target="_blank">
								<?php esc_html_e( 'Live Demo', 'fse-cloths-rental' ); ?><span class="dashicons dashicons-external"></span>
							</a>
							<a class="pm-btn pm-btn-outline" href="<?php echo esc_url( FSE_CLOTHS_RENTAL_PRO_THEME_BUNDLE ); ?>" target="_blank">
								<span class="dashicons dashicons-screenoptions"></span><?php esc_html_e( 'Get Theme Bundle', 'fse-cloths-rental' ); ?>
							</a>
						</div>
					</div>
					<div class="pm-hero-media">
						<img src="<?php echo esc_url( $fse_cloths_rental_screenshot ); ?>" alt="<?php echo esc_attr( $fse_cloths_rental_theme_name ); ?>" />
						<span class="pm-hero-badge"><?php esc_html_e( '100% Responsive', 'fse-cloths-rental' ); ?></span>
					</div>
				</div>

				<div class="pm-card pm-about">
					<div class="pm-about-icon"><span class="dashicons dashicons-info-outline"></span></div>
					<div class="pm-about-body">
						<h2><?php
							/* translators: %s: theme name */
							echo esc_html( sprintf( __( 'About %s', 'fse-cloths-rental' ), $fse_cloths_rental_theme_name ) );
						?></h2>
						<p><?php echo esc_html( $fse_cloths_rental_description ); ?></p>
						<div class="pm-feature-row">
							<div class="pm-feature">
								<span class="dashicons dashicons-smartphone"></span>
								<div>
									<strong><?php esc_html_e( 'Modern & Responsive', 'fse-cloths-rental' ); ?></strong>
									<p><?php esc_html_e( 'Looks perfect on all devices', 'fse-cloths-rental' ); ?></p>
								</div>
							</div>
							<div class="pm-feature">
								<span class="dashicons dashicons-search"></span>
								<div>
									<strong><?php esc_html_e( 'SEO Optimized', 'fse-cloths-rental' ); ?></strong>
									<p><?php esc_html_e( 'Built with best SEO practices', 'fse-cloths-rental' ); ?></p>
								</div>
							</div>
							<div class="pm-feature">
								<span class="dashicons dashicons-performance"></span>
								<div>
									<strong><?php esc_html_e( 'Fast & Lightweight', 'fse-cloths-rental' ); ?></strong>
									<p><?php esc_html_e( 'Optimized for speed & performance', 'fse-cloths-rental' ); ?></p>
								</div>
							</div>
							<div class="pm-feature">
								<span class="dashicons dashicons-admin-customizer"></span>
								<div>
									<strong><?php esc_html_e( 'Easy Customization', 'fse-cloths-rental' ); ?></strong>
									<p><?php esc_html_e( 'No coding skills required', 'fse-cloths-rental' ); ?></p>
								</div>
							</div>
						</div>
					</div>
				</div>

				<div class="pm-card pm-quickstart">
					<h2><?php esc_html_e( 'Get Started Quickly', 'fse-cloths-rental' ); ?></h2>
					<div class="pm-quickstart-grid">
						<div class="pm-qs-box">
							<span class="pm-qs-icon pm-qs-purple dashicons dashicons-media-document"></span>
							<h4><?php esc_html_e( 'Theme Documentation', 'fse-cloths-rental' ); ?></h4>
							<p><?php esc_html_e( 'Learn how to set up and use all theme features.', 'fse-cloths-rental' ); ?></p>
							<a class="pm-qs-link pm-qs-link-purple" href="<?php echo esc_url( FSE_CLOTHS_RENTAL_THEME_DOC ); ?>" target="_blank"><?php esc_html_e( 'View Documentation', 'fse-cloths-rental' ); ?></a>
						</div>
						<div class="pm-qs-box">
							<span class="pm-qs-icon pm-qs-green dashicons dashicons-desktop"></span>
							<h4><?php esc_html_e( 'Theme Demo', 'fse-cloths-rental' ); ?></h4>
							<p><?php esc_html_e( 'Preview the theme in action before you start customizing.', 'fse-cloths-rental' ); ?></p>
							<a class="pm-qs-link pm-qs-link-green" href="<?php echo esc_url( FSE_CLOTHS_RENTAL_PRO_DEMO ); ?>" target="_blank"><?php esc_html_e( 'View Demo', 'fse-cloths-rental' ); ?></a>
						</div>
						<div class="pm-qs-box">
							<span class="pm-qs-icon pm-qs-orange dashicons dashicons-admin-appearance"></span>
							<h4><?php esc_html_e( 'Theme Editor', 'fse-cloths-rental' ); ?></h4>
							<p><?php esc_html_e( 'Edit your site appearance and layout.', 'fse-cloths-rental' ); ?></p>
							<a class="pm-qs-link pm-qs-link-orange" href="<?php echo esc_url( admin_url( 'site-editor.php' ) ); ?>" target="_blank"><?php esc_html_e( 'Edit Now', 'fse-cloths-rental' ); ?></a>
						</div>
						<div class="pm-qs-box">
							<span class="pm-qs-icon pm-qs-blue dashicons dashicons-sos"></span>
							<h4><?php esc_html_e( 'Quick Support', 'fse-cloths-rental' ); ?></h4>
							<p><?php esc_html_e( 'Get expert help from our dedicated support team.', 'fse-cloths-rental' ); ?></p>
							<a class="pm-qs-link pm-qs-link-blue" href="<?php echo esc_url( FSE_CLOTHS_RENTAL_SUPPORT ); ?>" target="_blank"><?php esc_html_e( 'Get Support', 'fse-cloths-rental' ); ?></a>
						</div>
					</div>
				</div>

				<div class="pm-premium-banner">
					<div class="pm-premium-left">
						<h3><span class="dashicons dashicons-star-filled"></span><?php esc_html_e( 'Why Go Premium?', 'fse-cloths-rental' ); ?></h3>
						<div class="pm-premium-list">
							<ul>
								<li><span class="dashicons dashicons-yes-alt"></span><?php esc_html_e( 'Advanced Customization Options', 'fse-cloths-rental' ); ?></li>
								<li><span class="dashicons dashicons-yes-alt"></span><?php esc_html_e( 'One-Click Demo Import', 'fse-cloths-rental' ); ?></li>
								<li><span class="dashicons dashicons-yes-alt"></span><?php esc_html_e( 'WooCommerce Integration & Enhanced Features', 'fse-cloths-rental' ); ?></li>
							</ul>
							<ul>
								<li><span class="dashicons dashicons-yes-alt"></span><?php esc_html_e( 'Performance Optimization & SEO-Ready', 'fse-cloths-rental' ); ?></li>
								<li><span class="dashicons dashicons-yes-alt"></span><?php esc_html_e( 'Premium Support & Regular Updates', 'fse-cloths-rental' ); ?></li>
							</ul>
						</div>
					</div>
					<div class="pm-premium-right">
						<p class="pm-premium-from"><?php esc_html_e( 'Starting From', 'fse-cloths-rental' ); ?></p>
						<p class="pm-premium-price"><?php esc_html_e( '$39', 'fse-cloths-rental' ); ?></p>
						<p class="pm-premium-note"><?php esc_html_e( 'One Time Payment', 'fse-cloths-rental' ); ?></p>
						<a class="pm-btn pm-btn-primary" href="<?php echo esc_url( FSE_CLOTHS_RENTAL_BUY_NOW ); ?>" target="_blank">
							<span class="dashicons dashicons-awards"></span><?php esc_html_e( 'Upgrade To Pro', 'fse-cloths-rental' ); ?>
						</a>
					</div>
				</div>

				<div class="pm-stats-row">
					<div class="pm-stat">
						<span class="dashicons dashicons-translation"></span>
						<strong><?php esc_html_e( 'Translation Ready', 'fse-cloths-rental' ); ?></strong>
					</div>
					<div class="pm-stat">
						<span class="dashicons dashicons-block-default"></span>
						<strong><?php esc_html_e( 'Full Site Editing', 'fse-cloths-rental' ); ?></strong>
					</div>
					<div class="pm-stat">
						<span class="dashicons dashicons-welcome-widgets-menus"></span>
						<strong><?php esc_html_e( 'Widget Ready', 'fse-cloths-rental' ); ?></strong>
					</div>
					<div class="pm-stat">
						<span class="dashicons dashicons-shield-alt"></span>
						<strong><?php esc_html_e( 'GPL Licensed', 'fse-cloths-rental' ); ?></strong>
					</div>
				</div>

			</div>

			<div class="pm-sidebar">

				<div class="pm-card pm-offer">
					<span class="pm-offer-badge"><?php esc_html_e( 'LIMITED TIME OFFER', 'fse-cloths-rental' ); ?></span>
					<h3><?php esc_html_e( 'Special Launch Offer!', 'fse-cloths-rental' ); ?></h3>
					<p><?php esc_html_e( 'Get 25% OFF on Our WordPress Theme', 'fse-cloths-rental' ); ?></p>

					<p class="pm-coupon-label"><?php esc_html_e( 'Use Coupon Code:', 'fse-cloths-rental' ); ?></p>
					<div class="pm-coupon">
						<span class="pm-coupon-code"><?php esc_html_e( 'SUMMER25', 'fse-cloths-rental' ); ?></span>
						<button type="button" class="pm-copy-btn" data-copy-text="SUMMER25">
							<span class="dashicons dashicons-clipboard"></span>
						</button>
					</div>

					<p class="pm-offer-price">
						<strong class="pm-price-cancel"><?php esc_html_e( '$39', 'fse-cloths-rental' ); ?></strong>
						<span class="pm-price-final"><?php esc_html_e( '$29.25', 'fse-cloths-rental' ); ?></span>
					</p>

					<div class="pm-countdown" data-countdown>
						<div class="pm-countdown-box"><span data-countdown-days>00</span><small><?php esc_html_e( 'Days', 'fse-cloths-rental' ); ?></small></div>
						<div class="pm-countdown-box"><span data-countdown-hours>00</span><small><?php esc_html_e( 'Hours', 'fse-cloths-rental' ); ?></small></div>
						<div class="pm-countdown-box"><span data-countdown-minutes>00</span><small><?php esc_html_e( 'Minutes', 'fse-cloths-rental' ); ?></small></div>
						<div class="pm-countdown-box"><span data-countdown-seconds>00</span><small><?php esc_html_e( 'Seconds', 'fse-cloths-rental' ); ?></small></div>
					</div>

					<a class="pm-btn pm-btn-primary pm-btn-block" href="<?php echo esc_url( FSE_CLOTHS_RENTAL_BUY_NOW ); ?>" target="_blank">
						<span class="dashicons dashicons-awards"></span><?php esc_html_e( 'GET PREMIUM', 'fse-cloths-rental' ); ?>
					</a>
					<p class="pm-offer-footnote"><?php esc_html_e( 'Offer valid for a limited time only!', 'fse-cloths-rental' ); ?></p>
				</div>

				<div class="pm-card pm-bundle">
					<h3><?php esc_html_e( 'Get Theme Bundle', 'fse-cloths-rental' ); ?></h3>
					<p><?php esc_html_e( '80+ Premium WordPress Themes in one bundle.', 'fse-cloths-rental' ); ?></p>
					<img src="<?php echo esc_url( $fse_cloths_rental_premium_img ); ?>" alt="<?php esc_attr_e( 'Theme bundle preview', 'fse-cloths-rental' ); ?>" />
					<p class="pm-offer-price">
						<strong class="pm-price-cancel"><?php esc_html_e( '$2340', 'fse-cloths-rental' ); ?></strong>
						<span class="pm-price-final"><?php esc_html_e( '$86', 'fse-cloths-rental' ); ?></span>
					</p>
					<a class="pm-btn pm-btn-primary pm-btn-block" href="<?php echo esc_url( FSE_CLOTHS_RENTAL_PRO_THEME_BUNDLE ); ?>" target="_blank">
						<span class="dashicons dashicons-awards"></span><?php esc_html_e( 'Get Theme Bundle', 'fse-cloths-rental' ); ?>
					</a>
				</div>

				<div class="pm-card pm-help">
					<h3><?php esc_html_e( 'Need Help?', 'fse-cloths-rental' ); ?></h3>
					<p><?php esc_html_e( 'Our support team is here to help you succeed. Get expert assistance whenever you need it.', 'fse-cloths-rental' ); ?></p>
					<ul class="pm-help-list">
						<li><span class="dashicons dashicons-yes-alt"></span><?php esc_html_e( 'Quick Response', 'fse-cloths-rental' ); ?></li>
						<li><span class="dashicons dashicons-yes-alt"></span><?php esc_html_e( 'Expert Support', 'fse-cloths-rental' ); ?></li>
						<li><span class="dashicons dashicons-yes-alt"></span><?php esc_html_e( 'Detailed Solutions', 'fse-cloths-rental' ); ?></li>
					</ul>
					<a class="pm-btn pm-btn-dark pm-btn-block" href="<?php echo esc_url( FSE_CLOTHS_RENTAL_SUPPORT ); ?>" target="_blank">
						<span class="dashicons dashicons-format-chat"></span><?php esc_html_e( 'Get Support Now', 'fse-cloths-rental' ); ?>
					</a>
				</div>

			</div>
		</div>
	</div>
<?php } ?>
