/*
Theme Name: Elessi Theme Child
Theme URI: https://elessi.nasatheme.com/demo/
Description: This is a child theme for Elessi Theme
Author: NasaTheme team
Author URI: https://nasatheme.com
Template: elessi-theme
Version: 1.0
*/


/*************** ADD YOUR CUSTOM CSS IN THIS AREA ***************/

/* ── Deal offer tooltip on .product-duration-overlay ── */
.product-duration-overlay {
    position: relative;
}

.product-duration-overlay::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #222;
    color: #fff;
    font-size: 12px;
    line-height: 1.4;
    white-space: pre;
    padding: 5px 10px;
    border-radius: 4px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 999;
}

/* Arrow */
.product-duration-overlay::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #222;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 999;
}

.product-duration-overlay:hover::after,
.product-duration-overlay:hover::before {
    opacity: 1;
}

/* ── Hide duplicate default star rating in shop loop ── */
.product-info-wrap .star-rating:not(.has-rating-count) {
    display: none !important;
}

/* ── Star rating row alignment (Single Product page JS) ── */
.star-rating.has-rating-count {
    display: inline-block !important;
    vertical-align: middle !important;
    margin-right: 5px !important;
    margin-bottom: 0 !important;
    float: none !important;
    overflow: visible !important;
}

/* Hide the screen reader text inside the rating span that becomes visible due to overflow: visible */
.star-rating.has-rating-count > span {
    text-indent: -9999px !important;
    display: block;
}
.star-rating.has-rating-count > span::before {
    text-indent: 0 !important;
}

/* Ensure empty stars still show properly by hiding overflow on the before element if needed, though woo default is usually fine */
.star-rating.has-rating-count::after {
    content: attr(data-rating-count);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 5px;
    color: #777;
    font-size: 0.9em;
    line-height: 1;
    white-space: nowrap;
}

body.rtl .star-rating.has-rating-count::after {
    left: auto;
    right: 100%;
    margin-left: 0;
    margin-right: 5px;
}
