/* ============ Wishlist Button ============ */
.sadattoys-wishlist-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 40px;
	height: 40px;
	border: none;
	background-color: #ffffff;
	border-radius: 50%;
	cursor: pointer;
	padding: 0;
	transition: all 0.25s ease-in-out;
}

.sadattoys-wishlist-btn.sadattoys-wishlist-btn--loading {
	opacity: 0.6;
	pointer-events: none;
}

.sadattoys-wishlist-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1em;
}

.sadattoys-wishlist-icon svg {
	width: 18px;
	height: 18px;
}

.sadattoys-wishlist-icon--active {
	display: none;
	transform-origin: center;
}

.sadattoys-wishlist-btn.in-wishlist .sadattoys-wishlist-icon--inactive {
	display: none;
}

.sadattoys-wishlist-btn.in-wishlist .sadattoys-wishlist-icon--active {
	display: flex;
}

/* ---- Add-to-wishlist animation ---- */

.sadattoys-wishlist-btn {
	position: relative;
	overflow: visible;
	--sadattoys-burst-color: #e63946;
}

.sadattoys-wishlist-btn::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	border: 2px solid var( --sadattoys-burst-color );
	opacity: 0;
	pointer-events: none;
}

.sadattoys-wishlist-btn.sadattoys-pop .sadattoys-wishlist-icon--active {
	animation: sadattoys-heart-pop 0.55s cubic-bezier( 0.17, 0.89, 0.32, 1.49 );
}

.sadattoys-wishlist-btn.sadattoys-pop::after {
	animation: sadattoys-ring-burst 0.55s ease-out;
}

@keyframes sadattoys-heart-pop {
	0% {
		transform: scale( 0.6 );
	}
	45% {
		transform: scale( 1.35 );
	}
	70% {
		transform: scale( 0.9 );
	}
	100% {
		transform: scale( 1 );
	}
}

@keyframes sadattoys-ring-burst {
	0% {
		opacity: 0.6;
		transform: scale( 1 );
	}
	100% {
		opacity: 0;
		transform: scale( 1.7 );
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.sadattoys-wishlist-btn.sadattoys-pop .sadattoys-wishlist-icon--active,
	.sadattoys-wishlist-btn.sadattoys-pop::after {
		animation: none;
	}
}

/* ============ Wishlist Count ============ */
.sadattoys-wishlist-count-wrap {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
}

.sadattoys-wishlist-count-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #333333;
}

.sadattoys-wishlist-count-icon svg {
	width: 24px;
	height: 24px;
}

.sadattoys-wishlist-count {
	position: absolute;
	top: -6px;
	inset-inline-end: -8px;
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	border-radius: 50%;
	background-color: #e63946;
	color: #ffffff;
	font-size: 10px;
	line-height: 16px;
	text-align: center;
}

/* ============ Wishlist Grid (card layout, like the product grid) ============ */
.sadattoys-wishlist-grid {
	display: grid;
	grid-template-columns: repeat( 3, 1fr );
	gap: 20px;
	align-items: stretch;
}

/* ---- Sale / stock badges ---- */
.sadattoys-wishlist-badge {
	position: absolute;
	top: 10px;
	inset-inline-start: 10px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 12px;
	line-height: 1.6;
	white-space: nowrap;
}

.sadattoys-wishlist-badge--sale {
	background-color: #e63946;
	color: #ffffff;
}

.sadattoys-wishlist-badge--stock {
	background-color: #6c757d;
	color: #ffffff;
}

/* Equal-height cards: the grid stretches every card to the tallest row
   item, and the card itself is a column flexbox so the info block can
   grow and keep the Add to Cart button pinned to the bottom. */
.sadattoys-wishlist-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background-color: #ffffff;
	border: 1px solid #eaeaea;
	border-radius: 10px;
	overflow: hidden;
	transition: box-shadow 0.2s ease-in-out, opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.sadattoys-wishlist-card-image-wrap {
	position: relative;
}

.sadattoys-wishlist-card-image {
	display: block;
	aspect-ratio: 1 / 1;
}

.sadattoys-wishlist-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.sadattoys-wishlist-card-wishlist-btn {
	position: absolute;
	top: 10px;
	inset-inline-end: 10px;
	z-index: 2;
}

.sadattoys-wishlist-card-info {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 14px;
	flex: 1 1 auto; /* fills remaining height so buttons line up across cards */
}

.sadattoys-wishlist-card-title {
	font-weight: 600;
	text-decoration: none;
	color: inherit;
}

.sadattoys-wishlist-card-price {
	color: #777777;
	font-size: 0.9em;
}

.sadattoys-wishlist-card-add-to-cart {
	margin-top: auto; /* pushes the button to the bottom of the card */
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	text-decoration: none;
	padding: 10px 16px;
	border-radius: 6px;
	background-color: #045c57;
	color: #ffffff;
	transition: background-color 0.2s ease-in-out;
}

.sadattoys-wishlist-card-add-to-cart:hover {
	background-color: #033f3b;
	color: #ffffff;
}

.sadattoys-wishlist-empty {
	text-align: center;
	color: #777777;
	padding: 40px 0;
}

@media ( max-width: 767px ) {
	.sadattoys-wishlist-grid {
		grid-template-columns: repeat( 2, 1fr );
		gap: 12px;
	}
}
