.lemon-favorites-button,
.lemon-favorites-icon {
	--lfv-color: #191d1e;
	--lfv-color-hover: #191d1e;
	--lfv-active-color: #191d1e;
	--lfv-background: transparent;
	--lfv-background-hover: transparent;
	--lfv-border-color: transparent;
	--lfv-radius: 0;
	--lfv-gap: 8px;
	--lfv-icon-size: 22px;

	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--lfv-gap);
	border: 1px solid var(--lfv-border-color) !important;
	border-radius: var(--lfv-radius) !important;
	background: var(--lfv-background) !important;
	color: var(--lfv-color) !important;
	font: inherit;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.lemon-favorites-button:hover,
.lemon-favorites-button:focus-visible,
.lemon-favorites-icon:hover,
.lemon-favorites-icon:focus-visible {
	background: var(--lfv-background-hover) !important;
	color: var(--lfv-color-hover) !important;
}

.lemon-favorites-button.is-active,
.lemon-favorites-icon.has-items {
	color: var(--lfv-active-color) !important;
}

.lemon-favorites-button.is-loading {
	cursor: wait;
	opacity: 0.55;
}

.lemon-favorites-button__icon,
.lemon-favorites-icon__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--lfv-icon-size);
	height: var(--lfv-icon-size);
	flex: 0 0 auto;
	color: currentColor;
	font-size: var(--lfv-icon-size);
	line-height: 1;
}

.lemon-favorites-button__svg,
.lemon-favorites-button__custom-icon,
.lemon-favorites-icon__svg,
.lemon-favorites-icon__custom-icon {
	display: block;
	width: 100%;
	height: 100%;
}

.lemon-favorites-button__svg,
.lemon-favorites-icon__svg {
	fill: transparent;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: fill 160ms ease, transform 160ms ease;
}

.lemon-favorites-button__icon svg,
.lemon-favorites-icon__icon svg {
	display: block;
	width: 100%;
	height: 100%;
}

.lemon-favorites-icon.has-items .lemon-favorites-icon__svg {
	fill: currentColor;
}

/* Custom uploaded icons (inlined SVG or <img>). */
.lemon-loop-button__custom-icon {
	display: block;
	width: 100%;
	height: 100%;
}

/* Inlined custom SVG follows the button colour; paths without their own fill
   inherit currentColor, so single-colour icons recolour and change on active. */
.lemon-loop-button__custom-svg {
	display: block;
	width: 100%;
	height: 100%;
	transition: fill 160ms ease, color 160ms ease;
}

/* Favorites heart follows the icon colour (and changes on active); the cart
   button keeps its own icon design. */
.lemon-favorites-button .lemon-loop-button__custom-svg {
	fill: currentColor;
}

/* Default/active icon swap: when an active icon is uploaded, it replaces the
   default one once the product is in favorites. */
.lemon-loop-button__custom-icon--active {
	display: none;
}

.lemon-favorites-button.is-active .lemon-loop-button__custom-icon--default {
	display: none;
}

.lemon-favorites-button.is-active .lemon-loop-button__custom-icon--active {
	display: block;
}

/* For a single outline custom SVG, attempt a solid fill on active by switching
   the fill rule (works when the heart's subpaths share a winding direction).
   Upload a separate filled "active icon" for guaranteed solid feedback. */
.lemon-favorites-button.is-active .lemon-loop-button__custom-svg,
.lemon-favorites-button.is-active .lemon-loop-button__custom-svg path {
	fill-rule: nonzero;
	fill: currentColor;
}

.lemon-favorites-button__text,
.lemon-favorites-icon__text {
	white-space: nowrap;
}

.lemon-favorites-button--icon-only .lemon-favorites-button__text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	border: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
	position: relative;
}

.lemon-favorites-button--loop {
	--lfv-icon-size: 20px;
	--lfv-background: #fff;
	--lfv-background-hover: #fff;
	--lfv-radius: 999px;

	position: absolute;
	z-index: 3;
	top: 12px;
	right: 12px;
	width: 38px;
	height: 38px;
	padding: 0 !important;
	box-shadow: 0 8px 20px rgba(25, 29, 30, 0.12);
}

.lemon-favorites-button--single,
.lemon-favorites-button--shortcode {
	min-height: 44px;
	padding: 12px 18px !important;
	margin-top: 16px;
	text-transform: uppercase;
}

.lemon-favorites-button--list {
	--lfv-icon-size: 18px;

	justify-content: flex-start;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	text-transform: uppercase;
}

