/* The native wishlist button stays in the product form when the color changes. */
@media (max-width: 767.98px) {
  body#product #main > .product-container.lpd-layout-v2:has(> .col-md-5 .product-cover) {
    position: relative;
  }

  body#product #main > .lpd-layout-v2:has(> .col-md-5 .product-cover) > .col-md-7 {
    position: static;
  }

  body#product #main > .lpd-layout-v2 > .col-md-5 .product-cover {
    anchor-name: --lpd-product-cover;
  }

  body#product #main > .lpd-layout-v2:has(> .col-md-5 .product-cover) .product-quantity .wishlist-button-product {
    position: absolute;
    /* The mobile product card has 17px padding around the gallery. */
    top: 27px;
    right: 27px;
    position-anchor: --lpd-product-cover;
    top: calc(anchor(top, 17px) + 10px);
    right: calc(anchor(right, 17px) + 10px);
    z-index: 6;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(39, 50, 57, .18);
  }

  body#product #main .product-quantity .wishlist-button-product:focus-visible {
    outline: 3px solid #587e27;
    outline-offset: 2px;
  }
}
