/*
 * Alkom Plugins — Badge modul (bedževi na proizvodima).
 * Vizuelni klon „Badge Designer lite" tekstualnih šablona (1–5), bez buga sa
 * varijabilnim proizvodima. Prefiks adtb- (ne sudara se sa wobd-).
 * Boje/font po bedžu se ubacuju inline (vidi dynamic_css() u klasi).
 */

.adtb-wrap {
    display: block;
    position: relative;
    white-space: normal;
}

.adtb-text {
    display: block;
    line-height: 1;
    text-align: center;
    font-family: 'Lato', sans-serif;
}

.adtb-badge {
    z-index: 9;
    white-space: normal;
    box-sizing: border-box;
}

/* ---- Pozicije ---- */
.adtb-badge.adtb-pos-right_center {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) translateZ(0);
    right: 0;
}
.adtb-badge.adtb-pos-right_top {
    position: absolute;
    top: 0;
    right: 0;
}
.adtb-badge.adtb-pos-right_bottom {
    position: absolute;
    bottom: 0;
    right: 0;
}
.adtb-badge.adtb-pos-left_center {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) translateZ(0);
    left: 0;
}
.adtb-badge.adtb-pos-left_top {
    position: absolute;
    top: 0;
    left: 0;
}
.adtb-badge.adtb-pos-left_bottom {
    position: absolute;
    bottom: 0;
    left: 0;
}

/* ---- Šablon 1 ---- */
.adtb-tpl-1.adtb-pos-left_top    { margin-top: 15px; margin-left: 0; }
.adtb-tpl-1.adtb-pos-right_top   { margin-top: 10px; margin-left: 15px; margin-right: 10px; padding: 10px; }
.adtb-tpl-1.adtb-pos-left_bottom { margin-bottom: 15px; margin-left: 0; }
.adtb-tpl-1.adtb-pos-right_bottom{ margin-bottom: 15px; margin-right: 0; }
.adtb-tpl-1.adtb-pos-left_center { margin-top: 0; margin-left: 0; }
.adtb-tpl-1.adtb-pos-right_center{ margin-top: 0; margin-right: 0; }
.adtb-tpl-1 {
    background: #9DBE19;
    color: #FFF;
    font-size: 14px;
    font-family: 'Lato', sans-serif;
    padding: 7px 15px;
}

/* ---- Šablon 2 (sa corner-fold) ---- */
.adtb-tpl-2.adtb-pos-left_top    { margin-top: 20px; margin-left: -12px; }
.adtb-tpl-2.adtb-pos-right_top   { margin-top: 20px; margin-right: -12px; }
.adtb-tpl-2.adtb-pos-left_bottom { margin-bottom: 20px; margin-left: -12px; }
.adtb-tpl-2.adtb-pos-right_bottom{ margin-bottom: 20px; margin-right: -12px; }
.adtb-tpl-2.adtb-pos-left_center { margin-top: 0; margin-left: -12px; }
.adtb-tpl-2.adtb-pos-right_center{ margin-top: 0; margin-right: -12px; }
.adtb-tpl-2 {
    background: #e91d64;
    color: #FFF;
    font-size: 14px;
    font-family: 'Lato', sans-serif;
    padding: 7px 15px;
    position: relative;
}
.adtb-tpl-2:after {
    position: absolute;
    content: "";
    bottom: 100%;
    width: 0;
    height: 0;
    border-style: solid;
}
.adtb-tpl-2.adtb-pos-left_center:after,
.adtb-tpl-2.adtb-pos-left_top:after,
.adtb-tpl-2.adtb-pos-left_bottom:after {
    left: 0;
    border-width: 0 0 6px 12px;
    border-color: transparent transparent #93173f transparent;
}
.adtb-tpl-2.adtb-pos-right_center:after,
.adtb-tpl-2.adtb-pos-right_top:after,
.adtb-tpl-2.adtb-pos-right_bottom:after {
    right: 0;
    border-width: 6px 0 0 12px;
    border-color: transparent transparent transparent #93173f;
}

/* ---- Šablon 3 ---- */
.adtb-tpl-3.adtb-pos-left_top    { margin-top: 15px; margin-left: 20px; }
.adtb-tpl-3.adtb-pos-right_top   { margin-top: 15px; margin-right: 20px; }
.adtb-tpl-3.adtb-pos-left_bottom { margin-bottom: 15px; margin-left: 20px; }
.adtb-tpl-3.adtb-pos-right_bottom{ margin-bottom: 15px; margin-right: 20px; }
.adtb-tpl-3.adtb-pos-left_center { margin-top: 0; margin-left: 20px; }
.adtb-tpl-3.adtb-pos-right_center{ margin-top: 0; margin-right: 20px; }
.adtb-tpl-3 {
    background: #ff002c;
    color: #FFF;
    font-size: 13px;
    font-family: 'Lato', sans-serif;
    padding: 6px 12px;
    border-radius: 4px;
    position: relative;
}

/* ---- Šablon 4 ---- */
.adtb-tpl-4.adtb-pos-left_top    { margin-top: 15px; margin-left: 10px; }
.adtb-tpl-4.adtb-pos-right_top   { margin-top: 15px; margin-right: 10px; }
.adtb-tpl-4.adtb-pos-left_bottom { margin-bottom: 15px; margin-left: 10px; }
.adtb-tpl-4.adtb-pos-right_bottom{ margin-bottom: 15px; margin-right: 10px; }
.adtb-tpl-4.adtb-pos-left_center { margin-top: 0; margin-left: 10px; }
.adtb-tpl-4.adtb-pos-right_center{ margin-top: 0; margin-right: 10px; }
.adtb-tpl-4 {
    background: #f43d3f;
    color: #FFF;
    font-size: 12px;
    font-family: 'Lato', sans-serif;
    padding: 7px 15px;
    border-radius: 15px;
    position: relative;
}

/* ---- Šablon 5 ---- */
.adtb-tpl-5.adtb-pos-left_top    { margin-top: 12px; margin-left: 8px; }
.adtb-tpl-5.adtb-pos-right_top   { margin-top: 12px; margin-right: 8px; }
.adtb-tpl-5.adtb-pos-left_bottom { margin-bottom: 12px; margin-left: 5px; }
.adtb-tpl-5.adtb-pos-right_bottom{ margin-bottom: 12px; margin-right: 8px; }
.adtb-tpl-5.adtb-pos-left_center { margin-top: 0; margin-left: 8px; }
.adtb-tpl-5.adtb-pos-right_center{ margin-top: 0; margin-right: 8px; }
.adtb-tpl-5 {
    background: #ff9d1e;
    color: #FFF;
    font-size: 12px;
    font-family: 'Lato', sans-serif;
    padding: 10px 11px;
    border-radius: 0;
    position: relative;
}
.adtb-tpl-5 .adtb-text { line-height: 1.15; }

/* Single product galerija — drži bedž iznad slike */
.woocommerce .single-product .woocommerce-product-gallery .adtb-badge { z-index: 9; }
