/**
 * CBS Products Carousel
 * Version: 1.0.0
 * Author: Dan Lee
 *
 * Reproduces the JetEngine "Products Carousel" listing (template 2966) as
 * measured on custombiogenics.com. Breakpoints follow Elementor's defaults
 * (tablet <= 1024px, mobile <= 767px). Slides per view are set here through
 * --cbs-pc-per-view; the script reads that value.
 */

.cbs-pc {
	--cbs-pc-per-view: var(--cbs-pc-cols, 3);
	position: relative;
}

.cbs-pc *,
.cbs-pc *::before,
.cbs-pc *::after {
	box-sizing: border-box;
}

/* ---- Slider frame ------------------------------------------------------ */

.cbs-pc__slider {
	position: relative;
}

/* The negative margin lines the card edges up with the container, as
   JetEngine's grid did (10px padding on each slide). */
.cbs-pc__viewport {
	overflow: hidden;
	margin: 0 -10px;
	touch-action: pan-y;
}

.cbs-pc__track {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	will-change: transform;
}

.cbs-pc__slide {
	display: flex;
	flex: 0 0 calc(100% / var(--cbs-pc-per-view));
	max-width: calc(100% / var(--cbs-pc-per-view));
	padding: 10px;
}

/* ---- Card -------------------------------------------------------------- */

.cbs-pc__card {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 20px;
	width: 100%;
	padding: 0;
	border: 20px solid #e5e5e8;
}

.cbs-pc__body {
	display: flex;
	flex-direction: column;
	gap: 0;
	padding: 10px;
}

.cbs-pc__title-wrap {
	padding-top: 6%;
	text-align: center;
}

.cbs-pc .cbs-pc__title {
	margin: 0;
	padding: 0;
	font-family: "HelveticaNowText", Sans-serif;
	font-size: 35px;
	font-weight: 700;
	line-height: 1;
	color: #145eaa;
	text-align: center;
}

.cbs-pc__divider {
	display: flex;
	padding: 15px 0;
}

.cbs-pc__divider-line {
	display: block;
	width: 50px;
	margin: 0 auto;
	border-top: 2px solid #e5e5e8;
}

.cbs-pc__text {
	padding: 0 8%;
	font-family: "HelveticaNowText", Sans-serif;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.5;
	color: var(--e-global-color-text, #183454);
	text-align: center;
}

.cbs-pc__text p {
	margin: 0 0 0.9em;
}

.cbs-pc__text p:last-child {
	margin-bottom: 0;
}

.cbs-pc__lower {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 20px;
	padding: 0;
}

/* 300px box with 8% padding gives the 252x350 image the site shows. */
.cbs-pc__media {
	width: 300px;
	max-width: 100%;
}

.cbs-pc__media-inner {
	padding: 0 8%;
}

.cbs-pc .cbs-pc__image {
	display: block;
	width: 100%;
	max-width: 100%;
	height: 350px;
	object-fit: cover;
}

.cbs-pc__footer {
	display: flex;
	flex-direction: column;
	align-self: stretch;
	padding: 10px;
	border-top: 2px solid #e5e5e8;
}

.cbs-pc__button-wrap {
	padding: 4% 8%;
	text-align: center;
}

.cbs-pc .cbs-pc__button,
.cbs-pc .cbs-pc__button:visited {
	display: inline-block;
	padding: 12px 24px;
	border-radius: 0;
	background-color: #509bdc;
	color: #fff;
	font-family: "HelveticaNowText", Sans-serif;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 1.5px;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 0.3s;
}

.cbs-pc .cbs-pc__button:hover,
.cbs-pc .cbs-pc__button:focus {
	background-color: #145eaa;
	color: #fff;
	text-decoration: none;
}

/* ---- Dots -------------------------------------------------------------- */

.cbs-pc .jet-slick-dots {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin: 30px 0 10px;
	padding: 0;
	list-style: none;
}

.cbs-pc .jet-slick-dots li {
	width: 10px;
	height: 10px;
	margin: 0 5px;
	padding: 0;
	overflow: hidden;
	border-radius: 100%;
	background: #eee;
	cursor: pointer;
}

.cbs-pc .jet-slick-dots li.slick-active,
.cbs-pc .jet-slick-dots li:hover {
	background: #145eaa;
}

.cbs-pc .jet-slick-dots button {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 100%;
	background: transparent;
	cursor: pointer;
}

.cbs-pc .jet-slick-dots button:focus-visible {
	outline: 2px solid #145eaa;
	outline-offset: 2px;
}

/* Dots do nothing until the script has started. */
.cbs-pc:not(.cbs-pc--ready) .jet-slick-dots {
	visibility: hidden;
}

/* Fewer items than slides to show: nothing to slide. */
.cbs-pc--static .jet-slick-dots {
	display: none;
}

/* ---- Breakpoints (Elementor defaults) ---------------------------------- */

@media (max-width: 1024px) {
	.cbs-pc {
		--cbs-pc-per-view: var(--cbs-pc-cols-tablet, 3);
	}

	.cbs-pc .cbs-pc__title {
		font-size: 30px;
	}
}

@media (max-width: 767px) {
	.cbs-pc {
		--cbs-pc-per-view: var(--cbs-pc-cols-mobile, 1);
	}

	.cbs-pc__viewport {
		margin: 0;
	}

	.cbs-pc__slide {
		padding: 0;
	}
}
