/**
 * YITH WooCommerce Wishlist — brand-tinted overrides.
 * Loaded only when the plugin is active (see inc/wishlist.php).
 *
 * == Customizing the heart icon ==
 * The SVG used for the heart is defined as a CSS variable below. To change
 * it, replace the data-URI in `--mrwoo-heart-svg` (and `--mrwoo-heart-svg-filled`
 * for the "in wishlist" state). Both variables expect a single-color SVG; the
 * actual color is applied via `currentColor` on the parent link.
 */

.mrwoo-wishlist {
	--mrwoo-heart-empty: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12.62 20.81c-.34.12-.9.12-1.24 0C8.48 19.82 2 15.69 2 8.69 2 5.6 4.49 3.1 7.56 3.1c1.82 0 3.43.88 4.44 2.24C13.01 3.98 14.63 3.1 16.44 3.1 19.51 3.1 22 5.6 22 8.69c0 7-6.48 11.13-9.38 12.12Z'/%3E%3C/svg%3E");
	--mrwoo-heart-filled: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='18' viewBox='0 0 20 18' fill='none'%3E%3Cpath d='M10.62 17.71C10.28 17.83 9.72 17.83 9.38 17.71C6.48 16.72 0 12.59 0 5.59C0 2.5 2.49 0 5.56 0C7.38 0 8.99 0.88 10 2.24C11.01 0.88 12.63 0 14.44 0C17.51 0 20 2.5 20 5.59C20 12.59 13.52 16.72 10.62 17.71Z' fill='%23FD6187'/%3E%3C/svg%3E");
	--mrwoo-heart-size: 20px;
}

/* === Card heart — placement comes from product-card.css; we only re-skin the YITH internals === */
.product-card__wishlist {
	background: transparent;
	box-shadow: none;
	padding: 0;
	width: auto;
	height: auto;
}

.product-card__wishlist .mrwoo-wishlist {
	display: inline-block;
	width: 36px;
	height: 36px;
}

.mrwoo-wishlist .yith-wcwl-add-to-wishlist,
.mrwoo-wishlist .yith-wcwl-add-button {
	margin: 0;
	padding: 0;
}

span.yith-wcwl-add-to-wishlist-button__label,
.mrwoo-wishlist .yith-wcwl-add-to-wishlist-button__label {
    display: none;
}

/* Slepiam YITH'o numatytąją širdelę (SVG arba IMG) — savo
 * piešiame per `background-image` ant nuorodos. */
.mrwoo-wishlist a svg,
.mrwoo-wishlist a img,
.mrwoo-wishlist .yith-wcwl-icon-svg,
.mrwoo-wishlist .yith-wcwl-icon,
.mrwoo-wishlist i.yith-wcwl-icon {
    display: none !important;
}

/* Bet kuri YITH'o nuoroda `.mrwoo-wishlist` viduje — baltas apskritimas
 * su mūsų širdelės SVG kaip background'as. Selektorius universalus,
 * kad veiktų ir senesnėj, ir naujoj YITH versijoj. */
.mrwoo-wishlist a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background-color: var(--color-white);
    background-image: var(--mrwoo-heart-empty);
    background-repeat: no-repeat;
    background-position: center;
    background-size: var(--mrwoo-heart-size);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    color: var(--color-black);
    text-decoration: none;
    position: relative;
    transition: transform var(--transition-fast), background-image var(--transition-fast);
}

.mrwoo-wishlist a:hover {
    transform: scale(1.08);
}

/* Pridėta į pageidavimus — užpildyta rožinė širdelė.
 * Klasę `mrwoo-wishlist--in-list` uždeda assets/js/wishlist.js: jis
 * tikrina kelis YITH būsenų indikatorius (legacy wrapper'iai, naujesnio
 * mygtuko modifier'iai, href patternai) ir taip stabiliai veikia tarp
 * YITH versijų bei AJAX add/remove event'ų. */
.mrwoo-wishlist--in-list a,
.mrwoo-wishlist:has(.yith-wcwl-wishlistaddedbrowse:not(.hide)) a,
.mrwoo-wishlist:has(.yith-wcwl-wishlistexistsbrowse:not(.hide)) a,
.mrwoo-wishlist:has(.yith-wcwl-add-to-wishlist.exists) a,
.mrwoo-wishlist .yith-wcwl-wishlistaddedbrowse a,
.mrwoo-wishlist .yith-wcwl-wishlistexistsbrowse a,
.mrwoo-wishlist a.yith-wcwl-add-to-wishlist-button--added,
.mrwoo-wishlist a.yith-wcwl-add-to-wishlist-button--browse,
.mrwoo-wishlist a.added {
    background-image: var(--mrwoo-heart-filled);
}

