/* Phase 28K: final transparent lettered assets plus a live-text Woo master. */

:root {
    --bhw-dynamic-wood-button: url("../../media/buttons/button-master-dynamisch.png");
    --bhw-wood-button-text: #f8e4b5;
    --bhw-wood-button-focus: #f3c86f;
}

.bhw-image-button--produkte-entdecken { --bhw-image-button: url("../../media/buttons/button-produkte-entdecken.png"); }
.bhw-image-button--rabenhalle-betreten { --bhw-image-button: url("../../media/buttons/button-rabenhalle-betreten.png"); }
.bhw-image-button--shop-ansehen { --bhw-image-button: url("../../media/buttons/button-shop-ansehen.png"); }
.bhw-image-button--zum-shop { --bhw-image-button: url("../../media/buttons/button-zum-shop.png"); }
.bhw-image-button--zur-rabenhalle { --bhw-image-button: url("../../media/buttons/button-zur-rabenhalle.png"); }
.bhw-image-button--kontakt { --bhw-image-button: url("../../media/buttons/button-kontakt.png"); }
.bhw-image-button--zur-startseite { --bhw-image-button: url("../../media/buttons/button-zur-startseite.png"); }
.bhw-image-button--email-schreiben { --bhw-image-button: url("../../media/buttons/button-email-schreiben.png"); }
.bhw-image-button--whatsapp-oeffnen { --bhw-image-button: url("../../media/buttons/button-whatsapp-oeffnen.png"); }
.bhw-image-button--sechs-wege-ansehen { --bhw-image-button: url("../../media/buttons/button-sechs-wege-ansehen.png"); }
.bhw-image-button--pfad-zeigen { --bhw-image-button: url("../../media/buttons/button-pfad-zeigen.png"); }
.bhw-image-button--rune-ziehen { --bhw-image-button: url("../../media/buttons/button-rune-ziehen.png"); }
.bhw-image-button--fest-zeigen { --bhw-image-button: url("../../media/buttons/button-fest-zeigen.png"); }
.bhw-image-button--gestalt-zeigen { --bhw-image-button: url("../../media/buttons/button-gestalt-zeigen.png"); }
.bhw-image-button--zeichen-zeigen { --bhw-image-button: url("../../media/buttons/button-zeichen-zeigen.png"); }
.bhw-image-button--passende-werkstuecke-ansehen { --bhw-image-button: url("../../media/buttons/button-passende-werkstuecke-ansehen.png"); }
.bhw-image-button--zurueck-zur-rabenhalle { --bhw-image-button: url("../../media/buttons/button-zurueck-zur-rabenhalle.png"); }
.bhw-image-button--verstanden-bereich-betreten { --bhw-image-button: url("../../media/buttons/button-verstanden-bereich-betreten.png"); }
.bhw-image-button--hekates-rat-betreten { --bhw-image-button: url("../../media/buttons/button-hekates-rat-betreten.png"); }
.bhw-image-button--frage-an-odin { --bhw-image-button: url("../../media/buttons/button-frage-an-odin.png"); }
.bhw-image-button--frage-senden { --bhw-image-button: url("../../media/buttons/button-frage-senden.png"); }
.bhw-image-button--zurueck-zum-shop { --bhw-image-button: url("../../media/buttons/button-zurueck-zum-shop.png"); }
.bhw-image-button--zurueck-zum-warenkorb { --bhw-image-button: url("../../media/buttons/button-zurueck-zum-warenkorb.png"); }

/* Fixed assets have no fallback slab behind their transparent PNG edge. */
.bhw-image-button {
    position: relative;
    isolation: isolate;
    display: inline-flex !important;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: min(100%, 17.5rem) !important;
    height: 3.75rem !important;
    min-height: 3.75rem !important;
    padding: 0 !important;
    overflow: hidden;
    border: 0 !important;
    border-radius: 1rem !important;
    background-color: transparent !important;
    background-image: var(--bhw-image-button) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
    box-shadow: none !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    text-shadow: none !important;
    filter:
        drop-shadow(0 0.42rem 0.36rem rgba(0, 0, 0, 0.44))
        saturate(0.96)
        brightness(0.97);
    transform: translateZ(0);
    transition:
        transform 440ms cubic-bezier(0.2, 0.8, 0.2, 1),
        filter 440ms ease;
}

.bhw-image-button::before {
    display: none !important;
}

