/* Fix for favorites count visibility - especially on product pages */

/* Default state - hidden, never show 0 */
.favorites-count {
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    top: -8px !important;
    right: -8px !important;
    background: #e74c3c !important;
    color: white !important;
    border-radius: 50% !important;
    width: 16px !important;
    height: 16px !important;
    font-size: 10px !important;
    font-weight: bold !important;
    transition: opacity 0.2s ease !important;
    z-index: 999 !important;
}

/* Show ONLY when has-items class is added by JavaScript */
.favorites-count.has-items {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Mobile version */
.mobile-favorites-link .favorites-count {
    width: 14px !important;
    height: 14px !important;
    font-size: 9px !important;
    top: -6px !important;
    right: -6px !important;
}

/* Hide when zero or empty */
.favorites-count:empty {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Also hide when content is "0" */
.favorites-count {
    transition: opacity 0.2s ease;
}

/* Ensure parent links have correct positioning */
.favorites-header-link,
.mobile-favorites-link {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
}

/* Ensure heart icons are visible */
.favorites-heart-icon,
.mobile-favorites-heart {
    display: inline-block !important;
    font-size: inherit !important;
}

/* Product page specific fixes - ensure count is visible when not empty */
.product-page .favorites-count:not(:empty),
body[data-page="product"] .favorites-count:not(:empty) {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Override any conflicting styles from product page */
.container .favorites-count:not(:empty),
.product-wrapper ~ * .favorites-count:not(:empty) {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Ensure we never show empty or zero count */
.favorites-count:empty,
.favorites-count[data-count="0"] {
    opacity: 0 !important;
    display: none !important;
    visibility: hidden !important;
}