/**
 * TV Produktvisning – frontend slideshow styles.
 */

/* Full-screen TV layout */
body.tvpd-page {
	margin: 0;
	padding: 0;
	overflow: hidden;
	background: #eee6e0;
}

body.tvpd-page #page,
body.tvpd-page .site-content,
body.tvpd-page .entry-content {
	margin: 0;
	padding: 0;
	max-width: none;
}

.tvpd-root {
	--tvpd-bg: #eee6e0;
	--tvpd-text: #21152f;
	--tvpd-text-muted: #3d3446;
	--tvpd-orange: #f29000;
	--tvpd-indigo-800: #45244f;
	--tvpd-yellow: #fbba21;
	--tvpd-accent: var(--tvpd-orange);
	--tvpd-white: #ffffff;
	--tvpd-radius: clamp(18px, 1.85vw, 72px);
	--tvpd-badge-size: clamp(96px, 10.45vw, 400px);

	position: relative;
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	background: var(--tvpd-bg);
	color: var(--tvpd-text);
	font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
	overflow: hidden;
	box-sizing: border-box;
}

.tvpd-root *,
.tvpd-root *::before,
.tvpd-root *::after {
	box-sizing: border-box;
}

/* Controls overlay */
.tvpd-controls {
	position: fixed;
	top: 12px;
	right: 12px;
	z-index: 100;
	display: flex;
	align-items: center;
	gap: 10px;
}

.tvpd-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 16px;
	border: none;
	border-radius: 999px;
	background: rgba(26, 26, 46, 0.85);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.15s ease;
}

.tvpd-btn:hover,
.tvpd-btn:focus {
	background: rgba(26, 26, 46, 1);
	outline: 2px solid var(--tvpd-accent);
	outline-offset: 2px;
}

.tvpd-btn:active {
	transform: scale(0.97);
}

.tvpd-btn__icon {
	font-size: 18px;
	line-height: 1;
}

.tvpd-controls__status {
	font-size: 13px;
	color: var(--tvpd-text-muted);
	background: rgba(255, 255, 255, 0.8);
	padding: 6px 12px;
	border-radius: 999px;
}

/* Slideshow container */
.tvpd-slideshow {
	position: relative;
	width: 100%;
	height: 100%;
}

.tvpd-slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.8s ease, visibility 0.8s ease;
	display: flex;
	align-items: stretch;
	justify-content: center;
	padding: 0;
}

.tvpd-slide.is-active {
	opacity: 1;
	visibility: visible;
	z-index: 1;
}

.tvpd-slide__inner {
	display: flex;
	padding: var(--spacing-spacing-xlarge, 80px);
	align-items: flex-start;
	gap: var(--spacing-spacing-small, 24px);
	flex: 1 0 0;
	align-self: stretch;
	width: 100%;
	max-width: none;
}

/* Media column */
.tvpd-slide__media {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	flex: 1 0 0;
	align-self: stretch;
}

.tvpd-slide__image-wrap {
	position: relative;
	background: var(--tvpd-white);
	border-radius: var(--tvpd-radius);
	padding: 0;
	width: 100%;
	max-height: 100%;
	aspect-ratio: 464 / 490;
	overflow: visible;
	display: flex;
	align-items: center;
	justify-content: center;
}

.tvpd-slide__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: var(--tvpd-radius);
}

/* Badge */
.tvpd-slide__badge {
	position: absolute;
	top: clamp(18px, 2.1vw, 40px);
	right: calc(var(--tvpd-badge-size) / -2);
	width: var(--tvpd-badge-size);
	height: var(--tvpd-badge-size);
	border-radius: 50%;
	background: var(--tvpd-accent);
	color: var(--tvpd-text);
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	font-weight: 600;
	font-size: clamp(16px, 1.65vw, 64px);
	line-height: 1.1;
	text-transform: uppercase;
	padding: 8px;
	letter-spacing: 0.02em;
	box-shadow: none;
	flex-direction: column;
}

.tvpd-slide__badge--news {
	background: var(--tvpd-indigo-800);
	color: #ffffff;
}

.tvpd-slide__badge--campaign {
	background: var(--tvpd-orange);
	color: var(--tvpd-text);
}

.tvpd-slide__badge--friendly_prices {
	background: var(--tvpd-yellow);
	color: var(--tvpd-text);
}

