/* Lista Preferiti — front-end */

/* ---- Pulsante cuore ---- */
.lpm-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #fff;
	border: 1px solid rgba(0,0,0,.12);
	border-radius: 999px;
	color: #333;
	cursor: pointer;
	line-height: 1;
	padding: 7px 12px;
	font-size: 13px;
	transition: color .15s ease, border-color .15s ease, background .15s ease, transform .1s ease;
}
.lpm-btn:hover { border-color: #e2264d; color: #e2264d; }
.lpm-btn:active { transform: scale(.94); }
.lpm-btn__icon svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; }
.lpm-btn.is-saved { color: #e2264d; border-color: #e2264d; }
.lpm-btn.is-saved .lpm-btn__icon svg { fill: #e2264d; stroke: #e2264d; }
.lpm-btn.is-busy { opacity: .55; pointer-events: none; }

/* Nel catalogo: pastiglia solo-icona in alto a destra sull'immagine */
.lpm-btn--loop {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 5;
	padding: 8px;
	box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.lpm-btn--loop .lpm-btn__text {
	position: absolute;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.woocommerce ul.products li.product,
.product-small.box { position: relative; }

/* Scheda prodotto */
.lpm-single-wrap { margin: 10px 0 4px; }
.lpm-btn--single { padding: 10px 16px; font-size: 14px; }

/* ---- Popover scelta lista (modalità multipla) ---- */
.lpm-panel {
	position: absolute;
	z-index: 1000;
	min-width: 240px;
	max-width: 300px;
	background: #fff;
	border: 1px solid rgba(0,0,0,.12);
	border-radius: 8px;
	box-shadow: 0 6px 24px rgba(0,0,0,.18);
	padding: 10px;
	font-size: 14px;
}
.lpm-panel__title { font-weight: 600; margin: 0 0 8px; font-size: 13px; color: #666; }
.lpm-panel__lists { max-height: 220px; overflow: auto; margin: 0 0 8px; }
.lpm-panel__row { display: flex; align-items: center; gap: 8px; padding: 6px 4px; cursor: pointer; border-radius: 5px; }
.lpm-panel__row:hover { background: #f6f6f6; }
.lpm-panel__row input { margin: 0; }
.lpm-panel__new { display: flex; gap: 6px; border-top: 1px solid #eee; padding-top: 8px; }
.lpm-panel__new input[type=text] { flex: 1; min-width: 0; padding: 6px 8px; }
.lpm-panel__new button { white-space: nowrap; }
.lpm-panel__close { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 18px; line-height: 1; cursor: pointer; color: #999; }
.lpm-backdrop { position: fixed; inset: 0; z-index: 999; }

/* ---- Pagina account ---- */
.lpm-account .lpm-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 18px;
	margin: 14px 0 26px;
}
.lpm-card { display: flex; flex-direction: column; border: 1px solid #eee; border-radius: 8px; padding: 10px; }
.lpm-card__img img { width: 100%; height: auto; border-radius: 5px; }
.lpm-card__title { font-weight: 600; margin: 8px 0 4px; display: block; }
.lpm-card__price { margin-bottom: 8px; }
.lpm-card__actions { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.lpm-card__add { text-align: center; }
.lpm-remove { background: none; border: 0; color: #b00; cursor: pointer; font-size: 13px; padding: 4px; }
.lpm-remove:hover { text-decoration: underline; }

.lpm-list { margin-bottom: 30px; }
.lpm-list__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 2px solid #f0f0f0; padding-bottom: 6px; }
.lpm-list__name { margin: 0; }
.lpm-list__count { color: #999; font-weight: 400; font-size: .85em; }
.lpm-link { background: none; border: 0; color: #2271b1; cursor: pointer; padding: 0; font-size: 13px; }
.lpm-link:hover { text-decoration: underline; }
.lpm-link--danger { color: #b00; }
.lpm-empty-list { color: #888; font-style: italic; margin: 10px 0; }

.lpm-newlist-form { display: flex; gap: 8px; margin: 6px 0 22px; max-width: 460px; }
.lpm-newlist-input { flex: 1; padding: 8px 10px; }

.lpm-toast {
	position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
	background: #222; color: #fff; padding: 10px 16px; border-radius: 6px;
	font-size: 14px; z-index: 100000; opacity: 0; transition: opacity .2s ease;
	pointer-events: none; max-width: 90vw;
}
.lpm-toast.is-visible { opacity: 1; }
