/*BOOKMARK CUSTOMAZING*/
/*
 * Allping — SaveTo Wishlist global button design
 *
 * Applies to the plugin's wishlist buttons wherever they are rendered.
 * The plugin's behavior and state classes remain untouched.
 */

/* Keep the plugin's placement wrapper above the product media. */
.stw-wishlist-button-container {
  z-index: 20 !important;
}

/* Move the plugin's top-left placement to the upper-right side. */
.stw-wishlist-button-container.stw-wishlist-button-placement-top_left {
  left: auto !important;
  right: 10px !important;
}

/* In desktop list view, align the button with the right edge of the image
 * column instead of the right edge of the complete horizontal card. */
@media (min-width: 1025px) {
  body.woocommerce.archive ul.products.products-list-view li.product
  .stw-wishlist-button-container.stw-wishlist-button-placement-top_left {
    left: calc(25% - 39px) !important;
    right: auto !important;
  }
}

/* The mobile list uses a 38% image column. */
@media (max-width: 575px) {
  body.woocommerce.archive ul.products.products-list-view li.product
  .stw-wishlist-button-container.stw-wishlist-button-placement-top_left {
    left: calc(38% - 39px) !important;
    right: auto !important;
  }
}

button.save-to-wishlist-button,
button.save-to-wishlist-cart-button {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 29px !important;
  min-width: 29px !important;
  height: 29px !important;
  min-height: 29px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: #FFFFFF !important;
  color: #0A1930 !important;
  font-size: 0 !important;
  line-height: 0 !important;
  text-align: center !important;
  white-space: nowrap !important;
  box-shadow: 0 2px 6px rgba(10, 25, 48, 0.16) !important;
  cursor: pointer !important;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease !important;
}

/* Desktop: reveal the wishlist button only when the product card is hovered. */
@media (min-width: 1025px) {
  li.entry.content-bg .stw-wishlist-button-container button.save-to-wishlist-button,
  li.entry.content-bg .stw-wishlist-button-container button.save-to-wishlist-cart-button {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: scale(0.88) !important;
    transition:
      opacity 0.2s ease,
      color 0.2s ease,
      box-shadow 0.2s ease,
      transform 0.2s ease !important;
  }

  li.entry.content-bg:hover .stw-wishlist-button-container button.save-to-wishlist-button,
  li.entry.content-bg:hover .stw-wishlist-button-container button.save-to-wishlist-cart-button,
  li.entry.content-bg:focus-within .stw-wishlist-button-container button.save-to-wishlist-button,
  li.entry.content-bg:focus-within .stw-wishlist-button-container button.save-to-wishlist-cart-button {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: scale(1) !important;
  }

  /* Keep saved products visible even when the card is not hovered. */
  li.entry.content-bg .stw-wishlist-button-container button.save-to-wishlist-button.stw-active,
  li.entry.content-bg .stw-wishlist-button-container button.save-to-wishlist-cart-button.stw-active {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: scale(1) !important;
  }

  /* Preserve the small button lift when the cursor is directly over the button. */
  li.entry.content-bg:hover .stw-wishlist-button-container button.save-to-wishlist-button:hover,
  li.entry.content-bg:hover .stw-wishlist-button-container button.save-to-wishlist-cart-button:hover {
    transform: scale(1.05) !important;
  }
}

button.save-to-wishlist-button:hover,
button.save-to-wishlist-cart-button:hover {
  background: #FFFFFF !important;
  color: #0064D2 !important;
  transform: scale(1.05) !important;
}

button.save-to-wishlist-button:active,
button.save-to-wishlist-cart-button:active {
  transform: none !important;
}

button.save-to-wishlist-button:focus-visible,
button.save-to-wishlist-cart-button:focus-visible {
  outline: 3px solid rgba(0, 100, 210, 0.35) !important;
  outline-offset: 3px !important;
}

button.save-to-wishlist-button.stw-adding,
button.save-to-wishlist-button.stw-removing,
button.save-to-wishlist-cart-button.stw-adding,
button.save-to-wishlist-cart-button.stw-removing {
  cursor: wait !important;
}

button.save-to-wishlist-button .stw-icon-wrapper,
button.save-to-wishlist-cart-button .stw-icon-wrapper {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 24px !important;
  height: 24px !important;
  margin: 0 !important;
}

