/* ==========================================================================
   Probit Products Block
   ========================================================================== */

.products {
	--products-gap: 24px;
	background: linear-gradient(180deg, #ffffff 0%, #f6f8fb 100%);
	position: relative;
	overflow: hidden;
}

.products::before {
	content: '';
	position: absolute;
	top: -120px;
	right: -80px;
	width: 420px;
	height: 420px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(59, 111, 255, 0.06) 0%, transparent 70%);
	pointer-events: none;
}

.products .container {
	position: relative;
	z-index: 1;
	max-width: var(--container-wide);
	margin-left: auto;
	margin-right: auto;
}

.products__header {
	text-align: center;
	max-width: 920px;
	margin-left: auto;
	margin-right: auto;
	margin-bottom: 52px;
}

.products__header.section-header--center {
	max-width: 920px;
}

.products__header .section-eyebrow,
.products__header .section-title,
.products__header .section-desc {
	text-align: center;
}

.products__header .section-title {
	max-width: 100%;
}

.products__header .section-desc {
	margin-left: auto;
	margin-right: auto;
	max-width: 820px;
}

.products__grid {
	display: grid;
	grid-template-columns: repeat(var(--slides-per-view, 3), minmax(0, 1fr));
	gap: var(--products-gap);
	align-items: stretch;
	justify-content: center;
}

.products__grid--placeholder,
.products__grid--centered {
	grid-template-columns: repeat(auto-fit, minmax(280px, 380px));
	justify-content: center;
	justify-items: stretch;
	max-width: 100%;
}

/* Slider */
.products-slider {
	position: relative;
}

.products-slider__dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 36px;
	min-height: 10px;
}

.products-slider__dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: none;
	border-radius: 999px;
	background: #cbd5e1;
	cursor: pointer;
	transition: background 0.25s ease, width 0.25s ease;
}

.products-slider__dot.is-active {
	width: 28px;
	background: var(--color-primary);
}

.products-slider__frame {
	position: relative;
	padding: 0 56px;
}

.products-slider__arrow {
	position: absolute;
	top: 38%;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid #e2e8f0;
	border-radius: 50%;
	background: var(--color-white);
	color: var(--color-primary);
	box-shadow: 0 4px 16px rgba(15, 27, 45, 0.08);
	cursor: pointer;
	transform: translateY(-50%);
	transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

.products-slider__arrow--prev {
	left: 0;
}

.products-slider__arrow--next {
	right: 0;
}

.products-slider__arrow:hover {
	background: var(--color-primary);
	color: var(--color-white);
	border-color: var(--color-primary);
	box-shadow: 0 8px 22px rgba(59, 111, 255, 0.3);
}

.products-slider__arrow:disabled {
	opacity: 0.35;
	cursor: not-allowed;
	pointer-events: none;
}

.products-slider__viewport {
	--slides-per-view: 3;
	--slide-width: calc((100% - (var(--slides-per-view) - 1) * var(--products-gap)) / var(--slides-per-view));
	overflow: hidden;
	width: 100%;
	padding: 12px 0 28px;
	margin: -12px 0 -28px;
	cursor: grab;
	touch-action: pan-y;
	user-select: none;
}

.products-slider__viewport.is-dragging {
	cursor: grabbing;
}

.products-slider__viewport.is-dragging a.product-card__cta {
	pointer-events: none;
}

.products-slider__track {
	display: flex;
	gap: var(--products-gap);
	transition: transform 0.55s cubic-bezier(0.25, 0.8, 0.25, 1);
	will-change: transform;
	align-items: stretch;
}

.products-slider.is-centered .products-slider__track {
	justify-content: center;
	width: 100%;
}

.products-slider.is-centered .products-slider__track .product-card {
	flex: 0 0 min(400px, var(--slide-width));
	width: min(400px, var(--slide-width));
	max-width: 100%;
}

.products-slider__track .product-card {
	flex: 0 0 var(--slide-width);
	width: var(--slide-width);
	min-width: 0;
	box-sizing: border-box;
}

/* Product cards */
.product-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	border-radius: 16px;
	overflow: hidden;
	background: var(--color-white);
	border: 1px solid #e8edf3;
	box-shadow: 0 6px 24px rgba(15, 27, 45, 0.06);
	text-decoration: none;
	color: inherit;
	transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

@media (hover: hover) and (pointer: fine) {
	.product-card:hover {
		transform: translateY(-6px);
		border-color: rgba(59, 111, 255, 0.18);
		box-shadow: 0 16px 40px rgba(15, 27, 45, 0.1);
	}

	.product-card--placeholder:hover {
		transform: none;
		box-shadow: 0 6px 24px rgba(15, 27, 45, 0.06);
		border-color: #e8edf3;
	}

	.product-card:hover .product-card__media img {
		transform: scale(1.04);
	}

	.product-card__cta:hover,
	.product-card:hover .product-card__cta {
		gap: 10px;
	}
}

.product-card__media {
	aspect-ratio: 2 / 1;
	background: #eef2f7;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.product-card__media img,
.product-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	pointer-events: none;
	-webkit-user-drag: none;
	transition: transform 0.5s ease;
}

.product-card__media-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #e8eef8 0%, #dce6f5 100%);
}

