.product-action {
  position: relative;
  cursor: pointer;
}

.product-action.is-loading {
  cursor: wait;
  pointer-events: none;
}

.product-action__icon {
  position: relative;
  z-index: 1;
  display: block;
  flex: 0 0 1rem;
  width: 1rem;
  height: 1rem;
  line-height: 0;
}

.product-action__glyph {
  position: absolute;
  inset: 0;
  display: block;
  width: 1rem;
  height: 1rem;
}

.product-action__glyph svg {
  display: block;
  width: 1rem;
  height: 1rem;
}

.product-action__icon > .product-action__glyph--active,
.product-action.is-active .product-action__icon > .product-action__glyph--idle {
  display: none;
}

.product-action.is-active .product-action__icon > .product-action__glyph--active {
  display: block;
}

.product-action.is-loading .product-action__glyph {
  visibility: hidden;
  opacity: 0;
  transition: none;
}

.product-action__spinner {
  display: none;
  position: absolute;
  inset: 1px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: product-action-spin 0.6s linear infinite;
}

.product-action.is-loading .product-action__spinner {
  display: block;
}

@keyframes product-action-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-action__spinner {
    animation: none;
    border-right-color: currentColor;
    opacity: 0.45;
  }
}

/* Icon sits to the right of the label. Chrome comes from action-button. */

.product-action.action-button {
  gap: 0.4rem;
}

.product-action.action-button--primary.is-active {
  background: var(--bg-white);
  border: 1px solid var(--list-item-marker);
  color: var(--text);
}

.product-action.action-button--primary.is-active::before {
  background-image: url("../../../assets/images/button-light-hover.png");
  background-size: contain;
}

.product-action.action-button--primary.is-active:hover {
  color: var(--text);
}

.product-action.action-button--white.is-active,
.product-action.action-button--rounded-white.is-active {
  border-color: var(--brand);
}

.product-action.action-button--ghost svg path {
  transition: fill 0.3s ease;
}

.product-action.action-button--ghost:hover svg path {
  fill: currentColor;
}

.product-action.action-button--ghost.is-active {
  color: var(--text);
}

/* —— Compact: the only product-action skin (product card) —— */

.product-action--compact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 50%;
  background: var(--bg-white);
  color: var(--text);
  font: inherit;
  box-shadow: 0 20px 40px -15px rgba(10, 61, 36, 0.05);
  transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.3s;
  margin-left: auto;
}

.product-action--compact:hover,
.product-action--compact.is-active {
  background: var(--bg-white);
  border-color: var(--brand);
  color: var(--text);
}

.product-action--compact.product-action--compare:hover,
.product-action--compact.product-action--compare.is-active {
  transform: rotate(10deg);
}

.product-action--compact.product-action--cart:hover,
.product-action--compact.product-action--cart.is-active {
  transform: rotate(-10deg);
}

.product-action--compact.is-loading,
.product-action--compact.is-loading:hover {
  transform: none;
}
