/* Vitrino Hub — Product Switcher (lightweight, preset-based, no JS) */

.vitrino-hub-switcher {
	--vh-sw-accent: #2563eb;
	--vh-sw-accent-2: #1d4ed8;
	--vh-sw-surface: #ffffff;
	--vh-sw-muted: #64748b;
	--vh-sw-text: #0f172a;
	--vh-sw-border: #e2e8f0;
	--vh-sw-radius: 14px;
	--vh-sw-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);

	box-sizing: border-box;
	margin: 1.25em 0;
	color: var(--vh-sw-text);
	contain: layout style paint;
}

.vitrino-hub-switcher *,
.vitrino-hub-switcher *::before,
.vitrino-hub-switcher *::after {
	box-sizing: border-box;
}

.vitrino-hub-switcher__inner {
	display: flex;
	align-items: stretch;
	gap: 16px;
}

.vitrino-hub-switcher__body {
	flex: 1 1 auto;
	min-width: 0;
}

.vitrino-hub-switcher__media {
	flex: 0 0 120px;
}

.vitrino-hub-switcher__image {
	display: block;
	width: 120px;
	height: 120px;
	object-fit: cover;
	border-radius: 12px;
	background: #f1f5f9;
}

.vitrino-hub-switcher__badge {
	display: inline-block;
	margin-bottom: 8px;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--vh-sw-badge-bg, rgba(37, 99, 235, 0.1));
	color: var(--vh-sw-accent);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.4;
}

.vitrino-hub-switcher__title {
	margin: 0 0 8px;
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.5;
}

.vitrino-hub-switcher__text {
	margin: 0 0 12px;
	color: var(--vh-sw-muted);
	font-size: 0.95rem;
	line-height: 1.7;
}

.vitrino-hub-switcher__price {
	margin: 0 0 14px;
	color: var(--vh-sw-accent);
	font-size: 1.1rem;
	font-weight: 800;
	line-height: 1.4;
}

.vitrino-hub-switcher__price--lg {
	font-size: 1.45rem;
}

.vitrino-hub-switcher__price--inline {
	margin: 0;
}

.vitrino-hub-switcher__eyebrow {
	display: block;
	margin-bottom: 4px;
	color: var(--vh-sw-muted);
	font-size: 12px;
	font-weight: 600;
}

.vitrino-hub-switcher__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: relative;
	overflow: hidden;
	min-height: 44px;
	padding: 10px 20px;
	border: 0;
	border-radius: 10px;
	background: linear-gradient(135deg, var(--vh-sw-accent), var(--vh-sw-accent-2));
	color: #fff !important;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.4;
	text-decoration: none !important;
	box-shadow: 0 8px 20px color-mix(in srgb, var(--vh-sw-accent) 30%, transparent);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.vitrino-hub-switcher__button-label {
	position: relative;
	z-index: 1;
}

.vitrino-hub-switcher__button--shine::after {
	content: "";
	position: absolute;
	top: -40%;
	left: -75%;
	width: 42%;
	height: 180%;
	background: linear-gradient(
		105deg,
		transparent 0%,
		rgba(255, 255, 255, 0.05) 35%,
		rgba(255, 255, 255, 0.42) 50%,
		rgba(255, 255, 255, 0.05) 65%,
		transparent 100%
	);
	transform: skewX(-18deg);
	pointer-events: none;
	animation: vh-sw-button-shine var(--vh-sw-shine-duration, 4.5s) ease-in-out infinite;
}

