/* 9 Position System for Product Badges */

.woocommerce-LoopProduct-link, .woocommerce-product-gallery__wrapper, .astra-shop-thumbnail-wrap, .woocommerce-loop-product__link, .post-thumbnail {
    position: relative !important;
    display: block !important;
    line-height: 0 !important;
}

.product {
    position: relative !important;
}

.pb-badges-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    pointer-events: none;
    z-index: 50;
    line-height: normal !important;
    opacity: 0;
    visibility: hidden;
    overflow: visible;
}

.pb-badge {
    position: absolute;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
    line-height: 1;
    white-space: nowrap;
}

.pb-badge-img {
    max-width: 60px;
    width: 100%;
    height: auto;
    display: block;
}

/* 9 Position Mapping */
.pb-pos-TL { top: 10px; left: 10px; }
.pb-pos-TC { top: 10px; left: 50%; transform: translateX(-50%); }
.pb-pos-TR { top: 10px; right: 10px; }
.pb-pos-ML { top: 50%; left: 10px; transform: translateY(-50%); }
.pb-pos-MC { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.pb-pos-MR { top: 50%; right: 10px; transform: translateY(-50%); }
.pb-pos-BL { bottom: 10px; left: 10px; }
.pb-pos-BC { bottom: 10px; left: 50%; transform: translateX(-50%); }
.pb-pos-BR { bottom: 10px; right: 10px; }

.pb-shape-pill {
    border-radius: 50px !important;
}

.pb-shape-circle {
    aspect-ratio: 1/1;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 10px !important;
}

.pb-shape-square {
    aspect-ratio: 1/1;
    border-radius: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 10px !important;
}

.pb-shape-star {
    aspect-ratio: 1/1;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 15px !important;
}

.pb-shape-diamond {
    aspect-ratio: 1/1;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 10px !important;
}

.pb-shape-hexagon {
    aspect-ratio: 1/1;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 10px !important;
}

.pb-shape-flag {
    clip-path: polygon(100% 0%, 0% 0%, 0% 100%, 100% 100%, 80% 50%);
    padding-right: 20px !important;
}

.pb-shape-ribbon {
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 50% 85%, 0% 100%);
    padding-bottom: 15px !important;
    display: flex !important;
    align-items: flex-start;
    justify-content: center;
}

.pb-shape-tag {
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%, 15px 50%);
    padding-left: 25px !important;
}

@keyframes pbBounce {
    0% { transform: scale(0.5) translateY(10px); opacity: 0; }
    100% { opacity: 1; }
}
