/**
 * Blazeworks Product Condition Badges
 * Small tags on the top-right of product images
 */

/* --------------------------------------------------
   Base badge style
   -------------------------------------------------- */
.bw-condition-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 20;
    display: inline-block;
    padding: 4px 10px;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: #ffffff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    pointer-events: none;
    white-space: nowrap;
}

/* --------------------------------------------------
   Condition colours
   -------------------------------------------------- */

/* Brand New – strong green */
.bw-badge-new {
    background: linear-gradient(135deg, #00a651 0%, #008f45 100%);
}

/* Used – warm orange */
.bw-badge-used {
    background: linear-gradient(135deg, #ff6b00 0%, #e55f00 100%);
}

/* Refurbished – gold / amber */
.bw-badge-refurb {
    background: linear-gradient(135deg, #f5a623 0%, #d4890f 100%);
    color: #1a1a1a;
}

/* --------------------------------------------------
   Shop / Loop / Archive positioning
   -------------------------------------------------- */

/* Most themes wrap the image in these containers */
.product-small,
.product,
.woocommerce ul.products li.product,
.box-product,
.product-small .box-image,
.product .box-image,
.woocommerce-loop-product__link,
.image-fade_in_back,
.product-image,
.attachment-woocommerce_thumbnail {
    position: relative;
}

/* Ensure the badge sits correctly inside Flatsome product boxes */
.product-small .box-image,
.product .box-image,
.box .box-image {
    position: relative;
    overflow: visible; /* allow badge to show fully */
}

/* --------------------------------------------------
   Single product page
   -------------------------------------------------- */
.bw-single-badge-wrapper {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 30;
    pointer-events: none;
}

.bw-single-badge-wrapper .bw-condition-badge {
    position: static;
    font-size: 12px;
    padding: 5px 12px;
}

/* Make sure the product image container is relative */
.single-product div.product .woocommerce-product-gallery,
.single-product .product-gallery,
.single-product .images,
.product-images,
.woocommerce-product-gallery__wrapper {
    position: relative;
}

/* Flatsome single product gallery */
.product-gallery .woocommerce-product-gallery,
.product-main .product-gallery {
    position: relative;
}

/* --------------------------------------------------
   Responsive adjustments
   -------------------------------------------------- */
@media (max-width: 849px) {
    .bw-condition-badge {
        top: 8px;
        right: 8px;
        font-size: 10px;
        padding: 3px 8px;
    }

    .bw-single-badge-wrapper {
        top: 10px;
        right: 10px;
    }

    .bw-single-badge-wrapper .bw-condition-badge {
        font-size: 11px;
        padding: 4px 10px;
    }
}

@media (max-width: 480px) {
    .bw-condition-badge {
        font-size: 9px;
        padding: 3px 7px;
        top: 6px;
        right: 6px;
    }
}

/* --------------------------------------------------
   Admin list table
   -------------------------------------------------- */
.wp-list-table .bw-condition-badge {
    position: static !important;
    display: inline-block;
    margin: 0;
    box-shadow: none;
}
