/* Favourites panel (modal + account tab) and the guest sign-up nudge. */
.fav {
	--fav-ink: #1d1d1f;
	--fav-muted: #6e6e73;
	--fav-line: rgba(17, 24, 39, 0.08);
	--fav-soft: #f5f5f7;
	--fav-accent: #0071e3;
	--fav-good: #1a7f37;
	color: var(--fav-ink);
	display: grid;
	gap: 14px;
}
.fav [hidden] { display: none !important; }
.fav-head {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: space-between;
}
.fav-summary { color: var(--fav-muted); font-size: 0.94rem; margin: 0; }
.fav-summary:empty { display: none; }
.fav-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.fav-btn,
.fav-nudge .fav-btn {
	align-items: center;
	background: var(--fav-ink, #1d1d1f);
	border: 0;
	border-radius: 999px;
	color: #fff !important;
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-size: 0.88rem;
	font-weight: 600;
	gap: 6px;
	justify-content: center;
	line-height: 1;
	min-height: 36px;
	padding: 0 16px;
	text-decoration: none !important;
	transition: opacity 0.15s ease, background-color 0.15s ease;
	white-space: nowrap;
}
.fav-btn:hover { opacity: 0.86; }
.fav-btn--wa { background: #1f9d55; }
.fav-btn--ghost { background: var(--fav-soft); color: var(--fav-ink) !important; }
.fav-btn--ghost:hover { background: #ebebf0; opacity: 1; }

.fav-sync {
	align-items: center;
	background: var(--fav-soft);
	border-radius: 12px;
	color: var(--fav-muted);
	display: flex;
	font-size: 0.86rem;
	gap: 8px;
	line-height: 1.6;
	margin: 0;
	padding: 10px 14px;
}
.fav-sync a { color: var(--fav-accent); font-weight: 600; text-decoration: none; }
.fav-sync a:hover { text-decoration: underline; }
.fav-sync svg { fill: none; flex: none; height: 16px; stroke: var(--fav-good); stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.4; width: 16px; }

.fav-empty {
	align-items: center;
	display: grid;
	gap: 6px;
	justify-items: center;
	padding: 36px 16px;
	text-align: center;
}
.fav-empty__ico {
	align-items: center;
	background: var(--fav-soft);
	border-radius: 50%;
	display: inline-flex;
	height: 56px;
	justify-content: center;
	margin-bottom: 6px;
	width: 56px;
}
.fav-empty__ico svg { fill: none; height: 26px; stroke: var(--fav-muted); stroke-linejoin: round; stroke-width: 1.8; width: 26px; }
.fav-empty strong { font-size: 1.05rem; }
.fav-empty p { color: var(--fav-muted); margin: 0 0 10px; }

.fav-list { display: grid; gap: 10px; }
.fav.is-loading .fav-list { opacity: 0.5; transition: opacity 0.2s ease; }

.fav-item {
	align-items: center;
	background: #fff;
	border: 1px solid var(--fav-line);
	border-radius: 16px;
	display: grid;
	gap: 14px;
	grid-template-columns: 104px minmax(0, 1fr) auto;
	padding: 10px;
	position: relative;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.fav-item:hover { box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08); }
.fav-item__media {
	aspect-ratio: 4 / 3;
	background: var(--fav-soft);
	border-radius: 12px;
	display: block;
	overflow: hidden;
	position: relative;
}
.fav-item__media img { display: block; height: 100%; object-fit: cover; width: 100%; }
.fav-item__note-img {
	background: rgba(0, 0, 0, 0.55);
	border-radius: 6px;
	bottom: 4px;
	color: #fff;
	font-size: 0.62rem;
	inset-inline-start: 4px;
	padding: 1px 5px;
	position: absolute;
}
.fav-item__body { display: grid; gap: 3px; min-width: 0; }
.fav-item__eyebrow { color: var(--fav-muted); font-size: 0.78rem; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fav-item h3 { -webkit-box-orient: vertical; display: -webkit-box; font-size: 0.98rem; font-weight: 600; -webkit-line-clamp: 2; line-clamp: 2; line-height: 1.4; margin: 0; overflow: hidden; }
.fav-item h3 a { color: inherit; text-decoration: none; }
.fav-item h3 a:hover { color: var(--fav-accent); }
.fav-item__price { font-size: 0.95rem; margin: 0; }
.fav-item__price s { color: var(--fav-muted); font-size: 0.82rem; margin-inline-start: 4px; }
.fav-item__meta { color: var(--fav-muted); font-size: 0.78rem; margin: 0; }
.fav-item__meta:empty { display: none; }
.fav-item__note { color: var(--fav-muted); font-size: 0.82rem; margin: 0; }

.fav-tag {
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 700;
	justify-self: start;
	line-height: 1;
	padding: 5px 9px;
}
.fav-tag--drop { background: #e8f5ec; color: var(--fav-good); }
.fav-tag--gone { background: #f2f2f4; color: var(--fav-muted); }
.fav-item.has-drop .fav-item__price strong { color: var(--fav-good); }

.fav-item.is-gone { background: #fbfbfd; }
.fav-item.is-gone .fav-item__media { align-items: center; display: flex; justify-content: center; }
.fav-item.is-gone .fav-item__media span { color: var(--fav-muted); font-size: 0.78rem; }
.fav-item.is-gone h3 { color: var(--fav-muted); }

.fav-item__remove {
	align-items: center;
	align-self: start;
	background: transparent;
	border: 0;
	border-radius: 50%;
	color: var(--fav-muted);
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-size: 0.82rem;
	height: 32px;
	justify-content: center;
	min-width: 32px;
	padding: 0;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.fav-item.is-gone .fav-item__remove { border-radius: 999px; padding: 0 12px; align-self: center; background: var(--fav-soft); color: var(--fav-ink); }
.fav-item__remove:hover { background: var(--fav-soft); color: var(--fav-ink); }
.fav-item__remove svg { fill: none; height: 16px; stroke: currentColor; stroke-linecap: round; stroke-width: 2; width: 16px; }

@media (max-width: 520px) {
	.fav-item { gap: 10px; grid-template-columns: 84px minmax(0, 1fr) auto; }
	.fav-actions { width: 100%; }
	.fav-actions .fav-btn { flex: 1; }
}

/* Guest nudge */
.fav-nudge {
	align-items: center;
	background: rgba(255, 255, 255, 0.92);
	-webkit-backdrop-filter: saturate(180%) blur(20px);
	backdrop-filter: saturate(180%) blur(20px);
	border: 1px solid rgba(17, 24, 39, 0.08);
	border-radius: 18px;
	bottom: 20px;
	box-shadow: 0 18px 48px rgba(17, 24, 39, 0.18);
	color: #1d1d1f;
	direction: rtl;
	display: grid;
	gap: 12px;
	grid-template-columns: auto minmax(0, 1fr) auto auto;
	inset-inline-start: 20px;
	max-width: min(460px, calc(100vw - 32px));
	opacity: 0;
	padding: 14px 14px 14px 10px;
	pointer-events: none;
	position: fixed;
	transform: translateY(16px);
	transition: opacity 0.3s ease, transform 0.3s ease;
	z-index: 9990;
}
.fav-nudge.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.fav-nudge strong { display: block; font-size: 0.95rem; }
.fav-nudge p { color: #6e6e73; font-size: 0.82rem; line-height: 1.5; margin: 2px 0 0; }
.fav-nudge__ico {
	align-items: center;
	background: #fff0f3;
	border-radius: 50%;
	display: inline-flex;
	height: 40px;
	justify-content: center;
	width: 40px;
}
.fav-nudge__ico svg { fill: #e0245e; height: 20px; width: 20px; }
.fav-nudge__close {
	align-items: center;
	background: transparent;
	border: 0;
	border-radius: 50%;
	color: #6e6e73;
	cursor: pointer;
	display: inline-flex;
	height: 30px;
	justify-content: center;
	padding: 0;
	width: 30px;
}
.fav-nudge__close:hover { background: #f5f5f7; }
.fav-nudge__close svg { fill: none; height: 14px; stroke: currentColor; stroke-linecap: round; stroke-width: 2; width: 14px; }

@media (max-width: 560px) {
	.fav-nudge { bottom: 12px; grid-template-columns: auto minmax(0, 1fr) auto; inset-inline: 16px; max-width: none; }
	.fav-nudge .fav-btn { grid-column: 1 / -1; }
	.fav-nudge__close { grid-column: 3; grid-row: 1; }
}
@media (prefers-reduced-motion: reduce) {
	.fav-nudge, .fav-item { transition: none; }
}
