/*
 * Category Showcase - structural CSS only.
 * No colors, borders or shadows here: all design comes from Elementor controls.
 */

.csw-wrapper {
	position: relative;
	width: 100%;
}

/* ---------- Card ---------- */
.csw-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	box-sizing: border-box;
	overflow: hidden;
	transition: background-color .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.csw-card a {
	text-decoration: none;
	color: inherit;
	display: block;
}

.csw-image {
	display: block;
	overflow: hidden;
	line-height: 0;
}

.csw-image img {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
	object-fit: cover;
}

.csw-title {
	margin: 0;
	transition: color .3s ease;
}

/* ---------- Grid ---------- */
.csw-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* ---------- Slider ---------- */
.csw-slider {
	overflow: hidden;
	position: relative;
}

/*
 * FOUC fix: before Swiper initializes, keep slides in a single non-wrapping row
 * at their computed width (set inline via --csw-spv) instead of one giant image.
 */
.csw-slider:not(.swiper-initialized):not(.swiper-container-initialized) .swiper-wrapper {
	display: flex;
	flex-wrap: nowrap;
}

.csw-slider:not(.swiper-initialized):not(.swiper-container-initialized) .swiper-slide {
	width: auto;
	flex-shrink: 0;
	flex-basis: calc( ( 100% - ( var(--csw-spv, 4) - 1 ) * var(--csw-gap, 0px) ) / var(--csw-spv, 4) );
	margin-right: var(--csw-gap, 0px);
}

.csw-slider .swiper-slide {
	height: auto;
	box-sizing: border-box;
}

/* Navigation positioning only (appearance inherits from Elementor/Swiper). */
.csw-wrapper .csw-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	line-height: 1;
	aspect-ratio: 1/1;
	user-select: none;
}

.csw-wrapper .csw-prev { left: 0; }
.csw-wrapper .csw-next { right: 0; }

.csw-wrapper .csw-nav.swiper-button-disabled {
	cursor: default;
}

.csw-wrapper .csw-pagination {
	position: relative;
	margin-top: 15px;
	text-align: center;
	line-height: 0;
}

.csw-wrapper .csw-pagination .swiper-pagination-bullet {
	margin: 0 4px;
}
