/**
 * Global toast notification stack — top-right, brand-aligned, mobile-friendly.
 */
#global-toast-stack {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10050;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    pointer-events: none;
    max-width: min(420px, calc(100vw - 32px));
}

.global-toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 280px;
    max-width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    color: #fff;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.45;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.14);
    transform: translateX(110%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}

.global-toast.is-visible {
    transform: translateX(0);
    opacity: 1;
}

.global-toast.is-leaving {
    transform: translateX(110%);
    opacity: 0;
}

.global-toast__icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-top: 1px;
}

.global-toast__message {
    flex: 1;
    padding-right: 4px;
}

.global-toast__close {
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: inherit;
    opacity: 0.75;
    cursor: pointer;
    font-size: 1.15rem;
    line-height: 1;
    padding: 0;
    margin-top: 1px;
}

.global-toast__close:hover {
    opacity: 1;
}

.global-toast--success {
    background: linear-gradient(135deg, #15803d 0%, #22c55e 100%);
}

.global-toast--error,
.global-toast--danger {
    background: linear-gradient(135deg, #b91c1c 0%, #ef4444 100%);
}

.global-toast--warning {
    background: linear-gradient(135deg, #c2410c 0%, #f97316 100%);
}

.global-toast--info {
    background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
}

.global-toast--wishlist {
    background: linear-gradient(135deg, #db2777 0%, #f472b6 100%);
}

@media (max-width: 640px) {
    #global-toast-stack {
        top: 14px;
        right: 14px;
        left: 14px;
        align-items: stretch;
    }

    .global-toast {
        min-width: 0;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .global-toast {
        transition: opacity 0.2s ease;
        transform: none;
    }

    .global-toast.is-visible,
    .global-toast.is-leaving {
        transform: none;
    }
}
