/* ===================================================================
   WISHLIST ICON — DIMA CIRCLE (icon bark, bla text)
   + fix dyal l z-index m3a l side cart / mobile menu
=================================================================== */

/* ===== base circle + icon only ===== */
.wd-add-to-wishlist,
.wd-wishlist-btn,
a.wd-add-to-wishlist,
a.wd-wishlist-btn {
	border-radius: 999px !important;
	background: #fff !important;
	border: 1px solid rgba(0, 0, 0, 0.14) !important;
	box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12) !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 0 !important;
	line-height: 1 !important;
	text-decoration: none !important;
	overflow: visible !important;
	position: relative !important;
	z-index: 5 !important;
}

/* Circle f kol blasa — 7ta ila makanch f loop */
.wd-add-to-wishlist,
.wd-wishlist-btn {
	width: 34px;
	height: 34px;
	min-width: 34px;
	min-height: 34px;
}

/* hide text */
.wd-add-to-wishlist .wd-wishlist-title,
.wd-wishlist-btn .wd-wishlist-title,
.wd-add-to-wishlist .text,
.wd-wishlist-btn .text,
.wd-add-to-wishlist span:not([class]),
.wd-wishlist-btn span:not([class]) {
	display: none !important;
}

/* icon size */
.wd-add-to-wishlist i,
.wd-wishlist-btn i,
.wd-add-to-wishlist svg,
.wd-wishlist-btn svg {
	width: 16px !important;
	height: 16px !important;
	font-size: 16px !important;
	margin: 0 !important;
	display: block !important;
}

/* badge ✓ */
.wd-add-to-wishlist.added::after,
.wd-wishlist-btn.added::after,
.wd-add-to-wishlist.added-to-wishlist::after,
.wd-wishlist-btn.added-to-wishlist::after {
	content: "✓";
	position: absolute;
	top: -6px;
	right: -6px;
	width: 18px;
	height: 18px;
	border-radius: 999px;
	background: #34b591;
	color: #fff;
	font-size: 12px;
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
	z-index: 10 !important;
}

/* ===== archive / related / upsell / mini cart — top-right ===== */
.wd-products .product,
.related .product,
.up-sells .product,
.cross-sells .product {
	position: relative !important;
}

.wd-products .product .wd-add-to-wishlist,
.wd-products .product .wd-wishlist-btn,
.related .product .wd-add-to-wishlist,
.related .product .wd-wishlist-btn,
.up-sells .product .wd-add-to-wishlist,
.up-sells .product .wd-wishlist-btn,
.cross-sells .product .wd-add-to-wishlist,
.cross-sells .product .wd-wishlist-btn {
	position: absolute !important;
	/* Dakhel l card, machi 3la l 7afa */
	top: 10px !important;
	right: 10px !important;
	left: auto !important;
	width: 34px !important;
	height: 34px !important;
	z-index: 5 !important;
}

/* ===== SINGLE: main image wrapper anchor ===== */
body.single-product .woocommerce-product-gallery__wrapper {
	position: relative !important;
}

/* NO FLICKER: f single, l wishlist mkhebbya 7tta ydkhol l tswira.
   L class "wdl-wl-ready" kayzidha l JS (wla timeout dyal 1.5s b7al
   fallback ila l JS ma khdemch). */
body.single-product:not(.wdl-wl-ready) .wd-add-to-wishlist,
body.single-product:not(.wdl-wl-ready) .wd-wishlist-btn,
body.single-product:not(.wdl-wl-ready) .wd-wishlist-btn-wrap,
body.single-product:not(.wdl-wl-ready) .wd-add-to-wishlist-wrap {
	opacity: 0 !important;
	pointer-events: none !important;
}

body.single-product .wd-add-to-wishlist,
body.single-product .wd-wishlist-btn {
	transition: opacity 0.18s ease;
}

/* Holder dakhel l tswira l kbira (top-left) */
body.single-product .woocommerce-product-gallery__wrapper .sageandsilky-wishlist-near-badges {
	position: absolute !important;
	top: 10px !important;
	left: 10px !important;
	right: auto !important;
	z-index: 40 !important;
	display: flex !important;
	gap: 8px !important;
	align-items: center !important;
	will-change: transform;
}

/* FIX OVERLAP: mnin l side cart / off-canvas mftou7, l wishlist tmchi l wra */
body.wd-opened-cart .sageandsilky-wishlist-near-badges,
body.wd-opened-cart .wd-add-to-wishlist,
body.wd-opened-cart .wd-wishlist-btn,
body.cart-widget-opened .sageandsilky-wishlist-near-badges,
body.cart-widget-opened .wd-add-to-wishlist,
body.cart-widget-opened .wd-wishlist-btn,
body.wd-opened-offcanvas .sageandsilky-wishlist-near-badges,
body.wd-opened-offcanvas .wd-add-to-wishlist,
body.wd-opened-offcanvas .wd-wishlist-btn {
	z-index: 1 !important;
}

/* nafs l 9yas b7al f archive */
body.single-product .sageandsilky-wishlist-near-badges .wd-add-to-wishlist,
body.single-product .sageandsilky-wishlist-near-badges .wd-wishlist-btn {
	width: 34px !important;
	height: 34px !important;
	min-width: 34px !important;
	min-height: 34px !important;
}

/* bayn GHI mnin dakhel l holder */
body.single-product .sageandsilky-wishlist-near-badges .wd-add-to-wishlist,
body.single-product .sageandsilky-wishlist-near-badges .wd-wishlist-btn,
body.single-product .sageandsilky-wishlist-near-badges a.wd-add-to-wishlist,
body.single-product .sageandsilky-wishlist-near-badges a.wd-wishlist-btn {
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
}

/* MOBILE FIX */
@media (max-width: 991px) {
	body.wd-opened-mobile-nav .sageandsilky-wishlist-near-badges,
	body.wd-opened-mobile-nav .wd-add-to-wishlist {
		display: none !important;
	}
}
