/* ── TVFL Products Slider Widget ────────────────────────────────────────────── */

/* Default CSS variable values — overridden by Elementor responsive controls */
.tvfl-ps-slider {
	--tvfl-ps-cols: 4;
	--tvfl-ps-gap: 16px;
}

/* ── Slider shell ──────────────────────────────────────────────────────────── */

.tvfl-ps-wrap {
	position: relative;
}

.tvfl-ps-slider {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* ── Track ─────────────────────────────────────────────────────────────────── */

.tvfl-ps-track-wrap {
	flex: 1;
	min-width: 0;
	overflow: hidden;
}

.tvfl-ps-track {
	display: flex;
	gap: var(--tvfl-ps-gap, 16px);
	transition: transform 0.35s ease;
	will-change: transform;
}

/*
 * Item width = (track-wrap width − gaps between visible items) / visible items.
 * This ensures exactly --tvfl-ps-cols cards fill the viewport at once; the rest
 * overflow to the right and are revealed by the JS translateX.
 */
.tvfl-ps-item {
	flex: 0 0 calc(
		(100% - (var(--tvfl-ps-cols, 4) - 1) * var(--tvfl-ps-gap, 16px)) /
		var(--tvfl-ps-cols, 4)
	);
	min-width: 0;
}

/* ── Card ──────────────────────────────────────────────────────────────────── */

.tvfl-ps-card {
	display: block;
	text-decoration: none;
	border: 1px solid rgba(150, 150, 150, 0.35);
	border-radius: 5px;
	overflow: hidden;
	background-color: rgba(255, 255, 255, 0.03);
	transition: border-color 0.2s ease;
	height: 100%;
	box-sizing: border-box;
}

.tvfl-ps-card:hover {
	border-color: rgba(255, 255, 255, 0.22);
	text-decoration: none;
}

/* ── Image ─────────────────────────────────────────────────────────────────── */

.tvfl-ps-image {
	width: 100%;
	overflow: hidden;
	border-radius: 5px 5px 0 0;
	box-sizing: border-box;
}

.tvfl-ps-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: 5px 5px 0 0;
	transition: transform 0.3s ease;
}

.tvfl-ps-card:hover .tvfl-ps-image img {
	transform: scale(1.04);
}

/* Placeholder shown in Elementor editor preview */
.tvfl-ps-image--placeholder {
	height: 140px;
	background: rgba(255, 255, 255, 0.08);
	border-radius: 5px 5px 0 0;
}

/* ── Info ──────────────────────────────────────────────────────────────────── */

.tvfl-ps-info {
	padding: 12px;
}

/* ── Title ─────────────────────────────────────────────────────────────────── */

.tvfl-ps-title {
	margin: 0 0 6px;
	color: #ffffff;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.35;
	transition: color 0.2s ease;
	/* Clamp to 2 lines to keep card heights uniform */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ── Price ─────────────────────────────────────────────────────────────────── */

.tvfl-ps-price {
	color: var(--e-global-color-primary);
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.2;
}

/* Strike-through regular price on sale items */
.tvfl-ps-price del,
.tvfl-ps-price del .amount {
	color: rgba(255, 255, 255, 0.4);
	font-weight: 400;
	font-size: 0.8125rem;
	margin-right: 4px;
}

.tvfl-ps-price ins {
	text-decoration: none;
}

/* ── Arrow buttons ─────────────────────────────────────────────────────────── */

.tvfl-ps-btn {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.1);
	color: #ffffff;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
	/* Remove default button appearance */
	-webkit-appearance: none;
	appearance: none;
}

.tvfl-ps-btn:hover:not(:disabled) {
	background-color: rgba(255, 255, 255, 0.2);
}

.tvfl-ps-btn:disabled {
	opacity: 0.25;
	cursor: default;
	pointer-events: none;
}

/* CSS-drawn chevron arrows — no icon font required */
.tvfl-ps-btn::before {
	content: '';
	display: block;
	flex-shrink: 0;
	width: 9px;
	height: 9px;
	border-top: 2px solid currentColor;
	border-left: 2px solid currentColor;
}

.tvfl-ps-prev::before {
	transform: rotate(-45deg) translate(2px, 2px);
}

.tvfl-ps-next::before {
	transform: rotate(135deg) translate(-2px, 2px);
}
