/* Paylaşılan UI: toast, sayfa geçişi, yükleme */

@keyframes pageFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-enter {
    animation: pageFadeIn 0.35s ease-out both;
}

.toast-container-ui {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1090;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-width: min(360px, calc(100vw - 2rem));
    pointer-events: none;
}

.toast-ui {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    font-size: 0.9rem;
    font-weight: 500;
    color: #0f172a;
    pointer-events: auto;
    animation: toastSlideIn 0.3s ease-out both;
}

.toast-ui.toast-exit {
    animation: toastSlideOut 0.25s ease-in both;
}

.toast-ui i {
    font-size: 1.15rem;
    flex-shrink: 0;
    margin-top: 0.05rem;
}

.toast-ui-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.toast-ui-success i {
    color: #16a34a;
}

.toast-ui-error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.toast-ui-error i {
    color: #dc2626;
}

.toast-ui-info {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1e40af;
}

.toast-ui-info i {
    color: #2563eb;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(24px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(24px);
    }
}

.btn.is-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.85;
}

.btn.is-loading .btn-label {
    visibility: hidden;
}

.btn.is-loading::after {
    content: '';
    position: absolute;
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes cartBounce {
    0%, 100% {
        transform: scale(1);
    }
    40% {
        transform: scale(1.25);
    }
}

.cart-badge-pulse {
    animation: cartBounce 0.5s ease-out;
}

.product-detail-btn.added {
    background: #16a34a !important;
    border-color: #16a34a !important;
}

.empty-state {
    padding: 3rem 1.5rem;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.25rem;
    border-radius: 20px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    color: #94a3b8;
}

.empty-state-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.5rem;
}

@media (max-width: 575.98px) {
    .toast-container-ui {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }
}