/* Prevent a plugin-provided icon from stacking with the CSS icon layer. */
button.save-to-wishlist-button .stw-icon,
button.save-to-wishlist-cart-button .stw-icon,
button.save-to-wishlist-button .stw-icon-heart,
button.save-to-wishlist-cart-button .stw-icon-heart,
button.save-to-wishlist-button .stw-icon-solid,
button.save-to-wishlist-cart-button .stw-icon-solid,
button.save-to-wishlist-button .stw-icon-minimal,
button.save-to-wishlist-cart-button .stw-icon-minimal {
  display: none !important;
}

/* Draw the bookmark directly in CSS; no extra JavaScript is required. */
button.save-to-wishlist-button .stw-icon-wrapper::before,
button.save-to-wishlist-cart-button .stw-icon-wrapper::before {
  content: "" !important;
  display: block !important;
  flex: 0 0 24px !important;
  width: 24px !important;
  height: 24px !important;
  margin: 0 !important;
  background-color: currentColor !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M192%2C224l-64-40L64%2C224V48a8%2C8%2C0%2C0%2C1%2C8-8H184a8%2C8%2C0%2C0%2C1%2C8%2C8Z' fill='none' stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='12'/%3E%3C/svg%3E") center / contain no-repeat !important;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M192%2C224l-64-40L64%2C224V48a8%2C8%2C0%2C0%2C1%2C8-8H184a8%2C8%2C0%2C0%2C1%2C8%2C8Z' fill='none' stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='12'/%3E%3C/svg%3E") center / contain no-repeat !important;
  pointer-events: none !important;
  transition: transform 0.2s ease !important;
}

