/* FrikiCoins — frontend. Colores de marca del tema ltw-aqua. */
:root {
	--ltw-fc-brand: #510395;
	--ltw-fc-brand-soft: #f8f1fe;
	--ltw-fc-text: #232323;
	--ltw-fc-muted: #6b6b6b;
	--ltw-fc-border: #e4d6f2;
	--ltw-fc-gold: #f2b705;
	--ltw-fc-gold-dark: #b98a00;
	--ltw-fc-error: #b3261e;
	--ltw-fc-radius: 12px;
}

/* Moneda: el dragón de Friki de Nacimiento sobre oro (assets/img/coin.svg).
 * El texto «FC» se queda para lectores de pantalla pero no se ve. */
.ltw-fc__coin {
	display: inline-flex;
	flex: 0 0 auto;
	width: 1.9em;
	height: 1.9em;
	margin-right: .4em;
	overflow: hidden;
	border-radius: 50%;
	background: url("../img/coin.svg?v=7") center / contain no-repeat;
	color: transparent !important;
	font-size: .75em;
	line-height: 1;
	text-indent: -999px;
	vertical-align: middle;
}

.ltw-fc__coin--lg {
	width: 3.5rem;
	height: 3.5rem;
	margin: 0;
	font-size: 1rem;
}

.ltw-fc-badge {
	display: inline-block;
	padding: .15em .6em;
	border-radius: 999px;
	background: var(--ltw-fc-brand);
	color: #fff;
	font-size: .75rem;
	font-weight: 700;
	line-height: 1.6;
	white-space: nowrap;
}

/* Listado de productos: pastilla de FC extra en la fila del precio del tema
 * (.product-card__price-row). Escritorio: en la línea del precio, a la derecha.
 * Móvil (< 782 px, donde la fila es una rejilla): en su línea, encima del precio. */
.ltw-fc-badge--loop {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	align-self: center;
	padding: 3px 12px 3px 3px;
	border: 1px solid #e4d6f2;
	border-radius: 999px;
	background: #f8f1fe;
	color: var(--ltw-fc-brand);
	font-family: "Bebas Neue", sans-serif;
	font-size: 17px;
	font-weight: 400;
	letter-spacing: .02em;
	line-height: 1.2;
	white-space: nowrap;
}

.ltw-fc-badge--loop .ltw-fc__coin {
	width: 1.4rem;
	height: 1.4rem;
	margin-right: .35rem;
	font-size: 1rem;
}

@media (min-width: 782px) {
	.product-card__price-row:has(.ltw-fc-badge--loop) {
		flex-wrap: wrap;
		align-items: center;
		justify-content: flex-start !important;
	}

	.product-card__price-row:has(.ltw-fc-badge--loop) .price { flex: 0 1 auto !important; }
	/* Alineada a la derecha de la fila; si hay corazón de favoritos, va detrás. */
	.product-card__price-row .ltw-fc-badge--loop { margin-left: auto; }
}

@media (max-width: 781px) {
	.product-card__price-row .ltw-fc-badge--loop {
		grid-column: 1;
		grid-row: 1;
		justify-self: start;
		font-size: 15px;
	}

	/* En móvil el tema pone .price en display: contents y reparte precio
	 * (fila 1) y tachado (fila 2); con la pastilla, todo baja una fila. */
	.product-card__price-row:has(.ltw-fc-badge--loop) .price ins { grid-row: 2 !important; }
	.product-card__price-row:has(.ltw-fc-badge--loop) .price ins,
	.product-card__price-row:has(.ltw-fc-badge--loop) .price > .woocommerce-Price-amount { grid-row: 2 !important; }
	.product-card__price-row:has(.ltw-fc-badge--loop) .price del { grid-row: 3 !important; }
}

.ltw-fc__lock {
	flex: 0 0 auto;
	vertical-align: -2px;
}

.ltw-fc__progress {
	display: block;
	height: 4px;
	margin-top: .5rem;
	overflow: hidden;
	border-radius: 999px;
	background: var(--ltw-fc-border);
}

.ltw-fc__progress > span {
	display: block;
	height: 100%;
	background: var(--ltw-fc-brand);
}

.ltw-fc__link {
	padding: 0;
	border: 0;
	background: none;
	color: var(--ltw-fc-brand);
	font: inherit;
	text-decoration: underline;
	cursor: pointer;
}

/* Ficha de producto en móvil y tableta: el tema pone el resumen en
 * display: contents y coloca cada hijo en su rejilla con un `order` fijo
 * (precio 3, carrito 4, sellos de confianza 5…) por debajo de 960 px, su `lg`.
 * Sin esto el bloque caía en la primera celda, arriba del todo y de una sola
 * columna. Mismo orden que el carrito: va justo detrás en el HTML. */
@media (max-width: 959px) {
	.single-product__summary > .ltw-fc-product {
		grid-column: 1 / -1;
		order: 4;
	}
}

/* Pastilla de FrikiCoins (lila, moneda, cifra en Bebas): la misma en la
 * ficha, en el listado y en «Consigue más». */
.ltw-fc-pill {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	padding: 4px 16px 4px 4px;
	border: 1px solid #e4d6f2;
	border-radius: 999px;
	background: #f8f1fe;
	color: var(--ltw-fc-brand);
	font-family: "Bebas Neue", sans-serif;
	font-size: 26px;
	font-weight: 400;
	letter-spacing: .02em;
	line-height: 1.15;
	white-space: nowrap;
}

