/* ==========================================================
   CART NOTIFICATION TOAST STYLES
   ========================================================== */

#clena-cart-notification-container {
    position: fixed;
    top: 105px;
    right: 24px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 360px;
    max-width: calc(100vw - 48px);
    pointer-events: none;
}

.cart-notification-toast {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(229, 231, 235, 0.8);
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 16px;
    position: relative;
    overflow: hidden;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-notification-toast.toast-show {
    transform: translateX(0);
    opacity: 1;
}

.cart-notification-toast.toast-hide {
    transform: translateX(120%);
    opacity: 0;
}

/* Toast Header */
.toast-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.toast-success-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #10b981;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

.toast-success-badge svg {
    flex-shrink: 0;
}

.toast-close-btn {
    border: none;
    background: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}

.toast-close-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #4b5563;
}

/* Toast Product Body */
.toast-body {
    display: flex;
    gap: 12px;
    align-items: center;
}

.toast-img-wrap {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(229, 231, 235, 0.6);
    background: #f9fafb;
}

.toast-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 2px;
    box-sizing: border-box;
}

.toast-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0; /* allows text truncation */
}

.toast-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toast-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

/* Toast Footer/Actions */
.toast-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 4px;
}

.toast-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    text-align: center;
}

.toast-btn-secondary {
    background: transparent;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

.toast-btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #1f2937;
}

.toast-btn-primary {
    background: var(--primary);
    color: #ffffff;
    border: 1px solid var(--primary);
}

.toast-btn-primary:hover {
    filter: brightness(1.08);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Dynamic Timer Progress Bar */
.toast-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
    transform-origin: left;
}

.toast-progress-bar.animate {
    animation: toast-timer-progress 4.5s linear forwards;
}

.cart-notification-toast:hover .toast-progress-bar {
    animation-play-state: paused;
}

@keyframes toast-timer-progress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}