/* The text remains in the DOM for screen readers, but is not visually shown. */
button.save-to-wishlist-button .stw-text-label,
button.save-to-wishlist-cart-button .stw-text-label {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

button.save-to-wishlist-button.stw-active .stw-icon-wrapper::before,
button.save-to-wishlist-cart-button.stw-active .stw-icon-wrapper::before {
  transform: scale(1.04) !important;
}

/* While the plugin is adding the item, replace the bookmark with a spinner. */
button.save-to-wishlist-button.stw-adding .stw-icon-wrapper::before,
button.save-to-wishlist-cart-button.stw-adding .stw-icon-wrapper::before {
  flex: 0 0 17px !important;
  width: 17px !important;
  height: 17px !important;
  background: transparent !important;
  -webkit-mask: none !important;
  mask: none !important;
  border: 2px solid rgba(10, 25, 48, 0.18) !important;
  border-top-color: currentColor !important;
  border-radius: 50% !important;
  box-sizing: border-box !important;
  animation: allping-wishlist-spin 0.7s linear infinite !important;
  will-change: transform !important;
}

/* Saved state: keep the button circular and change only the bookmark to filled. */
button.save-to-wishlist-button.stw-active,
button.save-to-wishlist-cart-button.stw-active {
  width: 29px !important;
  min-width: 29px !important;
  padding: 0 !important;
  background: #FFFFFF !important;
  border: 0 !important;
  border-radius: 50% !important;
  color: #0064D2 !important;
}

button.save-to-wishlist-button.stw-active:hover,
button.save-to-wishlist-cart-button.stw-active:hover {
  background: #FFFFFF !important;
  border: 0 !important;
  color: #0064D2 !important;
}

button.save-to-wishlist-button.stw-active .stw-icon-wrapper,
button.save-to-wishlist-cart-button.stw-active .stw-icon-wrapper {
  width: auto !important;
  height: 24px !important;
  gap: 0 !important;
}

/* Filled bookmark for the saved state. */
button.save-to-wishlist-button.stw-active .stw-icon-wrapper::before,
button.save-to-wishlist-cart-button.stw-active .stw-icon-wrapper::before {
  flex: 0 0 24px !important;
  width: 24px !important;
  height: 24px !important;
  background-color: currentColor !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M192%2C224l-64-40L64%2C224V48a8%2C8%2C0%2C0%2C1%2C8-8H184a8%2C8%2C0%2C0%2C1%2C8%2C8Z' fill='white'/%3E%3C/svg%3E") center / contain no-repeat !important;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M192%2C224l-64-40L64%2C224V48a8%2C8%2C0%2C0%2C1%2C8-8H184a8%2C8%2C0%2C0%2C1%2C8%2C8Z' fill='white'/%3E%3C/svg%3E") center / contain no-repeat !important;
  border: 0 !important;
  border-radius: 0 !important;
  transform: none !important;
  animation: none !important;
}

/* The plugin creates this separate success notification after saving. */
span.stw-fade-notification:not(.stw-fade-notification-error) {
  background: #22C55E !important;
  color: #FFFFFF !important;
  border: 0 !important;
  border-radius: 8px !important;
  padding: 6px 10px !important;
  font-size: 0 !important;
  line-height: 14px !important;
  box-shadow: 0 3px 10px rgba(34, 197, 94, 0.24) !important;
}

span.stw-fade-notification:not(.stw-fade-notification-error) > svg {
  display: inline-block !important;
  width: 14px !important;
  height: 14px !important;
  margin: 0 6px 0 0 !important;
  vertical-align: middle !important;
  color: #FFFFFF !important;
  stroke: currentColor !important;
}

span.stw-fade-notification:not(.stw-fade-notification-error)::after {
  content: "Guardado" !important;
  display: inline-block !important;
  color: #FFFFFF !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 14px !important;
  vertical-align: middle !important;
}

/*
 * Archive stability: the plugin appends the temporary success notification
 * beside the bookmark anchor. Keep it out of normal flow so it cannot widen
 * the right-anchored wrapper and move the bookmark horizontally.
 */
body.woocommerce.archive ul.products li.product
.stw-wishlist-button-container.stw-wishlist-button-placement-top_left {
  box-sizing: border-box !important;
  display: block !important;
  width: 29px !important;
  min-width: 29px !important;
  height: 29px !important;
  min-height: 29px !important;
  overflow: visible !important;
}

body.woocommerce.archive ul.products li.product
.stw-wishlist-button-container.stw-wishlist-button-placement-top_left
> .stw-wishlist-button-anchor {
  box-sizing: border-box !important;
  display: block !important;
  position: relative !important;
  width: 29px !important;
  min-width: 29px !important;
  height: 29px !important;
  min-height: 29px !important;
  overflow: visible !important;
}

body.woocommerce.archive ul.products li.product
.stw-wishlist-button-container.stw-wishlist-button-placement-top_left
> .stw-wishlist-button-anchor
> button.save-to-wishlist-button,
body.woocommerce.archive ul.products li.product
.stw-wishlist-button-container.stw-wishlist-button-placement-top_left
> .stw-wishlist-button-anchor
> button.save-to-wishlist-cart-button {
  position: relative !important;
  z-index: 1 !important;
  flex: 0 0 29px !important;
}

/* Mobile: enlarge only the invisible tap area; the 29px visual button and
 * its fixed wrapper stay unchanged, so saved-state notifications cannot shift it. */
@media (max-width: 767px) {
  body.woocommerce.archive ul.products li.product
  .stw-wishlist-button-container.stw-wishlist-button-placement-top_left
  > .stw-wishlist-button-anchor
  > button.save-to-wishlist-button,
  body.woocommerce.archive ul.products li.product
  .stw-wishlist-button-container.stw-wishlist-button-placement-top_left
  > .stw-wishlist-button-anchor
  > button.save-to-wishlist-cart-button {
    overflow: visible !important;
    touch-action: manipulation;
  }

  body.woocommerce.archive ul.products li.product
  .stw-wishlist-button-container.stw-wishlist-button-placement-top_left
  > .stw-wishlist-button-anchor
  > button.save-to-wishlist-button::after,
  body.woocommerce.archive ul.products li.product
  .stw-wishlist-button-container.stw-wishlist-button-placement-top_left
  > .stw-wishlist-button-anchor
  > button.save-to-wishlist-cart-button::after {
    content: "";
    position: absolute;
    inset: -7.5px;
  }
}

/* The temporary success notification must not participate in wrapper sizing. */
body.woocommerce.archive ul.products li.product
.stw-wishlist-button-container.stw-wishlist-button-placement-top_left
> span.stw-fade-notification:not(.stw-fade-notification-error) {
  position: absolute !important;
  top: 35px !important;
  right: 0 !important;
  z-index: 2 !important;
  box-sizing: border-box !important;
  width: max-content !important;
  margin: 0 !important;
  pointer-events: none !important;
  transform: none !important;
}

button.save-to-wishlist-button.stw-removing .stw-icon-wrapper::before,
button.save-to-wishlist-cart-button.stw-removing .stw-icon-wrapper::before {
  animation: allping-wishlist-pulse 0.9s ease-in-out infinite !important;
}

@keyframes allping-wishlist-pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.58;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  button.save-to-wishlist-button,
  button.save-to-wishlist-cart-button {
    transition: none !important;
  }

  button.save-to-wishlist-button .stw-icon-wrapper::before,
  button.save-to-wishlist-cart-button .stw-icon-wrapper::before {
    transition: none !important;
    animation: none !important;
  }
}







