ul.products li.product.dollab-card-has-us-stock {
  position: relative;
}

.dollab-card-us-flag {
  position: absolute;
  z-index: 3;
  inset: 8px auto auto 8px;
  inline-size: 42px;
  block-size: 42px;
  box-sizing: border-box;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px #0005;
  pointer-events: none;
}

.dollab-card-us-flag::before {
  content: '';
  position: absolute;
  inset: 50% auto auto 50%;
  inline-size: 60px;
  block-size: 40px;
  transform: translate(-50%, -50%);
  background: url('reference/mobile-flags.png') -448px -896px no-repeat;
}

ul.products li.product.dollab-card-has-us-stock .dollab-brand-card-badge {
  right: 10px;
  left: auto;
}

ul.products li.product.dollab-card-has-us-stock .dollab-brand-stock-caption { display: none; }

ul.products li.product .dollab-card-stock {
  margin-block: 3px 7px;
  color: #646464;
  font-size: 13px;
  line-height: 1.4;
}

.dollab-card-stock strong { color: #282828; }

.dollab-card-stock-bar {
  display: block;
  height: 5px;
  margin-top: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: #f4e3e9;
}

.dollab-card-stock-bar > span {
  display: block;
  height: 100%;
  background: var(--primary, #d93664);
}

@media (max-width: 600px) {
  .dollab-card-us-flag {
    inset: 6px auto auto 6px;
    inline-size: 34px;
    block-size: 34px;
  }
  .dollab-card-us-flag::before { transform: translate(-50%, -50%) scale(.8); }
}

/* The zoom stays inside the photo, and the form stays outside its product link. */
ul.products li.product > a > .dollab-card-image-window {
  display: block;
  position: relative;
  overflow: hidden;
}

ul.products li.product .dollab-card-image-window .dollab-shop-card-media {
  display: block;
  position: relative;
}

ul.products li.product .dollab-card-image-window img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  margin: 0;
  object-fit: cover;
  transition: scale 360ms ease-out;
}

ul.products li.product .dollab-card-image-window .dollab-shop-card-preview {
  position: absolute;
  inset: 0;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}

/* Shop and In Stock share a button inside the card overlay. */
:is(.dollab-shop-results, .dollab-in-stock-group) ul.products li.product:has(> a.woocommerce-loop-product__link > .dollab-card-image-window) > .dollab-wishlist-button {
  position: absolute;
  z-index: 2;
  inset: 8px 8px auto auto;
  width: auto;
  margin: 0;
}

:is(.dollab-shop-results, .dollab-in-stock-group) ul.products li.product:has(> a.woocommerce-loop-product__link > .dollab-card-image-window :is(.onsale, .dollab-brand-card-badge)) > .dollab-wishlist-button {
  top: 48px;
}

:is(.dollab-shop-results, .dollab-in-stock-group) ul.products li.product:has(> a.woocommerce-loop-product__link > .dollab-card-image-window) > .dollab-wishlist-button .button {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-height: 0;
  margin: 0;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50%;
  background: #fff !important;
  color: #333 !important;
  font-size: 0 !important;
}

:is(.dollab-shop-results, .dollab-in-stock-group) ul.products li.product:has(> a.woocommerce-loop-product__link > .dollab-card-image-window) > .dollab-wishlist-button .button svg {
  width: 18px;
  height: 18px;
  flex: none;
}

:is(.dollab-shop-results, .dollab-in-stock-group) ul.products li.product:has(> a.woocommerce-loop-product__link > .dollab-card-image-window) > .dollab-wishlist-button .button:not(:has(svg))::before {
  content: '\2661';
  font: 24px/1 Arial, sans-serif;
}

:is(.dollab-shop-results, .dollab-in-stock-group) ul.products li.product:has(> a.woocommerce-loop-product__link > .dollab-card-image-window) > .dollab-wishlist-button .button.dollab-wishlist-saved:not(:has(svg))::before {
  content: '\2665';
  color: #d51f44;
}

:is(.dollab-shop-results, .dollab-in-stock-group) ul.products li.product:has(> a.woocommerce-loop-product__link > .dollab-card-image-window) > .dollab-wishlist-button .button:focus-visible {
  outline: 2px solid #252525;
  outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  :is(.dollab-shop-results, .dollab-in-stock-group) ul.products li.product:has(> a > .dollab-card-image-window) {
    overflow: clip;
  }

  :is(.dollab-shop-results, .dollab-in-stock-group) ul.products li.product:has(> a.woocommerce-loop-product__link > .dollab-card-image-window) > .dollab-wishlist-button {
    opacity: 0;
    translate: 100% 0;
    pointer-events: none;
    transition: opacity 220ms ease-out, translate 220ms ease-out;
  }

  :is(.dollab-shop-results, .dollab-in-stock-group) ul.products li.product:has(> a.woocommerce-loop-product__link > .dollab-card-image-window):has(> a > .dollab-card-image-window:hover, > a:focus-visible > .dollab-card-image-window, > .dollab-wishlist-button:is(:hover, :focus-within)) > .dollab-wishlist-button {
    opacity: 1;
    translate: 0 0;
    pointer-events: auto;
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  ul.products li.product:has(> a > .dollab-card-image-window:hover, > .dollab-wishlist-button:hover) .dollab-card-image-window img {
    scale: 1.08;
    animation: none;
  }
}

ul.products li.product:has(> a > .dollab-card-image-window:hover, > a:focus-visible > .dollab-card-image-window, > .dollab-wishlist-button:is(:hover, :focus-within)) .dollab-card-image-window .dollab-shop-card-media[data-preview-ready] > .dollab-shop-card-preview {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  ul.products li.product .dollab-card-image-window img {
    scale: 1;
    transition: none;
  }

  :is(.dollab-shop-results, .dollab-in-stock-group) ul.products li.product:has(> a.woocommerce-loop-product__link > .dollab-card-image-window) > .dollab-wishlist-button {
    translate: none;
    transition: none;
  }
}
