/* Carousel container styling */
.clubland-shop-category-carousel {
	display: flex;
	justify-content: center;
	text-align: center;
	overflow: hidden; /* Prevents horizontal scrolling */
	width: 100%;
	padding: 5px 0;
}

/* Removed global html, body rules that were causing heading alignment issues.
   These global rules were interfering with WordPress block layouts.
   Overflow control is handled by the carousel container itself. */

/* Individual category item styling */
.clubland-shop-category-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-decoration: none;
	color: var(--font-color);
	padding: 5px;
	transition: transform 0.3s ease-in-out;
	width: auto;
	height: auto;
	flex-shrink: 0;
	text-align: center;
}

/* Hover effect for category items */
.clubland-shop-category-item:hover {
	transform: scale(1.1);
}

/* Category image styling */
.clubland-shop-category-img {
	display: flex;
	justify-content: center;
	align-items: center;
	width: var(--circle-diameter);
	height: var(--circle-diameter);
	border-radius: 50%;
	background-size: cover; /* Ensures the image fills the entire circle */
	background-position: center;
	overflow: hidden;
	border: solid var(--border-size) var(--outline-color);
	background-repeat: no-repeat;
}

/* Reduce spacing between categories */
.swiper-slide.categories-swiper-slide {
	text-align: center;
	margin-right: 5px ; /* Ensure consistent spacing */
	scroll-snap-align: center;
}

/* Category title styling */
.clubland-shop-category-title {
	font-size: var(--font-size);
	font-weight: 700;
	margin-top: 10px;
	color: var(--font-color);
	text-align: center;
}


.clubland-shop-category-carousel .swiper-container.categories-swiper-container {
	display: flex;
	justify-content: flex-start; /* Start from left */
	align-items: center;
	position: relative;
	margin: 0;
	width: 100%; /* Use full width */
}


.clubland-shop-category-carousel .swiper-container {
	overflow: hidden;
	display: flex;
	justify-content: flex-start; /* Start from left instead of center */
	align-items: center;
	margin: 0;
	width: 100%; /* Use full width instead of fit-content */
	max-width: 100%;
}

.clubland-shop-category-carousel .swiper-slide {
	flex-shrink: 0;
	width: auto !important; /* Allows natural sizing */
	max-width: 200px; /* Ensures a consistent size */
}


.clubland-shop-category-carousel .swiper-wrapper {
	display: flex;
	align-items: flex-start; /* Ensures slides align naturally */
	flex-direction: row;
	scroll-snap-align: start;
	touch-action: pan-y pinch-zoom; /* Allow horizontal pan by Swiper, vertical scroll by browser */
	justify-content: flex-start !important; /* Ensures items align to the left */

	/* REMOVED: transform translateX(0) with !important - this was preventing Swiper from moving slides */
}

/* Mobile-specific overflow control */

@media (max-width: 767px) {

	.clubland-shop-category-carousel .swiper-container {
		padding: 0;
		margin: 0;
		overflow: hidden !important; /* Proper overflow control */
		width: 100%;
		position: relative;
	}

	.clubland-shop-category-carousel .swiper-wrapper {
		padding-right: 0; /* Remove wrapper padding, let Swiper handle offsets */

		/* REMOVED: overflow-x visible with !important - let Swiper handle overflow */
	}

	.clubland-shop-category-carousel .swiper-slide {
		flex-shrink: 0;
		width: 110px !important; /* Fixed width for consistent spacing */
		max-width: 110px;
		min-width: 110px;
	}

	/* Ensure category items inside slides also have consistent sizing */
	.clubland-shop-category-carousel .clubland-shop-category-item {
		width: 100%;
		max-width: 100px; /* Reduced to ensure 3 fit comfortably */
		margin: 0 auto;
	}

	/* Allow natural horizontal scroll within bounds */
	.clubland-shop-category-carousel {
		width: 100%;
		max-width: 100%;
		position: relative;
		overflow: hidden; /* Prevent unwanted overflow */
		margin: 0;
		padding: 0;
	}

	/* Add visual indicator that more items are available */
	.clubland-shop-category-carousel::after {
		content: '';
		position: absolute;
		right: 0;
		top: 0;
		bottom: 0;
		width: 30px;
		background: linear-gradient(to right, transparent, rgba(255,255,255,0.8));
		pointer-events: none;
		z-index: 1;
		opacity: 0;
		transition: opacity 0.3s;
	}

	.clubland-shop-category-carousel.scrolled-left::after {
		opacity: 1;
	}

	/* Removed problematic rule that caused width inconsistency for last 3 slides */
}

/* Additional breakpoint for very small screens */
@media (max-width: 480px) {

	.clubland-shop-category-carousel .swiper-slide {
		max-width: 100px; /* Ensure 3 items fit even on smallest screens */
		min-width: 70px;
	}

	.clubland-shop-category-carousel .clubland-shop-category-item {
		max-width: 90px;
	}

	/* Adjust circle diameter for smaller screens if needed */
	.clubland-shop-category-img {
		max-width: 80px;
		max-height: 80px;
	}
}