/*
Theme Name: Flatsome Child
Description: This is a child theme for Flatsome Theme
Author: UX Themes
Template: flatsome
Version: 3.1.5
*/

/*************** ADD CUSTOM CSS HERE.   ***************/


@media only screen and (max-width: 48em) {
    /*************** ADD MOBILE ONLY CSS HERE  ***************/


}

/* Custom Compare Button in Image Overlay */
/* Custom Compare Button in Image Overlay - High Specificity */
/* Custom Compare Button in Image Overlay - Consolidated from functions.php */
/* Custom Compare Button in Image Overlay - Final (Top Position) */
html body .product-small .box-image .compare.button,
html body .product-small .box-image a.compare {
    display: inline-block !important;
    width: 35px !important;
    height: 35px !important;
    line-height: 35px !important;
    padding: 0 !important;
    margin: 0 !important;
    margin-top: 5px !important;
    /* Spacing */
    margin-bottom: 0px !important;
    text-align: center !important;

    background-color: #fff !important;
    color: #333 !important;
    border: 2px solid #ddd !important;
    border-radius: 50% !important;
    box-shadow: 0 1px 3px -1px rgba(0, 0, 0, 0.2) !important;
    font-size: 0 !important;
    min-width: 0 !important;
    opacity: 1 !important;
    position: relative !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    text-indent: -9999px !important;
    overflow: visible !important;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23333333" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 3L21 7L17 11"/><path d="M3 7H20"/><path d="M8 21L4 17L8 13"/><path d="M20 17H5"/></svg>') !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 20px !important;
    z-index: 15 !important;
}

/* Tooltip Style (::after) */
html body .product-small .box-image .compare.button::after,
html body .product-small .box-image a.compare::after {
    content: "Compare";
    display: block !important;
    position: absolute !important;
    top: auto !important;
    bottom: 115% !important;
    /* Above the button */
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    background-color: #333 !important;
    color: #fff !important;
    font-size: 12px !important;
    padding: 6px 12px !important;
    border-radius: 3px !important;
    white-space: nowrap !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none !important;
    text-indent: 0 !important;
    /* Reset text-indent for tooltip */
    line-height: normal !important;
    z-index: 999 !important;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2) !important;
}

/* Tooltip Hide/Show Logic */
html body .product-small .box-image .compare.button:hover::after,
html body .product-small .box-image a.compare:hover::after {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Allow Tooltip to overflow box-image (User Request) */
html body .product-small .box-image {
    overflow: visible !important;
    z-index: 20 !important;
}

/* Active State (Added to Compare) */
html body .product-small .box-image .compare.added,
html body .product-small .box-image a.compare.added {
    background-color: #79a206 !important;
    /* Green background */
    border-color: #79a206 !important;
    color: #fff !important;
    opacity: 1 !important;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>') !important;
}

html body .product-small .box-image .compare.button:hover,
html body .product-small .box-image a.compare:hover {

    background-color: #333 !important;
    color: #fff !important;
    border-color: #333 !important;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 3L21 7L17 11"/><path d="M3 7H20"/><path d="M8 21L4 17L8 13"/><path d="M20 17H5"/></svg>') !important;
    opacity: 1 !important;
}

/* Remove ::before only (keep ::after for tooltip) */
html body .product-small .box-image .compare.button::before,
html body .product-small .box-image a.compare::before {
    display: none !important;
    content: "" !important;
}

/* Hide Account Dropdown (Popup) - Specific fix */
.header .account-item .nav-dropdown,
.header-nav .account-item .nav-dropdown {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Fix Wishlist Tooltip Z-Index overlap with Compare button */
.product-small .box-image .image-tools .wishlist-icon,
.product-small .box-image .image-tools .wishlist-button {
    position: relative;
    z-index: 20 !important;
}

/* Mobile specific fixes */
@media (max-width: 849px) {

    html body .product-small .box-image .compare.button,
    html body .product-small .box-image a.compare {
        width: 30px !important;
        height: 30px !important;
        line-height: 30px !important;
        background-size: 16px !important;
    }
}

/* Fix Alignment for PC: Move compare button next to wishlist heart */
@media (min-width: 850px) {

    html body .product-small .box-image .compare.button,
    html body .product-small .box-image a.compare {
        position: absolute !important;
        top: 55 !important;
        right: 12px !important;
        margin-top: 0 !important;
        margin-right: 0px !important;
    }
}

/* Custom Out of Stock Label (Remove Background) */
.product-small .out-of-stock-label {
    background: transparent !important;
    color: #9e9e9e !important;
    text-shadow: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    /* Adjust position if needed since background is gone */
    top: 50% !important;
}