/* -----------------------------------------------------------------------------
 * Wishlist — inherits the site's brand tokens, refined with hairline borders,
 * tracked micro-labels and soft motion. Colors fall back to currentColor so the
 * component adapts to light or dark sections automatically.
 * -------------------------------------------------------------------------- */
.e-wishlist-button,
.e-wishlist {
	--e-wl-accent: var(--e-global-color-accent, var(--e-global-color-primary, currentColor));
	--e-wl-hairline: rgba(127, 127, 127, 0.22);
	--e-wl-hairline: color-mix(in srgb, currentColor 16%, transparent);
	--e-wl-tint: rgba(127, 127, 127, 0.06);
	--e-wl-tint: color-mix(in srgb, currentColor 5%, transparent);
	--e-wl-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Add-to-wishlist button — ghost style that fills on hover. */
.e-wishlist-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6em;
	cursor: pointer;
	border: 1px solid var(--e-wl-hairline);
	background: transparent;
	color: inherit;
	font: inherit;
	line-height: 1;
	letter-spacing: 0.02em;
	padding: 0.85em 1.5em;
	border-radius: 3px;
	transition: color 0.25s var(--e-wl-ease), background-color 0.25s var(--e-wl-ease),
		border-color 0.25s var(--e-wl-ease), transform 0.25s var(--e-wl-ease);
}

.e-wishlist-button:hover {
	border-color: currentColor;
	background: var(--e-wl-tint);
}

.e-wishlist-button.is-in-wishlist {
	border-color: var(--e-wl-accent);
	color: var(--e-wl-accent);
}

.e-wishlist-button.is-loading {
	opacity: 0.55;
	pointer-events: none;
}

.e-wishlist-button__icon {
	display: inline-flex;
	align-items: center;
	transition: transform 0.25s var(--e-wl-ease);
}

.e-wishlist-button.is-in-wishlist .e-wishlist-button__icon svg {
	fill: currentColor;
}

/* Heart "pop" the moment an item is added (class toggled by the script). */
.e-wishlist-button.is-just-added .e-wishlist-button__icon {
	animation: e-wishlist-pop 0.4s var(--e-wl-ease);
}

@keyframes e-wishlist-pop {
	0% { transform: scale(1); }
	40% { transform: scale(1.4); }
	100% { transform: scale(1); }
}

.e-wishlist-button-align-center { text-align: center; }
.e-wishlist-button-align-right { text-align: right; }
.e-wishlist-button-align-stretch .e-wishlist-button { display: flex; width: 100%; }

/* -------------------------------------------------------------------------- */
/* Saved-items grid                                                           */
/* -------------------------------------------------------------------------- */
.e-wishlist {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
}

.e-wishlist__item {
	position: relative;
	display: flex;
	flex-direction: column;
	text-align: center;
	padding: 22px;
	border: 1px solid var(--e-wl-hairline);
	border-radius: 6px;
	background: transparent;
	transition: transform 0.3s var(--e-wl-ease), box-shadow 0.3s var(--e-wl-ease),
		border-color 0.3s var(--e-wl-ease);
}

.e-wishlist__item:hover {
	transform: translateY(-4px);
	border-color: transparent;
	box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.45);
}

.e-wishlist__remove {
	position: absolute;
	top: 12px;
	inset-inline-end: 12px;
	width: 30px;
	height: 30px;
	line-height: 1;
	font-size: 18px;
	border: 0;
	border-radius: 50%;
	background: var(--e-wl-tint);
	color: inherit;
	cursor: pointer;
	opacity: 0;
	transform: scale(0.9);
	transition: opacity 0.25s var(--e-wl-ease), transform 0.25s var(--e-wl-ease), background-color 0.2s;
}

.e-wishlist__item:hover .e-wishlist__remove {
	opacity: 1;
	transform: scale(1);
}

.e-wishlist__remove:hover {
	background: var(--e-wl-accent);
	color: #fff;
}

.e-wishlist__image {
	display: block;
	margin-bottom: 16px;
	overflow: hidden;
	border-radius: 4px;
}

.e-wishlist__image img {
	width: 100%;
	height: auto;
	transition: transform 0.5s var(--e-wl-ease);
}

.e-wishlist__item:hover .e-wishlist__image img {
	transform: scale(1.05);
}

.e-wishlist__title {
	display: block;
	font-weight: 600;
	letter-spacing: 0.01em;
	margin-bottom: 6px;
	text-decoration: none;
	color: inherit;
}

.e-wishlist__price {
	margin-bottom: 16px;
	opacity: 0.85;
}

.e-wishlist__add-to-cart {
	margin-top: auto;
}

.e-wishlist-empty {
	padding: 40px 24px;
	text-align: center;
	font-size: 0.85em;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	opacity: 0.55;
}

.e-wishlist-count.is-empty {
	opacity: 0.5;
}

