.gh-rank-image,.gh-rank-stack{position:relative}
.gh-rank-stack,
html body :is(#main,.gh32-badge-host) .gh32-badge-layer .gh32-stack.gh32-rank {
    position:absolute;left:0!important;right:auto!important;top:auto!important;bottom:0;
    display:flex;flex-direction:column;align-items:flex-start!important;direction:ltr;gap:2px;z-index:2
}
html body.single-product #main :is(.product-gallery,.woocommerce-product-gallery) > .gh32-badge-layer .gh32-stack.gh32-rank {
    top:var(--gh-rank-gallery-edge,0px)!important;bottom:auto;transform:translateY(-100%);
    visibility:var(--gh-rank-gallery-visible,hidden)
}
.gh32-rank:empty,.gh-rank-stack:empty{display:none!important}
.gh-rank-label {
    display:block;border-radius:0 6px 0 0;padding:1px 5px;
    font:800 10px/1.3 GH2Vazir,Vazirmatn,Tahoma,sans-serif;direction:rtl;white-space:nowrap
}
.gh-rank-label:last-child{border-bottom-left-radius:7px}
.gh-rank-label.rank_reviews{font-size:8px;background:#efc6ae;color:#733d26}
.gh-rank-label.rank_popular{background:#f4e1a4;color:#614408}
.gh-rank-label.rank_sales{background:#e1e6ee;color:#394457}

/* 2.0.7.8: override legacy generic .gh32-stack top rules only for the rank stack. */
html body #main :is(.gh32-badge-host,.gh35-combo-image,.gummy-img-wrap,.gh-v60-image-wrap) > .gh32-badge-layer[data-gh37-id] > .gh32-stack.gh32-rank,
html body .gh32-badge-host > .gh32-badge-layer[data-gh37-id] > .gh32-stack.gh32-rank {
    top:auto!important;bottom:0!important;left:0!important;right:auto!important;
    transform:none!important;gap:1px!important;max-width:100%;
}
html body.single-product #main :is(.product-gallery,.woocommerce-product-gallery).gh32-badge-host > .gh32-badge-layer[data-gh37-id] > .gh32-stack.gh32-rank {
    top:var(--gh-rank-gallery-edge,0px)!important;bottom:auto!important;transform:translateY(-100%)!important;
    visibility:var(--gh-rank-gallery-visible,hidden);
}
.gh32-rank .gh-rank-label{font-size:9px;line-height:1.25;padding:1px 3px;max-width:100%;box-sizing:border-box}
