/**
 * AJAX Add to Cart notification styles
 */


.cart-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 360px;
    max-width: 90vw;
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(192, 108, 132, 0.1);
    z-index: 9999;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    overflow: hidden;
    visibility: hidden;
}


.cart-notification.active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    animation: cart-notification-appear 0.3s ease;
}

@keyframes cart-notification-appear {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}


.cart-notification.success {
    border-top: 4px solid var(--primary-background);
    border-image-slice: 1;
}


.cart-notification.error {
    border-top: 4px solid #FF6B6B;
}


.notification-content {
    display: flex;
    padding: 20px;
    position: relative;
}


.notification-content::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -10px;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(246, 114, 128, 0.05) 0%, rgba(192, 108, 132, 0.05) 100%);
    border-radius: 50%;
    z-index: -1;
}

.notification-content::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -10px;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(246, 114, 128, 0.03) 0%, rgba(192, 108, 132, 0.03) 100%);
    z-index: -1;
}


.notification-image {
    flex: 0 0 80px;
    margin-right: 18px;
}

.notification-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.notification-image img:hover {
    transform: scale(1.03);
}


.notification-message {
    flex: 1;
}

.notification-message h4 {
    margin: 0 0 8px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--green-text);
    display: flex;
    align-items: center;
}

.notification-message h4::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F67280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'%3E%3C/path%3E%3Cpolyline points='22 4 12 14.01 9 11.01'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    margin-right: 8px;
}

.notification-message p {
    margin: 0 0 12px;
    font-size: 0.95rem;
    color: var(--black-text);
    font-weight: 500;
}


.cart-notification:not(.success):not(.error) .notification-message {
    padding: 15px;
}


.notification-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.notification-buttons a,
.notification-buttons button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-cart-btn {
    background: var(--secondary-background);
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(192, 108, 132, 0.2);
}

.view-cart-btn:hover {
    box-shadow: 0 6px 12px rgba(192, 108, 132, 0.3);
    transform: translateY(-2px);
}

.continue-shopping-btn {
    background: transparent;
    color: var(--black-text);
    border: none;
    text-decoration: none;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.continue-shopping-btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: 0;
    left: 0;
    background: var(--primary-background);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
}


.continue-shopping-btn:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}


.notification-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.05);
    color: #888;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

.notification-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #555;
}

.notification-close svg {
    width: 14px;
    height: 14px;
}


.ajax_add_to_cart.loading,
.single_add_to_cart_button.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.ajax_add_to_cart.loading:after,
.single_add_to_cart_button.loading:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border-radius: 50%;
    border: 2px solid #7d1d60;
    border-top-color: white;
    animation: spin 0.8s infinite linear;
}

@keyframes spin {
    to {
        rotate: 360deg;
    }
}


@keyframes cart-shake {

    0%,
    100% {
        transform: translateX(0) rotate(0deg) scale(1);
    }

    10% {
        transform: translateX(-2px) rotate(-1deg) scale(1.02);
    }

    20% {
        transform: translateX(2px) rotate(1deg) scale(1.05);
    }

    30% {
        transform: translateX(-1px) rotate(0deg) scale(1.02);
    }

    40% {
        transform: translateX(1px) rotate(1deg) scale(1.05);
    }

    50% {
        transform: translateX(0) rotate(0deg) scale(1.08);
    }

    60% {
        transform: translateX(1px) rotate(-1deg) scale(1.05);
    }

    70% {
        transform: translateX(-1px) rotate(1deg) scale(1.02);
    }

    80% {
        transform: translateX(0) rotate(0deg) scale(1.01);
    }

    90% {
        transform: translateX(0) rotate(0deg) scale(1);
    }
}

.cart-shake {
    animation: cart-shake 0.8s ease-in-out;
}


.cart-icon-container {
    transition: transform 0.2s ease;
}

.cart-icon-container:hover {
    transform: scale(1.05);
}


@media (max-width: 767px) {
    .cart-notification {
        width: 320px;
        max-width: calc(100vw - 20px);
        bottom: 20px;
        right: 10px;
        left: auto;
        top: auto;
    }

    .notification-content {
        padding: 15px;
    }

    .notification-image {
        flex: 0 0 60px;
        margin-right: 12px;
    }

    .notification-image img {
        width: 60px;
        height: 60px;
    }

    .notification-message h4 {
        font-size: 0.9rem;
        margin-bottom: 5px;
    }

    .notification-message p {
        font-size: 0.85rem;
        margin-bottom: 10px;
    }

    .notification-buttons {
        gap: 8px;
    }

    .notification-buttons a,
    .notification-buttons button {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    .notification-close {
        top: 8px;
        right: 8px;
        width: 20px;
        height: 20px;
    }

    .notification-close svg {
        width: 12px;
        height: 12px;
    }
}



.fly-to-cart-clone {
    position: fixed;
    z-index: 99999;
    pointer-events: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(192, 108, 132, 0.15);
    will-change: transform, left, top, width, height, opacity;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.fly-to-cart-clone img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fly-to-cart-clone::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(246, 114, 128, 0.1) 0%, rgba(192, 108, 132, 0.2) 100%);
    pointer-events: none;
}


@keyframes cartPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.cart-pulse {
    animation: cartPulse 0.3s ease-out;
}


@media (max-width: 480px) {
    .cart-notification {
        width: 280px;
        max-width: calc(100vw - 15px);
        bottom: 15px;
        right: 7px;
    }

    .notification-content {
        padding: 12px;
    }

    .notification-image {
        flex: 0 0 50px;
        margin-right: 10px;
    }

    .notification-image img {
        width: 50px;
        height: 50px;
    }

    .notification-message h4 {
        font-size: 0.85rem;
    }

    .notification-message p {
        font-size: 0.8rem;
    }

    .notification-buttons {
        flex-direction: column;
        gap: 6px;
    }

    .notification-buttons a,
    .notification-buttons button {
        width: 100%;
        font-size: 0.75rem;
        padding: 8px 12px;
    }
}