.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 99999999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.notification-overlay.show {
    opacity: 1;
    visibility: visible;
}

.cart-notification {
    position: fixed;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 16px 20px;
    max-width: 320px;
    transform: translateX(696px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 9999999999;
    border-right: 4px solid #4CAF50;
}

.cart-notification.show {
    transform: translateX(-696px);
}

.cart-notification.hide {
    transform: translateX(696px);
}

.cart-notification.center {
    width: 95%;
    max-width: 350px;
    top: 291px;
}

.cart-notification.center .notification-content {
    flex-direction: column;
    text-align: center;
    gap: 16px;
    padding: 10px;
}

.cart-notification.center .notification-icon {
    width: 60px;
    height: 60px;
    font-size: 28px;
    margin: 0 auto;
    animation: centerCheckmark 0.8s ease-in-out;
}

@keyframes centerCheckmark {
    0% {
        transform: scale(0) rotate(180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.3) rotate(360deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

.cart-notification.center .notification-text {
    text-align: center;
}

.cart-notification.center .notification-title {
    font-size: 18px;
    margin-bottom: 8px;
}

.cart-notification.center .notification-message {
    font-size: 15px;
    font-weight: 8000;
    margin-bottom: 16px;
}

.cart-notification.center .notification-actions {
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
}

.cart-notification.center .notification-btn {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 8px;
    font-weight: 600;
}

.cart-notification.center .close-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-notification.center .close-btn:hover {
    background: rgba(0, 0, 0, 0.2);
}

.cart-notification.center .notification-progress {
    bottom: 0;
    right: 0;
    left: 0;
    border-radius: 0 0 12px 12px;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-icon {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    animation: checkmark 0.6s ease-in-out;
    flex-shrink: 0;
}

@keyframes checkmark {
    0% {
        transform: scale(0) rotate(180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(360deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

.notification-text {
    flex: 1;
}

.notification-title {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
}

.notification-message {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.product-name {
    color: #4CAF50;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.close-btn:hover {
    background: #f5f5f5;
    color: #666;
}

/* Progress Bar */
.notification-progress {
    position: absolute;
    bottom: 0;
    right: 0;
    height: 2px;
    background: #4CAF50;
    border-radius: 0 0 12px 0;
    animation: progress 5s linear forwards;
}

@keyframes progress {
    0% { width: 100%; }
    100% { width: 0%; }
}

/* Success variants */
.cart-notification.variant-success {
    border-right-color: #4CAF50;
}

.cart-notification.variant-success .notification-icon {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

.cart-notification.variant-success .notification-progress {
    background: #4CAF50;
}

.cart-notification.variant-error {
    border-right-color: red;
}

.cart-notification.variant-error .notification-icon {
    background: linear-gradient(135deg, red, red);
}

.cart-notification.variant-error .notification-progress {
    background: red;
}

.cart-notification.variant-info {
    border-right-color: #2196F3;
}

.cart-notification.variant-info .notification-icon {
    background: linear-gradient(135deg, #2196F3, #1976D2);
}

.cart-notification.variant-info .notification-progress {
    background: #2196F3;
}

.cart-notification.variant-warning {
    border-right-color: #FF9800;
}

.cart-notification.variant-warning .notification-icon {
    background: linear-gradient(135deg, #FF9800, #F57C00);
}

.cart-notification.variant-warning .notification-progress {
    background: #FF9800;
}

/* Responsive for center notifications */
@media (max-width: 480px) {
    .cart-notification.center {
        width: 95%;
        max-width: 350px;
    }

    .cart-notification.show {
        transform: translateX(-7px);
    }

    .cart-notification.center .notification-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .cart-notification.center .notification-title {
        font-size: 16px;
    }

    .cart-notification.center .notification-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    /* Regular notifications (corner) */
    .cart-notification:not(.center) {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }

    .cart-notification:not(.center).show {
        transform: translateY(0);
    }

    .cart-notification:not(.center).hide {
        transform: translateY(-100px);
    }

    .notification-content {
        gap: 10px;
    }

    .notification-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

/* Multiple notifications stack */
.notification-stack {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (max-width: 480px) {
    .notification-stack {
        top: 10px;
        right: 10px;
        left: 10px;
    }
}

/* Action buttons in notification */
.notification-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.notification-btn {
    background: none;
    border: 1px solid #e0e0e0;
    color: #666;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notification-btn:hover {
    background: #f5f5f5;
}

.notification-btn.primary {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.notification-btn.primary:hover {
    background: #45a049;
}
