/* Vantart Favorites. Colours can be changed in Elementor → Site Settings → Custom CSS:
 *   :root { --vfav-color: #111; --vfav-bg: #fff; }
 */
:root {
	--vfav-color: #111111;   /* heart, counter badge, buttons */
	--vfav-on-color: #ffffff; /* text on black */
	--vfav-bg: #ffffff;
	--vfav-line: #111111;
	--vfav-size: 34px;       /* round badge on product cards */
	--vfav-icon: 17px;
}
@media (max-width: 767px) {
	:root {
		--vfav-size: 30px;
		--vfav-icon: 15px;
	}
}

/* ---------- heart button ---------- */
.vfav-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--vfav-line);
	font: inherit;
	line-height: 1;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: color .2s ease, background-color .2s ease, transform .2s ease;
}
.vfav-btn:hover,
.vfav-btn:focus {
	background: none;
	color: var(--vfav-color);
}
.vfav-btn:focus-visible {
	outline: 2px solid var(--vfav-color);
	outline-offset: 2px;
}
.vfav-heart {
	display: block;
	flex: none;
	width: var(--vfav-icon);
	height: var(--vfav-icon);
	fill: transparent;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linejoin: round;
	transition: fill .2s ease;
}
.vfav-btn.is-active {
	color: var(--vfav-color);
}
.vfav-btn.is-active .vfav-heart {
	fill: currentColor;
}

/* icon style: small round white badge on top of the product image */
.vfav-style-icon {
	width: var(--vfav-size);
	height: var(--vfav-size);
	border-radius: 50%;
	background: var(--vfav-bg);
	box-shadow: 0 1px 6px rgba(0, 0, 0, .14);
}
.vfav-style-icon:hover,
.vfav-style-icon:focus {
	background: var(--vfav-bg);
}

/* text style: outlined pill (product page) → filled black when saved */
.vfav-style-text {
	padding: 10px 18px;
	border: 1px solid var(--vfav-color);
	border-radius: 999px;
	color: var(--vfav-color);
	font-size: 15px;
}
.vfav-style-text .vfav-heart {
	width: 17px;
	height: 17px;
}
.vfav-style-text:hover,
.vfav-style-text:focus {
	background: rgba(0, 0, 0, .04);
	color: var(--vfav-color);
}
.vfav-style-text.is-active,
.vfav-style-text.is-active:hover,
.vfav-style-text.is-active:focus {
	background: var(--vfav-color);
	color: var(--vfav-on-color);
}
@media (max-width: 767px) {
	.vfav-style-text {
		width: 100%;
		padding: 12px 18px;
	}
}

.vfav-btn.vfav-pop .vfav-heart {
	animation: vfav-pop .4s ease;
}
@keyframes vfav-pop {
	0% { transform: scale(1); }
	40% { transform: scale(1.35); }
	100% { transform: scale(1); }
}

/* automatic placement on theme shop cards */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
	position: relative;
}
/* Right corner in Hebrew (the Sale badge sits in the left one).
   To move it left: .vfav-auto-loop { inset-inline-start: auto; inset-inline-end: 10px; } */
.vfav-auto-loop {
	position: absolute;
	top: var(--vfav-top, 10px);
	inset-inline-start: var(--vfav-side, 10px);
	z-index: 5;
	line-height: 0;
}
@media (max-width: 767px) {
	.vfav-auto-loop {
		top: var(--vfav-top-m, 6px);
		inset-inline-start: var(--vfav-side-m, 6px);
	}
}
/* product page: heart on the product image, same corner as on the shop cards
   (the zoom 🔍 icon sits in the other corner) */
.vfav-to-gallery {
	visibility: hidden; /* until the script moves it onto the image */
	line-height: 0;
}
.vfav-to-gallery.vfav-on-gallery {
	visibility: visible;
	position: absolute;
	top: var(--vfav-top-single, 16px);
	inset-inline-start: var(--vfav-side-single, 16px);
	z-index: 9;
}
.vfav-to-gallery.vfav-gallery-missing {
	visibility: visible;
	margin: 12px 0;
}
.vfav-gallery-host {
	position: relative;
}
@media (max-width: 767px) {
	.vfav-to-gallery.vfav-on-gallery {
		top: var(--vfav-top-single-m, 10px);
		inset-inline-start: var(--vfav-side-single-m, 10px);
	}
}

