/* ============================================================
   WooCommerce Favourite Products - Public Styles
   ============================================================ */

.woocommerce ul.products li.product,
.woocommerce .products ul li.product,
.wc-block-grid__products .wc-block-grid__product {
	position: relative;
}

.woocommerce ul.products li.product .product-block,
.woocommerce .products ul li.product .product-block {
	position: relative;
}

.wfp-loop-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
	opacity: 0;
	transform: translateX(20px);
	-webkit-user-select: none;
	user-select: none;
	line-height: 1;
}

@media (hover: hover) {
	li.product:hover .wfp-loop-btn,
	.wc-block-grid__product:hover .wfp-loop-btn {
		opacity: 1;
		transform: translateX(0);
	}
}

@media (hover: none) {
	.wfp-loop-btn {
		opacity: 1;
		transform: translateX(0);
	}
}

.wfp-loop-btn .wfp-loop-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: color 0.3s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wfp-loop-btn .wfp-loop-icon svg,
.wfp-action-link .wfp-action-icon svg {
	width: 100%;
	height: 100%;
	display: block;
}

.wfp-loop-btn:hover {
	opacity: 0.9;
}

.wfp-loop-btn.wfp-active {
	opacity: 1;
}

.wfp-loading {
	opacity: 0.5;
	pointer-events: none;
	cursor: default;
}

.wfp-loop-btn.wfp-loading .wfp-loop-icon,
.wfp-action-link.wfp-loading .wfp-action-icon {
	animation: wfp-spin 0.8s linear infinite;
}

@keyframes wfp-spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

.wfp-error {
	color: #e74c3c;
	font-size: 12px;
	margin-top: 4px;
	white-space: nowrap;
}

.wfp-action-link {
	position: relative;
}

.wfp-action-link .wfp-action-text {
	font-size: 14px;
	line-height: 1;
	white-space: nowrap;
}

.wfp-action-link.wfp-active:hover {
	color: #c0392b;
}

.wfp-action-link.wfp-animate .wfp-action-icon {
	animation: wfp-action-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes wfp-action-pop {
	0% { transform: scale(1); }
	40% { transform: scale(1.3); }
	100% { transform: scale(1); }
}

.wfp-loop-btn.wfp-animate .wfp-loop-icon {
	animation: wfp-loop-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes wfp-loop-pop {
	0% { transform: scale(1); }
	40% { transform: scale(1.35); }
	100% { transform: scale(1); }
}

.wfp-loop-btn::after,
.wfp-action-link::after {
	position: absolute;
	padding: 5px 10px;
	background: #333;
	color: #fff;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.4;
	white-space: nowrap;
	border-radius: 4px;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transform: translateY(4px);
	transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
	z-index: 50;
}

.wfp-loop-btn::after {
	content: attr(data-tooltip);
	bottom: calc(100% + 6px);
	right: 0;
}

.wfp-action-link::after {
	content: attr(data-tooltip);
	bottom: calc(100% + 6px);
	left: 0;
}

.wfp-loop-btn:hover::after,
.wfp-loop-btn:focus-visible::after,
.wfp-action-link:hover::after,
.wfp-action-link:focus-visible::after {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

/* JS-powered real DOM tooltip – bypasses overflow:hidden clipping. */
.wfp-js .wfp-loop-btn::after,
.wfp-js .wfp-action-link::after {
	display: none;
}

.wfp-tooltip {
	position: absolute;
	padding: 5px 10px;
	background: #333;
	color: #fff;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.4;
	white-space: nowrap;
	border-radius: 4px;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transform: translateY(4px);
	transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
	z-index: 99999;
}

.wfp-tooltip.wfp-tooltip-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.wfp-tooltip.wfp-tooltip-below {
	transform: translateY(0);
}

.wfp-myaccount-products {
	margin-top: 20px;
}

.wfp-myaccount-products .products {
	margin: 0;
}

.wfp-pagination {
	margin-top: 20px;
	text-align: center;
}

.wfp-favourite-item {
	position: relative;
}

.wfp-empty-state {
	text-align: center;
	padding: 60px 20px;
}

.wfp-empty-state p {
	margin-bottom: 16px;
	font-size: 16px;
	color: #666;
}

.wfp-shortcode-products,
.wfp-block-products {
	display: grid;
	gap: 24px;
	padding: 10px 0;
}

.wfp-columns-1 { grid-template-columns: 1fr; }
.wfp-columns-2 { grid-template-columns: repeat(2, 1fr); }
.wfp-columns-3 { grid-template-columns: repeat(3, 1fr); }
.wfp-columns-4 { grid-template-columns: repeat(4, 1fr); }

.wfp-shortcode-product,
.wfp-block-product {
	border: 1px solid #e8e8e8;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	transition: box-shadow 0.25s ease;
}

.wfp-shortcode-product:hover,
.wfp-block-product:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.wfp-product-image-link,
.wfp-block-image-link {
	display: block;
	overflow: hidden;
}

.wfp-product-image-link img,
.wfp-block-image-link img {
	width: 100%;
	height: auto;
	display: block;
	transition: transform 0.3s ease;
}

.wfp-product-image-link:hover img,
.wfp-block-image-link:hover img {
	transform: scale(1.03);
}

.wfp-product-info,
.wfp-block-product-info {
	padding: 14px;
}

.wfp-product-title,
.wfp-block-product-title {
	font-size: 16px;
	margin: 0 0 8px;
}

.wfp-product-title a,
.wfp-block-product-title a {
	text-decoration: none;
	color: inherit;
}

.wfp-product-actions,
.wfp-block-product-info .wfp-product-actions {
	margin-top: 12px;
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.wfp-add-to-cart-button,
.wfp-add-to-cart {
	margin-top: 8px;
}

.wfp-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wfp-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(2px);
}

.wfp-modal-content {
	position: relative;
	background: #fff;
	border-radius: 12px;
	padding: 32px;
	max-width: 420px;
	width: 90%;
	text-align: center;
	z-index: 1;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.wfp-modal-close {
	position: absolute;
	top: 12px;
	right: 16px;
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	color: #999;
	line-height: 1;
	padding: 4px;
	transition: color 0.2s ease;
}

.wfp-modal-close:hover {
	color: #333;
}

.wfp-modal-content p {
	margin-bottom: 20px;
	font-size: 15px;
	color: #555;
}

.wfp-modal-content .wfp-login-button {
	margin-right: 10px;
}

@media (max-width: 768px) {
	.wfp-columns-3,
	.wfp-columns-4 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px) {
	.wfp-columns-2,
	.wfp-columns-3,
	.wfp-columns-4 {
		grid-template-columns: 1fr;
	}

	.wfp-action-link .wfp-action-text {
		display: none;
	}

	.wfp-modal-content {
		padding: 24px 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wfp-action-link .wfp-action-icon,
	.wfp-loop-btn .wfp-loop-icon,
	.wfp-loop-btn,
	.wfp-action-link {
		transition: none !important;
		animation: none !important;
	}
}
