/**
 * C4mulo5 – Body-Zones-Selector Section
 *
 * Zwei Silhouetten nebeneinander: Vorderseite + Rückseite.
 * Die Rückseite ist per transform: scaleX(-1) gespiegelt, damit man
 * dasselbe Silhouetten-Bild nutzen kann und die Rückseite als solche
 * erkennbar wird (Richtung gedreht).
 *
 * Ansichts-Varianten über Klassen am Wrapper:
 *   .c4m5-bodyzones-view--both  → beide Seiten nebeneinander (Default)
 *   .c4m5-bodyzones-view--front → nur Vorderseite
 *   .c4m5-bodyzones-view--back  → nur Rückseite
 */

/* ═══ ::BEFORE / ::AFTER RESET ═══════════════════════════════════ */
.c4mulo5-body-zones .c4m5-bz-wrap::before,
.c4mulo5-body-zones .c4m5-bz-wrap::after,
.c4mulo5-body-zones .c4m5-bz-side::before,
.c4mulo5-body-zones .c4m5-bz-side::after,
.c4mulo5-body-zones .c4m5-bz-stage::before,
.c4mulo5-body-zones .c4m5-bz-stage::after,
.c4mulo5-body-zones .c4m5-bz-clip::before,
.c4mulo5-body-zones .c4m5-bz-clip::after {
    display: none !important;
    content: none !important;
}

/* ═══ WRAPPER mit beiden Seiten nebeneinander ═══════════════════ */
.c4mulo5-body-zones .c4m5-bz-wrap {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 60px;
    padding: 20px 0;
    flex-wrap: wrap;
}

/* Eine Seite (Container für Label + Silhouette) */
.c4mulo5-body-zones .c4m5-bz-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

/* Label über der Silhouette */
.c4mulo5-body-zones .c4m5-bz-side-label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #c8a84b;
}

/* ═══ ANSICHTS-VARIANTEN ═════════════════════════════════════════ */
/* Default: beide Seiten zeigen (c4m5-bodyzones-view--both) */

/* Nur Vorderseite */
.c4m5-bodyzones-view--front .c4m5-bz-side--back {
    display: none;
}

/* Nur Rückseite */
.c4m5-bodyzones-view--back .c4m5-bz-side--front {
    display: none;
}

/* ═══ STAGE + SILHOUETTE ═══════════════════════════════════════ */
.c4mulo5-body-zones .c4m5-bz-stage {
    position: relative;
    width: var(--c4m5-sil-w, 300px);
    max-width: 100%;
}

.c4mulo5-body-zones .c4m5-bz-clip {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 5;
    overflow: hidden;
}

.c4mulo5-body-zones .c4m5-bz-img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center center !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Rückseite: Bild horizontal spiegeln */
.c4mulo5-body-zones .c4m5-bz-stage--back .c4m5-bz-img {
    transform: scaleX(-1);
}

/* Clip-path je nach Geschlecht */
.c4m5-bodyzones--female .c4m5-bz-img {
    clip-path: url(#c4m5-silhouette-female-clip);
    -webkit-clip-path: url(#c4m5-silhouette-female-clip);
}
.c4m5-bodyzones--male .c4m5-bz-img {
    clip-path: url(#c4m5-silhouette-male-clip);
    -webkit-clip-path: url(#c4m5-silhouette-male-clip);
}

/* ═══ ZONEN-HOTSPOTS ═════════════════════════════════════════════ */
.c4mulo5-body-zones .c4m5-bz-zone {
    position: absolute;
    left: var(--zone-x, 50%);
    top: var(--zone-y, 50%);
    transform: translate(-50%, -50%);
    z-index: 3;

    width: 28px;
    height: 28px;
    padding: 0;
    margin: 0;
    border-radius: 50%;
    background: rgba(200, 168, 75, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 4px rgba(200, 168, 75, 0.25);

    font-size: 0;
    color: transparent;

    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: c4m5-bz-pulse 2s ease-in-out infinite;
}

.c4mulo5-body-zones .c4m5-bz-zone::before {
    content: "+";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

.c4mulo5-body-zones .c4m5-bz-zone:hover,
.c4mulo5-body-zones .c4m5-bz-zone:focus {
    transform: translate(-50%, -50%) scale(1.2);
    box-shadow: 0 0 0 6px rgba(200, 168, 75, 0.35);
    outline: none;
}

.c4mulo5-body-zones .c4m5-bz-zone.is-active {
    background: #1d2327;
    border-color: #c8a84b;
    animation: none;
}

@keyframes c4m5-bz-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(200, 168, 75, 0.25); }
    50%      { box-shadow: 0 0 0 10px rgba(200, 168, 75, 0.1); }
}

/* Geschlechter-Filter */
.c4m5-bodyzones--female .c4m5-bz-zone[data-gender="male"] { display: none; }
.c4m5-bodyzones--male   .c4m5-bz-zone[data-gender="female"] { display: none; }

/* ═══ INFO-OVERLAY (als Modal im Viewport zentriert) ═══════════ */
.c4mulo5-body-zones .c4m5-bz-overlay {
    position: fixed;
    left: 50%;
    bottom: 33vh; /* ca. 1/3 vom unteren Rand, um nicht von Sticky-Elementen verdeckt zu werden */
    width: min(460px, calc(100% - 40px));
    z-index: 99990;
    padding: 20px 24px;
    background: rgba(29, 35, 39, 0.97);
    color: #fff;
    border-radius: 10px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
    box-sizing: border-box;

    transform: translate(-50%, 20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.c4mulo5-body-zones .c4m5-bz-overlay.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
}

.c4mulo5-body-zones .c4m5-bz-overlay-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.c4mulo5-body-zones .c4m5-bz-overlay-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.c4mulo5-body-zones .c4m5-bz-overlay-title {
    margin: 0 0 8px;
    color: #c8a84b;
    font-size: 1.1rem;
    font-weight: 700;
    padding-right: 28px;
}

.c4mulo5-body-zones .c4m5-bz-overlay-text {
    margin: 0 0 14px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    line-height: 1.5;
}

.c4mulo5-body-zones .c4m5-bz-overlay-cta,
.c4mulo5-body-zones .c4m5-bz-overlay-cta:link,
.c4mulo5-body-zones .c4m5-bz-overlay-cta:visited {
    display: inline-block;
    padding: 10px 22px;
    background: #c8a84b !important; /* dunkelgelb / gold */
    color: #1d2327 !important;
    border: 2px solid #c8a84b !important;
    border-radius: 999px !important; /* komplett rund / Pill-Form */
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none !important;
    text-transform: none;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 8px rgba(200, 168, 75, 0.3);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.c4mulo5-body-zones .c4m5-bz-overlay-cta:hover,
.c4mulo5-body-zones .c4m5-bz-overlay-cta:focus {
    background: #b89640 !important;
    border-color: #b89640 !important;
    color: #1d2327 !important;
    transform: translateY(-1px);
    outline: none;
}

/* ═══ RESPONSIVE ══════════════════════════════════════════════════ */
@media (max-width: 760px) {
    .c4mulo5-body-zones .c4m5-bz-wrap {
        gap: 30px;
    }
    .c4mulo5-body-zones .c4m5-bz-stage {
        width: min(var(--c4m5-sil-w, 300px), 240px);
    }
    .c4mulo5-body-zones .c4m5-bz-zone {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 500px) {
    /* Auf kleinen Screens: Vorder- und Rückseite untereinander */
    .c4mulo5-body-zones .c4m5-bz-wrap {
        flex-direction: column;
        gap: 40px;
        align-items: center;
    }
}