.bhw-image-button::after {
    position: absolute;
    z-index: 1;
    inset: 0.45rem 0.55rem;
    border-radius: 0.85rem;
    background: linear-gradient(
        102deg,
        transparent 0%,
        rgba(255, 211, 136, 0.02) 35%,
        rgba(255, 224, 168, 0.46) 50%,
        rgba(214, 132, 43, 0.04) 65%,
        transparent 100%
    );
    content: "";
    opacity: 0;
    pointer-events: none;
    transform: translateX(-125%) skewX(-12deg);
}

.bhw-image-button:hover {
    background-color: transparent !important;
    box-shadow: none !important;
    color: transparent !important;
    filter:
        drop-shadow(0 0.7rem 0.55rem rgba(0, 0, 0, 0.5))
        drop-shadow(0 0 0.72rem rgba(238, 157, 56, 0.52))
        saturate(1.12)
        brightness(1.1);
    transform: translateY(-3px) scale(1.018);
}

.bhw-image-button:hover::after {
    animation: bhw-awakened-wood-sheen 620ms ease-out 70ms 1 both;
}

.bhw-image-button:focus-visible {
    outline: 3px solid var(--bhw-wood-button-focus) !important;
    outline-offset: 3px;
    box-shadow: none !important;
    filter:
        drop-shadow(0 0 0.84rem rgba(243, 200, 111, 0.62))
        drop-shadow(0 0.7rem 0.55rem rgba(0, 0, 0, 0.48))
        saturate(1.08)
        brightness(1.08);
}

.bhw-image-button:active {
    box-shadow: none !important;
    filter:
        drop-shadow(0 0.2rem 0.24rem rgba(0, 0, 0, 0.44))
        saturate(0.94)
        brightness(0.9);
    transform: translateY(1px) scale(0.992);
}

.bhw-image-button[aria-disabled="true"],
.bhw-image-button:disabled {
    cursor: not-allowed;
    filter: grayscale(0.55) saturate(0.45) brightness(0.66);
    opacity: 0.68;
    transform: none !important;
}

.bhw-image-button[aria-busy="true"]::after,
.bhw-image-button.bhw-button--loading::after {
    display: none;
    animation: none;
}

/* Dynamic commerce controls keep real labels on the matching blank master. */
:is(
    .bhw-dynamic-wood-button,
    .bhw-button:not(.bhw-image-button):not(.bhw-button--ghost):not(.bhw-button--text),
    .wp-element-button,
    .woocommerce a.button,
    .woocommerce button.button,
    .woocommerce input.button,
    .wc-block-components-button
) {
    position: relative;
    isolation: isolate;
    min-height: 3.15rem;
    padding: 0.65rem clamp(1.25rem, 1rem + 0.8vw, 2rem) !important;
    border: 0.72rem solid transparent !important;
    border-radius: 0.85rem !important;
    border-image-source: var(--bhw-dynamic-wood-button) !important;
    border-image-slice: 66 156 66 156 fill !important;
    border-image-width: 0.82rem 2.15rem !important;
    border-image-repeat: stretch !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--bhw-wood-button-text) !important;
    font-family: var(--bhw-font-heading);
    font-size: 1.02rem;
    font-weight: var(--bhw-weight-bold);
    letter-spacing: 0.01em;
    line-height: 1.05;
    text-align: center;
    text-shadow: 0 1px 2px rgba(34, 12, 3, 0.96);
    filter:
        drop-shadow(0 0.38rem 0.34rem rgba(0, 0, 0, 0.4))
        saturate(0.88)
        brightness(0.92);
    transition:
        transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1),
        filter 360ms ease,
        color 240ms ease;
}

:is(
    .bhw-dynamic-wood-button,
    .bhw-button:not(.bhw-image-button):not(.bhw-button--ghost):not(.bhw-button--text),
    .wp-element-button,
    .woocommerce a.button,
    .woocommerce button.button,
    .woocommerce input.button,
    .wc-block-components-button
):hover {
    background: transparent !important;
    box-shadow: none !important;
    color: #fff0c9 !important;
    filter:
        drop-shadow(0 0.62rem 0.5rem rgba(0, 0, 0, 0.47))
        drop-shadow(0 0 0.55rem rgba(229, 145, 48, 0.34))
        saturate(1.04)
        brightness(1.04);
    transform: translateY(-2px);
}

