/* === Frontend Badge Styles === */

/* Ensure product grid items can position badges */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    position: relative;
    overflow: visible !important;
}

/* Badge wrapper (frontend display) */
.cib-product-badge-wrapper {
    position: absolute;
    z-index: 99;
    pointer-events: none;
}

/* Badge container */
.cib-product-badge {
    position: absolute;
    z-index: 99;
    pointer-events: none;
}

/* Badge image */
.cib-product-badge img {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
    border-radius: 3px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

/* Hover effect on product grid */
.woocommerce ul.products li.product:hover .cib-product-badge img {
    transform: scale(1.05);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* === Single Product Page Compatibility === */
.single-product div.product div.images,
.single-product .woocommerce-product-gallery,
.single-product .wd-content-layout {
    position: relative !important;
    overflow: visible !important;
}

.single-product .cib-product-badge-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 99;
    pointer-events: none;
}

.single-product .cib-product-badge {
    display: block !important;
    z-index: 99 !important;
}

/* === Admin Badge Preview (Draggable Interface) === */
.cib-position-preview {
    position: relative;
    width: 300px;
    height: auto;
}

.cib-position-marker {
    position: absolute;
    z-index: 10;
    cursor: move;
}

.cib-position-marker img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}
