/* ASFA storefront toast — minimal, bottom-center stack */
.asfa-toast-stack {
    position: fixed;
    left: 50%;
    bottom: 5.5rem;
    z-index: 100;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 0.5rem;
    width: min(100vw - 2rem, 20rem);
    transform: translateX(-50%);
    pointer-events: none;
}

@media (min-width: 768px) {
    .asfa-toast-stack {
        bottom: 1.5rem;
        width: auto;
        max-width: min(100vw - 2rem, 36rem);
    }

    .asfa-toast {
        width: auto;
        max-width: min(100vw - 2rem, 36rem);
    }

    .asfa-toast__message {
        white-space: nowrap;
        word-break: normal;
    }
}

.asfa-toast {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.75rem 0.875rem;
    border-radius: 0.75rem;
    background: var(--color-primary);
    border: 0;
    font-family: var(--font-dm-sans, "Inter", sans-serif);
    pointer-events: auto;
    opacity: 0;
    transform: translateY(0.5rem);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.asfa-toast--visible {
    opacity: 1;
    transform: translateY(0);
}

.asfa-toast--leaving {
    opacity: 0;
    transform: translateY(0.5rem);
}


.asfa-toast__icon {
    flex-shrink: 0;
    font-size: 1.125rem;
    line-height: 1;
    color: #FFFFFF;
}

.asfa-toast--success .asfa-toast__icon {
    color: #FFFFFF;
}

.asfa-toast--error .asfa-toast__icon {
    color: #FFFFFF;
}

.asfa-toast__message {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.25rem;
    color: #FFFFFF;
    white-space: normal;
    word-break: break-word;
}

.asfa-toast__message a,
.asfa-toast__link {
    color: #FFFFFF;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.asfa-toast__message a:hover,
.asfa-toast__link:hover {
    opacity: 0.9;
}

.asfa-toast__close {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    padding: 0;
    margin-left: 0.125rem;
    border: 0;
    border-radius: 0.25rem;
    background: transparent;
    color: #FFFFFF;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s ease, color 0.15s ease;
}

.asfa-toast:hover .asfa-toast__close,
.asfa-toast:focus-within .asfa-toast__close {
    opacity: 1;
}

.asfa-toast__close:hover {
    color: #FFFFFF;
}

.asfa-toast__close i {
    font-size: 0.875rem;
    line-height: 1;
}

.asfa-toast--cart-preview {
    align-items: flex-start;
    width: 100%;
    max-width: min(100vw - 2rem, 22rem);
    padding: 0.625rem 0.75rem;
}

.asfa-toast__thumb {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.asfa-toast__thumb--placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.125rem;
}

.asfa-toast__cart-body {
    flex: 1;
    min-width: 0;
}

.asfa-toast__cart-name {
    margin: 0 0 0.125rem;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.25rem;
    color: #ffffff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asfa-toast__qty {
    font-weight: 500;
    opacity: 0.9;
}

.asfa-toast__cart-meta {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.125rem;
    color: rgba(255, 255, 255, 0.92);
}

@media (min-width: 768px) {
    .asfa-toast--cart-preview {
        max-width: 22rem;
    }

    .asfa-toast--cart-preview .asfa-toast__cart-name {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
}

@media (prefers-reduced-motion: reduce) {
    .asfa-toast,
    .asfa-toast--visible,
    .asfa-toast--leaving {
        transition: opacity 0.15s ease;
        transform: none;
    }
}
