/*
 * Elementor Random Products
 * Without JavaScript the row is a normal horizontally scrollable list.
 * With JavaScript (.erp--js) it becomes the continuously moving track.
 */

.erp {
	--erp-card-w: 280px;
	--erp-gap: 16px;
	--erp-ratio: 4 / 5;
	--erp-fade: 60px;
	--erp-star: #f5a623;
	position: relative;
	width: 100%;
	max-width: 100%;
}

.erp__viewport {
	overflow-x: auto;
	overflow-y: hidden;
	scrollbar-width: none;
	-ms-overflow-style: none;
	touch-action: pan-y;
	outline: 0;
}

.erp__viewport::-webkit-scrollbar {
	display: none;
}

.erp--js .erp__viewport {
	overflow: hidden;
}

.erp--js.erp--draggable .erp__viewport {
	cursor: grab;
}

.erp--dragging .erp__viewport {
	cursor: grabbing;
	user-select: none;
	-webkit-user-select: none;
}

.erp__track {
	display: flex;
	width: max-content;
	direction: ltr; /* The track math is always left-to-right; card text follows the site direction. */
	will-change: transform;
	transition: opacity 0.25s ease;
}

.erp--swapping .erp__track {
	opacity: 0;
}

.erp__set {
	display: flex;
	flex: 0 0 auto;
	gap: var(--erp-gap);
	padding-right: var(--erp-gap); /* Keeps the seam between repeated sets identical to the gap. */
}

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

.erp__card {
	display: flex;
	flex: 0 0 var(--erp-card-w);
	flex-direction: column;
	width: var(--erp-card-w);
	min-width: 0;
	text-align: center;
}

.erp--rtl .erp__card {
	direction: rtl;
}

.erp__media {
	position: relative;
	overflow: hidden;
	aspect-ratio: var(--erp-ratio);
	background: #ececec;
	border-radius: 8px;
}

.erp__media-link {
	display: block;
	width: 100%;
	height: 100%;
}

.erp__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	-webkit-user-drag: none;
	user-select: none;
}

.erp__body {
	display: flex;
	flex: 1;
	flex-direction: column;
}

.erp__title {
	margin: 14px 0 4px;
	font-size: 1.05rem;
	font-weight: 400;
	line-height: 1.3;
}

.erp__title a {
	color: inherit;
	text-decoration: none;
}

.erp__title a:hover {
	text-decoration: underline;
}

.erp__price {
	font-size: 1.4rem;
	font-weight: 700;
	line-height: 1.3;
}

.erp__price del {
	opacity: 0.55;
	font-weight: 400;
	margin-inline-end: 0.4em;
}

.erp__price ins {
	text-decoration: none;
}

.erp__actions {
	margin-top: auto;
	padding-top: 16px;
}

.erp__btn {
	display: inline-block;
	padding: 0.65em 1.4em;
	border: 0;
	border-radius: 4px;
	background: #000;
	color: #fff;
	font: inherit;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.erp__btn:hover,
.erp__btn:focus-visible {
	background: #333;
	color: #fff;
}

.erp__btn.is-loading {
	opacity: 0.6;
	pointer-events: none;
}

.erp__btn.is-added {
	background: #1a7f37;
}

.erp a:focus-visible,
.erp button:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* ---- Badge, rating --------------------------------------------------- */

.erp__badge {
	position: absolute;
	top: 10px;
	inset-inline-start: 10px;
	padding: 0.25em 0.7em;
	border-radius: 3px;
	background: #c0392b;
	color: #fff;
	font-size: 0.8rem;
	line-height: 1.3;
	pointer-events: none;
}

.erp__rating {
	margin: 2px 0 4px;
	line-height: 1;
}

.erp__stars {
	--erp-rating: 0%;
	position: relative;
	display: inline-block;
	width: 5.4em;
	height: 1em;
	font-size: 1rem;
	background: linear-gradient(90deg, var(--erp-star) var(--erp-rating), rgba(128, 128, 128, 0.35) var(--erp-rating));
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='54' height='10' viewBox='0 0 54 10'><g fill='black'><path id='s' d='M5 0l1.2 3.4H10L7 5.6l1.1 3.6L5 7 1.9 9.2 3 5.6 0 3.4h3.8z'/><use href='%23s' x='11'/><use href='%23s' x='22'/><use href='%23s' x='33'/><use href='%23s' x='44'/></g></svg>") center / 100% 100% no-repeat;
	mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='54' height='10' viewBox='0 0 54 10'><g fill='black'><path id='s' d='M5 0l1.2 3.4H10L7 5.6l1.1 3.6L5 7 1.9 9.2 3 5.6 0 3.4h3.8z'/><use href='%23s' x='11'/><use href='%23s' x='22'/><use href='%23s' x='33'/><use href='%23s' x='44'/></g></svg>") center / 100% 100% no-repeat;
}

/* ---- Controls and extras --------------------------------------------- */

.erp__controls {
	display: flex;
	justify-content: center;
	margin-top: 12px;
}

.erp__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 1px solid currentColor;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	cursor: pointer;
	opacity: 0.7;
	transition: opacity 0.2s ease;
}

.erp__toggle:hover,
.erp__toggle:focus-visible {
	opacity: 1;
}

.erp__toggle[hidden] {
	display: none;
}

.erp__toggle .erp__ico--play,
.erp__toggle[aria-pressed="true"] .erp__ico--pause {
	display: none;
}

.erp__toggle[aria-pressed="true"] .erp__ico--play {
	display: block;
}

.erp-fade-yes .erp__viewport {
	-webkit-mask-image: linear-gradient(to right, transparent, #000 var(--erp-fade), #000 calc(100% - var(--erp-fade)), transparent);
	mask-image: linear-gradient(to right, transparent, #000 var(--erp-fade), #000 calc(100% - var(--erp-fade)), transparent);
}

.erp-empty {
	padding: 24px;
	border: 1px dashed #b5b5b5;
	text-align: center;
	color: #666;
}

@media (prefers-reduced-motion: reduce) {
	.erp__track,
	.erp__btn {
		transition: none;
	}
}
