/*
 * Wishlist — wishlist.css (v195.17-wishlist)
 * All selectors are scoped under els-wl-*, header-wishlist, or the
 * body class of the wishlist page, so nothing here can affect any
 * other component or page.
 */

/* =====================================================================
 * Heart button on product cards
 * ===================================================================== */

/* The WooCommerce loop item is the positioning ancestor. */
.woocommerce ul.products li.product,
ul.products li.product {
	position: relative;
}

.els-wl-heart {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 5;
	width: 38px;
	height: 38px;
	border-radius: 999px;
	border: 0;
	padding: 0;
	background: rgba(255, 255, 255, 0.94);
	color: #131613;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 12px rgba(19, 22, 19, 0.12);
	transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.els-wl-heart:hover,
.els-wl-heart:focus-visible {
	transform: scale(1.08);
	color: #d33a3a;
}

.els-wl-heart:focus-visible {
	outline: 2px solid #3e7a52;
	outline-offset: 2px;
}

.els-wl-heart-icon {
	width: 20px;
	height: 20px;
}

/* Saved state */
.els-wl-heart[aria-pressed="true"] {
	color: #d33a3a;
	background: #ffffff;
}

.els-wl-heart[aria-pressed="true"] .els-wl-heart-icon {
	fill: currentColor;
	stroke: currentColor;
}

/* Pop animation when just saved */
@keyframes els-wl-pop {
	0%   { transform: scale(1); }
	40%  { transform: scale(1.28); }
	70%  { transform: scale(0.94); }
	100% { transform: scale(1); }
}

.els-wl-heart.is-just-added {
	animation: els-wl-pop 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* =====================================================================
 * Header icon (matches the theme's existing icon links)
 * ===================================================================== */

.header-wishlist {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.55rem 0.9rem;
	border-radius: 999px;
	background: #ffffff;
	border: 1px solid #e4e8e4;
	color: #131613;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.92rem;
	line-height: 1.2;
	transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.header-wishlist:hover,
.header-wishlist:focus-visible {
	color: #2f5d3f;
	border-color: #2f5d3f;
	box-shadow: 0 4px 12px rgba(47, 93, 63, 0.14);
}

.els-wl-header-icon {
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
}

.els-wl-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 999px;
	background: #3e7a52;
	color: #ffffff;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1;
	opacity: 0;
	transform: scale(0.6);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.els-wl-count.is-visible {
	opacity: 1;
	transform: scale(1);
}

@media (max-width: 720px) {
	.els-wl-header-label {
		display: none;
	}

	.header-wishlist {
		padding: 0.5rem 0.6rem;
	}
}

/* =====================================================================
 * Wishlist page
 * ===================================================================== */

.els-wl-page {
	padding: 2rem 1rem 3rem;
	background: #ffffff;
	color: #131613;
}

.els-wl-page .els-wl-inner {
	max-width: 1100px;
	margin: 0 auto;
}

.els-wl-page .els-wl-header {
	text-align: center;
	margin-bottom: 1.75rem;
}

.els-wl-page .els-wl-eyebrow {
	margin: 0 0 0.5rem;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: #3e7a52;
}

.els-wl-page .els-wl-title {
	margin: 0 0 0.5rem;
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	font-weight: 800;
	letter-spacing: -0.02em;
}

.els-wl-page .els-wl-lead {
	margin: 0 auto;
	max-width: 520px;
	color: #5b615c;
	font-size: 1rem;
}

.els-wl-page .els-wl-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

@media (min-width: 640px) {
	.els-wl-page .els-wl-grid {
		grid-template-columns: 1fr 1fr;
		gap: 1.25rem;
	}
}

@media (min-width: 960px) {
	.els-wl-page .els-wl-grid {
		grid-template-columns: 1fr 1fr 1fr;
	}
}

.els-wl-page .els-wl-item {
	background: #ffffff;
	border: 1px solid #e4e8e4;
	border-radius: 16px;
	padding: 0.9rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	box-shadow: 0 4px 14px rgba(19, 22, 19, 0.05);
}

.els-wl-page .els-wl-item-media {
	position: relative;
	border-radius: 10px;
	overflow: hidden;
	background: #f6f8f6;
	aspect-ratio: 1 / 1;
}

.els-wl-page .els-wl-item-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.els-wl-page .els-wl-item-name {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.35;
	color: #131613;
}

.els-wl-page .els-wl-item-name a {
	color: inherit;
	text-decoration: none;
}

.els-wl-page .els-wl-item-name a:hover {
	color: #2f5d3f;
}

.els-wl-page .els-wl-item-price {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 700;
	color: #2f5d3f;
}

.els-wl-page .els-wl-item-actions {
	display: flex;
	gap: 0.5rem;
	margin-top: auto;
}

.els-wl-page .els-wl-btn {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.6rem 0.9rem;
	border-radius: 999px;
	font-weight: 700;
	font-size: 0.9rem;
	text-decoration: none;
	border: 1.5px solid transparent;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.els-wl-page .els-wl-btn-primary {
	background: #3e7a52;
	color: #ffffff;
}

.els-wl-page .els-wl-btn-primary:hover {
	background: #2f5d3f;
	color: #ffffff;
}

.els-wl-page .els-wl-btn-ghost {
	background: transparent;
	color: #131613;
	border-color: #d5dad5;
}

.els-wl-page .els-wl-btn-ghost:hover {
	color: #d33a3a;
	border-color: #d33a3a;
}

.els-wl-page .els-wl-empty {
	text-align: center;
	padding: 2.5rem 1rem;
	border: 1px dashed #d5dad5;
	border-radius: 16px;
	color: #5b615c;
}

.els-wl-page .els-wl-empty p {
	margin: 0 0 1.25rem;
	font-size: 1rem;
}

.els-wl-page .els-wl-cta {
	display: inline-flex;
	align-items: center;
	padding: 0.75rem 1.5rem;
	background: #3e7a52;
	color: #ffffff;
	border-radius: 999px;
	font-weight: 700;
	text-decoration: none;
	transition: background 0.2s ease;
}

.els-wl-page .els-wl-cta:hover {
	background: #2f5d3f;
	color: #ffffff;
}

/* =====================================================================
 * Toast (bottom of screen, brief)
 * ===================================================================== */

.els-wl-toast {
	position: fixed;
	left: 50%;
	bottom: 1.25rem;
	transform: translate(-50%, 20px);
	background: #131613;
	color: #ffffff;
	padding: 0.7rem 1.2rem;
	border-radius: 999px;
	font-size: 0.9rem;
	font-weight: 600;
	box-shadow: 0 12px 32px rgba(19, 22, 19, 0.25);
	opacity: 0;
	pointer-events: none;
	z-index: 10000;
	transition: transform 0.25s ease, opacity 0.25s ease;
}

.els-wl-toast.is-visible {
	transform: translate(-50%, 0);
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	.els-wl-heart,
	.els-wl-count,
	.els-wl-toast,
	.els-wl-heart.is-just-added {
		transition: none;
		animation: none;
	}
}
