/* ==========================================================================
   HVĚZDIČKY HODNOCENÍ
   - Skrývá blok hvězdiček i text "Neohodnoceno" u produktů bez hodnocení.
   - Přepisuje hvězdičky vlastními Unicode hvězdami (★) ve zlaté barvě.
   - Velikost 20px (klidně upravte v proměnné --star-size níže).
   - Funguje automaticky na celém e-shopu, není třeba nastavovat u produktů.
   ========================================================================== */

:root {
    --star-size: 20px;
    --star-color-on: #FFC107;     /* Zlatá - aktivní hvězdička */
    --star-color-off: #D0D0D0;    /* Šedá - prázdná hvězdička */
}

/* --- Skrytí hvězdiček u neohodnocených produktů --------------------------- */
.stars:not(:has(.star-on)) {
    display: none !important;
}

/* --- Skrytí textu "Neohodnoceno" (všechny pozice v HTML) ------------------ */
.stars-label:has(+ .stars:not(:has(.star-on))) {
    display: none !important;
}
.stars-wrapper:has(.stars:not(:has(.star-on))) .stars-label {
    display: none !important;
}
.stars:not(:has(.star-on)) ~ .stars-label {
    display: none !important;
}

/* --- Úplné vyčištění původního vzhledu hvězdičky -------------------------- */
.stars a.star,
.stars a.star-on,
.stars a.star-half,
.stars a.star-off {
    background: none !important;
    background-image: none !important;
    -webkit-mask: none !important;
    mask: none !important;
    width: var(--star-size) !important;
    height: var(--star-size) !important;
    min-width: var(--star-size) !important;
    min-height: var(--star-size) !important;
    display: inline-block !important;
    position: relative !important;
    font-size: 0 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    vertical-align: middle !important;
    margin: 0 1px !important;
}

/* Skryjeme případné pseudo-elementy ze šablony */
.stars a.star::before,
.stars a.star::after {
    display: none !important;
    content: none !important;
}

/* --- Vlastní hvězdička přes ::before (má nejvyšší prioritu) --------------- */
.stars a.star-on::before,
.stars a.star-half::before,
.stars a.star-off::before {
    content: "★" !important;
    display: inline-block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: var(--star-size) !important;
    height: var(--star-size) !important;
    font-size: var(--star-size) !important;
    line-height: 1 !important;
    font-family: Arial, sans-serif !important;
    text-align: center !important;
}

/* Plná zlatá hvězdička */
.stars a.star-on::before {
    color: var(--star-color-on) !important;
}

/* Prázdná šedá hvězdička */
.stars a.star-off::before {
    color: var(--star-color-off) !important;
}

/* Poloviční hvězdička - zlatá levá polovina, šedá pravá */
.stars a.star-half::before {
    background: linear-gradient(to right,
        var(--star-color-on) 50%,
        var(--star-color-off) 50%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
}