:is(
    .bhw-dynamic-wood-button,
    .bhw-button:not(.bhw-image-button):not(.bhw-button--ghost):not(.bhw-button--text),
    .wp-element-button,
    .woocommerce a.button,
    .woocommerce button.button,
    .woocommerce input.button,
    .wc-block-components-button
):focus-visible {
    outline: 3px solid var(--bhw-wood-button-focus) !important;
    outline-offset: 3px;
    box-shadow: none !important;
    color: #fff1cb !important;
    filter:
        drop-shadow(0 0 0.7rem rgba(243, 200, 111, 0.52))
        drop-shadow(0 0.6rem 0.48rem rgba(0, 0, 0, 0.46))
        saturate(1.06)
        brightness(1.06);
}

:is(
    .bhw-dynamic-wood-button,
    .bhw-button:not(.bhw-image-button):not(.bhw-button--ghost):not(.bhw-button--text),
    .wp-element-button,
    .woocommerce a.button,
    .woocommerce button.button,
    .woocommerce input.button,
    .wc-block-components-button
):active {
    box-shadow: none !important;
    filter: saturate(0.92) brightness(0.86);
    transform: translateY(1px) scale(0.992);
}

:is(
    .bhw-button[aria-disabled="true"],
    .bhw-button:disabled,
    .wp-element-button[aria-disabled="true"],
    .woocommerce .button[aria-disabled="true"],
    .woocommerce button.button:disabled,
    .woocommerce button.button.disabled,
    .woocommerce input.button:disabled,
    .wc-block-components-button:disabled,
    .wc-block-components-button[aria-disabled="true"]
) {
    cursor: not-allowed;
    filter: grayscale(0.5) saturate(0.45) brightness(0.68);
    opacity: 0.66;
    transform: none !important;
}

.bhw-button--loading::before {
    position: static;
    z-index: auto;
    inset: auto;
    width: 1em;
    height: 1em;
    border: var(--bhw-border-strong) solid currentcolor;
    border-inline-end-color: transparent;
    border-radius: 50%;
    background: none;
    opacity: 1;
    transform: none;
    transition: none;
    animation: bhw-spin var(--bhw-motion-slow) linear infinite;
}

@keyframes bhw-awakened-wood-sheen {
    0% {
        opacity: 0;
        transform: translateX(-125%) skewX(-12deg);
    }

    18% {
        opacity: 0.62;
    }

    100% {
        opacity: 0;
        transform: translateX(125%) skewX(-12deg);
    }
}

@media (max-width: 47.99rem) {
    .site-main .bhw-actions .bhw-button.bhw-image-button,
    .site-main .bhw-image-button {
        width: min(100%, 17.5rem) !important;
    }
}

@media (hover: none) {
    .bhw-image-button:hover,
    :is(
        .bhw-dynamic-wood-button,
        .bhw-button:not(.bhw-image-button):not(.bhw-button--ghost):not(.bhw-button--text),
        .wp-element-button,
        .woocommerce a.button,
        .woocommerce button.button,
        .woocommerce input.button,
        .wc-block-components-button
    ):hover {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bhw-image-button,
    :is(
        .bhw-dynamic-wood-button,
        .bhw-button:not(.bhw-image-button):not(.bhw-button--ghost):not(.bhw-button--text),
        .wp-element-button,
        .woocommerce a.button,
        .woocommerce button.button,
        .woocommerce input.button,
        .wc-block-components-button
    ) {
        transition: color 1ms linear, filter 1ms linear;
    }

    .bhw-image-button:hover,
    .bhw-image-button:active,
    :is(
        .bhw-dynamic-wood-button,
        .bhw-button:not(.bhw-image-button):not(.bhw-button--ghost):not(.bhw-button--text),
        .wp-element-button,
        .woocommerce a.button,
        .woocommerce button.button,
        .woocommerce input.button,
        .wc-block-components-button
    ):hover,
    :is(
        .bhw-dynamic-wood-button,
        .bhw-button:not(.bhw-image-button):not(.bhw-button--ghost):not(.bhw-button--text),
        .wp-element-button,
        .woocommerce a.button,
        .woocommerce button.button,
        .woocommerce input.button,
        .wc-block-components-button
    ):active {
        transform: none;
    }

    .bhw-image-button::after {
        display: none;
        animation: none;
    }
}
