/* Products wrapper for context */
.products-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Overlay container styles */
.overlay-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
}

.products-wrapper:hover .overlay-container {
    opacity: 1;
    visibility: visible;
}

.thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.5) 100%);
    z-index: 1;
}

.overlay-components {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    z-index: 2;
    padding: 15px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(20px);
    transition: transform 0.3s ease-in-out;
}

.products-wrapper:hover .overlay-components {
    transform: translateY(0);
}

/* Unified component styles */
.overlay-component {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease-in-out;
    cursor: pointer;
}

.overlay-component:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

/* Add to Cart Component */
.add-to-cart-container {
    background: #4CAF50; /* Green background */
}

.add-to-cart-container .button {
    background: none;
    border: none;
    padding: 0;
    font-size: 0;
    color: #ffffff;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    transition: all 0.3s ease-in-out;
    box-sizing: border-box;
}

.add-to-cart-container:hover {
    background: #388E3C;
}

.add-to-cart-container .button .fa-shopping-basket {
    font-size: 18px;
}

/* Wishlist Component */
.wishlist-container {
    background: #F44336; /* Red background */
}

.wishlist-container .yith-wcwl-add-to-wishlist {
    margin: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wishlist-container .yith-wcwl-add-to-wishlist a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    background: none;
    font-size: 0;
    box-sizing: border-box;
}

.wishlist-container:hover {
    background: #D32F2F;
}

.wishlist-container .yith-wcwl-add-to-wishlist .yith-wcwl-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wishlist-container .yith-wcwl-add-to-wishlist .yith-wcwl-icon-svg,
.wishlist-container .yith-wcwl-wishlistaddedbrowse .yith-wcwl-icon-svg,
.wishlist-container .yith-wcwl-wishlistexistsbrowse .yith-wcwl-icon-svg {
    width: 20px;
    height: 20px;
    fill: #ffffff;
    transition: fill 0.3s ease-in-out;
}

/* Quick View Component */
.quick-view-container {
    background: #2196F3; /* Blue background */
}

.quick-view-container .yith-wcqv-button {
    font-size: 0;
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    background: none;
    transition: all 0.3s ease-in-out;
    box-sizing: border-box;
}

.quick-view-container:hover {
    background: #1976D2;
}

.quick-view-container .yith-wcqv-button .fas {
    font-size: 18px;
}

/* Tooltip styles */
.overlay-component::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease-in-out;
    z-index: 10;
}

.overlay-component:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: -30px;
}

/* Auction badge compatibility */
.yith-wcact-aution-badge {
    z-index: 22220;
    position: absolute;
    right: 15px;
    max-width: 40px;
}

/* Secondary image compatibility */
.woo_secondary_media_image {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.3s ease-in-out;
    z-index: 222;
}

.products-wrapper:hover .woo_secondary_media_image {
    opacity: 1;
    visibility: visible;
}

/* Responsive design */
@media (max-width: 767px) {
    .hide-on-mobile {
        display: none;
    }

    .overlay-components {
        gap: 10px;
        padding: 12px;
        border-radius: 10px;
    }

    .overlay-component {
        width: 42px;
        height: 42px;
    }

    .add-to-cart-container .button .fa-shopping-basket,
    .quick-view-container .yith-wcqv-button .fas {
        font-size: 16px;
    }

    .wishlist-container .yith-wcwl-add-to-wishlist .yith-wcwl-icon-svg,
    .wishlist-container .yith-wcwl-wishlistaddedbrowse .yith-wcwl-icon-svg,
    .wishlist-container .yith-wcwl-wishlistexistsbrowse .yith-wcwl-icon-svg {
        width: 18px;
        height: 18px;
    }

    .overlay-component::after {
        font-size: 11px;
        padding: 4px 8px;
        bottom: -32px;
    }

    .overlay-component:hover::after {
        bottom: -28px;
    }

    .yith-wcact-aution-badge {
        display: none;
    }
}

/* Grid compatibility */
.products.columns-3 .products-wrapper {
    margin-bottom: 25px;
}