/* E-specialisti – EPREL oznake */
.es-eprel-display{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    gap:4px;
    margin-top:8px;
    max-width:100%;
    line-height:1.25;
}
.es-eprel-label-link{
    display:inline-flex;
    max-width:110px;
    text-decoration:none!important;
}
.es-eprel-arrow{
    display:block;
    width:100px;
    max-width:100%;
    height:auto;
}
.es-eprel-fiche-link{
    font-size:.86em;
    line-height:1.25;
    text-decoration:underline;
    overflow-wrap:anywhere;
}

/* Product cards / archives: compact overlay badge inside the image area. */
.es-eprel-overlay-host{
    position:relative!important;
}
.es-eprel-context-loop-overlay{
    position:absolute;
    right:8px;
    bottom:8px;
    z-index:4;
    margin:0;
    padding:0;
    align-items:flex-end;
    gap:0;
    pointer-events:none;
}
.es-eprel-context-loop-overlay .es-eprel-label-link{
    display:block;
    width:58px;
    max-width:58px;
    pointer-events:auto;
    filter:drop-shadow(0 2px 5px rgba(0,0,0,.22));
}
.es-eprel-context-loop-overlay .es-eprel-arrow{
    width:58px;
    max-width:58px;
    height:auto;
}
.woocommerce ul.products li.product .image_frame_wrapper,
.woocommerce ul.products li.product .image_frame,
.woocommerce ul.products li.product .product_image_wrapper,
.woocommerce ul.products li.product .woocommerce-LoopProduct-link,
.mfn-shop-products .image_frame_wrapper,
.mfn-shop-products .image_frame,
.products_wrapper .image_frame_wrapper,
.products_wrapper .image_frame,
.related .image_frame_wrapper,
.up-sells .image_frame_wrapper,
.cross-sells .image_frame_wrapper{
    position:relative;
}

.es-eprel-context-mini-cart,
.es-eprel-context-checkout{
    margin-top:6px;
}
.es-eprel-context-mini-cart .es-eprel-arrow,
.es-eprel-context-checkout .es-eprel-arrow,
.es-eprel-block-display .es-eprel-arrow{
    width:80px;
}
.es-eprel-context-mini-cart .es-eprel-fiche-link,
.es-eprel-context-checkout .es-eprel-fiche-link,
.es-eprel-block-display .es-eprel-fiche-link{
    font-size:11.5px;
    line-height:1.2;
}

/* Classic WooCommerce cart: EPREL stays to the right of the product name. */
.es-eprel-cart-name-layout{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    width:100%;
    min-width:0;
}
.es-eprel-cart-product-name{
    flex:1 1 auto;
    min-width:0;
}
.es-eprel-cart-product-name>a{display:inline}
.es-eprel-cart-name-layout .es-eprel-context-cart{
    flex:0 0 92px;
    min-width:72px;
    margin:0;
    gap:3px;
    align-items:center;
    text-align:center;
    line-height:1.1;
}
.es-eprel-cart-name-layout .es-eprel-label-link{
    display:flex;
    justify-content:center;
    width:100%;
    max-width:72px;
}
.es-eprel-cart-name-layout .es-eprel-arrow{
    width:72px;
    max-width:100%;
    height:auto;
}
.es-eprel-cart-name-layout .es-eprel-fiche-link{
    display:block;
    max-width:92px;
    font-size:11px;
    line-height:1.15;
    text-align:center;
    overflow-wrap:anywhere;
}

/* Modal with the full official EPREL label. */
.es-eprel-modal{
    position:fixed;
    z-index:999999;
    inset:0;
    background:rgba(0,0,0,.72);
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
}
.es-eprel-modal[hidden]{display:none}
.es-eprel-modal-inner{
    position:relative;
    background:#fff;
    border-radius:6px;
    max-width:min(94vw,780px);
    max-height:94vh;
    padding:18px;
    overflow:auto;
}
.es-eprel-modal-frame{
    display:block;
    width:min(92vw,520px);
    height:min(88vh,900px);
    max-width:100%;
    border:0;
    background:#fff;
}
.es-eprel-modal-close{
    position:absolute;
    right:6px;
    top:6px;
    width:36px;
    height:36px;
    border:0;
    border-radius:50%;
    background:#fff;
    font-size:28px;
    line-height:32px;
    cursor:pointer;
    box-shadow:0 1px 5px rgba(0,0,0,.25);
}

/* Cart/Checkout Blocks integration. */
.es-eprel-block-display{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    gap:4px;
    margin-top:6px;
    max-width:100%;
}

@media(max-width:768px){
    .es-eprel-context-loop-overlay{
        right:6px;
        bottom:6px;
    }
    .es-eprel-context-loop-overlay .es-eprel-label-link,
    .es-eprel-context-loop-overlay .es-eprel-arrow{
        width:50px;
        max-width:50px;
    }

    .es-eprel-cart-name-layout{
        align-items:flex-start;
        flex-wrap:wrap;
        gap:5px 8px;
    }
    .es-eprel-cart-product-name{
        flex:0 0 100%;
        width:100%;
    }
    .es-eprel-cart-name-layout .es-eprel-context-cart{
        flex:0 0 100%;
        width:100%;
        min-width:0;
        flex-direction:row;
        justify-content:flex-start;
        align-items:center;
        gap:8px;
        text-align:left;
    }
    .es-eprel-cart-name-layout .es-eprel-label-link,
    .es-eprel-cart-name-layout .es-eprel-arrow{
        width:68px;
        max-width:68px;
    }
    .es-eprel-cart-name-layout .es-eprel-fiche-link{
        max-width:150px;
        font-size:11px;
        text-align:left;
    }
    .es-eprel-arrow{width:88px}
}

