/* ========================================
   Favorites: heart buttons, header badge, toast, favorites page
======================================== */

/* Heart button (shared) */
.fav-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	background: rgba(250, 248, 245, 0.94);
	border: 1px solid var(--grey);
	border-radius: 50%;
	color: var(--ink);
	cursor: pointer;
	transition: transform 0.15s ease, border-color 0.2s ease, color 0.2s ease;
}

.fav-btn svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: fill 0.2s ease;
}

.fav-btn:hover {
	border-color: var(--ink);
	transform: scale(1.08);
}

.fav-btn:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 2px;
}

.fav-btn.is-active {
	color: var(--coral);
	border-color: var(--coral);
}

.fav-btn.is-active svg {
	fill: currentColor;
}

.fav-btn.is-pop svg {
	animation: fav-pop 0.35s ease;
}

@keyframes fav-pop {
	0% { transform: scale(1); }
	45% { transform: scale(1.35); }
	100% { transform: scale(1); }
}

/* On product cards: sits in the top-right corner of the photo */
.product-card {
	position: relative;
}

.product-card .fav-btn {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
}

/* On the product page: beside the title */
.product-title-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
}

.fav-btn-lg {
	flex-shrink: 0;
	width: 46px;
	height: 46px;
	margin-top: 0.4rem;
}

.fav-btn-lg svg {
	width: 22px;
	height: 22px;
}

/* Header heart: count badge (same look as the cart badge) */
.fav-count {
	position: absolute;
	top: 2px;
	right: 2px;
	background: var(--coral);
	color: var(--paper);
	font-family: var(--mono);
	font-size: 0.65rem;
	font-weight: 700;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	border-radius: 9px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Small confirmation message */
.fav-toast {
	position: fixed;
	left: 50%;
	bottom: 1.5rem;
	z-index: 1200;
	display: flex;
	align-items: center;
	gap: 1rem;
	max-width: calc(100vw - 2rem);
	padding: 0.8rem 1.1rem;
	background: var(--ink);
	color: var(--paper);
	border-radius: var(--radius);
	box-shadow: 0 16px 32px -12px rgba(26, 26, 26, 0.5);
	font-family: var(--mono);
	font-size: 0.78rem;
	line-height: 1.4;
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, 16px);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.fav-toast.is-visible {
	opacity: 1;
	pointer-events: auto;
	transform: translate(-50%, 0);
}

.fav-toast a {
	flex-shrink: 0;
	color: var(--paper);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Favorites page */
.favorites-head h1 {
	font-family: var(--display);
	font-size: clamp(1.75rem, 3vw, 2.5rem);
	font-weight: 700;
	letter-spacing: -0.02em;
}

.favorites-note {
	margin: -1.25rem 0 2rem;
	font-family: var(--mono);
	font-size: 0.8rem;
	color: var(--grey-text);
}

.favorites-note a {
	color: var(--ink);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.favorites-empty {
	padding: 3rem 0;
	text-align: center;
	font-family: var(--mono);
	font-size: 0.9rem;
	color: var(--grey-text);
}

.favorites-empty p {
	margin-bottom: 1.25rem;
}

/* Breadcrumb bar on the favorites page (same look as the product pages) */
.favorites-page .breadcrumb {
	border-bottom: 1px solid var(--grey);
	background: var(--paper-dim);
}

.favorites-page .breadcrumb .container {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem;
	padding: 1rem 2rem;
	font-family: var(--mono);
	font-size: 0.8rem;
	color: var(--grey-text);
}

.favorites-page .breadcrumb a {
	color: var(--grey-text);
	transition: color 0.2s;
}

.favorites-page .breadcrumb a:hover {
	color: var(--ink);
}

.favorites-page .crumb-sep {
	opacity: 0.5;
}

.favorites-page .crumb-current {
	color: var(--ink);
}

@media (max-width: 600px) {
	.favorites-page .breadcrumb .container {
		padding: 0.75rem 1rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fav-btn,
	.fav-toast {
		transition: none;
	}

	.fav-btn.is-pop svg {
		animation: none;
	}
}