.lemon-favorites-icon {
	--lfv-trigger-size: 36px;
	--lfv-trigger-padding: 0;
	--lfv-badge-size: 20px;
	--lfv-badge-offset-top: -2px;
	--lfv-badge-offset-right: -2px;
	--lfv-badge-background: #191d1e;
	--lfv-badge-color: #fff;

	min-width: var(--lfv-trigger-size);
	min-height: var(--lfv-trigger-size);
	padding: var(--lfv-trigger-padding) !important;
}

.lemon-favorites-icon__icon-wrap {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--lfv-trigger-size);
	height: var(--lfv-trigger-size);
	flex: 0 0 auto;
}

.lemon-favorites-icon__badge {
	position: absolute;
	top: var(--lfv-badge-offset-top);
	right: var(--lfv-badge-offset-right);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--lfv-badge-size);
	height: var(--lfv-badge-size);
	border-radius: 999px;
	background: var(--lfv-badge-background);
	color: var(--lfv-badge-color);
	font-size: calc(var(--lfv-badge-size) * 0.58);
	font-weight: 700;
	line-height: 1;
}

.lemon-favorites-list {
	--lfv-list-columns: 4;
	--lfv-list-mobile-columns: 2;
	--lfv-list-gap: 28px;
	--lfv-list-image-ratio: auto;
	--lfv-list-title-color: #191d1e;
	--lfv-list-price-color: #8a786b;
	--lfv-empty-align: center;
	--lfv-empty-max-width: 560px;
	--lfv-empty-button-background: #191d1e;
	--lfv-empty-button-color: #fff;
	--lfv-empty-button-background-hover: #000;
	--lfv-empty-button-color-hover: #fff;
}

.lemon-favorites-list.is-loading {
	pointer-events: none;
	opacity: 0.6;
}

.lemon-favorites-list__items {
	display: grid;
	grid-template-columns: repeat(var(--lfv-list-columns), minmax(0, 1fr));
	gap: var(--lfv-list-gap);
	padding: 0;
	margin: 0;
	list-style: none;
}

.lemon-favorites-list__item {
	position: relative;
	min-width: 0;
}

.lemon-favorites-list__image {
	display: block;
	margin-bottom: 14px;
	background: #f5f5f5;
	overflow: hidden;
}

.lemon-favorites-list__image img,
.lemon-favorites-list__image-img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: contain;
	object-position: center;
}

.lemon-favorites-list--fixed-image-ratio .lemon-favorites-list__image {
	aspect-ratio: var(--lfv-list-image-ratio);
}

.lemon-favorites-list--fixed-image-ratio .lemon-favorites-list__image img,
.lemon-favorites-list--fixed-image-ratio .lemon-favorites-list__image-img {
	height: 100%;
}

.lemon-favorites-list__title {
	margin: 0 0 8px;
	color: var(--lfv-list-title-color);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
	text-transform: uppercase;
}

.lemon-favorites-list__title a {
	color: inherit;
	text-decoration: none;
}

.lemon-favorites-list__price {
	margin-bottom: 14px;
	color: var(--lfv-list-price-color);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.25;
}

.lemon-favorites-empty {
	display: flex;
	flex-direction: column;
	align-items: var(--lfv-empty-align);
	max-width: var(--lfv-empty-max-width);
	margin: 0 auto;
	text-align: center;
}

.lemon-favorites-empty__title {
	margin: 0 0 12px;
	color: #191d1e;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.15;
	text-transform: uppercase;
}

.lemon-favorites-empty__text {
	margin: 0 0 24px;
	color: #191d1e;
	font-size: 17px;
	line-height: 1.45;
}

.lemon-favorites-empty__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 14px 24px;
	background: var(--lfv-empty-button-background);
	color: var(--lfv-empty-button-color);
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
}

.lemon-favorites-empty__button:hover,
.lemon-favorites-empty__button:focus-visible {
	background: var(--lfv-empty-button-background-hover);
	color: var(--lfv-empty-button-color-hover);
}

.lemon-favorites-page {
	padding: 40px 20px;
}

.lemon-favorites-page__inner {
	width: min(1180px, 100%);
	margin: 0 auto;
}

.lemon-favorites-page__title {
	margin: 0 0 30px;
	color: #191d1e;
	font-size: 34px;
	font-weight: 700;
	line-height: 1.1;
	text-transform: uppercase;
}

@media (max-width: 767px) {
	.lemon-favorites-list__items {
		grid-template-columns: repeat(var(--lfv-list-mobile-columns), minmax(0, 1fr));
		gap: 22px 16px;
	}

	.lemon-favorites-list__title {
		font-size: 15px;
	}

	.lemon-favorites-empty__title {
		font-size: 22px;
	}
}

@media (max-width: 480px) {
	.lemon-favorites-list__items {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lemon-favorites-button__svg,
	.lemon-favorites-icon__svg {
		transition: none;
	}
}