@media(max-width:480px){
    .es-eprel-context-loop-overlay{
        right:5px;
        bottom:5px;
    }
    .es-eprel-context-loop-overlay .es-eprel-label-link,
    .es-eprel-context-loop-overlay .es-eprel-arrow{
        width:44px;
        max-width:44px;
    }
    .es-eprel-cart-name-layout .es-eprel-label-link,
    .es-eprel-cart-name-layout .es-eprel-arrow{
        width:64px;
        max-width:64px;
    }
    .es-eprel-context-mini-cart .es-eprel-arrow,
    .es-eprel-context-checkout .es-eprel-arrow,
    .es-eprel-block-display .es-eprel-arrow{
        width:68px;
    }
}

/* BeTheme header / side mini-cart (.mfn-chp-*). */
.mfn-chp-product .mfn-chp-price .es-eprel-betheme-minicart{
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    gap:2px;
    margin-top:5px;
    line-height:1.08;
    text-align:right;
}
.mfn-chp-product .mfn-chp-price .es-eprel-betheme-minicart .es-eprel-label-link{
    display:inline-flex;
    width:54px;
    max-width:54px;
    margin:0;
}
.mfn-chp-product .mfn-chp-price .es-eprel-betheme-minicart .es-eprel-arrow{
    width:54px;
    max-width:54px;
    height:auto;
}
.mfn-chp-product .mfn-chp-price .es-eprel-betheme-minicart .es-eprel-fiche-link{
    display:block;
    max-width:70px;
    font-size:9.5px;
    line-height:1.08;
    text-align:right;
    overflow-wrap:anywhere;
}
@media(max-width:480px){
    .mfn-chp-product .mfn-chp-price .es-eprel-betheme-minicart .es-eprel-label-link,
    .mfn-chp-product .mfn-chp-price .es-eprel-betheme-minicart .es-eprel-arrow{
        width:48px;
        max-width:48px;
    }
    .mfn-chp-product .mfn-chp-price .es-eprel-betheme-minicart .es-eprel-fiche-link{
        max-width:64px;
        font-size:9px;
    }
}

/* v1.0.8 – BeTheme side/header mini-cart: keep the EPREL block visible below price. */
.mfn-chp-product.es-eprel-minicart-row .mfn-chp-row{
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
    align-items:flex-start!important;
}
.mfn-chp-product .mfn-chp-price.es-eprel-minicart-price-host{
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-end!important;
    justify-content:flex-start!important;
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
    white-space:normal!important;
}
.mfn-chp-product .mfn-chp-price.es-eprel-minicart-price-host > .woocommerce-Price-amount,
.mfn-chp-product .mfn-chp-price.es-eprel-minicart-price-host > .tax_label{
    flex:0 0 auto;
}
.mfn-chp-product .mfn-chp-price .es-eprel-betheme-minicart{
    flex:0 0 auto;
    position:static!important;
    visibility:visible!important;
    opacity:1!important;
    overflow:visible!important;
    margin-top:6px!important;
}


/* BeTheme 28.5.1 side cart: server-rendered inside .mfn-chp-price. */
.mfn-cart-holder .mfn-ch-content .mfn-ch-product .mfn-chp-price .es-eprel-context-betheme-sidecart{
    width:86px;
    max-width:86px;
    margin:7px 0 0 auto;
    gap:3px;
    align-items:flex-end;
    text-align:right;
    line-height:1.1;
}
.mfn-cart-holder .mfn-ch-content .mfn-ch-product .mfn-chp-price .es-eprel-context-betheme-sidecart .es-eprel-label-link{
    width:62px;
    max-width:62px;
}
.mfn-cart-holder .mfn-ch-content .mfn-ch-product .mfn-chp-price .es-eprel-context-betheme-sidecart .es-eprel-arrow{
    width:62px;
    max-width:62px;
    height:auto;
}
.mfn-cart-holder .mfn-ch-content .mfn-ch-product .mfn-chp-price .es-eprel-context-betheme-sidecart .es-eprel-fiche-link{
    display:block;
    max-width:86px;
    font-size:9.5px;
    line-height:1.15;
    text-align:right;
    overflow-wrap:anywhere;
}
@media only screen and (max-width:479px){
    .mfn-cart-holder .mfn-ch-content .mfn-ch-product .mfn-chp-price .es-eprel-context-betheme-sidecart{
        width:100%;
        max-width:none;
        margin:7px 0 0;
        align-items:center;
        text-align:center;
    }
    .mfn-cart-holder .mfn-ch-content .mfn-ch-product .mfn-chp-price .es-eprel-context-betheme-sidecart .es-eprel-fiche-link{
        max-width:130px;
        text-align:center;
        font-size:10px;
    }
}

/* BeTheme 28.5.1 right/header side cart. */
.mfn-chp-price .es-eprel-context-betheme-sidecart{
    margin-top:6px;
    align-items:flex-end;
    gap:3px;
    text-align:right;
}
.mfn-chp-price .es-eprel-context-betheme-sidecart .es-eprel-label-link,
.mfn-chp-price .es-eprel-context-betheme-sidecart .es-eprel-arrow{
    width:58px;
    max-width:58px;
}
.mfn-chp-price .es-eprel-context-betheme-sidecart .es-eprel-fiche-link{
    max-width:96px;
    font-size:10px;
    line-height:1.15;
    text-align:right;
}
@media(max-width:480px){
    .mfn-chp-price .es-eprel-context-betheme-sidecart .es-eprel-label-link,
    .mfn-chp-price .es-eprel-context-betheme-sidecart .es-eprel-arrow{
        width:52px;
        max-width:52px;
    }
}
