
.borna-wallet-product-badge{
    position:absolute;
    z-index:25;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:5px 9px;
    border-radius:6px;
    background:#fff;
    color:#c2410c !important;
    border:1px solid #fdba74;
    font-size:11px;
    line-height:1.4;
    font-weight:800;
    box-shadow:0 2px 8px rgba(0,0,0,.08);
    direction:rtl;
    pointer-events:auto;
    cursor:pointer;
    white-space:nowrap;
}
.borna-wallet-badge-top-right{top:8px;right:8px}
.borna-wallet-badge-top-left{top:8px;left:8px}
.borna-wallet-badge-bottom-right{bottom:8px;right:8px}
.borna-wallet-badge-bottom-left{bottom:8px;left:8px}

.product-element-top,
.product-image-link{
    position:relative;
}

/* Single product */
.borna-wallet-single-credit{
    display:flex;
    align-items:center;
    gap:12px;
    background:#fff7ed;
    border:1px solid #fed7aa;
    border-radius:10px;
    padding:12px 14px;
    margin:12px 0 16px;
    color:#7c2d12;
}
.borna-wallet-single-credit-mark{
    width:38px;
    height:38px;
    flex:0 0 38px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    background:#ea580c;
    color:#fff;
    font-size:18px;
    font-weight:900;
}
.borna-wallet-single-credit-content{
    display:flex;
    flex-direction:column;
    gap:3px;
}
.borna-wallet-single-credit-content strong{
    font-size:16px;
    font-weight:900;
    color:#9a3412;
}
.borna-wallet-single-credit-content span{
    font-size:13px;
    color:#7c2d12;
    line-height:1.7;
}

@media(max-width:600px){
    .borna-wallet-product-badge{
        font-size:10px;
        padding:4px 7px;
    }
    .borna-wallet-single-credit{
        padding:10px 12px;
    }
    .borna-wallet-single-credit-content strong{
        font-size:14px;
    }
}

.single-product .borna-wallet-single-image-badge{
    top:14px;
    right:14px;
    left:auto;
    bottom:auto;
    z-index:80;
    display:inline-flex !important;
    background:#fff;
    color:#c2410c !important;
    border:1px solid #fb923c;
    padding:8px 12px;
    font-size:13px;
    border-radius:7px;
    box-shadow:0 4px 12px rgba(0,0,0,.12);
}


.borna-wallet-product-badge:focus-visible{
    outline:2px solid #ea580c;
    outline-offset:2px;
}
body.borna-wallet-modal-open{overflow:hidden}
.borna-wallet-credit-modal{
    position:fixed;
    inset:0;
    z-index:999999;
    display:none;
    align-items:center;
    justify-content:center;
    padding:20px;
    direction:rtl;
}
.borna-wallet-credit-modal.is-open{display:flex}
.borna-wallet-credit-modal-backdrop{
    position:absolute;
    inset:0;
    background:rgba(15,23,42,.58);
    backdrop-filter:blur(2px);
}
.borna-wallet-credit-modal-dialog{
    position:relative;
    width:min(500px,100%);
    max-height:calc(100vh - 40px);
    overflow:auto;
    background:#fff;
    border-radius:18px;
    padding:30px 28px 26px;
    box-shadow:0 24px 70px rgba(0,0,0,.25);
    text-align:right;
    animation:bornaWalletModalIn .18s ease-out;
}
.borna-wallet-credit-modal-close{
    position:absolute;
    top:12px;
    left:14px;
    width:36px;
    height:36px;
    padding:0;
    border:0;
    border-radius:50%;
    background:#f3f4f6;
    color:#374151;
    font-size:26px;
    line-height:36px;
    cursor:pointer;
}
.borna-wallet-credit-modal-icon{
    width:48px;
    height:48px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:14px;
    margin:0 0 14px auto;
    background:#fff7ed;
    color:#ea580c;
    font-size:24px;
    font-weight:900;
}
.borna-wallet-credit-modal-dialog h3{
    margin:0 0 12px;
    color:#111827;
    font-size:21px;
    font-weight:900;
}
.borna-wallet-credit-modal-text{
    color:#4b5563;
    font-size:14px;
    line-height:2;
}
.borna-wallet-credit-modal-text p{margin:0 0 8px}
@keyframes bornaWalletModalIn{
    from{opacity:0;transform:translateY(8px) scale(.98)}
    to{opacity:1;transform:translateY(0) scale(1)}
}
@media(max-width:600px){
    .borna-wallet-credit-modal{padding:14px}
    .borna-wallet-credit-modal-dialog{padding:26px 20px 22px;border-radius:14px}
    .borna-wallet-credit-modal-dialog h3{font-size:18px}
}


