﻿/* === Global: Padding in Breite einrechnen & kein horizontales Leaken === */
*, *::before, *::after {
    box-sizing: border-box;
}

/* ===================================== */
html, body {
    margin: 0;
    padding: 0;
    /* overflow-x: hidden;   // falls nötig, aber lieber clip unten nutzen */
}

/* Standard: volle Breite */
.container {
    width: 100%;
    max-width: 760px; /* statt 768px */
    margin: 0 auto;
    position: relative;
    overflow-x: clip; /* Sicherheitszarge */
}

#imgContainer {
    position: relative;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

#myImage {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.image-wrapper {
    position: relative;
    width: 100%;
}

/* + sitzt fixed – Position wird per JS (right/bottom) gesetzt */
#menuBtn {
    position: fixed; /* am Viewport; JS setzt right/bottom */
    z-index: 10000;
    transform: none !important; /* Schutz gegen zentrierende Transforms */
}

/* gemeinsame Basis für Icon-Buttons */
.btnplus, .btnMinus {
    width: 32px; /* ggf. anpassen */
    height: 32px; /* ggf. anpassen */
    padding: 0;
    border: none;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    cursor: pointer;
    line-height: 0;
}

/* Plus im Header */
.btnplus {
    background-image: url('../Buttons/Navigation/Plus.png');
}

/* Minus im Menü (deine Positionierung bleibt) */
.btnMinus {
    position: absolute;
    top: -4px;
    right: 12px;
    z-index: 99999;
    background-image: url('../Buttons/Navigation/Minus.png');
}

    /* optional: Hover/Focus-Feedback */
    .btnplus:hover, .btnMinus:hover {
        opacity: 0.9;
    }

    .btnplus:focus-visible, .btnMinus:focus-visible {
        outline: 2px solid #555;
        outline-offset: 2px;
    }

.menuFl.fixed {
    position: fixed;
    bottom: 0;
    z-index: 9999;
    box-sizing: border-box;
}

/* Diverse */
.disabled {
    pointer-events: none;
}

.info {
    color: black;
    padding-left: 25px;
    padding-right: 25px;
    background: rgb(213, 210, 203);
    font-size: clamp(14px, 2vw, 20px)
}

.infoText1 {
    padding-top: 24px;
    font-size: clamp(14px, 8vw, 42px)
}

.infoText2 {
    font-size: clamp(14px, 2vw, 21px)
}

.ifnoHeader {
    vertical-align: top;
    width: 20%;
    padding-right: 10px;
}

.infoText {
    vertical-align: top;
    width: 80%;
}

.keder-group {
    display: flex;
    align-items: center;
    gap: 0.75rem; /* kleiner Abstand zwischen KEDER und ❌ */
}

/* ======= STAGE / MENÜ ======= */
.stage {
    position: relative;
    width: 100%;
    margin: 0 auto;
    display: block;
    transition: all .3s ease;
    container-type: inline-size;
    max-width: 760px;
    background: rgb(213, 210, 203);
    overflow-x: clip; /* Sicherheitszarge */
    /* Größensteuerung */
    --left-row-h: clamp(26px, 5.2cqw, 48px); /* Höhe je Button */
    --left-gap: 0.65cqw; /* Abstand zwischen Buttons */
    --extra-bottom: 12px; /* Abstand unten unter „Gestell“ */
    /* Fixe Bühnenhöhe = 4 Reihen + 3 Gaps + extra Bottom */
    --row-h: calc(4 * var(--left-row-h) + 3 * var(--left-gap) + var(--extra-bottom));
}

    .stage.fixed {
        position: fixed;
        bottom: 0;
        z-index: 9999;
        box-sizing: border-box;
    }

/* Gesamtmenü */
.menu {
    inset: 0 auto auto 0;
    width: 100%;
    display: grid;
    grid-template-rows: auto var(--row-h); /* header + feste Bühnenhöhe */
    backdrop-filter: blur(2px);
    pointer-events: none;
    overflow-x: clip; /* Sicherheitszarge */
}

/* Kopfzeile – volle Breite, Padding zählt durch border-box mit */
.header {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6cqw;
    /*width: 100%;*/ /* statt 93% (verhindert Überlauf) */
    width: 0;
    padding: 0.6cqw; /* Grundpadding */
    padding-left: 3.3%; /* optionaler Zusatz links */
    text-align: left;
}

    .header button {
        pointer-events: auto;
        width: 100%;
        height: 100%;
        border: none;
        background: transparent;
        font-size: 2.5cqw;
        font-weight: 0;
        cursor: pointer;
        transition: background 0.2s;
        display: flex;
        align-items: center;
        justify-content: flex-start; /* linksbündig statt center */
        gap: 0.5em; /* Abstand bleibt */
        text-align: left; /* Text sicher links */
        letter-spacing: 0.09em;
        color: black;
        padding-right: 0.5em;
        /*padding-left: 0.5em;*/
    }

        .header button img {
            height: 2.4em;
            width: auto;
            display: block;
        }

