/**
 * کارت محصول + wrap اسلایدر — سکشن محصولات مشابه (صفحه تکی محصول / مقاله).
 */

:is(body.yadak14-single-product .yd-sp-related, body.yadak14-single-post .yd-post-related) .ydh-prod-slider-wrap {
	padding-block: 0.25rem 0.5rem;
}

:is(body.yadak14-single-product .yd-sp-related, body.yadak14-single-post .yd-post-related) .ydh-pcard {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #fff;
	border: 1px solid rgba(226, 229, 235, 0.95);
	border-radius: var(--ydh-radius-lg, 22px);
	overflow: hidden;
	transition: transform 0.28s var(--ydh-ease, ease), box-shadow 0.28s ease, border-color 0.28s ease;
	direction: rtl;
}

:is(body.yadak14-single-product .yd-sp-related, body.yadak14-single-post .yd-post-related) .ydh-pcard:hover {
	transform: translateY(-6px);
	border-color: rgba(221, 5, 8, 0.35);
	box-shadow: var(--ydh-shadow-hover, 0 28px 60px rgba(221, 5, 8, 0.14));
}

:is(body.yadak14-single-product .yd-sp-related, body.yadak14-single-post .yd-post-related) .ydh-pcard__media {
	position: relative;
	display: block;
	aspect-ratio: 1;
	overflow: hidden;
}

:is(body.yadak14-single-product .yd-sp-related, body.yadak14-single-post .yd-post-related) .ydh-pcard__media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	transition: transform 0.35s var(--ydh-ease, ease);
}

:is(body.yadak14-single-product .yd-sp-related, body.yadak14-single-post .yd-post-related) .ydh-pcard:hover .ydh-pcard__media img {
	transform: scale(1.05);
}

:is(body.yadak14-single-product .yd-sp-related, body.yadak14-single-post .yd-post-related) .ydh-pcard__view {
	position: absolute;
	inset-inline: 0.75rem;
	bottom: 0.75rem;
	padding: 0.4rem 0.65rem;
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 800;
	text-align: center;
	color: #fff;
	background: rgba(11, 11, 12, 0.75);
	backdrop-filter: blur(6px);
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.25s ease, transform 0.25s ease;
}

:is(body.yadak14-single-product .yd-sp-related, body.yadak14-single-post .yd-post-related) .ydh-pcard:hover .ydh-pcard__view {
	opacity: 1;
	transform: translateY(0);
}

:is(body.yadak14-single-product .yd-sp-related, body.yadak14-single-post .yd-post-related) .ydh-pcard__badge {
	position: absolute;
	top: 0.7rem;
	inset-inline-start: 0.7rem;
	z-index: 2;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	min-width: 52px;
	padding: 0.35rem 0.5rem;
	border-radius: 12px;
	background: linear-gradient(145deg, #ff4d50, var(--ydh-red, #dd0508));
	color: #fff;
	line-height: 1.1;
	box-shadow: 0 8px 20px rgba(221, 5, 8, 0.35);
}

:is(body.yadak14-single-product .yd-sp-related, body.yadak14-single-post .yd-post-related) .ydh-pcard__badge-val {
	font-size: 0.82rem;
	font-weight: 900;
}

:is(body.yadak14-single-product .yd-sp-related, body.yadak14-single-post .yd-post-related) .ydh-pcard__badge-lbl {
	font-size: 0.62rem;
	font-weight: 700;
}

:is(body.yadak14-single-product .yd-sp-related, body.yadak14-single-post .yd-post-related) .ydh-pcard__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 0.85rem 0.95rem 1rem;
}

:is(body.yadak14-single-product .yd-sp-related, body.yadak14-single-post .yd-post-related) .ydh-pcard__title {
	margin: 0 0 0.55rem;
	font-size: 0.9rem;
	font-weight: 700;
	line-height: 1.55;
	min-height: 2.75em;
}

:is(body.yadak14-single-product .yd-sp-related, body.yadak14-single-post .yd-post-related) .ydh-pcard__title a {
	color: #1f232b;
	text-decoration: none;
}

:is(body.yadak14-single-product .yd-sp-related, body.yadak14-single-post .yd-post-related) .ydh-pcard__footer {
	margin-top: auto;
}

:is(body.yadak14-single-product .yd-sp-related, body.yadak14-single-post .yd-post-related) .ydh-pcard__prices {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.15rem;
}

:is(body.yadak14-single-product .yd-sp-related, body.yadak14-single-post .yd-post-related) .ydh-pcard__old {
	font-size: 0.76rem;
	color: var(--ydh-gray-500, #5c616b);
	text-decoration: line-through;
}

:is(body.yadak14-single-product .yd-sp-related, body.yadak14-single-post .yd-post-related) .ydh-pcard__price {
	font-size: 1rem;
	font-weight: 900;
	color: var(--ydh-red, #dd0508);
	text-decoration: none;
}
