/* Wishlist icon styles */

.wishlist-icon-wrapper {
	position: absolute;
	top: 5px;
	left: 5px;
	z-index: 1000;
	width: 22px;
	height: 22px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	touch-action: manipulation;
	pointer-events: auto;
    background-color: var(--color__primary) !important;
    border-radius: 50px;

}

.wishlist-icon-wrapper:hover {
	opacity: 0.7;
}

.wishlist-icon {
	cursor: pointer;
	width: 28px;
	height: 28px;
    color: var(--color__button__text) !important;
	stroke: currentColor;
	fill: transparent;
	transition: fill 0.2s ease, color 0.2s ease, filter 0.2s ease;
	pointer-events: none;
    padding: 2px
}

.wishlist-icon.in-wishlist {
	fill: #ff3b30; /* iOS red */
	stroke: #ff3b30;
}

/* Wishlist list styles */
.wishlist-items {
    margin: 10px 0;
    padding: 0;
}

.wishlist-items li {
    list-style: none;
    margin: 5px 0;
}

/* Ensure product image containers are positioned relative */
.woocommerce ul.products li.product,
.woocommerce div.product div.images {
    position: relative;
}

/* Ensure product links don't block wishlist icon */
.product-image-wrapper {
    position: relative;
}

.product-image-wrapper .product-link {
    position: relative;
    z-index: 1;
}


/**/

/* Wishlist Toggle Icon */
.wishlist-toggle-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f6f8;
    border-radius: 50px;
    cursor: pointer;
    transition: 0.2s;
    color: #ff3b30 !important;
    -webkit-tap-highlight-color: transparent;
}

.wishlist-toggle-icon:hover {
    scale:1.05
}

.wishlist-sidebar-icon {
    width: 26px;
    height: 26px;
    /* fill: #ff3b30 !important; */
    fill: #fff !important;
    stroke: #fff !important;
    pointer-events: none;
    color: #fff !important;
}

.wishlist-toggle-icon img{
    filter: brightness(01) saturate(0)
}

/* Wishlist Sidebar */
.wishlist-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    height: 100%;
    background: white;
    overflow-y: auto;
    transition: right 0.3s ease;
    z-index: 9998;
}

.overlay-wishlist {
    position: fixed;
    top: 0;
    right: 0%;
    width: 100%;
    height: 100%;
    background: #0005;
    transition: 0.3s ease;
    z-index: 9997;
}


/* Wishlist Overlay (hidden by default) */
.wishlist-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9997;
}

/* Show overlay when sidebar is open */
#wishlist-toggle-1:checked ~ .wishlist-overlay {
    display: block;
}


/* Show sidebar when checkbox is checked */
#wishlist-toggle-1:checked ~ .wishlist-sidebar {
    right: 0;
}

#wishlist-toggle-2:checked ~ .wishlist-overlay {
    display: block;
}


/* Show sidebar when checkbox is checked */
#wishlist-toggle-2:checked ~ .wishlist-sidebar {
    right: 0;
}

/* Close button inside sidebar */
.wishlist-close {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    display: block;
    text-align: right;
}

/* Wishlist item styles */
.wishlist-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wishlist-items .button.add-to-cart-button:hover{
    color: white
}

.wishlist-item {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eee;
    display: flex; 
    gap: 10px;
    align-items: center;
    padding: 10px 0
}

.wishlist-thumb{
    display: flex;
}

.wishlist-thumb img {
    width: 60px;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.wishlist-info {
    flex-grow: 1;
}

.wishlist-title {
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    color: #333;
    display: block;
    margin-bottom: 5px;
}

.add-to-cart-button {
    display: inline-block;
    background: #2c7be5;
    color: white;
    padding: 5px 10px;
    font-size: 13px;
    border-radius: 4px;
    text-decoration: none;
}


.wishlist-sidebar-content {padding: 1rem}

.mobile_wishlist {display: none}
@media(max-width: 970px){
 .mobile_wishlist {
    /* display: flex; 
    align-items: center; 
    justify-content: center;
    width: 42px; 
    height: 42px;
    aspect-ratio: 1; */
    /* position: absolute; */
    top: 0px;
    inset-inline-start: 0;
    z-index: 9999;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    left: unset;
    right: 50px;
}


 .mobile_wishlist .wishlist-toggle-icon {
    width: 42px;
    height: 42px;
}
 /* .mobile_wishlist .wishlist-sidebar-icon {
    width: 264px;
    height: 26px;
} */

}

.desktop_wishlist {
    display: flex;
    align-items: center; 
}
@media(max-width: 970px){
 .desktop_wishlist {display: none}

}


.product-grid-container .wishlist-icon-wrapper {
	position: absolute;
	top: 10px !important;
	left: 10px !important;
	z-index: 1
}


.wishlist-loader {
    position: absolute;
    width: 13px;
    height: 13px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: wishlist-spin 0.7s linear infinite;
    display: none; /* hidden by default */
    pointer-events: none;
}

.wishlist-icon-wrapper.loading .wishlist-loader {
    display: block; /* show spinner */
}

.wishlist-icon-wrapper.loading .wishlist-icon {
    visibility: hidden; /* hide heart while loading */
}

@keyframes wishlist-spin {
    to {
        transform: rotate(360deg);
    }
}