.ltw-fc-pill .ltw-fc__coin {
	width: 2.1rem;
	height: 2.1rem;
	margin-right: .5rem;
	font-size: 1rem;
}

.ltw-fc-pill small {
	margin-right: .3em;
	font-size: .62em;
	letter-spacing: .06em;
	opacity: .75;
}

/* Ficha de producto: en una tarjeta blanca con el mismo borde, radio y
 * sombra que las tarjetas de producto del tema (_product-loop-card). */
.ltw-fc-product {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 14px;
	padding: 12px 16px 12px 12px;
	border: 1px solid #e1e1e1;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 12px 12px rgba(13, 4, 22, .07);
	color: var(--ltw-fc-text);
}

.ltw-fc-product p { margin: 0 !important; }

.ltw-fc-product__text { flex: 1 1 140px; min-width: 0; }

.ltw-fc-product__lead {
	color: var(--ltw-fc-text);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
}

.ltw-fc-product__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 10px;
	color: var(--ltw-fc-muted);
	font-size: 13px;
	line-height: 1.4;
}

.ltw-fc-product__extra {
	color: var(--ltw-fc-brand);
	font-weight: 600;
}

.ltw-fc-product__meta a {
	color: var(--ltw-fc-brand);
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Panel del carrito / checkout (bloques). Va en el resumen entre subtotal y
 * envío (slot ExperimentalDiscountsMeta): caja lila suave, visible pero por
 * debajo del total en jerarquía. WooCommerce aplica
 * `.slot-wrapper>*>* { padding: 16px 0 }` a lo que se pinta en el slot, de
 * ahí el selector reforzado. */
.ltw-fc,
.wc-block-components-totals-wrapper.slot-wrapper .ltw-fc,
.wc-block-components-discounts-meta .ltw-fc {
	margin: 0;
	/* 4 px menos abajo: la última línea (enlaces) trae más interlineado */
	padding: 14px 16px 10px;
	border: 1px solid #ece4f5;
	border-radius: 10px;
	background: #f8f1fe;
	box-shadow: none;
	color: var(--ltw-fc-text);
	font-size: 14px;
}

/* La fila que lo contiene funciona como las demás filas del resumen: 16 px
 * arriba y nada abajo (el aire de abajo lo pone la fila siguiente o el
 * propio bloque), así queda igual de separada por arriba que por abajo. */
.wc-block-components-totals-wrapper:has(> .wc-block-components-discounts-meta .ltw-fc) {
	padding-top: 16px !important;
	/* 5 px: lo que el interlineado de la fila de texto de arriba añade por
	 * encima de la caja y la caja no tiene por debajo. */
	padding-bottom: 5px !important;
}

/* Si es la última fila de su grupo (sin envío debajo, p. ej. mientras se
 * calcula), el aire de abajo ya lo pone el bloque de WooCommerce. */
.wc-block-components-totals-wrapper:has(> .wc-block-components-discounts-meta .ltw-fc):last-child {
	padding-bottom: 0 !important;
}

.wc-block-components-discounts-meta:has(.ltw-fc) > :not(.ltw-fc) { padding: 0 !important; }

.ltw-fc.is-busy {
	opacity: .6;
	pointer-events: none;
}

.ltw-fc p { margin: 0; }

.ltw-fc small {
	display: block;
	color: var(--ltw-fc-muted);
	font-size: 13px;
}

/* Cabecera: «FrikiCoins» y debajo lo que suma el pedido */
.ltw-fc__title {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
}

.ltw-fc__title .ltw-fc__coin { width: 1.35rem; height: 1.35rem; margin: 0; font-size: 1rem; }

.ltw-fc__line {
	margin-top: 2px !important;
	padding-left: calc(1.35rem + 8px);
	color: var(--ltw-fc-muted);
	font-size: 13.5px;
}

.ltw-fc__line--muted { color: var(--ltw-fc-muted); }

/* Recompensa aplicada */
.ltw-fc__active {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 10px;
	padding: 10px 12px;
	border: 1px solid #e4d6f2;
	border-radius: 8px;
	background: #fff;
}

.ltw-fc__active strong,
.ltw-fc__label,
.ltw-fc__cost { display: block; }

.ltw-fc__label {
	color: var(--ltw-fc-muted);
	font-size: 12px;
}

.ltw-fc__cost {
	color: var(--ltw-fc-brand);
	font-size: 13px;
	font-weight: 600;
}

/* Desplegable de recompensas */
.ltw-fc__rewards { margin-top: 8px; }

.ltw-fc__toggle {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin: 0 0 0 calc(1.35rem + 8px);
	padding: 0;
	border: 0;
	background: none;
	color: var(--ltw-fc-brand);
	font: inherit;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
}

.ltw-fc__toggle:hover span { text-decoration: underline; }
.ltw-fc__chev { transition: transform .2s; }
.ltw-fc__toggle[aria-expanded="true"] .ltw-fc__chev { transform: rotate(180deg); }

.ltw-fc__list {
	display: grid;
	gap: 0;
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
}

.ltw-fc__reward {
	margin: 0;
	padding: 8px 0;
	border-top: 1px solid #e4d6f2;
}

.ltw-fc__reward-main {
	display: flex;
	align-items: center;
	gap: 10px;
}

.ltw-fc__thumb {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	overflow: hidden;
	border-radius: 8px;
	background: #fff;
}

.ltw-fc__thumb img,
.ltw-fc__art,
.ltw-fc__art svg {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ltw-fc__thumb .ltw-fc__coin { width: 1.4rem; height: 1.4rem; margin: 0; }

.ltw-fc__reward.is-locked .ltw-fc__thumb { filter: grayscale(1); opacity: .5; }

.ltw-fc__reward-text {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 13.5px;
	line-height: 1.3;
}

.ltw-fc__reward-text strong { display: block; font-weight: 600; }
.ltw-fc__reward-text .ltw-fc__cost { font-weight: 500; }
.ltw-fc__reward.is-locked .ltw-fc__reward-text { opacity: .6; }

.ltw-fc__missing {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 4px;
	color: var(--ltw-fc-muted);
	font-size: 12px;
	white-space: nowrap;
}

/* Botón «Canjear»: secundario del tema (contorno morado, Bebas, radio 8) */
.ltw-fc__button {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	min-height: 32px;
	padding: 0 12px;
	border: 1px solid var(--ltw-fc-brand);
	border-radius: 8px;
	background: transparent;
	color: var(--ltw-fc-brand);
	font-family: "Bebas Neue", sans-serif;
	font-size: 15px;
	font-weight: 400;
	letter-spacing: 1px;
	line-height: 1;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color .3s ease-out, color .3s ease-out;
}

.ltw-fc__button:hover { background: var(--ltw-fc-brand); color: #fff; }
.ltw-fc__button:disabled { opacity: .5; cursor: not-allowed; }

.ltw-fc__progress {
	display: block;
	height: 3px;
	margin-top: 6px;
}

.ltw-fc__form {
	display: grid;
	gap: 8px;
	margin-top: 8px;
}

.ltw-fc__form label span {
	display: block;
	margin-bottom: 4px;
	font-size: 13px;
	font-weight: 600;
}

.ltw-fc__form select,
.ltw-fc__form textarea {
	width: 100%;
	box-sizing: border-box;
}

.ltw-fc__form-actions {
	display: flex;
	align-items: center;
	gap: 12px;
}

.ltw-fc__hint {
	margin-top: 8px !important;
	color: var(--ltw-fc-muted);
	font-size: 12px;
	text-align: center;
}

.ltw-fc__error {
	margin-top: 8px !important;
	color: var(--ltw-fc-error);
	font-size: 13px;
}

.ltw-fc__links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 4px 14px;
	margin-top: 10px !important;
	font-size: 12.5px;
	text-align: center;
}

.ltw-fc__links a { color: var(--ltw-fc-muted); text-decoration: underline; }
.ltw-fc__links a:hover { color: var(--ltw-fc-brand); }

/* «Pedido recibido»: tarjeta de FrikiCoins (ThankYouController) */
.ltw-fc-thankyou {
	display: grid;
	gap: 10px;
	padding: 22px 24px;
	border: 1px solid #ece4f5;
	border-radius: 12px;
	background: linear-gradient(180deg, #f8f1fe 0%, #fff 75%);
	box-shadow: 0 1px 2px rgba(27, 6, 45, .04), 0 10px 30px rgba(81, 3, 149, .07);
	color: var(--ltw-fc-text);
}

.ltw-fc-thankyou p { margin: 0 !important; }

.ltw-fc-thankyou__head {
	display: flex;
	align-items: center;
	gap: 10px;
}

.ltw-fc-thankyou__head .ltw-fc__coin--lg { width: 2.4rem; height: 2.4rem; }

.ltw-fc-thankyou__head h2 {
	margin: 0 !important;
	font-family: "Bebas Neue", sans-serif;
	font-size: 28px !important;
	font-weight: 400;
	line-height: 1 !important;
}

.ltw-fc-thankyou__lead {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	font-size: 15px;
	font-weight: 600;
}

.ltw-fc-thankyou__text,
.ltw-fc-thankyou__balance {
	color: var(--ltw-fc-muted);
	font-size: 14px;
}

.ltw-fc-thankyou__reward {
	padding: 10px 12px;
	border: 1px solid #e4d6f2;
	border-radius: 8px;
	background: #fff;
	font-size: 14px;
}

.ltw-fc-thankyou__reward strong { color: var(--ltw-fc-text); }
.ltw-fc-thankyou__reward span { color: var(--ltw-fc-brand); font-weight: 600; white-space: nowrap; }

.ltw-fc-thankyou__balance strong { color: var(--ltw-fc-brand); }
.ltw-fc-thankyou__balance a { color: var(--ltw-fc-brand); font-weight: 600; }

.ltw-fc-thankyou > .button-primary { justify-self: start; }

/* Mi cuenta (mismo lenguaje que el widget: cabecera morada con filo dorado,
 * tarjetas blancas con sombra suave, botones del tema). */
.ltw-fc-teaser {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem 1rem;
	margin: 0 0 20px !important;
	padding: 16px 22px !important;
	border-bottom: 3px solid #f7c62f;
	border-radius: var(--ltw-fc-radius);
	background:
		radial-gradient(60% 120% at 90% 20%, rgba(255, 255, 255, .14), transparent 70%),
		linear-gradient(135deg, #6a12c4 0%, var(--ltw-fc-brand) 45%, #3a016f 100%);
	box-shadow: 0 10px 30px rgba(81, 3, 149, .18);
	color: #fff !important;
	font-size: 16px;
}

.ltw-fc-teaser .ltw-fc__coin {
	width: 2.75rem;
	height: 2.75rem;
	margin: 0;
	font-size: 1rem;
}

.ltw-fc-teaser strong {
	color: #f7c62f;
	font-family: "Bebas Neue", sans-serif;
	font-size: 26px;
	font-weight: 400;
	letter-spacing: .02em;
	vertical-align: -2px;
}

.ltw-fc-teaser a {
	margin-left: auto;
	padding: 8px 16px;
	border-radius: 8px;
	background: #fff;
	color: var(--ltw-fc-brand) !important;
	font-family: "Bebas Neue", sans-serif;
	font-size: 16px;
	font-weight: 400 !important;
	letter-spacing: 1px;
	text-decoration: none !important;
	text-transform: uppercase;
}

.ltw-fc-teaser a:hover { background: #f8f1fe; }

.ltw-fc-teaser__text { flex: 1 1 auto; }

@media (max-width: 600px) {
	.ltw-fc-teaser a {
		flex: 1 1 100%;
		justify-content: center;
		margin-left: 0;
		text-align: center;
	}
}

.ltw-fc-account {
	display: grid;
	gap: 2.5rem;
}

.ltw-fc-account h2 {
	margin-bottom: .5rem;
}

.ltw-fc-account__summary {
	position: relative;
	overflow: hidden;
	padding: 26px 28px 24px;
	border-bottom: 3px solid #f7c62f;
	border-radius: 16px;
	background:
		radial-gradient(60% 80% at 85% 25%, rgba(255, 255, 255, .14), transparent 70%),
		linear-gradient(135deg, #6a12c4 0%, var(--ltw-fc-brand) 45%, #3a016f 100%);
	box-shadow: 0 14px 40px rgba(81, 3, 149, .22);
	color: #fff;
}

.ltw-fc-account__summary.is-closed {
	background: linear-gradient(135deg, #6b6b6b, #3f3f3f);
	border-bottom-color: #b9b9b9;
}

.ltw-fc-account__deco {
	position: absolute;
	margin: 0;
	pointer-events: none;
	filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .3));
}

.ltw-fc-account__deco--1 { top: 22px; right: 90px; width: 84px; height: 84px; transform: rotate(-18deg); }
.ltw-fc-account__deco--2 { top: 92px; right: 30px; width: 54px; height: 54px; transform: rotate(16deg); opacity: .9; }
.ltw-fc-account__deco--3 { bottom: 16px; right: 170px; width: 36px; height: 36px; transform: rotate(32deg); opacity: .55; }

@media (max-width: 600px) {
	.ltw-fc-account__deco--1 { top: 16px; right: 16px; width: 56px; height: 56px; }
	.ltw-fc-account__deco--2,
	.ltw-fc-account__deco--3 { display: none; }
}

.ltw-fc-account__kicker {
	position: relative;
	margin: 0 0 12px !important;
	color: #f7c62f;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
}

.ltw-fc-account__balance {
	position: relative;
	display: flex;
	align-items: center;
	gap: 16px;
}

.ltw-fc-account__balance .ltw-fc__coin--lg {
	width: 4.25rem;
	height: 4.25rem;
}

.ltw-fc-account__balance p {
	margin: 0;
}

.ltw-fc-account__label {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	opacity: .85;
	text-transform: uppercase;
}

.ltw-fc-account__amount {
	font-family: "Bebas Neue", sans-serif;
	font-size: 56px;
	font-weight: 400;
	letter-spacing: .01em;
	line-height: .95;
}

.ltw-fc-account__pending {
	margin-top: .35rem !important;
	font-size: .875rem;
	opacity: .9;
}

.ltw-fc-account__closed {
	position: relative;
	margin: 1rem 0 0;
	font-weight: 600;
}

.ltw-fc-account__info {
	position: relative;
	margin: 18px 0 0 !important;
}

.ltw-fc-account .ltw-fc-account__info a {
	display: inline-flex;
	align-items: center;
	min-height: 38px;
	padding: 6px 16px;
	border: 1px solid rgba(255, 255, 255, .6);
	border-radius: 8px;
	color: #fff !important;
	font-family: "Bebas Neue", sans-serif;
	font-size: 16px;
	font-weight: 400 !important;
	letter-spacing: 1px;
	text-decoration: none !important;
	text-transform: uppercase;
	transition: background-color .15s, color .15s;
}

.ltw-fc-account .ltw-fc-account__info a:hover {
	background: #fff;
	color: var(--ltw-fc-brand) !important;
}

.ltw-fc-account__hint {
	display: block;
	color: var(--ltw-fc-muted);
	font-size: .875rem;
}

/* `hidden` tiene que ganar al display forzado de los botones */
body.woocommerce-account .woocommerce .woocommerce-MyAccount-content .ltw-fc-account [hidden],
body.woocommerce-account .woocommerce .woocommerce-MyAccount-content .ltw-fc-account .button[hidden] { display: none !important; }

/* Botones del área: mismos que los del tema (Bebas, mayúsculas, radio 8 px) */
.ltw-fc-account .button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	min-width: 0 !important;
	min-height: 40px !important;
	padding: 6px 16px !important;
	border: 1px solid var(--ltw-fc-brand) !important;
	border-radius: 8px !important;
	background: var(--ltw-fc-brand) !important;
	background-image: none !important;
	color: #fff !important;
	font-family: "Bebas Neue", sans-serif !important;
	font-size: 16px !important;
	font-weight: 400 !important;
	letter-spacing: 1px !important;
	line-height: 1 !important;
	text-decoration: none !important;
	text-transform: uppercase !important;
}

.ltw-fc-account .button:hover { background: #410674 !important; border-color: #410674 !important; }

.ltw-fc-account .button.ltw-fc__btn--ghost {
	background: transparent !important;
	color: var(--ltw-fc-brand) !important;
}

.ltw-fc-account .button.ltw-fc__btn--ghost:hover {
	background: var(--ltw-fc-brand) !important;
	color: #fff !important;
}

.ltw-fc-account input[type="text"],
.ltw-fc-account input[type="date"],
.ltw-fc-account select,
.ltw-fc-account textarea {
	min-height: 40px;
	border-radius: 8px !important;
}

/* Recompensas */
.ltw-fc-rewards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 16px;
	margin: 1rem 0 0;
	padding: 0;
	list-style: none;
}

.ltw-fc-rewards__item {
	display: flex;
	flex-direction: column;
	margin: 0;
	overflow: hidden;
	border: 1px solid #efe5f9;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(27, 6, 45, .04), 0 10px 30px rgba(81, 3, 149, .07);
	position: relative;
	transition: transform .3s ease-out, box-shadow .3s ease-out;
}

/* Mismo hover que las tarjetas de producto del tema (_product-loop-card):
 * sombra suave y, desde tablet (md, 782 px), la tarjeta sube 16 px. */
@media (hover: hover) {
	.ltw-fc-rewards__item:hover { box-shadow: 0 12px 12px rgba(13, 4, 22, .07); }
}

@media (hover: hover) and (min-width: 782px) {
	.ltw-fc-rewards__item:hover { transform: translateY(-16px); z-index: 2; }
}

.ltw-fc-rewards__item.is-in-cart {
	border-color: var(--ltw-fc-brand);
	box-shadow: 0 0 0 1px var(--ltw-fc-brand), 0 10px 30px rgba(81, 3, 149, .12);
}

.ltw-fc-rewards__media {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 4 / 3;
	/* Tono intermedio entre el fondo de la web (#f8f1fe) y el blanco: con el
	 * degradado anterior el borde de la tarjeta se fundía con la página. */
	background: #fcf8ff;
	border-bottom: 1px solid #efe5f9;
}

.ltw-fc-rewards__media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 12px;
	box-sizing: border-box;
}

.ltw-fc-rewards__media .ltw-fc__coin--lg {
	width: 5rem;
	height: 5rem;
	filter: drop-shadow(0 8px 14px rgba(81, 3, 149, .25));
}

.ltw-fc-rewards__media .ltw-fc-art {
	width: 100%;
	height: 100%;
	padding: 6px;
	box-sizing: border-box;
}

.ltw-fc-rewards__item.is-locked .ltw-fc-rewards__media .ltw-fc-art,
.ltw-fc-rewards__item.is-locked .ltw-fc-rewards__media img,
.ltw-fc-rewards__item.is-locked .ltw-fc-rewards__media .ltw-fc__coin {
	filter: grayscale(1);
	opacity: .4;
}

.ltw-fc-rewards__lock {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 50%;
	background: rgba(35, 35, 35, .85);
	color: #fff;
}

.ltw-fc-rewards__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: .4rem;
	padding: 16px 18px 18px;
}

.ltw-fc-account .ltw-fc-rewards__body h3 {
	margin: 0 !important;
	font-family: Inter, sans-serif !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	letter-spacing: 0 !important;
	line-height: 1.3 !important;
}

.ltw-fc-rewards__body p {
	margin: 0;
}

/* Precio, barra y botón a la misma altura aunque el título ocupe más líneas */
.ltw-fc-rewards__foot {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: .4rem;
}

@media (min-width: 601px) {
	.ltw-fc-rewards__item {
		display: grid;
		grid-row: span 3;
		grid-template-rows: subgrid;
		row-gap: 0;
	}

	.ltw-fc-rewards__body {
		display: grid;
		grid-row: span 2;
		grid-template-rows: subgrid;
		row-gap: .4rem;
	}
}

.ltw-fc-rewards__body .ltw-fc-pill { align-self: flex-start; font-size: 21px; }
.ltw-fc-rewards__body .ltw-fc-pill .ltw-fc__coin { width: 1.7rem; height: 1.7rem; }

.ltw-fc-rewards__description,
.ltw-fc-rewards__state {
	color: var(--ltw-fc-muted);
	font-size: .875rem;
}

.ltw-fc-rewards__form,
.ltw-fc-rewards__body form:not(.ltw-fc-dialog__form) {
	display: grid;
	gap: .6rem;
	margin-top: auto;
	padding-top: .6rem;
}

.ltw-fc-rewards__body form:not(.ltw-fc-rewards__form):not(.ltw-fc-dialog__form) {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .75rem;
}

.ltw-fc-rewards__form label span {
	display: block;
	margin-bottom: .25rem;
	font-size: .875rem;
	font-weight: 600;
}

.ltw-fc-rewards__form select,
.ltw-fc-rewards__form textarea {
	width: 100%;
	box-sizing: border-box;
}

/* Móvil: tarjeta horizontal, imagen a la izquierda */
@media (max-width: 600px) {
	.ltw-fc-rewards__item { flex-direction: row; }

	.ltw-fc-rewards__media {
		flex: 0 0 104px;
		aspect-ratio: auto;
		align-self: stretch;
		min-height: 104px;
	}

	.ltw-fc-rewards__media .ltw-fc__coin--lg { width: 3.25rem; height: 3.25rem; }
	.ltw-fc-rewards__media img { padding: 8px; }
	.ltw-fc-rewards__body { min-width: 0; padding: 14px; }
}

/* Ventana para elegir opción / escribir nota de una recompensa */
.ltw-fc-dialog {
	width: min(520px, calc(100vw - 32px));
	max-height: min(86vh, 720px);
	margin: auto;
	padding: 0;
	overflow: auto;
	overscroll-behavior: contain;
	border: 0;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 30px 80px rgba(10, 0, 25, .45);
	color: var(--ltw-fc-text);
}

.ltw-fc-dialog::backdrop {
	background: rgba(20, 0, 45, .55);
	backdrop-filter: blur(2px);
}

.ltw-fc-dialog__form {
	display: grid;
	gap: 18px;
	padding: 22px 24px;
}

.ltw-fc-dialog__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}

.ltw-fc-dialog__head > div { display: grid; gap: 8px; justify-items: start; }

.ltw-fc-account .ltw-fc-dialog__head h3 {
	margin: 0 !important;
	font-size: 26px !important;
	line-height: 1 !important;
}

.ltw-fc-dialog__head .ltw-fc-pill { font-size: 20px; }
.ltw-fc-dialog__head .ltw-fc-pill .ltw-fc__coin { width: 1.6rem; height: 1.6rem; }

.ltw-fc-dialog__close {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--ltw-fc-brand-soft);
	color: var(--ltw-fc-brand);
	cursor: pointer;
}

