/* Rive Marketing – preferiti */
.rvm-wl-btn {
	--rvm-wl-color: #e2264d;
	display: inline-flex;
	align-items: center;
	gap: .45em;
	padding: .4em .2em;
	margin: .5em 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	line-height: 1;
	cursor: pointer;
	box-shadow: none;
}
.rvm-wl-btn:hover, .rvm-wl-btn:focus { background: none; color: inherit; }
.rvm-wl-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 4px; }
.rvm-wl-icon { width: 22px; height: 22px; flex: none; fill: transparent; stroke: currentColor; stroke-width: 1.8; transition: fill .2s, stroke .2s, transform .2s; }
.rvm-wl-btn:hover .rvm-wl-icon { stroke: var(--rvm-wl-color); }
.rvm-wl-btn.is-active .rvm-wl-icon { fill: var(--rvm-wl-color); stroke: var(--rvm-wl-color); }
.rvm-wl-btn.is-loading { opacity: .5; pointer-events: none; }
.rvm-wl-btn.is-pop .rvm-wl-icon { transform: scale(1.3); }

/* Variante sopra l'immagine (griglie prodotto) */
.products .product:has(> .rvm-wl-btn--overlay),
.wc-block-product:has(> .rvm-wl-btn--overlay),
.products .product:has(> a > .rvm-wl-btn--overlay),
.rvm-wl-wrap { position: relative; }
.rvm-wl-btn--overlay {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 5;
	margin: 0;
	padding: 8px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .92);
	box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
	color: #222;
}
.rvm-wl-btn--overlay:hover, .rvm-wl-btn--overlay:focus { background: #fff; color: #222; }
.rvm-wl-btn--overlay .rvm-wl-icon { width: 20px; height: 20px; }
.rvm-wl-btn--overlay .rvm-wl-label,
.rvm-wl-btn--icon .rvm-wl-label {
	position: absolute !important;
	width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

/* Contatore header */
.rvm-wl-count-link { position: relative; display: inline-flex; align-items: center; color: inherit; text-decoration: none; }
.rvm-wl-count-link .rvm-wl-icon { fill: transparent; }
.rvm-wl-count {
	position: absolute; top: -6px; right: -10px;
	min-width: 18px; height: 18px; padding: 0 5px;
	border-radius: 9px; background: #e2264d; color: #fff;
	font-size: 11px; line-height: 18px; text-align: center;
}
.rvm-wl-count.is-empty { display: none; }

/* Pagina preferiti */
.rvm-wl-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 24px; }
.rvm-wl-item { position: relative; display: flex; flex-direction: column; gap: 6px; margin: 0; }
.rvm-wl-item img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 6px; display: block; }
.rvm-wl-name { font-weight: 600; text-decoration: none; color: inherit; }
.rvm-wl-out { font-size: .85em; color: #b32d2e; }
.rvm-wl-item .button { margin-top: auto; text-align: center; }
.rvm-wl-remove {
	position: absolute; top: 8px; right: 8px; z-index: 2;
	width: 30px; height: 30px; padding: 0;
	border: 0; border-radius: 50%;
	background: rgba(255, 255, 255, .92); color: #222;
	font-size: 20px; line-height: 30px; cursor: pointer;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
}
.rvm-wl-empty { text-align: center; padding: 2em 0; }

/* Badge "Offerta" a destra (temi a blocchi): il cuore passa a sinistra */
.rvm-wl-wrap:has(.wc-block-components-product-sale-badge--align-right) > .rvm-wl-btn--overlay { right: auto; left: 10px; }

/* Stato lista: classi da assegnare ai contenitori (Elementor → Avanzate → Classi CSS, o blocchi).
   rvm-wishlist-empty = visibile solo se la lista è vuota; rvm-wishlist-full = visibile solo se ha prodotti. */
body:not(.rvm-wl-ready):not(.elementor-editor-active) .rvm-wishlist-empty,
body.rvm-wl-has-items .rvm-wishlist-empty,
body.rvm-wl-empty .rvm-wishlist-full { display: none !important; }
