.vc-fav-heart-wrap {
	display: inline-flex;
	line-height: 0;
}

.vc-fav-heart {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	margin: 0;
	border: 1px solid #e53935 !important;
	border-radius: 50%;
	background: #fff !important;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12) !important;
	text-decoration: none !important;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.vc-fav-heart__svg {
	display: block;
	width: 18px;
	height: 18px;
	overflow: visible;
}

.vc-fav-heart--on .vc-fav-heart__svg path,
.vc-fav-heart.tinvwl-product-in-list .vc-fav-heart__svg path {
	fill: #e53935 !important;
}

.vc-fav-heart.vc-fav-heart--pulse {
	animation: vc-fav-heart-pop 0.45s ease;
}

.vc-fav-heart.is-busy {
	opacity: 0.55;
	pointer-events: none;
}

.vc-hub-favs {
	list-style: none;
	margin: 0 0 1.25rem;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.vc-hub-favs ~ .cart-empty,
.vc-hub-favs ~ .return-to-shop {
	display: none !important;
}

.vc-hub-favs__item {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr) 44px;
	gap: 12px;
	align-items: center;
	padding: 10px;
	border: 1px solid #e4ebf5;
	border-radius: 12px;
	background: #fff;
}

.vc-hub-favs__media {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	border-radius: 8px;
	background: #f7f9fc;
	overflow: hidden;
}

.vc-hub-favs__media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.vc-hub-favs__title {
	display: block;
	color: #1a1f28;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
}

.vc-hub-favs__price {
	margin: 0.25rem 0 0;
	color: #0445af;
	font-weight: 800;
}

.vc-hub-favs__remove {
	width: 44px;
	height: 44px;
	border-radius: 8px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 6 5 6 21 6'/%3E%3Cpath d='M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6'/%3E%3Cpath d='M10 11v6'/%3E%3Cpath d='M14 11v6'/%3E%3Cpath d='M9 6V4a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
}

@keyframes vc-fav-heart-pop {
	0% {
		transform: scale(1);
	}
	35% {
		transform: scale(1.28);
	}
	70% {
		transform: scale(0.94);
	}
	100% {
		transform: scale(1);
	}
}

/* Loop: cuore in alto a sinistra sulla thumbnail (non wrappare l'img). */
.woocommerce ul.products li.product {
	position: relative;
}

.woocommerce ul.products li.product .astra-shop-thumbnail-wrap {
	position: relative !important;
	display: block;
}

.woocommerce ul.products li.product .astra-shop-thumbnail-wrap > a.woocommerce-LoopProduct-link,
.woocommerce ul.products li.product .woocommerce-LoopProduct-link {
	position: relative;
	display: block;
}

/* Legacy: se resta un anchor vuoto/errato, non creare il quadratino. */
.woocommerce ul.products li.product .vc-fav-heart-loop-anchor {
	position: static !important;
	top: auto !important;
	left: auto !important;
	display: contents !important;
	pointer-events: none;
}

.woocommerce ul.products li.product .vc-fav-heart-loop-anchor > img {
	position: static !important;
	width: 100% !important;
	height: auto !important;
}

.woocommerce ul.products li.product .tinv-wraper,
.woocommerce ul.products li.product .tinvwl-loop-button-wrapper,
.woocommerce ul.products li.product .vc-fav-heart-loop-anchor .tinv-wraper {
	position: absolute !important;
	top: 8px !important;
	left: 8px !important;
	right: auto !important;
	z-index: 30 !important;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	width: auto !important;
	height: auto !important;
	pointer-events: auto;
}

.woocommerce ul.products li.product .tinvwl-tooltip {
	display: none !important;
}

/* Nascondi badge "In vendita!" / "Offerta!" + eventuali quadratini bianchi */
.woocommerce ul.products li.product .onsale,
.woocommerce ul.products li.product .ast-onsale-card,
.woocommerce ul.products li.product .ast-on-card-button.ast-onsale-card,
.woocommerce ul.products li.product .ast-on-card-button:not(.ast-quick-view-trigger),
.woocommerce span.onsale,
.wc-block-grid__product-onsale {
	display: none !important;
	width: 0 !important;
	height: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	opacity: 0 !important;
	overflow: hidden !important;
	pointer-events: none !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
}

.woocommerce ul.products li.product .astra-shop-thumbnail-wrap {
	background: transparent !important;
}

.woocommerce ul.products li.product .astra-shop-thumbnail-wrap > a.woocommerce-LoopProduct-link {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	position: relative !important;
	background: transparent !important;
}

.woocommerce ul.products li.product .astra-shop-thumbnail-wrap img.attachment-woocommerce_thumbnail,
.woocommerce ul.products li.product .astra-shop-thumbnail-wrap img.size-woocommerce_thumbnail {
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	margin: 0 !important;
}

.woocommerce ul.products li.product .tinvwl_add_to_wishlist_button .ftinvwl,
.woocommerce ul.products li.product .tinvwl_add_to_wishlist_button img,
.single-product .tinvwl_add_to_wishlist_button .ftinvwl,
.single-product .tinvwl_add_to_wishlist_button img {
	display: none !important;
}

.single-product .vc-fav-heart-wrap {
	margin-left: 8px;
	vertical-align: middle;
}

.single-product form.cart {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

body.vc-private-myaccount-shell .vc-mobile-wcfm-profile__row[href*="wishlist"] .vc-mobile-wcfm-profile__icon {
	color: #e53935;
}

/* Niente popup “aggiunto ai preferiti”. */
.tinvwl_added_to_wishlist.tinv-modal,
.tinv-modal.tinv-modal-open .tinv-overlay,
body.tinvwl-modal-open .tinvwl_added_to_wishlist {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

body.woocommerce-account .wishlist_table .product-remove a,
body.woocommerce-account .tinv-wishlist .product-remove button,
body.vc-wcfm-page-wishlist .tinv-wishlist .product-remove button {
	min-width: 44px;
	min-height: 44px;
	width: 44px;
	height: 44px;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 8px !important;
	background: transparent !important;
	box-shadow: none !important;
	color: #111 !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

body.woocommerce-account .tinv-wishlist .product-remove button .ftinvwl,
body.vc-wcfm-page-wishlist .tinv-wishlist .product-remove button .ftinvwl,
body.woocommerce-account .tinv-wishlist .product-remove button i {
	display: none !important;
}

body.woocommerce-account .tinv-wishlist .product-remove button::after,
body.vc-wcfm-page-wishlist .tinv-wishlist .product-remove button::after {
	content: "";
	display: block;
	width: 20px;
	height: 20px;
	background-color: #111;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 6 5 6 21 6'/%3E%3Cpath d='M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6'/%3E%3Cpath d='M10 11v6'/%3E%3Cpath d='M14 11v6'/%3E%3Cpath d='M9 6V4a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 6 5 6 21 6'/%3E%3Cpath d='M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6'/%3E%3Cpath d='M10 11v6'/%3E%3Cpath d='M14 11v6'/%3E%3Cpath d='M9 6V4a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2'/%3E%3C/svg%3E") center / contain no-repeat;
}

body.woocommerce-account .tinv-wishlist .product-remove button:hover::after,
body.vc-wcfm-page-wishlist .tinv-wishlist .product-remove button:hover::after {
	background-color: #000;
}

body.woocommerce-account .tinv-wishlist td.product-action,
body.vc-wcfm-page-wishlist .tinv-wishlist td.product-action {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-start;
	gap: 8px;
	width: 168px;
	min-width: 168px;
	max-width: 180px;
	box-sizing: border-box;
	padding: 8px 10px !important;
	overflow: hidden;
	vertical-align: middle;
}

body.woocommerce-account .tinv-wishlist td.product-action .button,
body.vc-wcfm-page-wishlist .tinv-wishlist td.product-action .button {
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	min-height: 40px;
	padding: 8px 10px !important;
	white-space: normal !important;
	line-height: 1.25 !important;
	font-size: 13px !important;
	box-sizing: border-box !important;
}

body.woocommerce-account .vc-wishlist-quote,
body.vc-wcfm-page-wishlist .vc-wishlist-quote {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 100%;
	min-height: 40px;
	padding: 8px 10px;
	border-radius: 8px;
	border: 0;
	background: #0445af;
	color: #fff !important;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.25;
	text-align: center;
	text-decoration: none !important;
	box-sizing: border-box;
	white-space: normal;
}

body.woocommerce-account .vc-wishlist-quote:hover,
body.vc-wcfm-page-wishlist .vc-wishlist-quote:hover,
body.woocommerce-account .vc-wishlist-quote:focus-visible,
body.vc-wcfm-page-wishlist .vc-wishlist-quote:focus-visible {
	filter: brightness(1.08);
	color: #fff !important;
	outline: none;
}

body.woocommerce-account .vc-wishlist-quote.is-busy,
body.vc-wcfm-page-wishlist .vc-wishlist-quote.is-busy {
	opacity: 0.65;
	pointer-events: none;
}

/* Preferiti mobile: card compatta (solo dashboard privato + P.IVA). */
@media (max-width: 781px) {
	body.vc-private-myaccount-shell .tinv-wishlist table.tinvwl-table-manage-list,
	body.vc-wcfm-page-wishlist .tinv-wishlist table.tinvwl-table-manage-list {
		display: block !important;
		width: 100% !important;
		border: 0 !important;
	}

	body.vc-private-myaccount-shell .tinv-wishlist table.tinvwl-table-manage-list thead,
	body.vc-wcfm-page-wishlist .tinv-wishlist table.tinvwl-table-manage-list thead,
	body.vc-private-myaccount-shell .tinv-wishlist table.tinvwl-table-manage-list tfoot,
	body.vc-wcfm-page-wishlist .tinv-wishlist table.tinvwl-table-manage-list tfoot {
		display: none !important;
	}

	body.vc-private-myaccount-shell .tinv-wishlist table.tinvwl-table-manage-list tbody,
	body.vc-wcfm-page-wishlist .tinv-wishlist table.tinvwl-table-manage-list tbody {
		display: block !important;
		width: 100% !important;
	}

	body.vc-private-myaccount-shell .tinv-wishlist table.tinvwl-table-manage-list tbody tr.wishlist_item,
	body.vc-wcfm-page-wishlist .tinv-wishlist table.tinvwl-table-manage-list tbody tr.wishlist_item {
		display: grid !important;
		grid-template-columns: 64px minmax(0, 1fr) 36px !important;
		grid-template-rows: auto auto auto !important;
		align-items: start !important;
		column-gap: 10px !important;
		row-gap: 4px !important;
		width: 100% !important;
		margin: 0 0 10px !important;
		padding: 10px !important;
		border: 1px solid #e8eaed !important;
		border-radius: 10px !important;
		background: #fff !important;
		box-sizing: border-box !important;
		position: relative !important;
	}

	body.vc-private-myaccount-shell .tinv-wishlist table.tinvwl-table-manage-list tbody td,
	body.vc-wcfm-page-wishlist .tinv-wishlist table.tinvwl-table-manage-list tbody td {
		position: static !important;
		float: none !important;
		padding: 0 !important;
		margin: 0 !important;
		border: 0 !important;
		text-align: left !important;
		width: auto !important;
		max-width: none !important;
		min-width: 0 !important;
	}

	body.vc-private-myaccount-shell .tinv-wishlist table.tinvwl-table-manage-list tbody td.product-thumbnail,
	body.vc-wcfm-page-wishlist .tinv-wishlist table.tinvwl-table-manage-list tbody td.product-thumbnail {
		display: block !important;
		grid-column: 1 !important;
		grid-row: 1 / 3 !important;
	}

	body.vc-private-myaccount-shell .tinv-wishlist td.product-thumbnail img,
	body.vc-wcfm-page-wishlist .tinv-wishlist td.product-thumbnail img {
		width: 64px !important;
		height: 64px !important;
		max-width: 64px !important;
		object-fit: cover !important;
		border-radius: 8px !important;
		display: block !important;
		margin: 0 !important;
	}

	body.vc-private-myaccount-shell .tinv-wishlist table.tinvwl-table-manage-list tbody td.product-name,
	body.vc-wcfm-page-wishlist .tinv-wishlist table.tinvwl-table-manage-list tbody td.product-name {
		display: block !important;
		grid-column: 2 !important;
		grid-row: 1 !important;
		font-size: 14px !important;
		font-weight: 700 !important;
		line-height: 1.25 !important;
	}

	body.vc-private-myaccount-shell .tinv-wishlist table.tinvwl-table-manage-list tbody td.product-price,
	body.vc-wcfm-page-wishlist .tinv-wishlist table.tinvwl-table-manage-list tbody td.product-price {
		display: block !important;
		grid-column: 2 !important;
		grid-row: 2 !important;
		font-size: 13px !important;
		font-weight: 600 !important;
	}

	body.vc-private-myaccount-shell .tinv-wishlist table.tinvwl-table-manage-list tbody td.product-remove,
	body.vc-wcfm-page-wishlist .tinv-wishlist table.tinvwl-table-manage-list tbody td.product-remove {
		display: flex !important;
		grid-column: 3 !important;
		grid-row: 1 / 3 !important;
		align-items: flex-start !important;
		justify-content: flex-end !important;
	}

	body.vc-private-myaccount-shell .tinv-wishlist .product-remove button,
	body.vc-wcfm-page-wishlist .tinv-wishlist .product-remove button {
		width: 36px !important;
		height: 36px !important;
		min-width: 36px !important;
		min-height: 36px !important;
	}

	body.vc-private-myaccount-shell .tinv-wishlist table.tinvwl-table-manage-list tbody td.product-action,
	body.vc-wcfm-page-wishlist .tinv-wishlist table.tinvwl-table-manage-list tbody td.product-action {
		display: flex !important;
		flex-direction: column !important;
		align-items: stretch !important;
		gap: 8px !important;
		grid-column: 2 / 4 !important;
		grid-row: 3 !important;
		width: auto !important;
		min-width: 0 !important;
		max-width: none !important;
		padding: 4px 0 0 !important;
		overflow: visible !important;
	}

	body.vc-private-myaccount-shell .tinv-wishlist td.product-action .button,
	body.vc-wcfm-page-wishlist .tinv-wishlist td.product-action .button,
	body.vc-private-myaccount-shell .tinv-wishlist td.product-action .vc-wishlist-quote,
	body.vc-wcfm-page-wishlist .tinv-wishlist td.product-action .vc-wishlist-quote {
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		position: static !important;
		width: 100% !important;
		max-width: 100% !important;
		min-height: 36px !important;
		margin: 0 !important;
		padding: 8px 10px !important;
		font-size: 12px !important;
		line-height: 1.2 !important;
		border-radius: 8px !important;
		box-sizing: border-box !important;
		white-space: normal;
	}

	body.vc-private-myaccount-shell .tinv-wishlist td.product-action .vc-wishlist-quote,
	body.vc-wcfm-page-wishlist .tinv-wishlist td.product-action .vc-wishlist-quote {
		background: #0445af !important;
		color: #fff !important;
		border: 0 !important;
	}

	body.vc-private-myaccount-shell .tinv-wishlist table.tinvwl-table-manage-list tbody td.product-cb,
	body.vc-wcfm-page-wishlist .tinv-wishlist table.tinvwl-table-manage-list tbody td.product-cb,
	body.vc-private-myaccount-shell .tinv-wishlist table.tinvwl-table-manage-list tbody td.product-date,
	body.vc-wcfm-page-wishlist .tinv-wishlist table.tinvwl-table-manage-list tbody td.product-date,
	body.vc-private-myaccount-shell .tinv-wishlist table.tinvwl-table-manage-list tbody td.product-stock,
	body.vc-wcfm-page-wishlist .tinv-wishlist table.tinvwl-table-manage-list tbody td.product-stock {
		display: none !important;
		visibility: hidden !important;
		position: absolute !important;
		width: 0 !important;
		height: 0 !important;
		overflow: hidden !important;
		padding: 0 !important;
		margin: 0 !important;
		pointer-events: none !important;
	}
}

@media (max-width: 782px) {
	.vc-fav-heart {
		width: 38px;
		height: 38px;
	}

	.vc-fav-heart__svg {
		width: 19px;
		height: 19px;
	}

	.vc-fav-heart-loop-anchor,
	.woocommerce ul.products li.product .tinv-wraper,
	.woocommerce ul.products li.product .tinvwl-loop-button-wrapper {
		top: 6px;
		left: 6px;
		z-index: 30;
	}
}
