/**
 * Frontend Styles for Promotional Slider
 */

.ps-slider-wrapper {
	position: relative;
	width: 100%;
	margin: 0 auto;
}

.ps-slider {
	position: relative;
	width: 100%;
	overflow: hidden;
}

.ps-slides-container {
	position: relative;
	width: 100%;
	overflow: hidden;
	min-height: 200px;
	transition: height 0.3s ease;
}

.ps-slide {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out, visibility 0.6s;
	transform: translateX(100%);
	z-index: 1;
	pointer-events: none;
}

.ps-slide.ps-active {
	opacity: 1;
	visibility: visible;
	transform: translateX(0);
	z-index: 2;
	pointer-events: auto;
}

.ps-slide.ps-prev {
	transform: translateX(-100%);
	z-index: 0;
}

.ps-slide.ps-next {
	transform: translateX(100%);
	z-index: 0;
}

.ps-slide-link {
	display: block;
	width: 100%;
	text-decoration: none;
	position: relative;
	z-index: 1;
}

.ps-slide-image {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	position: relative;
}

.ps-slide-image img {
	display: block;
	width: 100%;
	height: auto;
}

/* Navigation Arrows */
.ps-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0, 0, 0, 0.5);
	border: none;
	color: #fff;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
	transition: background-color 0.3s ease;
	padding: 0;
}

.ps-arrow:hover {
	background: rgba(0, 0, 0, 0.7);
}

.ps-arrow:focus {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.ps-arrow-prev {
	left: 20px;
}

.ps-arrow-next {
	right: 20px;
}

.ps-arrow .dashicons {
	font-size: 24px;
	width: 24px;
	height: 24px;
	color: #fff;
}

/* Dots Navigation */
.ps-dots {
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 10px;
	z-index: 10;
}

.ps-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	border: 2px solid #fff;
	background: transparent;
	cursor: pointer;
	padding: 0;
	transition: background-color 0.3s ease;
}

.ps-dot:hover {
	background: rgba(255, 255, 255, 0.5);
}

.ps-dot.ps-active {
	background: #fff;
}

.ps-dot:focus {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
	/* Hide arrows on mobile */
	.ps-arrow,
	.ps-arrow-prev,
	.ps-arrow-next {
		display: none !important;
	}

	/* Mobile slide display - show partial next slide */
	.ps-slides-container {
		display: flex;
		overflow-x: auto;
		overflow-y: hidden;
		scroll-snap-type: none; /* Disable snap for free dragging */
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		-ms-overflow-style: none;
		scroll-behavior: smooth; /* Smooth scroll for snap animation */
	}

	.ps-slides-container::-webkit-scrollbar {
		display: none;
	}

	.ps-slide {
		position: relative;
		flex: 0 0 90%;
		width: 90%;
		min-width: 90%;
		opacity: 1;
		visibility: visible;
		transform: none;
		z-index: 1;
		pointer-events: auto;
		scroll-snap-align: start;
		margin-right: 2%;
	}

	.ps-slide:last-child {
		margin-right: 0;
	}

	.ps-slide.ps-active {
		transform: none;
	}

	.ps-slide.ps-prev,
	.ps-slide.ps-next {
		transform: none;
	}

	/* Hide dots on mobile */
	.ps-dots {
		display: none !important;
	}
}

/* Thumbnails Navigation */
.ps-thumbnails {
	display: flex;
	gap: 10px;
	justify-content: flex-start;
	padding: 15px 20px;
	background: transparent;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	scroll-behavior: smooth;
	cursor: grab;
	user-select: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	-ms-overflow-style: none;  /* IE and Edge */
	scrollbar-width: none;  /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.ps-thumbnails::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}

.ps-thumbnails:active,
.ps-thumbnails.ps-dragging {
	cursor: grabbing;
}

.ps-thumbnails.ps-dragging .ps-thumbnail {
	pointer-events: none;
}

/* Hide scrollbar but keep scrolling functionality */
.ps-thumbnails::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}

.ps-thumbnails {
	-ms-overflow-style: none;  /* IE and Edge */
	scrollbar-width: none;  /* Firefox */
}

/* Hide thumbnails on mobile */
@media (max-width: 768px) {
	.ps-thumbnails {
		display: none;
	}
}

.ps-thumbnail {
	flex-shrink: 0;
	width: auto;
	height: 80px;
	border: 3px solid transparent;
	cursor: pointer;
	opacity: 0.6;
	transition: opacity 0.3s ease, border-color 0.3s ease;
	overflow: hidden;
	border-radius: 4px;
	background: transparent;
	display: inline-block;
	padding: 0;
	margin: 0;
	line-height: 0;
	vertical-align: middle;
}

.ps-thumbnail:hover {
	opacity: 0.8;
}

.ps-thumbnail.ps-active {
	opacity: 1;
	border-color: #666;
}

.ps-thumbnail img {
	width: auto;
	height: 100%;
	max-width: none;
	display: block;
	pointer-events: none;
	object-fit: contain;
}

/* Responsive Design */
@media (max-width: 768px) {
	.ps-thumbnails {
		padding: 10px;
		gap: 8px;
	}

	.ps-thumbnail {
		height: 60px;
		border-width: 2px;
	}
}

