/* ================================================================
   Puentec Reels — Horizontal Scroll Carousel with TikTok/IG embeds
   ================================================================ */

.puentec-reels-carousel {
	position: relative;
	width: 100%;
	margin: 30px 0;
	overflow: hidden;
}

/* ── Track: horizontal scroll ─────────────────────────────────── */

.puentec-reels-track {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	padding: 10px 0;
	-webkit-overflow-scrolling: touch;
	border-radius: 12px;

	/* Hide scrollbar */
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.puentec-reels-track::-webkit-scrollbar {
	display: none;
}

/* ── Item ─────────────────────────────────────────────────────── */

.puentec-reels-item {
	flex: 0 0 calc((100% - 4 * 16px) / 5);
	min-width: 220px;
	scroll-snap-align: start;
	border-radius: 12px;
	overflow: hidden;
	background: #000;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	transition: transform 0.2s;
}

.puentec-reels-item:hover {
	transform: translateY(-4px);
}

/* ── TikTok iframe ────────────────────────────────────────────── */

.puentec-reels-iframe {
	display: block;
	width: 100%;
	aspect-ratio: 9/16;
	height: auto;
	border: 0;
	border-radius: 12px;
}

/* ── Instagram thumbnail fallback ─────────────────────────────── */

.puentec-reels-thumb-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 9/16;
	cursor: pointer;
	overflow: hidden;
	border-radius: 12px;
}

.puentec-reels-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.puentec-reels-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
	color: #fff;
	font-size: 16px;
	font-weight: 600;
}

.puentec-reels-placeholder .dashicons {
	font-size: 48px;
	width: 48px;
	height: 48px;
}

.puentec-reels-play-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.25);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.3s;
}

.puentec-reels-thumb-wrap:hover .puentec-reels-play-overlay {
	opacity: 1;
}

.puentec-reels-play-icon {
	width: 60px;
	height: 60px;
	background: rgba(255, 255, 255, 0.9);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	color: #333;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
	padding-left: 4px;
}

/* ── Title ────────────────────────────────────────────────────── */

.puentec-reels-title {
	margin: 8px 0 0;
	padding: 0 8px 8px;
	font-size: 13px;
	color: #fff;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ── Arrows ───────────────────────────────────────────────────── */

.puentec-reels-arrow {
	border: none;
	cursor: pointer;
}

.puentec-reels-arrow svg {
	width: 20px;
	height: 20px;
}

/* ── Legacy classes (backward compat) ─────────────────────────── */

.puentec-instagram-reels {
	position: relative;
	width: 100%;
	overflow: hidden;
	margin: 20px 0;
}

/* ── Responsive ───────────────────────────────────────────────── */

@media (max-width: 1024px) {
	.puentec-reels-item {
		flex: 0 0 calc((100% - 3 * 16px) / 4);
	}
}

@media (max-width: 768px) {
	.puentec-reels-item {
		flex: 0 0 calc((100% - 2 * 16px) / 3);
	}

	.puentec-reels-arrow {
		width: 36px;
		height: 36px;
	}

	.puentec-reels-arrow svg {
		width: 16px;
		height: 16px;
	}
}

@media (max-width: 480px) {
	.puentec-reels-item {
		flex: 0 0 calc((100% - 1 * 16px) / 2);
	}
}