/* v1.8.14: place the single-product credit button beside stock status */
.single-product .borna-wallet-gallery-badge-mounted,
.single-product .borna-wallet-single-image-badge{display:none!important}
.borna-wallet-stock-badge-wrap{
    display:flex;
    width:max-content;
    vertical-align:middle;
    margin-top:10px;
    margin-right:0;
    margin-left:0;
}
.single-product .borna-wallet-stock-badge-mounted{
    position:static!important;
    inset:auto!important;
    display:inline-flex!important;
    align-items:center;
    justify-content:center;
    min-height:36px;
    padding:7px 13px;
    margin:0;
    border-radius:4px;
    background:var(--borna-wallet-button-bg,#2e6ea8)!important;
    border:1px solid var(--borna-wallet-button-border,#245b8d)!important;
    color:#fff!important;
    box-shadow:none!important;
    font-size:12px;
    line-height:1.4;
    font-weight:800;
    white-space:nowrap;
}
.single-product .borna-wallet-stock-badge-mounted:hover{
    background:#245b8d!important;
    border-color:#1d4e79!important;
    color:#fff!important;
}
@media(max-width:600px){
    .borna-wallet-stock-badge-wrap{margin-top:8px;margin-right:0}
    .single-product .borna-wallet-stock-badge-mounted{min-height:34px;padding:6px 10px;font-size:11px}
}

/* v1.8.17: Elementor/Woodmart single-product fallback placement */
.single-product .elementor-widget-woocommerce-product-title + .borna-wallet-stock-badge-wrap,
.single-product .product_title + .borna-wallet-stock-badge-wrap,
.single-product .wd-entities-title + .borna-wallet-stock-badge-wrap,
.single-product .elementor-widget-woocommerce-product-price + .borna-wallet-stock-badge-wrap{
    margin-top:10px;
    margin-bottom:10px;
}


/* v1.8.18: Borna Store orange theme and left purchase-panel placement */
.single-product .borna-wallet-stock-badge-wrap.borna-wallet-store-placement{
    display:flex;
    justify-content:flex-end;
    width:100%;
    margin:0 0 12px 0;
}
.single-product .borna-wallet-store-placement .borna-wallet-stock-badge-mounted{
    min-width:150px;
    min-height:38px;
    padding:8px 16px;
    background:var(--borna-wallet-button-bg,#f2864b)!important;
    border-color:var(--borna-wallet-button-border,#f2864b)!important;
    color:#fff!important;
}
.single-product .borna-wallet-store-placement .borna-wallet-stock-badge-mounted:hover{
    filter:brightness(.92);
    color:#fff!important;
}
@media(max-width:600px){
    .single-product .borna-wallet-stock-badge-wrap.borna-wallet-store-placement{margin-bottom:10px}
    .single-product .borna-wallet-store-placement .borna-wallet-stock-badge-mounted{min-width:140px}
}


/* v1.8.19: Borna Store button outside and above the purchase box */
.single-product .borna-wallet-stock-badge-wrap.borna-wallet-store-outside-box{
    display:flex;
    direction:ltr;
    justify-content:flex-start;
    align-items:center;
    width:100%;
    margin:0 0 12px 0;
    padding:0;
}
.single-product .borna-wallet-store-outside-box .borna-wallet-stock-badge-mounted{
    margin:0!important;
}
@media(max-width:600px){
    .single-product .borna-wallet-stock-badge-wrap.borna-wallet-store-outside-box{
        margin-bottom:10px;
    }
}


/* v1.8.20: Borna Store credit button above the live-viewers notice */
.single-product .borna-wallet-stock-badge-wrap.borna-wallet-store-above-viewers{
    display:flex;
    direction:ltr;
    justify-content:flex-start;
    align-items:center;
    width:100%;
    margin:0 0 12px 0;
    padding:0;
}
.single-product .borna-wallet-store-above-viewers .borna-wallet-stock-badge-mounted{
    margin:0!important;
    min-width:150px;
}
@media(max-width:600px){
    .single-product .borna-wallet-stock-badge-wrap.borna-wallet-store-above-viewers{
        margin-bottom:10px;
    }
}


/* v1.8.29: Borna Store compatibility */
.single-product .borna-wallet-stock-badge-wrap.borna-wallet-store-gallery-placement{
    position:absolute!important;
    top:14px!important;
    left:14px!important;
    right:auto!important;
    bottom:auto!important;
    z-index:120!important;
    width:auto!important;
    margin:0!important;
    display:block!important;
}
.single-product .borna-wallet-store-gallery-badge{
    position:static!important;
    display:inline-flex!important;
    min-width:0!important;
    min-height:0!important;
    padding:7px 11px!important;
    background:#fff!important;
    border:1px solid #fb923c!important;
    color:#c2410c!important;
    border-radius:6px!important;
    box-shadow:0 3px 10px rgba(0,0,0,.10)!important;
    font-size:12px!important;
}
/* Ensure archive badges remain visible in Woodmart/Elementor product cards. */
.products .product,
.wd-products .product-grid-item,
.product-grid-item,
.woocommerce ul.products li.product{
    position:relative;
}
.products .product .product-element-top,
.wd-products .product-grid-item .product-element-top,
.woocommerce ul.products li.product .product-image-link,
.woocommerce ul.products li.product .woocommerce-LoopProduct-link{
    position:relative!important;
    overflow:visible!important;
}
@media(max-width:600px){
    .single-product .borna-wallet-stock-badge-wrap.borna-wallet-store-gallery-placement{top:8px!important;left:8px!important}
}


/* v1.8.30: Borna Store single-product badge beside title, visual left */
.single-product .borna-wallet-store-title-row{
    display:flex;
    align-items:center;
    justify-content:flex-start;
    gap:12px;
    width:100%;
    direction:rtl;
    flex-wrap:wrap;
}
.single-product .borna-wallet-store-title-row > .product_title,
.single-product .borna-wallet-store-title-row > .wd-entities-title,
.single-product .borna-wallet-store-title-row > h1,
.single-product .borna-wallet-store-title-row > h2{
    margin-top:0!important;
    margin-bottom:0!important;
    flex:0 1 auto;
}
.single-product .borna-wallet-stock-badge-wrap.borna-wallet-store-title-placement{
    display:inline-flex!important;
    width:auto!important;
    margin:0!important;
    flex:0 0 auto;
    order:2;
}
.single-product .borna-wallet-store-title-placement .borna-wallet-stock-badge-mounted{
    position:static!important;
    inset:auto!important;
    display:inline-flex!important;
    min-width:0!important;
    min-height:36px;
    padding:7px 12px;
    margin:0!important;
    border-radius:7px;
    background:#fff!important;
    border:1px solid #fb923c!important;
    color:#c2410c!important;
    box-shadow:0 2px 8px rgba(0,0,0,.08)!important;
    font-size:12px;
    line-height:1.4;
    font-weight:800;
    white-space:nowrap;
}
.single-product .borna-wallet-store-title-placement .borna-wallet-stock-badge-mounted:hover{
    background:#fff7ed!important;
    border-color:#f97316!important;
    color:#9a3412!important;
}
@media(max-width:767px){
    .single-product .borna-wallet-store-title-row{gap:8px}
    .single-product .borna-wallet-store-title-placement .borna-wallet-stock-badge-mounted{
        min-height:32px;
        padding:5px 9px;
        font-size:10px;
    }
}
