/**
 * Widget: لیست محصولات مرتبط (Related Products Carousel)
 */

.seoew-related-products {
	position: relative;
	display: flex;
	align-items: center;
	gap: 32px;
	background: linear-gradient(135deg, #eaf5fc 0%, #ffffff 100%);
	border-radius: var(--seoew-radius-lg);
	padding: 28px 32px;
	min-height: 180px;
	overflow: hidden;
	font-family: var(--seoew-font-family);
}

.seoew-related-products__info {
	flex: 0 0 260px;
	min-width: 200px;
}

.seoew-related-products__title {
	margin: 0 0 10px;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.6;
	color: var(--seoew-color-heading);
}

.seoew-related-products__desc {
	margin: 0 0 18px;
	font-size: 13px;
	line-height: 1.8;
	color: var(--seoew-color-text);
}

.seoew-related-products__button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	width: fit-content;
	background: var(--seoew-color-primary);
	color: #ffffff;
	border: none;
	border-radius: var(--seoew-radius-pill);
	padding: 10px 22px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color .25s ease, gap .25s ease;
}

.seoew-related-products__button:hover {
	background: var(--seoew-color-primary-hover);
	color: #ffffff;
	gap: 12px;
}

.seoew-related-products__button-icon {
	display: inline-flex;
	font-size: 1em;
	line-height: 1;
}

.seoew-related-products__button-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.seoew-related-products__carousel {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
}

.seoew-related-products__track {
	display: flex;
	gap: 20px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
	-ms-overflow-style: none;
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
	padding: 4px 24px;
}

.seoew-related-products__track::-webkit-scrollbar {
	display: none;
}

.seoew-related-products__item {
	flex: 0 0 130px;
	scroll-snap-align: start;
	text-align: center;
	position: relative;
}

.seoew-related-products__item:not(:first-child) {
	border-inline-start: 1px solid var(--seoew-color-border);
	padding-inline-start: 20px;
}

.seoew-related-products__item-image {
	position: relative;
	display: block;
	margin: 0 0 12px;
}

.seoew-related-products__item-image img {
	width: 100%;
	height: 110px;
	object-fit: contain;
	display: block;
}

.seoew-related-products__wish {
	position: absolute;
	top: 0;
	inset-inline-end: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	color: var(--seoew-color-text-secondary);
	pointer-events: none;
}

.seoew-related-products__wish svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
}

.seoew-related-products__item-title {
	display: block;
	margin: 0 0 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--seoew-color-heading);
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.seoew-related-products__item-price {
	display: block;
	font-size: 13px;
	font-weight: 700;
	color: var(--seoew-color-primary);
}

.seoew-related-products__item-price del {
	margin-inline-start: 4px;
	font-weight: 400;
	font-size: 11px;
	color: var(--seoew-color-text-secondary);
	opacity: .8;
}

.seoew-related-products__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #ffffff;
	color: var(--seoew-color-primary);
	border: 1px solid var(--seoew-color-border);
	box-shadow: var(--seoew-shadow-soft);
	cursor: pointer;
	transition: color .2s ease, background-color .2s ease;
}

.seoew-related-products__nav:hover {
	background: var(--seoew-color-primary);
	color: #ffffff;
}

.seoew-related-products__nav svg {
	width: 14px;
	height: 14px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
}

.seoew-related-products__nav--prev {
	inset-inline-start: -6px;
}

.seoew-related-products__nav--next {
	inset-inline-end: -6px;
}

.seoew-related-products__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100px;
	border: 1px dashed var(--seoew-color-border);
	border-radius: var(--seoew-radius-md);
	color: var(--seoew-color-text);
	font-family: var(--seoew-font-family);
	font-size: 14px;
	text-align: center;
	padding: 20px;
}

@media (max-width: 767px) {
	.seoew-related-products {
		flex-direction: column;
		align-items: stretch;
		min-height: auto;
		padding: 18px;
		gap: 14px;
	}

	.seoew-related-products__info {
		flex-basis: auto;
		min-width: 0;
	}

	.seoew-related-products__title {
		font-size: 16px;
		margin-bottom: 4px;
	}

	.seoew-related-products__desc {
		margin-bottom: 10px;
	}

	.seoew-related-products__item {
		flex-basis: 96px;
	}

	.seoew-related-products__item-image img {
		height: 78px;
	}

	.seoew-related-products__nav {
		display: none;
	}
}
