/**
 * Product WhatsApp and centralized favorites UI.
 * Kept isolated from WooCommerce cart, checkout and archive layout rules.
 */

.header-actions .header-action-btn.favorites-link {
	position: relative;
	width: 42px;
	height: 42px;
	flex: 0 0 42px;
	border-radius: 50%;
	text-decoration: none;
}

.header-actions .favorites-link .icon {
	width: 23px;
	height: 23px;
}

.favorites-count-badge {
	position: absolute;
	top: 1px;
	right: 0;
	display: grid;
	min-width: 17px;
	height: 17px;
	padding: 0 4px;
	place-items: center;
	border: 2px solid var(--color-surface);
	border-radius: 999px;
	background: var(--color-accent);
	color: #fff;
	font-size: 0.62rem;
	font-weight: 700;
	line-height: 1;
}

.favorites-count-badge.is-empty {
	display: none;
}

.header-actions .favorites-link:hover,
.header-actions .favorites-link:focus-visible {
	background: var(--color-surface-secondary);
}

.exxepanna-favorite-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	margin: 0;
	border: 1px solid var(--color-border);
	border-radius: 999px;
	background: var(--color-surface);
	color: var(--color-dark);
	cursor: pointer;
	transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.exxepanna-favorite-toggle:hover {
	border-color: var(--color-accent);
	color: var(--color-accent);
	transform: translateY(-1px);
}

.exxepanna-favorite-toggle:focus-visible,
.exxepanna-product-whatsapp:focus-visible,
.header-actions .favorites-link:focus-visible {
	outline: 3px solid rgba(45, 90, 67, 0.28);
	outline-offset: 3px;
}

.exxepanna-favorite-toggle:disabled {
	opacity: 0.65;
	cursor: wait;
}

.exxepanna-favorite-toggle__icon,
.exxepanna-favorite-toggle__icon .icon {
	display: block;
	width: 22px;
	height: 22px;
}

.exxepanna-favorite-toggle.is-favorite {
	border-color: rgba(150, 45, 57, 0.32);
	background: #fff7f7;
	color: #9b2637;
}

.exxepanna-favorite-toggle.is-favorite .icon {
	fill: currentColor;
}

.exxepanna-card-media {
	position: relative;
}

.exxepanna-favorite-toggle--card {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 4;
	width: 42px;
	height: 42px;
	min-width: 42px;
	min-height: 42px;
	box-shadow: 0 5px 18px rgba(20, 20, 18, 0.12);
}

.exxepanna-product-contact-actions {
	display: grid;
	gap: 0.7rem;
	margin: clamp(1rem, 2vw, 1.35rem) 0;
}

.exxepanna-product-whatsapp {
	display: flex;
	width: 100%;
	min-height: 62px;
	padding: 0.55rem 1rem;
	align-items: center;
	gap: 0.8rem;
	overflow: hidden;
	border: 1px solid rgba(39, 180, 62, 0.25);
	border-radius: 12px;
	background: rgba(39, 180, 62, 0.065);
	color: var(--color-dark);
	text-decoration: none;
	transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.exxepanna-product-whatsapp:hover {
	border-color: rgba(39, 180, 62, 0.48);
	background: rgba(39, 180, 62, 0.11);
	transform: translateY(-1px);
}

.exxepanna-product-whatsapp img {
	display: block;
	width: 42px;
	height: 42px;
	flex: 0 0 42px;
}

.product-whatsapp-copy {
	position: relative;
	display: block;
	width: min(100%, 310px);
	height: 1.5rem;
	overflow: hidden;
	font-size: clamp(0.82rem, 1.2vw, 0.94rem);
	font-weight: 650;
	line-height: 1.5rem;
}

.product-whatsapp-copy .whatsapp-copy-message {
	white-space: nowrap;
}

.exxepanna-favorite-toggle--product {
	width: 100%;
	padding: 0.65rem 1rem;
	gap: 0.65rem;
	border-radius: 10px;
	font-size: 0.84rem;
	font-weight: 650;
}

.exxepanna-favorites-page {
	position: relative;
	min-height: 160px;
}

.exxepanna-favorites-page.is-loading {
	opacity: 0.62;
	pointer-events: none;
}

.exxepanna-favorites-grid {
	align-items: stretch;
}

.exxepanna-favorites-grid .product-card {
	min-width: 0;
}

.exxepanna-favorites-empty {
	display: grid;
	max-width: 640px;
	min-height: 280px;
	margin: 1rem auto 0;
	padding: clamp(1.5rem, 5vw, 3rem);
	place-items: center;
	align-content: center;
	gap: 1rem;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	background: var(--color-surface-secondary);
	text-align: center;
}

.exxepanna-favorites-empty[hidden] {
	display: none;
}

.exxepanna-favorites-empty__icon,
.exxepanna-favorites-empty__icon .icon {
	display: block;
	width: 42px;
	height: 42px;
	color: var(--color-text-secondary);
}

.exxepanna-favorites-empty p {
	margin: 0;
	font-size: clamp(1rem, 2vw, 1.2rem);
}

.exxepanna-favorites-empty .button {
	display: inline-flex;
	min-height: 44px;
	padding: 0.75rem 1.2rem;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--color-dark);
	border-radius: var(--radius-sm);
	background: var(--color-dark);
	color: #fff;
	font-size: 0.76rem;
	font-weight: 700;
	letter-spacing: 0.07em;
	text-decoration: none;
}

@media (max-width: 1024px) {
	.header-actions .header-action-btn.favorites-link {
		width: 40px;
		height: 40px;
		flex-basis: 40px;
	}
}

@media (max-width: 768px) {
	.exxepanna-product-contact-actions {
		margin-top: 0.9rem;
	}

	.exxepanna-product-whatsapp {
		min-height: 58px;
		padding-inline: 0.75rem;
	}

	.exxepanna-product-whatsapp img {
		width: 38px;
		height: 38px;
		flex-basis: 38px;
	}

	.product-whatsapp-copy {
		font-size: 0.8rem;
	}
}

@media (max-width: 430px) {
	.header-actions {
		gap: 0.05rem;
	}

	.header-actions .header-action-btn.favorites-link {
		width: 38px;
		height: 38px;
		flex-basis: 38px;
	}

	.header-actions .favorites-link .icon {
		width: 21px;
		height: 21px;
	}

	.favorites-count-badge {
		top: 0;
		right: -1px;
	}

	.exxepanna-favorite-toggle--card {
		top: 8px;
		right: 8px;
		width: 40px;
		height: 40px;
		min-width: 40px;
		min-height: 40px;
	}

	.product-whatsapp-copy .whatsapp-copy-message {
		white-space: normal;
		line-height: 1.2rem;
	}

	.product-whatsapp-copy {
		height: 2.4rem;
		font-size: 0.76rem;
		line-height: 1.2rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.exxepanna-favorite-toggle,
	.exxepanna-product-whatsapp {
		transition: none;
	}

	.product-whatsapp-copy .whatsapp-copy-message {
		animation: none;
		transition: none;
	}

	.product-whatsapp-copy .whatsapp-copy-message--first {
		opacity: 1;
		transform: none;
	}

	.product-whatsapp-copy .whatsapp-copy-message--second {
		display: none;
	}
}
