/* ===== ПРОЦЕНТЕН ЕТИКЕТ ===== */

.woocommerce span.onsale.mya-sale-badge,
span.onsale.mya-sale-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: auto !important;
    height: 40px !important;
    min-width: 66px !important;
    min-height: 0 !important;

    padding: 0 14px !important;
    margin: 0 !important;

    border: 1px solid rgba(255,255,255,.18) !important;
    border-radius: 9px !important;

    background: linear-gradient(
        135deg,
        var(--mya-accent) 0%,
        var(--mya-accent) 60%,
        var(--mya-accent) 100%
    ) !important;

    color: #fff !important;
    font-family: var(--mya-font) !important;
    font-size: 17px !important;
    font-weight: 850 !important;
    line-height: 1 !important;
    letter-spacing: -.3px !important;

    text-align: center !important;
    text-transform: none !important;
    text-decoration: none !important;

    box-shadow:
        0 6px 16px rgba(175,31,43,.2),
        inset 0 1px 0 rgba(255,255,255,.15) !important;

    overflow: hidden !important;
    pointer-events: none;
    z-index: 21 !important;
}

.mya-sale-badge::before,
.mya-sale-badge::after {
    display: none !important;
    content: none !important;
}

.mya-sale-value {
    display: block;
    color: inherit !important;
    font: inherit !important;
    white-space: nowrap;
}

/* ===== ЕТИКЕТ В ПРОДУКТОВАТА ГАЛЕРИЯ ===== */

body.single-product .woocommerce-product-gallery {
    position: relative !important;
}

/*
 * Скрива етикета на старото му място,
 * преди преместването му върху главната снимка.
 */

body.single-product div.product > .mya-sale-badge {
    visibility: hidden !important;
}

body.single-product
.woocommerce-product-gallery > .mya-sale-badge {
    position: absolute !important;

    top: 16px !important;
    right: 68px !important;
    bottom: auto !important;
    left: auto !important;

    visibility: visible !important;
    transform: none !important;

    max-width: calc(100% - 90px);
}

.mya-sale-badge[hidden] {
    display: none !important;
}

/* ===== ЕТИКЕТИ В ПРОДУКТОВИТЕ КУТИЙКИ ===== */

.woocommerce ul.products li.product,
ul.products li.product {
    position: relative;
}

.woocommerce ul.products li.product .mya-sale-badge,
ul.products li.product .mya-sale-badge {
    position: absolute !important;

    top: 11px !important;
    left: auto !important;
    right: 11px !important;
    bottom: auto !important;

    min-width: 54px !important;
    height: 32px !important;
    padding: 0 10px !important;

    border-radius: 7px !important;
    font-size: 14px !important;

    transform: none !important;
}

/* ===== ОСНОВНА ЦЕНА ===== */

body.single-product .summary > .price,
body.single-product .summary .woocommerce-variation-price .price {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: baseline !important;
    gap: 8px 14px !important;

    color: var(--mya-accent) !important;
    font-family: var(--mya-font) !important;
    font-size: clamp(27px, 2.4vw, 36px) !important;
    font-weight: 850 !important;
    line-height: 1.25 !important;

    margin: 0 0 23px !important;
    padding: 0 !important;

    background: transparent !important;
    border: 0 !important;

    font-variant-numeric: tabular-nums;
}

/* Стара цена — по-малка, сива, с фино зачертаване. */

body.single-product .summary > .price del,
body.single-product .summary .woocommerce-variation-price .price del {
    display: inline-block !important;

    color: #979797 !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;

    opacity: 1 !important;

    text-decoration-line: line-through !important;
    text-decoration-color: #b0b0b0 !important;
    text-decoration-thickness: 1px !important;

    background: transparent !important;
}

body.single-product .summary > .price del *,
body.single-product .summary .woocommerce-variation-price .price del * {
    color: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
}

/* Нова цена — водеща, без подчертаване. */

body.single-product .summary > .price ins,
body.single-product .summary .woocommerce-variation-price .price ins {
    display: inline-block !important;

    color: var(--mya-accent) !important;
    font-size: inherit !important;
    font-weight: 850 !important;
    line-height: inherit !important;

    text-decoration: none !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

body.single-product .summary > .price ins *,
body.single-product .summary .woocommerce-variation-price .price ins * {
    color: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;

    text-decoration: none !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
}

/* ===== ЦЕНИ В ПРОДУКТОВИТЕ КУТИЙКИ ===== */

.woocommerce ul.products li.product .price del,
ul.products li.product .price del {
    display: inline-block !important;

    margin: 0 7px 3px 0 !important;

    color: #989898 !important;
    font-size: 13px !important;
    font-weight: 500 !important;

    opacity: 1 !important;

    text-decoration-line: line-through !important;
    text-decoration-thickness: 1px !important;
    text-decoration-color: #b2b2b2 !important;
}

.woocommerce ul.products li.product .price del *,
ul.products li.product .price del * {
    color: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
}

.woocommerce ul.products li.product .price ins,
ul.products li.product .price ins {
    display: inline-block !important;

    color: var(--mya-accent) !important;
    font-size: 19px !important;
    font-weight: 850 !important;
    line-height: 1.3 !important;

    text-decoration: none !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.woocommerce ul.products li.product .price ins *,
ul.products li.product .price ins * {
    color: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;

    text-decoration: none !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
}

@media (max-width: 767px) {

    body.single-product
    .woocommerce-product-gallery > .mya-sale-badge {
        top: 17px !important;
        right: 67px !important;

        min-width: 58px !important;
        height: 38px !important;
        padding: 0 12px !important;

        font-size: 16px !important;
    }

    body.single-product .summary > .price,
    body.single-product .summary .woocommerce-variation-price .price {
        font-size: 30px !important;
        gap: 7px 12px !important;
    }

    body.single-product .summary > .price del,
    body.single-product .summary .woocommerce-variation-price .price del {
        font-size: 16px !important;
    }

}

/* Лични баджове — отляво, един под друг. Промоцията остава отдясно. */

.mya-custom-badges {
    position: absolute;
    top: 11px;
    left: 11px;
    right: auto;
    z-index: 22;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    max-width: calc(100% - 96px);
    margin: 0;
    pointer-events: none;
}

.mya-custom-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 32px;
    max-width: 100%;
    margin: 0;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 7px;
    background: var(--mya-badge-bg, #af1f2b);
    color: var(--mya-badge-color, #fff);
    font-family: var(--mya-font);
    font-size: var(--mya-badge-size, 14px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.2px;
    white-space: nowrap;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .12), inset 0 1px 0 rgba(255, 255, 255, .15);
}

body.single-product div.product > .mya-custom-badges {
    visibility: hidden;
}

body.single-product .woocommerce-product-gallery > .mya-custom-badges,
body.single-product .flex-viewport > .mya-custom-badges {
    top: 16px;
    left: 16px;
    visibility: visible;
}

body.single-product .flex-viewport {
    position: relative;
}

body.single-product .woocommerce-product-gallery > .mya-custom-badges .mya-custom-badge {
    min-height: 40px;
    padding: 0 14px;
    border-radius: 9px;
}

@media (max-width: 767px) {
    body.single-product .woocommerce-product-gallery > .mya-custom-badges {
        top: 17px;
        left: 12px;
    }

    body.single-product .woocommerce-product-gallery > .mya-custom-badges .mya-custom-badge {
        min-height: 38px;
        padding: 0 12px;
    }
}