/* -------------------------------------------------------------------------- */
/* Button skins (selectable preset)                                           */
/* -------------------------------------------------------------------------- */
.e-wlbtn-solid .e-wishlist-button {
	background: var(--e-wl-accent);
	border-color: var(--e-wl-accent);
	color: var(--e-global-color-background, #fff);
}

.e-wlbtn-solid .e-wishlist-button:hover {
	opacity: 0.9;
	background: var(--e-wl-accent);
}

.e-wlbtn-solid .e-wishlist-button.is-in-wishlist {
	background: transparent;
	color: var(--e-wl-accent);
}

.e-wlbtn-link .e-wishlist-button {
	border: 0;
	padding: 0;
	border-radius: 0;
	background: transparent;
}

.e-wlbtn-link .e-wishlist-button:hover {
	background: transparent;
}

.e-wlbtn-link .e-wishlist-button__text {
	padding-bottom: 2px;
	background-image: linear-gradient(currentColor, currentColor);
	background-size: 0% 1px;
	background-position: 0 100%;
	background-repeat: no-repeat;
	transition: background-size 0.3s var(--e-wl-ease);
}

.e-wlbtn-link .e-wishlist-button:hover .e-wishlist-button__text,
.e-wlbtn-link .e-wishlist-button.is-in-wishlist .e-wishlist-button__text {
	background-size: 100% 1px;
}

/* -------------------------------------------------------------------------- */
/* List skins (selectable preset)                                             */
/* -------------------------------------------------------------------------- */
.e-wll-bare .e-wishlist__item {
	border: 0;
	padding: 0;
}

.e-wll-bare .e-wishlist__item:hover {
	transform: none;
	box-shadow: none;
}

.e-wll-bare .e-wishlist__remove {
	background: transparent;
}

.e-wll-row .e-wishlist {
	grid-template-columns: 1fr;
	gap: 14px;
}

.e-wll-row .e-wishlist__item {
	flex-direction: row;
	align-items: center;
	text-align: start;
	gap: 18px;
}

.e-wll-row .e-wishlist__image {
	flex: 0 0 96px;
	width: 96px;
	margin-bottom: 0;
}

.e-wll-row .e-wishlist__title {
	margin-bottom: 2px;
}

.e-wll-row .e-wishlist__price {
	margin-bottom: 0;
}

.e-wll-row .e-wishlist__add-to-cart {
	margin-top: 0;
	margin-inline-start: auto;
}

/* Confident pill — filled, rounded-full, larger tap target (conversion CTA). */
.e-wlbtn-pill .e-wishlist-button {
	background: var(--e-wl-accent);
	border-color: var(--e-wl-accent);
	color: var(--e-global-color-background, #fff);
	border-radius: 999px;
	padding: 1em 2em;
	font-weight: 600;
	letter-spacing: 0.01em;
	box-shadow: 0 10px 24px -14px color-mix(in srgb, var(--e-wl-accent) 70%, transparent);
}

.e-wlbtn-pill .e-wishlist-button:hover {
	background: var(--e-wl-accent);
	transform: translateY(-1px);
}

.e-wlbtn-pill .e-wishlist-button.is-in-wishlist {
	background: transparent;
	color: var(--e-wl-accent);
	box-shadow: none;
}

/* -------------------------------------------------------------------------- */
/* Elevated card — soft shadow at rest, deeper lift on hover (Apple-like).    */
/* -------------------------------------------------------------------------- */
.e-wll-soft .e-wishlist__item {
	border-color: transparent;
	border-radius: 16px;
	background: var(--e-global-color-background, #fff);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 16px 38px -28px rgba(0, 0, 0, 0.4);
}

.e-wll-soft .e-wishlist__item:hover {
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 26px 56px -28px rgba(0, 0, 0, 0.5);
}

/* --------------------------------------------------------------------------
 * Responsive — tablet & phone
 * ------------------------------------------------------------------------ */
@media (max-width: 1024px) {
	.e-wishlist { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (max-width: 767px) {
	.e-wishlist { grid-template-columns: repeat(2, 1fr); gap: 14px; }
	.e-wishlist__item { padding: 16px; }
	.e-wll-soft .e-wishlist__item { border-radius: 14px; }
	/* The remove control is always visible on touch (no hover to reveal it). */
	.e-wishlist__remove { opacity: 1; transform: none; }
	.e-wishlist-button-align-stretch .e-wishlist-button,
	.e-wlbtn-pill .e-wishlist-button { width: 100%; }
}

@media (max-width: 479px) {
	.e-wishlist { grid-template-columns: 1fr; }
	/* Single-column phones read better as compact rows. */
	.e-wll-card .e-wishlist__item,
	.e-wll-soft .e-wishlist__item {
		flex-direction: row;
		align-items: center;
		text-align: start;
		gap: 14px;
	}
	.e-wll-card .e-wishlist__image,
	.e-wll-soft .e-wishlist__image { flex: 0 0 84px; width: 84px; margin-bottom: 0; }
	.e-wll-card .e-wishlist__add-to-cart,
	.e-wll-soft .e-wishlist__add-to-cart { margin-top: 6px; }
}

/* Keyboard users: reveal the remove control when focused within the item. */
.e-wishlist__item:focus-within .e-wishlist__remove {
	opacity: 1;
	transform: scale(1);
}
