.action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0.8rem 2rem;
    border: 1px solid transparent;
    border-radius: 1.2rem;
    font: inherit;
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.3s, color 0.3s, border-color 0.3s;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(2px);
}

.action-button::before {
    content: "";
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    filter: blur(2px);
}

.action-button:hover::before {
    opacity: 1;
}

.action-button__label {
    position: relative;
    z-index: 1;
}

.action-button__icon {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    display: flex;
}

.action-button--icon-left {
    flex-direction: row-reverse;
}

/* —— Loading: spinner replaces the label (same look as product-action__spinner) —— */

.action-button__spinner {
    display: none;
    position: absolute;
    inset: 50% auto auto 50%;
    width: 1.1rem;
    height: 1.1rem;
    margin: -0.55rem 0 0 -0.55rem;
    z-index: 2;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: action-button-spin 0.6s linear infinite;
}

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

.action-button.is-loading .action-button__label,
.action-button.is-loading .action-button__icon {
    /* visibility: hidden;
    opacity: 0; */
}

.action-button.is-loading .action-button__spinner {
    display: block;
}

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

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

/* —— Standard —— */

.action-button--primary {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--bg-white);
}

.action-button--primary::before {
    background-image: url("../../../assets/images/button-dark-hover.png");
}

.action-button--primary:hover {
    color: var(--bg-white);
}

.action-button--secondary {
    background: var(--bg-white-muted);
    border-color: transparent;
    color: var(--text);
}

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

.action-button--secondary:hover {
    color: var(--text);
}

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

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

.action-button--white:hover {
    color: var(--text);
}

.action-button--ghost {
    gap: 0.4rem;
    background: transparent;
    border-color: transparent;
    color: var(--brand);
    font-weight: 400;
    padding: 0;
    border-radius: 0;
    transition: all 0.3s ease;
}

.action-button--ghost::before {
    content: none;
}

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

.action-button--ghost:hover {
    color: var(--text);
}

.action-button--ghost:hover svg path {
    fill: var(--brand);
    transition:  all 0.3s ease;
}

/* —— Rounded (compact) —— */

.action-button--rounded {
    padding: 0.5rem 2rem;
    font-weight: 400;
}

.action-button--rounded:not(.action-button--rounded-primary) {
    border-color: rgba(0, 0, 0, 0.2);
}

.action-button--rounded-primary {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--bg-white);
}

.action-button--rounded-primary::before {
    background-image: url("../../../assets/images/button-dark-hover.png");
}

.action-button--rounded-primary:hover {
    color: var(--bg-white);
}

.action-button--rounded-secondary {
    background: var(--bg-white-muted);
    color: var(--text);
}

.action-button--rounded-secondary::before {
    background-image: url("../../../assets/images/button-light-hover.png");
    background-size: contain;
}

.action-button--rounded-secondary:hover {
    color: var(--text);
}

.action-button--rounded-white {
    background: var(--bg-white);
    color: var(--text);
}

.action-button--rounded-white::before {
    background-image: url("../../../assets/images/button-light-hover.png");
    background-size: contain;
}

.action-button--rounded-white:hover {
    color: var(--text);
}

.action-button--rounded-cart {
    gap: 0.4rem;
    background: var(--bg-white);
    color: var(--text);
}

.action-button--rounded-cart::before {
    background-image: url("../../../assets/images/button-light-hover.png");
    background-size: contain;
}

.action-button--rounded-cart:hover {
    color: var(--text);
}