.tvpd-badge__sub {
	font-size: 0.72em;
	font-weight: 600;
	letter-spacing: 0.02em;
}

/* Content column */
.tvpd-slide__content {
	display: flex;
	padding: var(--spacing-spacing-xxlarge, 120px);
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	gap: clamp(8px, 1.4vh, 18px);
	gap: var(--spacing-spacing-base, 16px);
	flex: 1 0 0;
	align-self: stretch;
	max-width: none;
}

.tvpd-slide__category {
	margin: 0;
	font-size: clamp(16px, 1.75vw, 68px);
	color: var(--tvpd-text);
	font-weight: 600;
	line-height: 1.25;
}

.tvpd-slide__title {
	margin: 0;
	font-size: clamp(38px, 4.3vw, 165px);
	font-weight: 600;
	line-height: 1.12;
	letter-spacing: -0.02em;
	color: var(--tvpd-text);
}

.tvpd-slide__excerpt {
	margin: 0;
	font-size: clamp(16px, 2vw, 24px);
	line-height: 1.45;
	color: var(--tvpd-text-muted);
	max-width: 36ch;
}

/* Pricing */
.tvpd-slide__pricing {
	margin-top: clamp(20px, 4.8vh, 56px);
}

.tvpd-slide__price {
	display: flex;
	align-items: center;
	gap: clamp(8px, 1vw, 16px);
	margin: 0 0 clamp(8px, 1.5vh, 16px);
	font-size: clamp(28px, 2.85vw, 110px);
	font-weight: 600;
	color: var(--tvpd-text);
}

.tvpd-slide__price-icon {
	display: flex;
	color: var(--tvpd-text);
	flex-shrink: 0;
}

.tvpd-slide__price-icon svg {
	width: clamp(24px, 2.55vw, 98px);
	height: clamp(24px, 2.55vw, 98px);
}

.tvpd-slide__savings-line {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: clamp(7px, 1vw, 14px);
	font-size: clamp(15px, 1.55vw, 60px);
	color: var(--tvpd-text);
}

.tvpd-slide__regular {
	font-weight: 500;
}

.tvpd-slide__divider {
	opacity: 0.5;
}

.tvpd-slide__savings-label {
	font-weight: 500;
}

.tvpd-slide__savings-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--tvpd-accent);
	color: var(--tvpd-text);
	font-weight: 700;
	padding: 5px 12px;
	border-radius: 999px;
	font-size: clamp(14px, 1.35vw, 52px);
}

.tvpd-slide__savings-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.2em;
	height: 1.2em;
	border-radius: 50%;
	background: rgba(26, 26, 46, 0.12);
	font-size: 0.8em;
	line-height: 1;
}

/* Empty state */
.tvpd-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	text-align: center;
	padding: 48px;
}

.tvpd-empty p {
	font-size: clamp(20px, 3vw, 36px);
	color: var(--tvpd-text-muted);
	margin: 0;
}

/* Portrait / standing screens */
@media (orientation: portrait), (max-aspect-ratio: 1/1) {
	.tvpd-slide {
		padding: 0;
		align-items: stretch;
	}

	.tvpd-slide__inner {
		flex-direction: column;
		padding: clamp(24px, 5vw, 56px);
		gap: clamp(20px, 3vh, 40px);
		max-width: 900px;
		margin: 0 auto;
	}

	.tvpd-slide__media {
		flex: 0 0 auto;
		width: 100%;
	}

	.tvpd-slide__image-wrap {
		width: 100%;
		max-height: none;
		padding: 0;
	}

	.tvpd-slide__image {
		max-height: min(45vh, 480px);
		margin: 0 auto;
	}

	.tvpd-slide__badge {
		top: auto;
		bottom: clamp(8px, 2vw, 20px);
		right: clamp(8px, 2vw, 20px);
	}

	.tvpd-slide__content {
		text-align: left;
		padding: clamp(24px, 4vh, 48px) 0;
		width: 100%;
	}

	.tvpd-slide__title {
		font-size: clamp(32px, 7vw, 56px);
	}
}

/* Very wide landscape TVs */
@media (orientation: landscape) and (min-aspect-ratio: 16/9) {
	.tvpd-slide__inner {
		max-width: 1800px;
	}
}