/* AJAX loading dot. */
.mrwoo-wishlist .ajax-loading {
	width: 14px;
	height: 14px;
}

/* Inert fallback (no plugin) — same look as our original button. */
.mrwoo-wishlist--inert {
	width: 36px;
	height: 36px;
	border: 0;
	background: var(--color-white);
	border-radius: 50%;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
	color: var(--color-black);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

/* === Gallery heart (single product page, top-right of main image) === */
.mrwoo-wishlist--gallery {
	--mrwoo-heart-size: 24px;
}

.mrwoo-wishlist--gallery a,
.mrwoo-wishlist--gallery.mrwoo-wishlist--inert {
	width: 44px;
	height: 44px;
}

/* === Wishlist page (/wishlist/) — the table YITH renders === */
.wishlist_table {
	font-family: var(--font-sans);
	border-collapse: collapse;
	width: 100%;
	margin: 24px 0;
}

.wishlist_table th,
.wishlist_table td {
	border-color: #ebebeb !important;
	padding: 16px !important;
	vertical-align: middle;
}

.wishlist_table th {
	font-family: var(--font-heading);
	font-weight: var(--font-bold);
	font-size: var(--text-sm);
	color: var(--color-black);
	background: var(--color-grey-bg);
	text-transform: none;
}

.wishlist_table .product-thumbnail img {
	max-width: 80px;
	height: auto;
	border-radius: var(--radius-md);
}

.wishlist_table .product-name a {
	color: var(--color-black);
	text-decoration: none;
	font-weight: var(--font-semibold);
}

.wishlist_table .product-name a:hover {
	color: var(--color-pink-strawberry);
}

.wishlist_table .product-price .amount {
	font-family: var(--font-heading);
	font-weight: var(--font-bold);
	color: var(--color-black);
}

.wishlist_table .product-add-to-cart a.button,
.wishlist_table .add_to_cart {
	background: var(--color-pink-shocking) !important;
	color: var(--color-black) !important;
	border: 0 !important;
	border-radius: var(--radius-pill) !important;
	font-weight: var(--font-semibold) !important;
	letter-spacing: 0 !important;
	padding: 10px 20px !important;
	text-transform: none !important;
}

.wishlist_table .product-add-to-cart a.button:hover {
	background: var(--color-pink-middle) !important;
}

.wishlist_table .product-remove a {
	color: var(--color-grey-light);
	transition: color var(--transition-fast);
}

.wishlist_table .product-remove a:hover {
	color: var(--color-pink-strawberry);
}

/* Wishlist top toolbar / share / counters — keep simple. */
.yith-wcwl-share,
.yith-wcwl-share ul {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	align-items: center;
	margin: 16px 0;
}

.yith-wcwl-share ul li {
	list-style: none;
	margin: 0;
}

.wishlist-title h2 {
	font-family: var(--font-heading);
	font-weight: var(--font-bold);
	font-size: var(--text-3xl);
	color: var(--color-black);
}

.wishlist_manage_table {
	margin-top: 16px;
}

/* Empty state */
.wishlist-empty {
	padding: 32px;
	text-align: center;
	background: var(--color-grey-bg);
	border-radius: var(--radius-lg);
	font-size: var(--text-base);
	color: var(--color-grey-light);
}

/* Mobile */
@media (max-width: 767px) {
	.wishlist_table {
		display: block;
	}
	.wishlist_table thead {
		display: none;
	}
	.wishlist_table tbody, .wishlist_table tr {
		display: block;
	}
	.wishlist_table tr {
		border: 1px solid #ebebeb;
		border-radius: var(--radius-md);
		margin-bottom: 12px;
		padding: 12px;
	}
	.wishlist_table td {
		display: flex;
		justify-content: space-between;
		border: 0 !important;
		padding: 6px 0 !important;
	}
	.wishlist_table td::before {
		content: attr(data-title);
		font-weight: var(--font-semibold);
		color: var(--color-grey-light);
	}
}