/* ---------- header counter ---------- */
.vfav-count {
	position: relative;
	display: inline-flex;
	align-items: center;
	vertical-align: middle;
	color: var(--vfav-color) !important;
	text-decoration: none !important;
	line-height: 1;
}
.vfav-count .vfav-heart {
	width: 24px;
	height: 24px;
	stroke-width: 1.6;
}
.vfav-count-num {
	position: absolute;
	top: -7px;
	inset-inline-end: -9px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	box-sizing: border-box;
	border-radius: 9px;
	background: var(--vfav-color);
	color: var(--vfav-on-color);
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
	letter-spacing: 0;
}
.vfav-count.vfav-zero .vfav-count-num {
	display: none;
}
.vfav-count.vfav-pulse {
	animation: vfav-pop .4s ease;
}
@media (max-width: 767px) {
	.vfav-count .vfav-heart {
		width: 22px;
		height: 22px;
	}
	.vfav-count-num {
		min-width: 16px;
		height: 16px;
		line-height: 16px;
		font-size: 10px;
		top: -6px;
		inset-inline-end: -8px;
	}
}

/* ---------- favorites page ---------- */
/* [fav_products] grid: columns="4" tablet="3" mobile="2" (Astra breakpoints 921 / 544) */
.vfav-products ul.products {
	display: grid !important;
	grid-template-columns: repeat(var(--vfav-cols, 4), minmax(0, 1fr)) !important;
	gap: 30px 20px;
	margin: 0 !important;
	padding: 0;
}
.vfav-products ul.products::before,
.vfav-products ul.products::after {
	display: none !important;
}
.vfav-products ul.products li.product {
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	float: none !important;
	clear: none !important;
}
@media (max-width: 921px) {
	.vfav-products ul.products {
		grid-template-columns: repeat(var(--vfav-cols-t, 3), minmax(0, 1fr)) !important;
	}
}
@media (max-width: 544px) {
	.vfav-products ul.products {
		grid-template-columns: repeat(var(--vfav-cols-m, 2), minmax(0, 1fr)) !important;
		gap: 22px 12px;
	}
	.vfav-products ul.products li.product .button {
		padding-inline: 10px;
		font-size: 13px;
	}
}

.vfav-removing {
	opacity: 0;
	transform: scale(.96);
	transition: opacity .3s ease, transform .3s ease;
}

.vfav-empty[hidden],
.vfav-share[hidden] {
	display: none !important;
}
.vfav-empty {
	max-width: 420px;
	margin: 40px auto;
	padding: 0 16px;
	text-align: center;
}
.vfav-empty-icon {
	display: inline-flex;
	color: var(--vfav-color);
}
.vfav-empty-icon .vfav-heart {
	width: 52px;
	height: 52px;
	stroke-width: 1.3;
}
.vfav-empty-title {
	margin: 14px 0 6px;
}
.vfav-empty-text {
	margin: 0 0 20px;
	opacity: .8;
}
.vfav-empty-btn {
	display: inline-block;
	padding: 12px 28px;
	background: var(--vfav-color);
	color: var(--vfav-on-color) !important;
	text-decoration: none;
}

.vfav-share {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 20px;
	border-radius: 999px;
	background: #25d366;
	color: #fff !important;
	fill: currentColor;
	text-decoration: none;
	font-weight: 600;
}
.vfav-share:hover {
	background: #1eb857;
}
@media (max-width: 767px) {
	.vfav-share {
		width: 100%;
	}
}

.vfav-shared-notice {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 20px;
	margin: 0 0 24px;
	padding: 14px 18px;
	border-radius: 12px;
	background: #f4f4f4;
}
.vfav-shared-notice p {
	margin: 0;
}
.vfav-shared-notice a {
	color: var(--vfav-color);
	font-weight: 600;
	text-decoration: underline;
}
