/* 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);
    }
}

/* ---------------------------------------------------------------
   Promo Banner — single product page card
   --------------------------------------------------------------- */
.dtbl-promo-banner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: rgba(0, 160, 80, 0.06);
    border: 1px solid rgba(0, 160, 80, 0.2);
    border-radius: 10px;
    padding: 14px 16px;
    margin: 12px 0;
    width: 100%;
    box-sizing: border-box;
}

.dtbl-promo-banner__icon {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-start;
    padding-top: 2px;
}

.dtbl-promo-banner__icon-img {
    height: auto;
    aspect-ratio: auto !important;
    object-fit: fill !important;
}

.dtbl-promo-banner__text {
    flex: 1;
    font-size: 14px;
    line-height: 1.55;
}

.dtbl-promo-banner__text > *:last-child {
    margin-bottom: 0 !important;
}

/* Product page: labels on the first gallery image (theme 1.1.611+) */
.dtb-gallery-slide { position: relative; }
.dtb-gallery-slide > .dtb-product-labels { z-index: 20; }
