/**
 * Sazehbar — recommendation section styles.
 *
 * Self-contained on purpose: these sections appear on pages that do not carry the
 * homepage builder's stylesheet, so nothing here depends on it. Class names are
 * prefixed sz-reco- so they cannot collide with the theme or the builder output.
 *
 * The container stays invisible until the script has filled it, so an empty or
 * failed section leaves no gap in the page.
 */

.sz-reco {
	display: none;
}

.sz-reco.sz-reco-ready {
	display: block;
	max-width: 1440px;
	margin: 0 auto 28px;
	padding: 0 4%;
	direction: rtl;
}

.sz-reco-title {
	margin: 0 0 16px;
	font-size: 1.35rem;
	font-weight: 900;
	color: #e8edf7;
	position: relative;
	padding-right: 14px;
}

.sz-reco-title::before {
	content: '';
	position: absolute;
	right: 0;
	top: .18em;
	bottom: .18em;
	width: 5px;
	border-radius: 4px;
	background: #f97316;
}

/* Flex with a fixed basis instead of a grid: a grid column can be told to grow,
   a flex item with flex-grow 0 and a fixed basis cannot. With one result the row
   simply ends after one card. */
.sz-reco-track {
	display: flex;
	flex-wrap: nowrap;
	justify-content: flex-start;
	gap: 14px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
	padding-bottom: 4px;
}

.sz-reco-track::-webkit-scrollbar {
	display: none;
}

.sz-reco-card {
	/* Never grows, never shrinks, never depends on how many results came back. */
	flex: 0 0 200px;
	width: 200px;
	max-width: 200px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 12px 12px 14px;
	border-radius: 18px;
	background: #151d31;
	border: 1px solid rgba(255, 255, 255, .08);
	text-decoration: none;
	scroll-snap-align: start;
	transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.sz-reco-card:hover {
	transform: translateY(-4px);
	border-color: rgba(249, 115, 22, .45);
	box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}

.sz-reco-media {
	position: relative;
	display: block;
	border-radius: 12px;
	overflow: hidden;
	background: rgba(255, 255, 255, .04);
}

.sz-reco-media img {
	display: block;
	width: 100%;
	height: 132px;
	max-height: 132px;
	object-fit: contain;
	padding: 8px;
	box-sizing: border-box;
}

/* Shown instead of a broken-image icon when the file cannot be loaded. */
.sz-reco-media-empty {
	min-height: 132px;
	background:
		repeating-linear-gradient(135deg, rgba(255, 255, 255, .04) 0 10px, rgba(255, 255, 255, .02) 10px 20px);
}

.sz-reco-badge {
	position: absolute;
	top: 8px;
	right: 8px;
	padding: 5px 9px;
	border-radius: 999px;
	font-size: .74rem;
	font-weight: 900;
	line-height: 1;
	color: #fff;
	background: linear-gradient(135deg, #f97316, #ea580c);
	box-shadow: 0 6px 16px rgba(234, 88, 12, .45);
}

.sz-reco-name {
	margin: 0;
	font-size: .86rem;
	font-weight: 700;
	line-height: 1.85;
	color: #e8edf7;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 3.2em;
}

.sz-reco-card:hover .sz-reco-name {
	color: #f97316;
}

.sz-reco-prices {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	margin-top: auto;
}

.sz-reco-old {
	font-size: .74rem;
	color: #64748b;
	text-decoration: line-through;
}

.sz-reco-new {
	font-size: .95rem;
	font-weight: 900;
	color: #fff;
}

@media (max-width: 768px) {
	.sz-reco.sz-reco-ready {
		padding: 0 3.5%;
		margin-bottom: 20px;
	}

	.sz-reco-title {
		font-size: 1.1rem;
		margin-bottom: 12px;
	}

	.sz-reco-track {
		gap: 10px;
	}

	.sz-reco-card {
		flex: 0 0 46vw;
		width: 46vw;
		max-width: 200px;
		padding: 8px 8px 12px;
		border-radius: 14px;
	}

	.sz-reco-media img {
		height: 104px;
		max-height: 104px;
	}

	.sz-reco-name {
		font-size: .78rem;
		min-height: 3em;
	}

	.sz-reco-new {
		font-size: .86rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sz-reco-card {
		transition: none;
	}

	.sz-reco-card:hover {
		transform: none;
	}
}