.product-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 18px 22px 20px;
	background: var(--color-white);
}

.product-card__heading {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}

.product-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	flex-shrink: 0;
	border-radius: 10px;
	background: rgba(59, 111, 255, 0.1);
	color: var(--color-primary);
}

.product-card__icon svg {
	width: 22px;
	height: 22px;
}

.product-card__title {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.3;
	color: #0f1b2d;
}

.product-card__desc {
	margin: 0 0 14px;
	flex: 1;
	font-size: 0.9375rem;
	line-height: 1.65;
	color: #64748b;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.product-card__cta {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 6px;
	margin-top: auto;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--color-primary);
	text-decoration: none;
	transition: gap 0.25s ease;
}

@media (min-width: 992px) {
	.products__header {
		max-width: 980px;
		margin-bottom: 56px;
	}

	.products__header.section-header--center {
		max-width: 980px;
	}

	.products__header .section-desc {
		max-width: 880px;
	}

	.product-card__desc {
		-webkit-line-clamp: 4;
	}
}

@media (max-width: 1200px) {
	.products__grid:not(.products__grid--placeholder):not(.products__grid--centered) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.products-slider__frame {
		padding: 0 48px;
	}
}

@media (max-width: 991px) {
	.products__header {
		max-width: 720px;
	}

	.products__header.section-header--center {
		max-width: 720px;
	}

	.products__header .section-desc {
		max-width: 640px;
	}

	.product-card__desc {
		-webkit-line-clamp: 3;
	}
}

@media (max-width: 768px) {
	.products {
		--products-gap: 16px;
	}

	.products__header {
		max-width: 100%;
		margin-bottom: 28px;
	}

	.products__header.section-header--center {
		max-width: 100%;
	}

	.products__header .section-desc {
		max-width: 100%;
	}

	.products__grid:not(.products__grid--placeholder):not(.products__grid--centered) {
		grid-template-columns: 1fr;
	}

	.products__grid--placeholder,
	.products__grid--centered {
		grid-template-columns: minmax(0, 1fr);
		max-width: 420px;
		margin-left: auto;
		margin-right: auto;
	}

	.products-slider__frame {
		padding: 0;
	}

	.products-slider__viewport {
		--slides-per-view: 1;
		--slide-width: 100%;
	}

	.products-slider__arrow {
		display: none;
	}

	.products-slider__dots {
		margin-top: 24px;
	}

	.product-card__body {
		padding: 16px;
	}

	.product-card__title {
		font-size: 0.9875rem;
	}

	.product-card__desc {
		font-size: 0.8125rem;
		-webkit-line-clamp: 3;
	}
}
