/* DTB Shop theme integration styles */

/* Label area: covers the image portion of the card, sits above the blurred info overlay */
.dtb-product-card-inner .dtbl-image-label-area {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 100;
    overflow: visible;
}

/* Label containers inside the area keep their own alignment */
.dtbl-image-label-area .dtb-product-labels.dtbl-position-type-on-image {
    position: absolute;
    pointer-events: none;
}

.dtb-product-labels.dtbl-position-type-before-title {
    position: relative;
}

/* Ensure plugin wrapper fills the media height */
.dtb-product-card-media .dtbl-label-wrapper {
    display: block;
    height: 100%;
}

/*
 * The info box uses backdrop-filter:blur which creates a stacking context.
 * Without an explicit z-index this stacking context can render above the
 * label area (z-index:100) in some browsers — hiding labels that overlap
 * the info box edge. z-index:1 ensures label area (z-index:100) always wins.
 */
.dtb-product-card-inner .dtb-product-card-info {
    z-index: 1;
}

/*
 * DTB Shop forces aspect-ratio:2/3 + object-fit:cover on all product images
 * in the related carousel on single-product pages. This distorts label icons
 * (e.g. 50x26px becomes 50x75px portrait). Restore natural proportions.
 */
img.dtbl-product-label {
    aspect-ratio: auto !important;
    object-fit: fill !important;
}

/* On mobile, nudge on-image labels 10px lower on single-product pages */
@media (max-width: 768px) {
    body.single-product .dtb-product-labels.dtbl-position-type-on-image {
        transform: translateY(10px);
    }
}