.ltw-fc-dialog__close:hover { background: #eedffd; }

.ltw-fc-dialog__options {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	border: 0;
}

.ltw-fc-dialog__options legend,
.ltw-fc-dialog__field > span {
	display: block;
	margin-bottom: 8px;
	padding: 0;
	font-size: 14px;
	font-weight: 600;
}

/* Cada opción: tarjeta seleccionable con foto */
.ltw-fc-option {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 8px 12px 8px 8px;
	border: 1px solid #e4d6f2;
	border-radius: 10px;
	background: #fff;
	cursor: pointer;
	transition: border-color .15s, background-color .15s, box-shadow .15s;
}

.ltw-fc-option:hover { border-color: #c9a6ee; }

.ltw-fc-option input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.ltw-fc-option:has(input:checked) {
	border-color: var(--ltw-fc-brand);
	background: var(--ltw-fc-brand-soft);
	box-shadow: 0 0 0 1px var(--ltw-fc-brand);
}

.ltw-fc-option:has(input:focus-visible) { outline: 2px solid var(--ltw-fc-brand); outline-offset: 2px; }

.ltw-fc-option.is-disabled { cursor: not-allowed; opacity: .5; }

.ltw-fc-option__thumb {
	display: inline-flex;
	flex: 0 0 auto;
	width: 52px;
	height: 52px;
	overflow: hidden;
	border-radius: 8px;
	background: var(--ltw-fc-brand-soft);
}

.ltw-fc-option__thumb img { width: 100%; height: 100%; object-fit: cover; }

.ltw-fc-option__name {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 14.5px;
	font-weight: 500;
	line-height: 1.35;
}

.ltw-fc-option__name small { display: block; color: var(--ltw-fc-muted); font-size: 12.5px; }

/* Check en la opción elegida */
.ltw-fc-option::after {
	content: "";
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	border: 1.5px solid #c9a6ee;
	border-radius: 50%;
	background: #fff center / 14px no-repeat;
}

.ltw-fc-option:has(input:checked)::after {
	border-color: var(--ltw-fc-brand);
	background-color: var(--ltw-fc-brand);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

.ltw-fc-dialog__field textarea {
	width: 100%;
	box-sizing: border-box;
	border-radius: 8px !important;
}

.ltw-fc-dialog__actions {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
}

/* Los formularios de Mi cuenta del tema (account.css) fuerzan label en
 * bloque, leyendas en Bebas y márgenes: dentro de la ventana, los nuestros. */
.woocommerce-account .ltw-fc-dialog form label.ltw-fc-option {
	display: flex;
	margin: 0;
	font-size: inherit;
	font-weight: 400;
}

body.woocommerce-account .woocommerce-MyAccount-content .ltw-fc-dialog form legend {
	padding: 0;
	color: var(--ltw-fc-text);
	font-family: Inter, sans-serif;
	font-size: 14px;
	letter-spacing: 0;
}

body.woocommerce-account .woocommerce-MyAccount-content .ltw-fc-dialog form fieldset { margin: 0; padding: 0; border: 0; }

body.woocommerce-account .woocommerce .woocommerce-MyAccount-content .ltw-fc-dialog__actions .button.ltw-fc__btn--ghost {
	background: transparent !important;
	color: var(--ltw-fc-brand) !important;
}

body.woocommerce-account .woocommerce .woocommerce-MyAccount-content .ltw-fc-dialog__actions .button.ltw-fc__btn--ghost:hover {
	background: var(--ltw-fc-brand-soft) !important;
}
.woocommerce-account .ltw-fc-dialog form label.ltw-fc-dialog__field { display: block; margin: 0; }

@media (max-width: 480px) {
	.ltw-fc-dialog__form { padding: 18px 16px; }
	.ltw-fc-dialog__actions .button { flex: 1 1 0; }
}

/* Consigue más: invitación destacada + tarjetas con la recompensa arriba y la
 * acción siempre abajo, alineada entre tarjetas. */
.ltw-fc-referral {
	display: grid;
	gap: 20px 32px;
	margin-top: 1rem;
	padding: 24px 26px;
	border-radius: 14px;
	background:
		linear-gradient(135deg, #fff 0%, #f8f1fe 100%);
	box-shadow: 0 1px 2px rgba(27, 6, 45, .04), 0 10px 30px rgba(81, 3, 149, .07);
}

@media (min-width: 900px) {
	.ltw-fc-referral { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; }
}

.ltw-fc-referral__intro {
	display: flex;
	align-items: flex-start;
	gap: 16px;
}

.ltw-fc-referral__intro .ltw-fc-earn__icon {
	flex: 0 0 auto;
	width: 52px;
	height: 52px;
	margin: 0;
	background: var(--ltw-fc-brand);
	color: #fff;
}

.ltw-fc-account .ltw-fc-referral h3 {
	margin: 2px 0 6px !important;
	font-size: 28px !important;
}

.ltw-fc-referral p {
	margin: 0;
	color: var(--ltw-fc-muted);
	font-size: 15px;
}

.ltw-fc-referral p strong { color: var(--ltw-fc-brand); }

.ltw-fc-referral__share {
	display: grid;
	gap: 10px;
}

.ltw-fc-referral__amounts {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
}

.ltw-fc-referral__amounts > span {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.ltw-fc-referral__amounts small {
	color: var(--ltw-fc-muted);
	font-size: 13px;
	font-weight: 600;
}

/* Enlace + Copiar en una sola pieza */
.ltw-fc-account .ltw-fc-copy {
	display: flex;
	flex-wrap: nowrap;
	gap: 0;
	margin: 0;
	padding: 4px;
	border: 1px solid var(--ltw-fc-border);
	border-radius: 10px;
	background: #fff;
}

.ltw-fc-account .ltw-fc-copy input {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 40px;
	padding: 0 10px !important;
	border: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
	color: var(--ltw-fc-text);
	font-size: 14px;
	outline: none;
}

.ltw-fc-account .ltw-fc-copy .button { flex: 0 0 auto; }

.ltw-fc-account .button.ltw-fc__btn--wa {
	border-color: #1fa855 !important;
	background: #1fa855 !important;
}

.ltw-fc-account .button.ltw-fc__btn--wa:hover {
	border-color: #168043 !important;
	background: #168043 !important;
}

.ltw-fc-referral__stats { font-size: 13px !important; }

.ltw-fc-earn {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 16px;
	margin-top: 16px;
}

.ltw-fc-earn__card {
	display: flex;
	flex-direction: column;
	padding: 20px 22px;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(27, 6, 45, .04), 0 10px 30px rgba(81, 3, 149, .07);
}

.ltw-fc-earn__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}

.ltw-fc-earn__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 10px;
	background: var(--ltw-fc-brand-soft);
	color: var(--ltw-fc-brand);
}

/* Lo que se gana: pastilla morada suave; el dorado queda sólo en la moneda */
.ltw-fc-earn__reward {
	display: inline-flex;
	align-items: center;
	padding: 3px 12px 3px 3px;
	border: 1px solid #e4d6f2;
	border-radius: 999px;
	background: #f8f1fe;
	color: var(--ltw-fc-brand);
	font-family: "Bebas Neue", sans-serif;
	font-size: 19px;
	line-height: 1.2;
	white-space: nowrap;
}

.ltw-fc-earn__reward .ltw-fc__coin {
	width: 1.45rem;
	height: 1.45rem;
	margin-right: .35rem;
	font-size: 1rem;
}

.ltw-fc-account .ltw-fc-earn__card h3 {
	margin: 0 0 .35rem !important;
	font-size: 24px !important;
}

.ltw-fc-earn__card p {
	margin: 0 0 1rem;
	color: var(--ltw-fc-muted);
	font-size: 14.5px;
	line-height: 1.5;
}

.ltw-fc-earn__card p strong { color: var(--ltw-fc-brand); }

.ltw-fc-earn__action {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: auto !important;
}

/* Botones a todo el ancho de la tarjeta: así las tres acciones quedan a la
 * misma altura y con el mismo peso visual. */
.ltw-fc-account .ltw-fc-earn__action .button {
	flex: 1 1 0;
	/* El enlace «Seguir» con la misma altura que los botones */
	min-height: 48px !important;
	padding-block: 0 !important;
	padding-inline: 12px !important;
	white-space: nowrap;
}

.ltw-fc-earn__action input[type="date"] {
	flex: 1 1 100%;
	min-width: 0;
}

.ltw-fc-earn__msg {
	flex: 1 0 100%;
	margin: 0 !important;
	color: var(--ltw-fc-error) !important;
	font-size: 13px !important;
}

/* Bonus ya conseguido: tarjeta en verde suave, check en lugar del icono y
 * la pastilla dice lo que se sumó. Sin acción abajo. */
.ltw-fc-earn__card.is-done {
	background: linear-gradient(180deg, #f3fbf5 0%, #fff 70%);
	box-shadow: 0 0 0 1px #d3efdb, 0 10px 30px rgba(23, 102, 58, .06);
}

.ltw-fc-earn__card.is-done .ltw-fc-earn__icon {
	background: #1d7a3a;
	color: #fff;
}

.ltw-fc-earn__reward.is-done {
	padding: 4px 12px;
	border-color: #c6e9d1;
	background: #e6f6ea;
	color: #17663a;
}

.ltw-fc-inline-form {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
}

/* Mis pedidos: columna FrikiCoins */
.ltw-fc-order-points {
	display: block;
	white-space: nowrap;
	line-height: 1.35;
}

.ltw-fc-order-points strong { font-weight: 700; }
.ltw-fc-order-points small { color: var(--ltw-fc-muted); font-size: 12.5px; }
.ltw-fc-order-points--added strong { color: #17663a; }
.ltw-fc-order-points--pending strong { color: #7a5600; }
.ltw-fc-order-points--redeemed strong { color: var(--ltw-fc-brand); }
.ltw-fc-order-points--voided strong,
.ltw-fc-order-points--returned strong { color: var(--ltw-fc-muted); text-decoration: line-through; }
.ltw-fc-order-points--none { color: var(--ltw-fc-muted); }

/* Movimientos: la tabla hereda el estilo de las tablas de Mi cuenta */
.ltw-fc-history__concept strong { display: block; }

.ltw-fc-history__note {
	display: block;
	color: var(--ltw-fc-muted);
	font-size: 14px;
}

/* Estado como píldora */
.ltw-fc-status {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	background: #e6f6ea;
	color: #17663a;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.5;
	white-space: nowrap;
}

/* Una por resultado (Transaction::getOutcome) */
.ltw-fc-status--redeemed { background: #f3e9fd; color: var(--ltw-fc-brand); }
.ltw-fc-status--deducted { background: #fbe9e8; color: #a1261d; }
.ltw-fc-status--pending { background: #fff4d6; color: #7a5600; }
.ltw-fc-status--voided { background: #f1eef5; color: #6d6578; }
.ltw-fc-status--returned { background: #e8f0fe; color: #1c4fa8; }

/* Los canjes en morado, como su etiqueta: no es un error ni una pérdida */
.ltw-fc-history tr:has(.ltw-fc-status--redeemed) .ltw-fc-history__points { color: var(--ltw-fc-brand); }

/* Móvil: cada movimiento en una fila compacta, como en el widget:
 * concepto y fecha a la izquierda, puntos y estado a la derecha. Pisa la
 * versión «tarjeta con etiquetas» genérica de las tablas de Mi cuenta. */
@media (max-width: 768px) {
	body.woocommerce-account .woocommerce-MyAccount-content table.ltw-fc-history tbody tr {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-areas: "concept points" "date status";
		gap: 2px 12px;
		align-items: center;
		padding: 12px 16px;
	}

	body.woocommerce-account .woocommerce-MyAccount-content table.ltw-fc-history tbody tr > * {
		display: block !important;
		padding: 0 !important;
		text-align: left !important;
	}

	body.woocommerce-account .woocommerce-MyAccount-content table.ltw-fc-history tbody tr > *::before { content: none !important; }

	body.woocommerce-account table.ltw-fc-history .ltw-fc-history__concept { grid-area: concept; }
	body.woocommerce-account table.ltw-fc-history .ltw-fc-history__date { grid-area: date; color: var(--ltw-fc-muted); font-size: 13px; }
	/* justify-self y no text-align: la regla de arriba fija text-align con más especificidad */
	body.woocommerce-account table.ltw-fc-history .ltw-fc-history__points { grid-area: points; justify-self: end; font-size: 17px; }
	body.woocommerce-account table.ltw-fc-history .ltw-fc-history__status { grid-area: status; justify-self: end; }
	body.woocommerce-account table.ltw-fc-history .ltw-fc-status { padding: 1px 8px; font-size: 12px; }

	body.woocommerce-account table.ltw-fc-history .ltw-fc-history__note {
		overflow: hidden;
		font-size: 13px;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
}

.ltw-fc-history__points {
	text-align: right !important;
	white-space: nowrap;
	color: #17663a;
	font-weight: 700;
}

.ltw-fc-history__points.is-negative { color: #a1261d; }

.ltw-fc-history tr.is-pending td {
	color: var(--ltw-fc-muted);
}

.ltw-fc-history tr.is-cancelled td { color: var(--ltw-fc-muted); }
.ltw-fc-history tr.is-cancelled .ltw-fc-history__points { color: var(--ltw-fc-muted); text-decoration: line-through; }
.ltw-fc-history tr.is-pending .ltw-fc-history__points { color: #7a5600; }

.ltw-fc-birthday-field .ltw-fc-account__hint {
	margin-top: .25rem;
}