/* Zweite Zeile */
.row {
    display: grid;
    grid-template-columns: 1fr 4fr;
    /*gap: 0.3cqw;*/ /* das ist der Abstand zum Buttons links*/
    padding: 0 0.6cqw 0; /* ok, zählt durch border-box mit */
    min-height: 0;
}

/* Linke Spalte */
.left {
    display: grid;
    gap: var(--left-gap);
    grid-auto-rows: var(--left-row-h);
    align-content: start;
    min-height: 0;
    padding-bottom: var(--extra-bottom);
}

    .left button:not(#kederOn):not(#kederOff) {
        pointer-events: auto;
        width: 100%;
        height: 100%;
        min-height: 0;
        border: none;
        background: transparent;
        font-size: 2.9cqw;
        font-weight: 600;
        cursor: pointer;
        transition: background 0.2s;
        text-align: left;
        padding-left: 23%;
        letter-spacing: 0.09em;
        color: black;
    }

    .left button.active:not(#kederOn):not(#kederOff) {
        text-decoration: underline;
        text-decoration-thickness: 2px;
        text-underline-offset: 4px;
    }

    /* Häkchen klickbar trotz menu: pointer-events:none */
    .left #kederOn, .left #kederOff {
        pointer-events: auto;
    }


/* Rechte Spalte passt sich an */
.right {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 0.6cqw;
    min-height: 0;
    padding-left: 2%;
    padding-bottom: var(--extra-bottom);
}

.right-top {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    min-height: 0;
}

    .right-top button {
        grid-column: 1 / span 2;
        pointer-events: auto;
        width: 100%;
        height: 100%;
        border: none;
        background: transparent;
        color: black;
        font-size: 2.1cqw;
        font-weight: 600;
        cursor: pointer;
        text-align: left;
        letter-spacing: 0.09em;
    }

/* Unterer Bereich rechts */
.right-bottom {
    display: block; /* wichtig für Flickity-Höhenberechnung */
    font-size: 1.4cqw;
    pointer-events: auto;
    text-align: center;
    min-height: 0;
    overflow: hidden;
    padding: 0.6cqw;
    height: 100%; /* füllt den 1fr-Bereich */
}

/* ---- Carousel / Flickity ---- */
.carousel {
    background: transparent;
    width: 100%;
    height: 100%;
    position: absolute;
    opacity: 0;
    visibility: hidden;
    container-type: inline-size; /* für cqw */
}

    .carousel.active {
        position: relative;
        opacity: 1;
        visibility: visible;
        width: 100%;
        height: 100%;
    }

.carousel-cell {
    display: inline-block; /* Fallback */
    vertical-align: top;
    width: 17.4%;
    margin-right: 4%;
    font-size: clamp(12px, 3cqw, 18px);
    height: 100%;
}

    .carousel-cell img {
        width: 100%;
        object-fit: contain;
        display: block;
    }

    .carousel-cell p {
        text-align: left;
        margin-top: 6px;
    }

    /* statt Outline am ganzen Cell: nur am Bild */
    .carousel-cell.active img {
        outline: 2px solid white;
        outline-offset: -2px;
    }

/* Entfernt letzten rechten Außenabstand im Fallback */
.carousel:after {
    content: "";
    display: block;
    clear: both;
}

/* ===== Responsive Flickity-Pfeile ===== */
/* Pfeile lesen eine CSS-Variable; 50% ist Fallback */
.flickity-prev-next-button {
    position: absolute;
    top: var(--arrow-mid, 50%);
    transform: translateY(-50%); /* Pfeil selbst zentrieren */
    width: clamp(28px, 6cqw, 56px);
    height: clamp(28px, 6cqw, 56px);
    border-radius: 999px;
    background: rgba(0,0,0,0.35);
    color: #fff;
    z-index: 5;
}

    .flickity-prev-next-button.previous {
        left: 0.6rem;
    }

    .flickity-prev-next-button.next {
        right: 0.6rem;
    }

    .flickity-prev-next-button .flickity-button-icon {
        left: 50%;
        top: 50%;
        width: 55%;
        height: 55%;
        transform: translate(-50%, -50%);
    }

/* Tabellen */
table {
    width: 100%;
    border-collapse: collapse;
    background: rgb(213, 210, 203);
}

td {
    padding: 0;
}



/*Nur für Testen*/
/** { outline: 1px solid red; }*/
