.product-likes-container {
    display: inline-block;
    margin: 10px 0;
}

.product-like-button {
    background: #f8f8f8;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    padding: 8px 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #333;
    font-family: inherit;
    line-height: 1;
    border-style: solid;
    position: relative;
    overflow: hidden;
}

.product-like-button:hover:not(.loading) {
    background: #fff5f5;
    transform: translateY(-1px);
}

.product-like-button.liked {
    background: #fff5f5;
}

/* Loading state - shown DURING the AJAX delay */
.product-like-button.loading {
    cursor: not-allowed;
    padding-right: 35px; /* Make space for loader */
}

.product-like-button.loading .product-likes-loader {
    display: block;
}

/* Your specific loader */
.product-likes-loader {
    --loading-color: #ff4757;
    width: 20px;
    aspect-ratio: .75;
    background: 
        no-repeat linear-gradient(var(--loading-color) 0 0),
        no-repeat linear-gradient(var(--loading-color) 0 0),
        no-repeat linear-gradient(var(--loading-color) 0 0);
    background-size: 20% 65%;
    animation: l5 1s infinite linear;
    display: none;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes l5 {
    20% {background-position: 0% 50% ,50% 100%,100% 100%}
    40% {background-position: 0% 0%  ,50% 50% ,100% 100%}
    60% {background-position: 0% 100%,50% 0%  ,100% 50% }
    80% {background-position: 0% 100%,50% 100%,100% 0%  }
}

/* Error state */
.product-like-button.error {
    background: #ffe6e6;
    border-color: #ff4757;
    animation: errorShake 0.5s ease-in-out;
}

@keyframes errorShake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

.heart-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.heart-icon svg {
    transition: all 0.3s ease;
    fill: transparent;
    stroke: currentColor;
}

.product-like-button.liked .heart-icon svg {
    fill: currentColor;
    animation: heartFill 0.6s ease;
}

.product-like-button.animate .heart-icon {
    animation: heartBeat 0.6s ease;
}

@keyframes heartBeat {
    0% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.3);
    }
    50% {
        transform: scale(1);
    }
    75% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes heartFill {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.likes-count {
    font-weight: bold;
    min-width: 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

/* For WooCommerce integration */
.woocommerce-loop-product__title + .product-likes-container {
    display: block;
    margin-top: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .product-like-button {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .product-like-button.loading {
        padding-right: 30px;
    }
    
    .heart-icon svg {
        width: 14px;
        height: 14px;
    }
    
    .product-likes-loader {
        width: 18px;
        right: 10px;
    }
}

/* Elementor specific styles */
.elementor-widget-product_likes {
    display: inline-block;
}

/* Border none style */
.product-like-button[style*="border-style: none"] {
    border: none !important;
}