/**
 * Link Hub — public page styles.
 *
 * Mobile-first (~390px), single column, max-width ~480px. Everything themable
 * is driven by CSS custom properties set inline on .lh-hub from the theme config:
 *   --lh-bg, --lh-accent, --lh-text, --lh-radius, --lh-btn-shadow, --lh-font.
 */

.lh-hub {
	--lh-max: 480px;
	--lh-gap: 14px;
	--lh-card: rgba(255, 255, 255, 0.9);
	--lh-border: rgba(0, 0, 0, 0.08);

	box-sizing: border-box;
	min-height: 100%;
	width: 100%;
	margin: 0;
	padding: 28px 18px 40px;
	background: var(--lh-bg, #fff);
	color: var(--lh-text, #1a1a1a);
	font-family: var(--lh-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
	line-height: 1.45;
	-webkit-font-smoothing: antialiased;
}

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

.lh-inner {
	max-width: var(--lh-max);
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 18px;
}

/* ---- Language toggle ---- */
.lh-lang-toggle {
	display: flex;
	justify-content: center;
	gap: 4px;
	margin-bottom: -4px;
}

.lh-lang-btn {
	appearance: none;
	border: 1px solid var(--lh-border);
	background: var(--lh-card);
	color: inherit;
	font: inherit;
	font-size: 13px;
	padding: 4px 12px;
	border-radius: 999px;
	cursor: pointer;
	opacity: 0.6;
	transition: opacity 0.15s ease;
}

.lh-lang-btn[aria-pressed="true"] {
	opacity: 1;
	border-color: var(--lh-accent);
	color: var(--lh-accent);
	font-weight: 600;
}

/* ---- Profile ---- */
.lh-profile {
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}

.lh-logo-img {
	width: 96px;
	height: 96px;
	object-fit: cover;
	border-radius: 50%;
	border: 3px solid var(--lh-card);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.lh-name {
	font-size: 22px;
	font-weight: 700;
	margin: 4px 0 0;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.lh-verified {
	display: inline-flex;
	color: var(--lh-accent);
}

.lh-tagline {
	margin: 0;
	font-size: 15px;
	opacity: 0.8;
	max-width: 34ch;
}

/* ---- Promo / announcement bar ---- */
.lh-promo-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px 12px;
	padding: 10px 14px;
	text-align: center;
	font-size: 14px;
	font-weight: 600;
	color: #fff;
	background: var(--lh-accent);
	border-radius: var(--lh-radius, 12px);
	text-decoration: none;
}

a.lh-promo-bar:hover {
	filter: brightness(1.06);
}

.lh-promo-countdown {
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	background: rgba(0, 0, 0, 0.18);
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 13px;
}

/* ---- Voucher card ---- */
.lh-voucher {
	appearance: none;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	cursor: pointer;
	font: inherit;
	color: inherit;
	text-align: left;
	background: var(--lh-card);
	border: 2px dashed var(--lh-accent);
	border-radius: var(--lh-radius, 12px);
	transition: transform 0.12s ease;
}

.lh-voucher:hover,
.lh-voucher:focus-visible {
	transform: translateY(-2px);
}

.lh-voucher-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.lh-voucher-label {
	font-size: 13px;
	opacity: 0.85;
}

.lh-voucher-code {
	font-size: 18px;
	font-weight: 800;
	letter-spacing: 1.5px;
	color: var(--lh-accent);
}

.lh-voucher-action {
	flex: 0 0 auto;
	font-size: 12.5px;
	font-weight: 700;
	color: #fff;
	background: var(--lh-accent);
	padding: 7px 13px;
	border-radius: 999px;
	white-space: nowrap;
}

.lh-voucher.is-copied .lh-voucher-action {
	background: #1a7f4b;
}

/* ---- Featured block ---- */
.lh-featured {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.lh-featured-heading {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	text-align: center;
	opacity: 0.9;
}

.lh-featured-single .lh-featured-card {
	width: 100%;
}

/* Slideshow — one product at a time. */
.lh-featured-carousel {
	position: relative;
}

.lh-featured-slides {
	display: flex;
	gap: 0;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.lh-featured-slides::-webkit-scrollbar {
	display: none;
}

.lh-featured-slides .lh-featured-card {
	flex: 0 0 100%;
	scroll-snap-align: center;
}

.lh-carousel-nav {
	position: absolute;
	top: 34%;
	transform: translateY(-50%);
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: none;
	cursor: pointer;
	border-radius: 50%;
	color: var(--lh-text);
	background: rgba(255, 255, 255, 0.9);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	transition: opacity 0.15s ease;
}

.lh-carousel-prev {
	left: 8px;
}

.lh-carousel-next {
	right: 8px;
}

.lh-carousel-nav:hover {
	opacity: 0.85;
}

.lh-carousel-dots {
	display: flex;
	justify-content: center;
	gap: 7px;
	margin-top: 10px;
}

.lh-carousel-dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	background: var(--lh-border);
	opacity: 1;
	transition: transform 0.15s ease, background 0.15s ease;
}

.lh-carousel-dot[aria-current="true"] {
	background: var(--lh-accent);
	transform: scale(1.3);
}

.lh-featured-card {
	background: var(--lh-card);
	border: 1px solid var(--lh-border);
	border-radius: var(--lh-radius, 12px);
	overflow: hidden;
	box-shadow: var(--lh-btn-shadow, none);
	display: flex;
	flex-direction: column;
}

.lh-featured-media {
	display: block;
	line-height: 0;
	background: rgba(0, 0, 0, 0.04);
}

.lh-featured-media img {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

/* Card image aspect (Featured tab setting). */
.lh-featured--ratio-portrait .lh-featured-media img {
	aspect-ratio: 3 / 4;
}

.lh-featured--ratio-landscape .lh-featured-media img {
	aspect-ratio: 4 / 3;
}

.lh-featured-body {
	padding: 12px 14px 14px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	text-align: center;
}

.lh-featured-name {
	font-size: 15px;
	font-weight: 600;
	color: inherit;
	text-decoration: none;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.lh-featured-rating {
	font-size: 13px;
}

.lh-featured-price {
	font-size: 15px;
	font-weight: 700;
	color: var(--lh-accent);
}

.lh-featured-price del {
	opacity: 0.55;
	font-weight: 400;
	margin-right: 6px;
}

.lh-featured-cta {
	margin-top: 4px;
	display: inline-block;
	padding: 10px 14px;
	font-size: 14px;
	font-weight: 700;
	color: #fff;
	background: var(--lh-accent);
	border-radius: var(--lh-radius, 12px);
	text-decoration: none;
}

.lh-featured-cta.added::after {
	content: "✓";
	margin-left: 6px;
}

/* ---- Links ---- */
.lh-links {
	display: flex;
	flex-direction: column;
	gap: var(--lh-gap);
}

.lh-link-item {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.lh-link-note {
	text-align: center;
	font-size: 12px;
	line-height: 1.35;
	opacity: 0.65;
	padding: 0 6px;
}

.lh-link {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	position: relative;
	min-height: 54px;
	padding: 14px 44px;
	text-decoration: none;
	color: inherit;
	font-size: 16px;
	font-weight: 600;
	text-align: center;
	background: var(--lh-card);
	border: 1px solid var(--lh-border);
	border-radius: var(--lh-radius, 12px);
	box-shadow: var(--lh-btn-shadow, none);
	transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.lh-link:hover,
.lh-link:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
}

.lh-link:active {
	transform: translateY(0);
}

.lh-link--highlight {
	border-color: var(--lh-accent);
	border-width: 2px;
	background: var(--lh-accent);
	color: #fff;
}

.lh-link--highlight .lh-link-icon svg {
	color: #fff;
}

.lh-link-icon {
	display: inline-flex;
	align-items: center;
	position: absolute;
	left: 16px;
}

.lh-link-icon--emoji {
	position: absolute;
	left: 16px;
	font-size: 20px;
}

.lh-link-icon svg {
	color: var(--lh-accent);
}

.lh-link-label {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Link thumbnails (small product image instead of an icon). */
.lh-link--thumb {
	min-height: 62px;
}

.lh-link-thumb {
	position: absolute;
	left: 8px;
	top: 50%;
	transform: translateY(-50%);
	width: 46px;
	height: 46px;
	border-radius: calc(var(--lh-radius, 12px) - 4px);
	overflow: hidden;
	line-height: 0;
}

.lh-link-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ---- Entrance animation (staggered fade-up) ---- */
@keyframes lh-fade-up {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.lh-links .lh-link-item,
.lh-voucher,
.lh-featured,
.lh-lead-form,
.lh-socials,
.lh-actions {
	animation: lh-fade-up 0.45s ease-out both;
}

.lh-links .lh-link-item:nth-child(1) { animation-delay: 0.05s; }
.lh-links .lh-link-item:nth-child(2) { animation-delay: 0.11s; }
.lh-links .lh-link-item:nth-child(3) { animation-delay: 0.17s; }
.lh-links .lh-link-item:nth-child(4) { animation-delay: 0.23s; }
.lh-links .lh-link-item:nth-child(5) { animation-delay: 0.29s; }
.lh-links .lh-link-item:nth-child(n+6) { animation-delay: 0.35s; }
.lh-voucher { animation-delay: 0.38s; }
.lh-lead-form { animation-delay: 0.42s; }
.lh-socials { animation-delay: 0.46s; }
.lh-actions { animation-delay: 0.5s; }

@media (prefers-reduced-motion: reduce) {
	.lh-links .lh-link-item,
	.lh-voucher,
	.lh-featured,
	.lh-lead-form,
	.lh-socials,
	.lh-actions {
		animation: none;
	}
}

/* Clearance for the floating WhatsApp button. */
.lh-hub--has-float {
	padding-bottom: 96px;
}

/* ---- Socials ---- */
.lh-socials {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-top: 4px;
}

.lh-social {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	color: inherit;
	background: var(--lh-card);
	border: 1px solid var(--lh-border);
	transition: transform 0.12s ease, color 0.12s ease;
}

.lh-social:hover,
.lh-social:focus-visible {
	transform: translateY(-2px);
	color: var(--lh-accent);
}

/* ---- Action buttons (vCard / WhatsApp / QR) ---- */
.lh-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-top: 4px;
}

.lh-action {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	color: inherit;
	background: var(--lh-card);
	border: 1px solid var(--lh-border);
	border-radius: var(--lh-radius, 12px);
	transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.lh-action:hover,
.lh-action:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
}

.lh-action svg {
	color: var(--lh-accent);
}

.lh-action--whatsapp svg {
	color: #25d366;
}

/* ---- Floating WhatsApp button ---- */
.lh-whatsapp-float {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 9999;
	width: 56px;
	height: 56px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: #25d366;
	color: #fff;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
	transition: transform 0.15s ease;
}

.lh-whatsapp-float:hover,
.lh-whatsapp-float:focus-visible {
	transform: scale(1.06);
}

.lh-whatsapp-float svg {
	color: #fff;
}

@supports (padding: max(0px)) {
	.lh-whatsapp-float {
		right: max(18px, env(safe-area-inset-right));
		bottom: max(18px, env(safe-area-inset-bottom));
	}
}

/* ---- Lead form ---- */
.lh-lead-form {
	background: var(--lh-card);
	border: 1px solid var(--lh-border);
	border-radius: var(--lh-radius, 12px);
	padding: 18px 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.lh-lead-heading {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	text-align: center;
}

.lh-lead-fields {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.lh-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	text-align: left;
}

.lh-field-label {
	font-size: 13px;
	font-weight: 600;
	opacity: 0.85;
}

.lh-field input {
	width: 100%;
	box-sizing: border-box;
	padding: 11px 12px;
	font-size: 15px;
	color: var(--lh-text);
	background: #fff;
	border: 1px solid var(--lh-border);
	border-radius: 10px;
}

.lh-field input:focus {
	outline: none;
	border-color: var(--lh-accent);
	box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.lh-consent {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 12.5px;
	line-height: 1.4;
	text-align: left;
	opacity: 0.85;
}

.lh-consent input {
	margin-top: 2px;
	flex: 0 0 auto;
}

/* Honeypot — visually hidden but present for bots. */
.lh-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.lh-lead-submit {
	appearance: none;
	border: none;
	cursor: pointer;
	padding: 13px 16px;
	font-size: 16px;
	font-weight: 700;
	color: #fff;
	background: var(--lh-accent);
	border-radius: var(--lh-radius, 12px);
	transition: opacity 0.12s ease;
}

.lh-lead-submit:disabled {
	opacity: 0.6;
	cursor: default;
}

.lh-lead-status {
	margin: 0;
	font-size: 14px;
	text-align: center;
	min-height: 1em;
}

.lh-lead-status.is-success {
	color: #1a7f4b;
	font-weight: 600;
}

.lh-lead-status.is-error {
	color: #c0392b;
	font-weight: 600;
}

/* ---- QR modal ---- */
.lh-qr-modal {
	position: fixed;
	inset: 0;
	z-index: 10000;
	background: rgba(0, 0, 0, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.lh-qr-modal-box {
	position: relative;
	background: #fff;
	border-radius: 16px;
	padding: 22px;
	max-width: 320px;
	width: 100%;
	text-align: center;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.lh-qr-canvas {
	width: 100%;
	height: auto;
	max-width: 260px;
	image-rendering: pixelated;
	border-radius: 8px;
}

.lh-qr-download {
	display: inline-block;
	margin-top: 14px;
	padding: 10px 20px;
	background: var(--lh-accent, #e63946);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
	border-radius: var(--lh-radius, 12px);
}

.lh-qr-close {
	position: absolute;
	top: 8px;
	right: 10px;
	width: 32px;
	height: 32px;
	border: none;
	background: transparent;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	color: #333;
}

/* ---- Footer ---- */
.lh-footer {
	text-align: center;
	margin-top: 10px;
	font-size: 12px;
	opacity: 0.55;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
	.lh-link,
	.lh-social,
	.lh-lang-btn {
		transition: none;
	}
}

/* ---- Small viewports ---- */
@media (max-width: 360px) {
	.lh-hub {
		padding: 20px 12px 32px;
	}
	.lh-link {
		font-size: 15px;
		min-height: 50px;
	}
}
