/* ============================================================
   PRODUKTLABELS: NICHT MEHR VERFÜGBAR / NEU
   ============================================================ */

/* Grid: Die Labels liegen wie bisher oben auf der Produktkachel. */
.woocommerce ul.products li.product {
    position: relative;
}

/* Einzelprodukt: Die Labels beziehen sich auf das Hauptbild. */
.woocommerce div.product .woocommerce-product-gallery__image {
    position: relative;
}

/* Gemeinsamer Stack: kein fester Offset, dadurch immer korrekt gestapelt. */
.ew-artwork-labels {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    z-index: 99;
    box-sizing: border-box;
    pointer-events: none;
}

.ew-out-of-stock-label,
.ew-new-label {
    display: block;
    box-sizing: border-box;
    padding: 5px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

/* Oberstes Label in voller Bildbreite (bisherige Optik beibehalten). */
.ew-out-of-stock-label {
    width: 100%;
    background-color: #f79044;
    color: #333;
    text-align: center;
}

/* Manuelles Label, nur so breit wie sein Inhalt, linksbündig darunter. */
.ew-new-label {
    width: auto;
    padding-right: 12px;
    padding-left: 12px;
    background-color: #1e0093;
    color: #fff;
    text-align: left;
}

/* ============================================================
   HOVER-BILDER – klassische WooCommerce-/Divi-Produktlisten
   ============================================================ */

.woocommerce ul.products li.product .ew-hover-image {
    position: relative;
    display: block;
    overflow: hidden;
    margin: 0 0 1em;
}

/* Divi nutzt einen eigenen Thumbnail-Wrapper und einen kleineren Bildabstand. */
.woocommerce ul.products li.product .et_shop_image .ew-hover-image {
    margin-bottom: 9px;
}

.woocommerce ul.products li.product .ew-hover-primary,
.woocommerce ul.products li.product .ew-hover-primary picture {
    display: block;
}

.woocommerce ul.products li.product .ew-hover-primary img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 !important;
}

.woocommerce ul.products li.product .ew-hover-secondary {
    position: absolute;
    inset: 0;
    display: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity 2500ms cubic-bezier(0.23, 1, 0.32, 1);
}

.woocommerce ul.products li.product .ew-hover-secondary picture,
.woocommerce ul.products li.product .ew-hover-secondary img {
    display: block;
    width: 100%;
    height: 100%;
}

.woocommerce ul.products li.product .ew-hover-secondary img {
    max-width: 100%;
    margin: 0 !important;
    padding: 0;
    object-fit: cover;
    opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
    .woocommerce ul.products li.product .ew-hover-secondary {
        display: block;
    }

    .woocommerce ul.products li.product:hover .ew-hover-secondary,
    .woocommerce ul.products li.product a:focus-visible .ew-hover-secondary {
        opacity: 1;
    }

    .woocommerce ul.products li.product .ew-hover-zoom .ew-hover-primary {
        transition: transform 450ms cubic-bezier(0.23, 1, 0.32, 1);
    }

    .woocommerce ul.products li.product:hover .ew-hover-zoom .ew-hover-primary,
    .woocommerce ul.products li.product a:focus-visible .ew-hover-zoom .ew-hover-primary {
        transform: scale(1.03);
    }
}

@media (prefers-reduced-motion: reduce) {
    .woocommerce ul.products li.product .ew-hover-secondary,
    .woocommerce ul.products li.product .ew-hover-zoom .ew-hover-primary {
        transition: none;
    }
    .woocommerce ul.products li.product:hover .ew-hover-zoom .ew-hover-primary,
    .woocommerce ul.products li.product a:focus-visible .ew-hover-zoom .ew-hover-primary {
        transform: none;
    }
}
