/* Wishlist Heart Button */
.wishlist-heart {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

[dir="rtl"] .wishlist-heart {
    right: auto;
    left: 12px;
}

.wishlist-heart:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.wishlist-heart:active {
    transform: scale(0.95);
}

.wishlist-heart i {
    font-size: 20px;
    transition: all 0.3s ease;
}

.wishlist-heart .bi-heart {
    display: inline;
    color: #dc3545;
    height: 25px;
}

.wishlist-heart .bi-heart-fill {
    display: none;
    color: #dc3545;
    height: 25px;
}

.wishlist-heart.active .bi-heart {
    display: none;
}

.wishlist-heart.active .bi-heart-fill {
    display: inline;
    animation: heartBeat 0.3s ease-in-out;
}

/* Heart beat animation */
@keyframes heartBeat {
    0%, 100% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.3);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Wishlist Count Badge */
.wishlist-count {
    position: absolute;
    top: 0px;
    right: 0px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    min-width: 19px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 7px;
    line-height: 10px;
    z-index: 10;
}

[dir="rtl"] .wishlist-count {
    right: auto;
    left: 0px;
}

/* Wishlist Icon in Header */
.wishlist-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 8px;
}

    .wishlist-icon i {
        font-size: 20px;
        color: #333;
        line-height: 19px;
    }

    .wishlist-icon:hover i {
        color: #dc3545;
    }

/* Wishlist overlay */
.wishlist-dropdown {
    position: absolute;
    top: 100%;
    right: 20px;
    margin-top: -10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 350px;
    max-height: 500px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

[dir="rtl"] .wishlist-dropdown {
    right: auto;
    left: 0;
}

.wishlist-dropdown.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wishlist-dropdown-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .wishlist-dropdown-header h5 {
        margin: 0;
        font-size: 18px;
        font-weight: 600;
    }

.wishlist-dropdown-body {
    padding: 16px;
}

.wishlist-empty {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

    .wishlist-empty i.heart {
        font-size: 48px;
        color: #dee2e6;
        margin-bottom: 16px;
    }

    .wishlist-empty i {
        font-size: 16px;
        color: #dee2e6;
    }

.wishlist-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #f1f3f5;
    transition: background 0.2s;
    position: relative;
}

    .wishlist-item:last-child {
        border-bottom: none;
    }

    .wishlist-item:hover {
        background: #f8f9fa;
    }

.wishlist-item-link {
    display: flex;
    align-items: center;
    flex: 1;
    text-decoration: none;
    color: inherit;
}

    .wishlist-item-link:hover {
        text-decoration: none;
    }

        .wishlist-item-link:hover .wishlist-item-title {
            color: #2b0e3e;
        }

.wishlist-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 12px;
}


[dir="rtl"] .wishlist-item-image {
    margin-right: 0;
    margin-left: 12px;
}

.wishlist-item-info {
    flex: 1;
}

.wishlist-item-title {
    font-weight: 600;
    margin: 0 0 4px 0;
    font-size: 14px;
    transition: color 0.2s;
}

.wishlist-item-type {
    color: #6c757d;
    font-size: 12px;
    margin: 0;
}

.wishlist-item-remove {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 10px;
    transition: color 0.2s;
}

    .wishlist-item-remove:hover {
        color: #c82333;
    }

.card {
    position: relative;
}

    .card .wishlist-heart {
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .card:hover .wishlist-heart {
        opacity: 1;
    }

    .card .wishlist-heart.active {
        opacity: 1;
    }

@media (max-width: 576px) {
    .wishlist-dropdown {
        width: 100vw;
        max-width: 350px;
        right: 0;
        left:0;
        margin:0 auto
    }

    .card .wishlist-heart {
        opacity: 1;
    }
}
