/**
 * LumenHaus Core — estilos de los módulos.
 * Usa los tokens de lumenhaus-theme (--lh-*) con valores de respaldo.
 */

.lhc-scope,
.lhc-packs,
.lhc-ship,
.lhc-items,
.lhc-online-notice,
.lhc-drawer {
	--lhc-dark: var(--lh-dark, #0F172A);
	--lhc-bg: var(--lh-bg, #F8FAFC);
	--lhc-card: var(--lh-card, #FFFFFF);
	--lhc-border: var(--lh-border, #E2E8F0);
	--lhc-muted: var(--lh-text-muted, #475569);
	--lhc-cta: var(--lh-cta, #F97316);
	--lhc-cta-ink: var(--lh-cta-ink, #0F172A);
	--lhc-trust: var(--lh-trust, #10B981);
	--lhc-trust-ink: var(--lh-trust-ink, #047857);
	--lhc-r-badge: var(--lh-r-badge, 6px);
	--lhc-r-control: var(--lh-r-control, 10px);
	--lhc-r-card: var(--lh-r-card, 16px);
	--lhc-ease: var(--lh-ease, cubic-bezier(0.22, 1, 0.36, 1));
	--lhc-head: var(--lh-font-head, system-ui, sans-serif);
}

/* ==========================================================================
   Packs
   ========================================================================== */
.lh-bundles,
.lhc-standalone-packs {
	flex-basis: 100%;
	width: 100%;
}

/* Con packs, la cantidad la define el pack elegido. */
form.cart.lhc-has-packs .quantity,
form.cart:has(.lhc-packs) .quantity {
	display: none !important;
}

.lhc-packs {
	display: grid;
	gap: 0.625rem;
	margin: 0 0 0.25rem;
	padding: 0;
	border: 0;
	min-width: 0;
}

.lhc-packs__legend {
	padding: 0;
	margin-bottom: 0.625rem;
	font-family: var(--lhc-head);
	font-weight: 700;
	font-size: 1rem;
}

.lhc-pack {
	position: relative;
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 0.75rem;
	padding: 0.875rem 1rem;
	border: 1.5px solid var(--lhc-border);
	border-radius: var(--lhc-r-card);
	background: var(--lhc-card);
	cursor: pointer;
	transition: border-color 200ms var(--lhc-ease), box-shadow 200ms var(--lhc-ease);
	-webkit-tap-highlight-color: transparent;
}

.lhc-pack input[type="radio"] {
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--lhc-cta);
}

@media (hover: hover) {
	.lhc-pack:hover {
		border-color: color-mix(in srgb, var(--lhc-cta) 45%, var(--lhc-border));
	}
}

/* Pack elegido: "encendido" (borde naranja con halo) y un barrido de luz al elegirlo. */
.lhc-pack:has(input:checked) {
	border-color: var(--lhc-cta);
	background: linear-gradient(180deg, rgba(249, 115, 22, 0.06), rgba(249, 115, 22, 0.015)), var(--lhc-card);
	box-shadow: 0 0 0 1px var(--lhc-cta), 0 12px 30px -16px rgba(249, 115, 22, 0.7);
	overflow: hidden;
}

.lhc-pack:has(input:checked)::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 40%;
	background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.75), transparent);
	pointer-events: none;
	animation: lhc-sweep 900ms var(--lhc-ease) both;
}

@keyframes lhc-sweep {
	from { transform: translateX(-120%); }
	to { transform: translateX(320%); }
}

.lhc-pack:has(input:disabled) {
	opacity: 0.5;
	cursor: not-allowed;
}

.lhc-pack:has(input:focus-visible) {
	outline: 3px solid var(--lhc-cta);
	outline-offset: 2px;
}

.lhc-pack__main {
	display: grid;
	gap: 0.125rem;
	min-width: 0;
}

.lhc-pack__title {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.375rem;
	font-weight: 700;
	line-height: 1.3;
}

.lhc-pack__badge {
	padding: 0.125rem 0.5rem;
	border-radius: var(--lhc-r-badge);
	background: var(--lhc-cta);
	color: var(--lhc-cta-ink);
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.4;
}

.lhc-pack__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.125rem 0.625rem;
	color: var(--lhc-muted);
	font-size: 0.8125rem;
}

.lhc-pack__ship {
	color: var(--lhc-trust-ink);
	font-weight: 600;
}

.lhc-pack__nostock {
	color: #B91C1C;
	font-weight: 600;
}

.lhc-pack__price {
	display: grid;
	justify-items: end;
	text-align: right;
	line-height: 1.25;
}

.lhc-pack__price strong {
	font-family: var(--lhc-head);
	font-size: 1.0625rem;
	font-weight: 800;
	white-space: nowrap;
}

.lhc-pack__price del {
	color: var(--lhc-muted);
	font-size: 0.75rem;
	white-space: nowrap;
}

.lhc-pack__save {
	color: var(--lhc-trust-ink);
	font-size: 0.75rem;
	font-weight: 600;
	white-space: nowrap;
}

@media (max-width: 380px) {
	.lhc-pack {
		grid-template-columns: auto 1fr;
	}

	.lhc-pack__price {
		grid-column: 2;
		justify-items: start;
		text-align: left;
	}
}

/* ==========================================================================
   Carrito lateral: envío gratis
   ========================================================================== */
.lhc-ship {
	margin: 0 0 1rem;
	padding: 0.875rem 1rem;
	border-radius: var(--lhc-r-control);
	background: var(--lhc-bg);
	border: 1px solid var(--lhc-border);
}

.lhc-ship__msg {
	margin: 0 0 0.5rem;
	font-size: 0.875rem;
}

.lhc-ship.is-free .lhc-ship__msg {
	color: var(--lhc-trust-ink);
	font-weight: 600;
}

.lhc-ship__bar {
	height: 8px;
	border-radius: 999px;
	background: var(--lhc-border);
	overflow: hidden;
}

/* La barra es una tira LED: la luz fluye hacia la meta. */
.lhc-ship__bar span {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: linear-gradient(90deg, var(--lhc-cta), #FDBA74, var(--lhc-cta)) 0 0 / 200% 100%;
	box-shadow: 0 0 10px rgba(249, 115, 22, 0.6);
	transition: width 600ms var(--lhc-ease);
	animation: lhc-flow 2.2s linear infinite;
}

@keyframes lhc-flow {
	to { background-position: -200% 0; }
}

.lhc-ship.is-free {
	border-color: rgba(16, 185, 129, 0.45);
	background: rgba(16, 185, 129, 0.07);
}

.lhc-ship.is-free .lhc-ship__bar span {
	background: var(--lhc-trust);
	box-shadow: 0 0 12px rgba(16, 185, 129, 0.7);
	animation: lhc-unlocked 900ms var(--lhc-ease) both;
}

@keyframes lhc-unlocked {
	0% { filter: brightness(1); }
	30% { filter: brightness(1.6); }
	100% { filter: brightness(1); }
}

/* ==========================================================================
   Carrito lateral: ítems
   ========================================================================== */
.lhc-items {
	list-style: none;
	margin: 0;
	padding: 0;
}

.lhc-item {
	position: relative;
	display: grid;
	grid-template-columns: 72px 1fr;
	gap: 0.875rem;
	padding: 0.875rem 2rem 0.875rem 0;
	border-bottom: 1px solid var(--lhc-border);
	transition: opacity 200ms;
}

/* Neutraliza estilos de WooCommerce para ul.product_list_widget (clearfix y miniatura flotante de 32px). */
ul.product_list_widget li.lhc-item {
	margin: 0;
	padding: 0.875rem 2rem 0.875rem 0;
	list-style: none;
}

ul.product_list_widget li.lhc-item::before,
ul.product_list_widget li.lhc-item::after {
	content: none !important;
	display: none !important;
}

ul.product_list_widget li.lhc-item img {
	float: none !important;
	margin: 0 !important;
	width: 72px !important;
	height: 72px !important;
	box-shadow: none;
}

ul.product_list_widget li.lhc-item a {
	font-weight: inherit;
}

.lhc-item.is-loading {
	opacity: 0.5;
	pointer-events: none;
}

.lhc-item__thumb img {
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: var(--lhc-r-control);
	border: 1px solid var(--lhc-border);
	background: var(--lhc-bg);
}

.lhc-item__info {
	display: grid;
	gap: 0.375rem;
	min-width: 0;
	font-size: 0.875rem;
}

.lhc-item__name {
	font-weight: 600;
	line-height: 1.35;
	text-decoration: none;
	color: inherit;
}

.lhc-item .variation {
	display: flex;
	flex-wrap: wrap;
	gap: 0 0.375rem;
	margin: 0;
	color: var(--lhc-muted);
	font-size: 0.75rem;
}

.lhc-item .variation dt,
.lhc-item .variation dd,
.lhc-item .variation p {
	margin: 0;
	float: none;
}

.lhc-item__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
}

.lhc-qty {
	display: inline-flex;
	align-items: center;
	border: 1.5px solid var(--lhc-border);
	border-radius: var(--lhc-r-control);
	overflow: hidden;
}

.lhc-qty button {
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	background: transparent;
	font-size: 1.125rem;
	line-height: 1;
	cursor: pointer;
	color: inherit;
}

.lhc-qty button:hover:not(:disabled) {
	background: var(--lhc-bg);
}

.lhc-qty button:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.lhc-qty__value {
	min-width: 28px;
	text-align: center;
	font-weight: 600;
}

.lhc-item__subtotal {
	font-family: var(--lhc-head);
	font-weight: 700;
	white-space: nowrap;
}

.lhc-item .remove {
	position: absolute;
	top: 0.875rem;
	right: 0;
	width: 26px;
	height: 26px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	color: var(--lhc-muted) !important;
	text-decoration: none;
	font-size: 1.25rem;
	line-height: 1;
}

.lhc-item .remove:hover {
	background: var(--lhc-bg);
	color: #DC2626 !important;
}

.lhc-secure {
	margin: 0.75rem 0 0;
	text-align: center;
	color: var(--lhc-muted, #475569);
	font-size: 0.8125rem;
}

.lhc-empty {
	display: grid;
	justify-items: center;
	gap: 1rem;
	padding: 3rem 0;
	text-align: center;
}

/* ==========================================================================
   Checkout: aviso de pago online
   ========================================================================== */
.lhc-online-notice {
	margin: 0 0 1rem;
	padding: 0.875rem 1rem;
	border-radius: var(--lhc-r-control);
	border: 1px solid rgba(16, 185, 129, 0.35);
	background: rgba(16, 185, 129, 0.08);
	color: var(--lhc-trust-ink);
	font-size: 0.9375rem;
	line-height: 1.45;
}

.lhc-online-notice.is-applied {
	border-color: var(--lhc-trust);
	background: rgba(16, 185, 129, 0.14);
}

/* Solo se vende a Paraguay: el país no hace falta mostrarlo. */
.woocommerce-checkout .lhc-country-fixed {
	display: none !important;
}

/* Fila de RUC: en móvil, una columna */
@media (max-width: 599px) {
	.woocommerce-checkout #billing_ruc_field,
	.woocommerce-checkout #billing_razon_social_field {
		width: 100%;
		float: none;
	}
}

/* ==========================================================================
   Panel propio (solo sin lumenhaus-theme)
   ========================================================================== */
.lhc-overlay {
	position: fixed;
	inset: 0;
	z-index: 99990;
	background: rgba(15, 23, 42, 0.55);
	opacity: 0;
	visibility: hidden;
	transition: opacity 220ms, visibility 220ms;
}

.lhc-overlay.is-open {
	opacity: 1;
	visibility: visible;
}

.lhc-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 99991;
	width: min(420px, 92vw);
	display: flex;
	flex-direction: column;
	background: var(--lhc-card);
	transform: translateX(100%);
	visibility: hidden;
	transition: transform 320ms var(--lhc-ease), visibility 320ms;
}

.lhc-drawer.is-open {
	transform: none;
	visibility: visible;
}

.lhc-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1.25rem;
	border-bottom: 1px solid var(--lhc-border);
}

.lhc-drawer__head h2 {
	margin: 0;
	font-size: 1.25rem;
}

.lhc-drawer__close {
	width: 40px;
	height: 40px;
	border: 0;
	background: transparent;
	font-size: 1.75rem;
	cursor: pointer;
}

.lhc-drawer__body {
	flex: 1;
	overflow-y: auto;
	padding: 1rem 1.25rem;
}

@media (prefers-reduced-motion: reduce) {
	.lhc-pack,
	.lhc-ship__bar span,
	.lhc-drawer,
	.lhc-overlay {
		transition: none;
		animation: none;
	}

	.lhc-pack::after {
		display: none;
	}
}
