/**
 * RH Free Gift — frontend (classic cart/checkout) styling.
 */

/* Golden metallic "Regalo gratis" badge with a subtle shine sweep.
   font-size/line-height/color use !important so the theme cannot inflate or
   recolor the small chip. */
.rh-free-gift__badge {
	position: relative;
	display: inline-block;
	overflow: hidden;
	margin: 5px 0 0 10px !important;
	padding: 2px 9px !important;
	border-radius: 999px;
	background: linear-gradient(
		135deg,
		#6a460c 0%,
		#9a7020 22%,
		#c0923a 48%,
		#9a7020 74%,
		#6a460c 100%
	);
	color: #ffffff !important;
	font-family: 'Plus Jakarta Sans', sans-serif !important;
	font-size: 8px !important;
	font-weight: 700 !important;
	line-height: 1.7 !important;
	letter-spacing: 0.1em !important;
	text-transform: uppercase !important;
	white-space: nowrap;
	vertical-align: middle;
	text-shadow: 0 1px 1px rgba(50, 33, 0, 0.5);
	box-shadow:
		0 1px 2px rgba(70, 48, 5, 0.3),
		inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

/* The moving highlight: a soft diagonal sheen that crosses, then pauses. */
.rh-free-gift__badge::after {
	content: "";
	position: absolute;
	top: 0;
	left: -160%;
	width: 60%;
	height: 100%;
	transform: skewX(-20deg);
	background: linear-gradient(
		120deg,
		rgba(255, 255, 255, 0) 0%,
		rgba(255, 255, 255, 0.5) 50%,
		rgba(255, 255, 255, 0) 100%
	);
	animation: rh-free-gift-shine 5s ease-in-out infinite;
	pointer-events: none;
}

@keyframes rh-free-gift-shine {
	0%   { left: -160%; }
	16%  { left: 160%; }
	100% { left: 160%; }
}

/* Respect users who prefer reduced motion. */
@media (prefers-reduced-motion: reduce) {
	.rh-free-gift__badge::after {
		animation: none;
		display: none;
	}
}

.rh-free-gift__price {
	font-family: 'Plus Jakarta Sans', sans-serif;
	font-weight: 600;
	color: #1f7a3d;
}

.rh-free-gift__qty {
	display: inline-block;
	font-family: 'Plus Jakarta Sans', sans-serif;
	font-weight: 600;
}

/* ── Locked gift teaser (coupon applied, minimum not met yet) ─────────────── */

/* Dim only the gift "preview" cells, never the unlock message. */
.rh-free-gift-teaser__preview {
	opacity: 0.45;
}

.rh-free-gift-teaser .product-thumbnail img {
	filter: grayscale(100%);
}

/* The call to action that tells the customer how much more to spend. */
.rh-free-gift-teaser__msg {
	margin-top: 6px;
	font-family: 'Plus Jakarta Sans', sans-serif;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	color: #8a5e12;
}

.rh-free-gift-teaser__msg .amount,
.rh-free-gift-teaser__msg .woocommerce-Price-amount {
	font-weight: 700;
	white-space: nowrap;
}

/* Locked variant of the badge: muted grey, no shine. */
.rh-free-gift__badge--locked {
	background: linear-gradient(
		135deg,
		#7c7f85 0%,
		#9aa0a6 50%,
		#7c7f85 100%
	) !important;
	box-shadow:
		0 1px 2px rgba(60, 63, 68, 0.25),
		inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.rh-free-gift__badge--locked::after {
	display: none;
}
