 <!--===// Start: Slider
	=================================--> 
<?php
	$leatherhouse_hero_disabled = get_theme_mod( 'leatherhouse_hero_disabled', true );
	$leatherhouse_hero_text_overlay_disable  = get_theme_mod( 'leatherhouse_hero_text_overlay_disable', false );
	// Theme check
	$activate_theme_data = wp_get_theme(); // getting current theme data.
	$activate_theme      = $activate_theme_data->name;

if ( $leatherhouse_hero_disabled == true ) {
		?>
	<section id="slider-section" class="slider-wrapper">
		<div class="main-slider owl-carousel owl-theme">
			<?php
			if ( 'Leather House' == $activate_theme ) {	
				$image = get_theme_mod('leatherhouse_hero_img', get_template_directory_uri() . '/assets/images/slide-1.webp');
				$title = get_theme_mod('leatherhouse_hero_area_title', 'Effortless Style, Every Day');
				$text = get_theme_mod('leatherhouse_hero_area_desc', 'Take Your Website To New Heights & Build The Website Of Your Dreams');
				$button = get_theme_mod('leatherhouse_hero_area_btn_title', 'Go To Shop');
				$align = get_theme_mod('leatherhouse_hero_content_align', 'center');
				$container_size = get_theme_mod( 'leatherhouse_slider_container_size', 'container-full' );
			} elseif ( 'Modern House' == $activate_theme ) { 
				$image = get_theme_mod('leatherhouse_hero_img', get_template_directory_uri() . '/assets/images/mh-slider.webp');
				$title = get_theme_mod('leatherhouse_hero_area_title', 'Timeless Design, Urban Feel');
				$text = get_theme_mod('leatherhouse_hero_area_desc', 'Discover a curated home theme built for elegance, space, and simplicity.');
				$button = get_theme_mod('leatherhouse_hero_area_btn_title', 'Start Exploring');
				$align = get_theme_mod('leatherhouse_hero_content_align', 'center');
				$container_size = get_theme_mod( 'leatherhouse_slider_container_size', 'container-full' );
			} elseif ( 'NewsCraft' == $activate_theme ) { 
				$image = get_theme_mod('leatherhouse_hero_img', get_template_directory_uri() . '/assets/images/ncs-slider.webp');
				$title = get_theme_mod('leatherhouse_hero_area_title', 'Discover Today"s News Through Smarter, Deeper Insights.');
				$text = get_theme_mod('leatherhouse_hero_area_desc', 'Powerful Headlines Delivered With Insightful, Intelligent Analysis.');
				$button = get_theme_mod('leatherhouse_hero_area_btn_title', 'Subscribe Now');
				$align = get_theme_mod('leatherhouse_hero_content_align', 'left');
				$container_size = get_theme_mod( 'leatherhouse_slider_container_size', 'container-full' );
			}
			
			$link = get_theme_mod('leatherhouse_hero_area_btn_link', '#');
			$open_new_tab = get_theme_mod('leatherhouse_link_new_tab', '_self');

			?>
			<div class="item">
				<?php if ( ! empty( $image ) ) : ?>
					<img src="<?php echo esc_url( $image ); ?>" data-img-url="<?php echo esc_url( $image ); ?>" alt="">
				<?php endif; ?>	
				<div class="theme-slider">
					<div class="theme-table">
						<div class="theme-table-cell">
							<div class="<?php echo esc_attr( $container_size ); ?>">                                
								<div class="theme-content <?php if ( true === $leatherhouse_hero_text_overlay_disable ) { ?> text-overlay <?php } ?> text-<?php echo esc_attr( $align ); ?>" data-animation="fadeIn" data-delay="140ms">

									<?php if ( ! empty( $title ) ) : ?>
										<h1 data-delay="200ms"><?php echo esc_html( $title ); ?> </h1>   
									<?php endif; ?>

									<?php if ( ! empty( $text ) ) : ?>									
										<p  data-delay="500ms"><?php echo esc_html( $text ); ?></p>
									<?php endif; ?>

									<?php if ( ! empty( $button ) ) : ?>
										<a href="<?php echo esc_url( $link ); ?>" target="<?php echo esc_html($open_new_tab); ?>" class="av-btn-primary">
											<?php echo esc_html( $button ); ?> 
										</a>
									<?php endif; ?>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</section>
	<style>
		.main-slider .owl-dots{
			bottom: 10%;
			display: block;
			position: absolute;
			right: 48%;
			background: var(--sp-gradient1);
			border-radius: 8px;
			padding: 6px;
		}
	</style>
	<script>
		jQuery( document ).ready(function() {
			var owlMainSlider = jQuery('.main-slider');
			owlMainSlider.owlCarousel({
				rtl: jQuery("html").attr("dir") == 'rtl' ? true : false,
				items: 1,
				autoHeight: true,
				autoplay: false,
				loop: false,
				navRewind: false,
				dots: false,
				singleItem: true,
				transitionStyle: "fade",
				touchDrag: false,
				mouseDrag: false,
			});
		});
	</script>
	<?php
}