@keyframes vh-sw-button-shine {
	0%,
	68% {
		left: -75%;
		opacity: 0;
	}

	72% {
		opacity: 1;
	}

	100% {
		left: 135%;
		opacity: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.vitrino-hub-switcher__button--shine::after {
		animation: none;
	}
}

.vitrino-hub-switcher__button:hover,
.vitrino-hub-switcher__button:focus {
	color: #fff !important;
	transform: translateY(-1px);
	box-shadow: 0 12px 24px color-mix(in srgb, var(--vh-sw-accent) 38%, transparent);
}

@supports not (color: color-mix(in srgb, #000 50%, #fff)) {
	.vitrino-hub-switcher__button {
		box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
	}

	.vitrino-hub-switcher__button:hover,
	.vitrino-hub-switcher__button:focus {
		box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
	}
}

.vitrino-hub-switcher--disconnected {
	color: var(--vh-sw-muted);
	font-size: 0.95em;
}

/* Classic */
.vitrino-hub-switcher--classic {
	padding: 1em 1.25em;
	border: 1px solid var(--vh-sw-border);
	border-radius: var(--vh-sw-radius);
	background: #f8fafc;
}

/* Card */
.vitrino-hub-switcher--card {
	padding: 16px;
	border: 1px solid var(--vh-sw-border);
	border-radius: var(--vh-sw-radius);
	background: var(--vh-sw-surface);
	box-shadow: var(--vh-sw-shadow);
}

/* Promo */
.vitrino-hub-switcher--promo {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	padding: 18px;
	border: 1px solid var(--vh-sw-border, #e2e8f0);
	border-radius: calc(var(--vh-sw-radius) + 2px);
	background: #ffffff;
	box-shadow: var(--vh-sw-shadow);
}

.vitrino-hub-switcher--promo::before,
.vitrino-hub-switcher--banner::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: linear-gradient(
		105deg,
		var(--vh-sw-grad-1, #eff6ff) 0%,
		var(--vh-sw-grad-2, #ffffff) 42%,
		var(--vh-sw-grad-3, #f8fafc) 78%,
		var(--vh-sw-grad-1, #eff6ff) 100%
	);
	background-size: 280% 100%;
	opacity: 0.78;
	z-index: 0;
	pointer-events: none;
}

.vitrino-hub-switcher--grad-animated.vitrino-hub-switcher--promo::before,
.vitrino-hub-switcher--grad-animated.vitrino-hub-switcher--banner::before {
	animation: vh-sw-gradient-flow 22s ease-in-out infinite;
}

.vitrino-hub-switcher--grad-speed-slow.vitrino-hub-switcher--grad-animated.vitrino-hub-switcher--promo::before,
.vitrino-hub-switcher--grad-speed-slow.vitrino-hub-switcher--grad-animated.vitrino-hub-switcher--banner::before {
	animation-duration: 34s;
}

.vitrino-hub-switcher--grad-speed-fast.vitrino-hub-switcher--grad-animated.vitrino-hub-switcher--promo::before,
.vitrino-hub-switcher--grad-speed-fast.vitrino-hub-switcher--grad-animated.vitrino-hub-switcher--banner::before {
	animation-duration: 14s;
}

@keyframes vh-sw-gradient-flow {
	0%,
	100% {
		background-position: 0% 50%;
	}

	50% {
		background-position: 100% 50%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.vitrino-hub-switcher--grad-animated::before {
		animation: none;
	}
}

.vitrino-hub-switcher--promo > *,
.vitrino-hub-switcher--banner > * {
	position: relative;
	z-index: 1;
}

.vitrino-hub-switcher--promo .vitrino-hub-switcher__inner {
	align-items: center;
}

.vitrino-hub-switcher--promo .vitrino-hub-switcher__media--promo {
	flex-basis: 140px;
}

.vitrino-hub-switcher--promo .vitrino-hub-switcher__image {
	width: 140px;
	height: 140px;
}

.vitrino-hub-switcher--promo .vitrino-hub-switcher__button {
	min-width: 180px;
}

/* Banner */
.vitrino-hub-switcher--banner {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	padding: 12px 16px;
	border: 1px solid var(--vh-sw-border, #bfdbfe);
	border-radius: 12px;
	background: #ffffff;
}

.vitrino-hub-switcher__inner--banner {
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.vitrino-hub-switcher__body--banner {
	display: flex;
	flex: 1 1 auto;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 14px;
	min-width: 0;
}

.vitrino-hub-switcher__text--banner {
	margin: 0;
	color: var(--vh-sw-text);
	font-size: 0.92rem;
	font-weight: 600;
	line-height: 1.6;
}

.vitrino-hub-switcher__media--banner {
	flex-basis: 72px;
}

.vitrino-hub-switcher__media--banner .vitrino-hub-switcher__image {
	width: 72px;
	height: 72px;
	border-radius: 10px;
}

.vitrino-hub-switcher__button--banner {
	flex: 0 0 auto;
	min-height: 40px;
	padding-inline: 16px;
	white-space: nowrap;
}

/* Minimal */
.vitrino-hub-switcher--minimal {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border: 1px dashed var(--vh-sw-border);
	border-radius: 10px;
	background: #fafafa;
}

.vitrino-hub-switcher--minimal .vitrino-hub-switcher__text {
	margin: 0;
}

.vitrino-hub-switcher__button--minimal {
	min-height: 36px;
	padding: 8px 14px;
	font-size: 0.88rem;
	box-shadow: none;
}

@media (max-width: 640px) {
	.vitrino-hub-switcher__inner,
	.vitrino-hub-switcher__inner--banner {
		flex-direction: column;
		align-items: stretch;
	}

	.vitrino-hub-switcher__media,
	.vitrino-hub-switcher__media--promo,
	.vitrino-hub-switcher__media--banner {
		flex-basis: auto;
	}

	.vitrino-hub-switcher__image {
		width: 100%;
		max-width: 220px;
		height: auto;
		aspect-ratio: 1 / 1;
	}

	.vitrino-hub-switcher__button,
	.vitrino-hub-switcher__button--banner {
		width: 100%;
	}
}
