.th-woo-entry-summary .product-action-wishlist {
  position: absolute;
  top: 20px;
  right: 30px;
}

@media only screen and (max-width: 768px) {
  .th-woo-entry-summary .product-action-wishlist {
    position: unset;
    top: 20px;
    right: 30px;
  }
}

.th-woocommerce-wishlist-button {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;  
  text-decoration: none;
  cursor: pointer;
  font-size: 14px;
  gap: 8px;
  transition: background-color 0.3s, color 0.3s;
  background-color: rgb(var(--color-background));
  color: rgb(var(--color-foreground));
}

.th-woocommerce-wishlist-button.added-to-wishlist {
  background-color: rgb(var(--color-foreground));
  border-color: rgb(var(--color-foreground));
  color: rgb(var(--color-background));
}

.th-woocommerce-wishlist-button:hover {
  background-color: rgb(var(--color-foreground));
  color: rgb(var(--color-background));
}

.th-woocommerce-wishlist-button.added-to-wishlist:hover {
  background-color: rgb(var(--color-background));
  color: rgb(var(--color-foreground));
}

.th-woocommerce-wishlist-button .dashicons-heart {
  font-size: 18px;
}

.th-woocommerce-wishlist-button.added-to-wishlist .dashicons-heart::before {
  content: "\f147";
}

/* Tooltip styles */
.th-woocommerce-wishlist-button[data-tooltip] {
  position: relative;
}

.th-woocommerce-wishlist-button[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;  
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 1000;
  background-color: rgb(var(--color-foreground));
  color: rgb(var(--color-background));
}

.th-woocommerce-wishlist-button[data-tooltip]::before {
  content: '';
  position: absolute;
  border: 5px solid transparent;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.th-woocommerce-wishlist-button:hover[data-tooltip]::after, .th-woocommerce-wishlist-button:hover[data-tooltip]::before {
  opacity: 1;
  visibility: visible;
}

/* Tooltip position: Top (default) */
.th-woocommerce-wishlist-button[data-tooltip-position="top"]::after {
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
}

.th-woocommerce-wishlist-button[data-tooltip-position="top"]::before {
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  border-top-color: rgb(var(--color-foreground));
}

/* Tooltip position: Bottom */
.th-woocommerce-wishlist-button[data-tooltip-position="bottom"]::after {
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
}

.th-woocommerce-wishlist-button[data-tooltip-position="bottom"]::before {
  top: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  border-bottom-color: rgb(var(--color-foreground));
}

/* Tooltip position: Right */
.th-woocommerce-wishlist-button[data-tooltip-position="right"]::after {
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
}

.th-woocommerce-wishlist-button[data-tooltip-position="right"]::before {
  left: calc(100% + 5px);
  top: 50%;
  transform: translateY(-50%);
  border-right-color: rgb(var(--color-foreground));
}

/* Tooltip position: Left */
.th-woocommerce-wishlist-button[data-tooltip-position="left"]::after {
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
}

.th-woocommerce-wishlist-button[data-tooltip-position="left"]::before {
  right: calc(100% + 5px);
  top: 50%;
  transform: translateY(-50%);
  border-left-color: rgb(var(--color-foreground));
}

.remove-wishlist-product-btn {
  position: absolute;
  top: 0;
  right: 0;
}

.remove-wishlist-product-btn .icon {
  display: flex;
  width: auto;
  height: auto;
}

.woocommerce div.product .woocommerce-product-gallery {
  position: relative;
}

.wishlist-button-overlay {
  position: absolute;
  top: 10px; 
  right: 10px;
  z-index: 10;
}

.wishlist-button {
  background-color: #0073aa;
  color: #fff;
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.wishlist-button:hover {
  background-color: #005177;
}