/* ==========================================================================
   My Favorite Products for WooCommerce — styles
   Text domain: my-favorite-products
   ========================================================================== */

/* -----------------------------------------------------------------------
   Heart button — universal
   --------------------------------------------------------------------- */

.mfp-favorite-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 1px solid currentColor;
	border-radius: 50%;
	width: 2.4em;
	height: 2.4em;
	padding: 0;
	cursor: pointer;
	transition: transform 0.15s ease, opacity 0.15s ease;
	line-height: 1;
	vertical-align: middle;
	margin-left: 0.5em;
	position: absolute;
	top: 50px;
	right: 0.25rem;
	z-index: 10;
}

.product-summary .mfp-favorite-btn {
	top: 10px;
	opacity: 1;
}

.mfp-remove-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	width: 2.4em;
	height: 2.4em;
	padding: 0;
	cursor: pointer;
	line-height: 1;
	vertical-align: middle;
	border: none;
}

.mfp-favorite-btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.mfp-favorite-btn.mfp-loading {
	opacity: 0.5;
	pointer-events: none;
}

.mfp-heart-icon {
	font-size: 1.1em;
	line-height: 1;
}

/* On shop loop, keep button compact and overlay-friendly */
.woocommerce ul.products li.product .mfp-favorite-btn {
	margin-top: 0.4em;
}

/* -----------------------------------------------------------------------
   Favorites page — list
   --------------------------------------------------------------------- */

.mfp-favorites-page {
	max-width: 100%;
}

.mfp-notice {
	padding: 0.8em 1em;
	border-radius: 4px;
	margin-bottom: 1em;
	font-size: 0.95em;
}

.mfp-notice--success {
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

.mfp-notice--error {
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

.mfp-actions--top {
	margin-bottom: 1.2em;
}

.mfp-favorites-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mfp-favorites-item {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1rem 0;
	border-bottom: 1px solid #e5e5e5;
}

.mfp-favorites-item:last-child {
	border-bottom: none;
}

.mfp-product-image {
	flex: 0 0 80px;
}

.mfp-product-image img {
	display: block;
	width: 80px;
	height: 80px;
	object-fit: cover;
	border-radius: 4px;
}

.mfp-product-info {
	flex: 1 1 auto;
}

.mfp-product-name {
	font-size: 1rem;
	margin: 0 0 0.3em;
}

.mfp-product-name a {
	text-decoration: none;
	color: inherit;
}

.mfp-product-name a:hover {
	text-decoration: underline;
}

.mfp-product-price {
	font-size: 0.95em;
	color: #555;
}

.mfp-out-of-stock {
	display: inline-block;
	margin-top: 0.3em;
	font-size: 0.8em;
	color: #c00;
	font-weight: 600;
}

.mfp-product-actions {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

/* Remove button inside the list */
.mfp-favorites-item .mfp-favorite-btn {
	margin-left: 0;
}

.mfp-empty-message {
	padding: 1.5em 0;
	color: #777;
}

.mfp-login-notice {
	color: #555;
}

/* -----------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------- */

@media ( max-width: 480px ) {
	.mfp-favorites-item {
		flex-wrap: wrap;
	}

	.mfp-product-actions {
		flex: 1 0 100%;
		justify-content: flex-end;
	}
}

/* Overlay icon on product image — mirrors cart icon */
.product-favorite-icon {
    width: 40px;
    height: 40px;
    background: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    border: none;
    margin: 0.5em auto 0;
    padding: 0;
    line-height: 1;
	opacity: 0;
}

.product-gallery-section .product-favorite-icon {
	top: 10px;
	opacity: 1;
}

.product-favorite-icon .mfp-heart-icon i {
    color: var(--color-primary);
    font-size: var(--font-size-base);
}

/* Hover state */
.product-favorite-icon:hover {
    background: var(--color-primary);
}

.product-favorite-icon:hover .mfp-heart-icon i {
    color: var(--color-white);
}

/* Show icon on hover (desktop) */
.woocommerce ul.products li.product:hover .product-favorite-icon,
.cross-sells .product:hover .product-favorite-icon,
.upsells .product:hover .product-favorite-icon,
.related .product:hover .product-favorite-icon {
    opacity: 1 !important;
}


@media (max-width: 768px) {
    /* Always show basket icon on mobile */
    .product-favorite-icon {
        opacity: 1;
    }
}

.mfp-pagination {
    display: flex;
    align-items: center;
    gap: 0.4em;
    margin-top: 1.5em;
    flex-wrap: wrap;
	justify-content: center;
}

.mfp-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.2em;
    height: 2.2em;
    padding: 0 0.6em;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: var(--color-white);
    color: inherit;
    text-decoration: none;
    font-size: 0.9em;
    transition: background 0.2s, color 0.2s;
}

.mfp-page-btn:hover {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.mfp-page-current {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
    font-weight: 600;
    pointer-events: none;
}

.mfp-page-prev,
.mfp-page-next {
    padding: 0 0.8em;
}

.mfp-per-page {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    font-size: 0.9em;
}

.mfp-per-page select {
    padding: 0.3em 0.5em;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.mfp-actions--top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mfp-actions--top .mfp-add-all-btn {
	width: auto;
}