html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}
.hide-mouse {
    cursor: none;
}

.body-container {
    margin-top: 2%;
    margin-left: 2%;
    margin-right: 2%;
    vertical-align: central;
}
html {
  position: relative;
  min-height: 100%;
}

body {
    margin-bottom: 60px;
}
footer {
    position: absolute;
    bottom: 0;
    width: contain;
    height: 60px;
    white-space: nowrap;
    line-height: 60px;
}
@keyframes buttonAnimation {
    from {
        font-size: inherit;
    }

    to {
        font-size: larger;
    }
}
ul#Navbar {
    display: flex;
    align-items: center; /* vertikal zentriert */
    justify-content: center; /* horizontal zentriert */
}

    ul#Navbar .nav-button {
        display: flex;
        align-items: center; /* Inhalt vertikal zentrieren */
        justify-content: center; /* Inhalt horizontal zentrieren */
        border-bottom: solid 1px #005284;
        padding: 0 3.0em;
        text-align: center;
    }

 
/* Szene / Perspektive */
.scene {
    perspective: 100000px;
    padding: 40px 0;
}

/* Carousel-Körper */
.carousel3d {
    position: relative;
    margin: 0 auto;
    width: 100%;
    height: 420px;
    transform-style: preserve-3d;
    transition: transform 1s ease;
    touch-action: pan-y;
    will-change: transform;
}

/* Einzelne Zellen */
.carousel__cell {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(320px, 80%);
    height: 240px;
    margin-left: calc( -1 * min(320px, 80%) / 2 );
    margin-top: calc( -1 * 240px / 2 );
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffffff, #e9f4ff);
    border: 1px solid #cfe6ff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    font-size: 3rem;
    color: #005284;
    border-radius: 8px;
    user-select: none;
    transition: opacity 0.5s ease; /* transform-Transition entfernt, damit kein Zoom-Interpolationseffekt entsteht */
    overflow: hidden; /* verhindert, dass Bilder außerhalb der Zelle sichtbar werden */
    box-sizing: border-box;
}

/* Responsive: reduzierter Höhe auf kleinen Bildschirmen */
@media (max-width: 576px) {
    .carousel3d {
        height: 300px;
    }

    .carousel__cell {
        height: 180px;
        font-size: 2rem;
    }
}

/* Fokus- und Hover-Verhalten - KEIN Zoom/Scale/zusätzliche translateZ mehr */
.carousel__cell[aria-hidden="false"] {
    /* KEIN transform setzen — so bleibt die Positionierung durch das inline-Transform (rotateY/translateZ(radius)) unverändert.
       Nur optische Hervorhebung via Schatten / z-index */
    box-shadow: 0 16px 34px rgba(0,0,0,0.18);
    z-index: 2;
}

/* Verhindere Hover/Focus-Zoom auf Carousel-Zellen: keine transform-Änderung */
.carousel__cell:hover,
.carousel__cell:focus,
.carousel__cell:active,
.carousel__cell:focus-visible {
    outline: none;
    /* keine transform-Anweisung hier */
}

/* Bild-Anpassung: komplett sichtbar, keine Beschneidung */
.carousel__cell {
    overflow: hidden; /* sorgt weiterhin dafür, dass nichts außerhalb der Zelle sichtbar wird */
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.carousel-img {
    height: 240px;
    aspect-ratio: auto; /* Seitenverhältnis beibehalten */
    object-fit: contain; /* Bild vollständig zeigen, Seitenverhältnis erhalten */
    display: block;
    transform: none !important;
    transition: none !important;
}

.page-bg {
    /* Reihenfolge: erst Overlay, dann Bild */
    background-image: linear-gradient(rgba(255,255,255,0.5), rgba(255,255,255,0.5)), /* Overlay: alpha anpassen */
    url(../images/Shop_Index.jpg);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}
/* Achtung Barrierefreiheit: Nutzer mit reduziertem Bewegungsempfinden berücksichtigen */
@media (prefers-reduced-motion: reduce) {
  .animate-button {
    animation: none !important;
  }
}

.animate-button {
  transform-origin: center;
  will-change: transform;
  transition: transform 0.8s cubic-bezier(.2,.8,.2,1);
  /* keine Animation standardmäßig */
  animation: none;
}

/* Beim Hover bzw. sichtbarem Fokus dauerhaft skaliert halten */
.animate-button:hover,
.animate-button:focus-visible {
  transform: scale(1.5);
}

/* Nutzer mit reduziertem Bewegungsempfinden respektieren */
@media (prefers-reduced-motion: reduce) {
  .animate-button,
  .animate-button:hover,
  .animate-button:focus-visible {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}

.sceneap {
    perspective: 6000px; /* Extrem hohe Werte wie 100000px flachen den 3D-Effekt fast komplett ab */
    padding: 40px 0;
}

/* Carousel-Körper */
.carousel3dap {
    position: relative;
    width: 90%;
    height: 300px;
    transform-style: preserve-3d;
    transition: transform 1s ease;
    touch-action: pan-y;
}

/* Einzelne Zellen */
.carousel__cellap {
    position: absolute;
    /* Zentrierungsmethode: */
    left: 50%;
    top: 50%;
    width: 80%;
    height: 300px;
    margin-left: calc( -1 * 80% / 2 );
    margin-top: calc( -1 * 300px / 2 );
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffffff, #e9f4ff);
    border: 1px solid #cfe6ff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-radius: 8px;
    box-sizing: border-box;
    overflow: hidden;
    background-color: #fff; /* Rückseite weiß */
    transform-style: preserve-3d;
    -webkit-backface-visibility: hidden;
    backface-visibility: visible;
}

/* Front layer: zeigt das Bild (aus --cell-front), liegt vor der Rückseite */
    .carousel__cellap::before {
        content: "";
        position: absolute;
        inset: 0;
        background-image: var(--cell-front);
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        z-index: 0;
        transform: translateZ(1px); /* leicht vor der Rückseite */
        -webkit-backface-visibility: hidden;
        backface-visibility: visible;
    }

/* Stelle sicher, dass Inhalt über dem Front-Layer liegt */
.carousel__cellap > .row,
.carousel__cellap > * {
  position: relative;
  z-index: 1;
}

/* Responsive Anpassung */
@media {
    .carousel3dap {
        height: 300px;
        width: 95%; /* Etwas breiter auf Handys */
    }

    .carousel__cellap {
        height: 300px;
    }
}

.carousel-imgap {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* Bild vollständig zeigen, Seitenverhältnis erhalten */
    display: block;
    transform: none !important;
    transition: none !important;
}

/* 3D-Szene sicherstellen */
.sceneap {
  perspective: 1200px;
}

/* Zelle: 3D-Stacking aktivieren; Rückseite standardmäßig weiß */
.carousel__cellap {
  position: absolute; /* bereits gesetzt in existierenden Regeln */
  transform-style: preserve-3d;
  background-color: white; /* fallback / Rückseite */
  overflow: hidden;
}

/* Front-Layer: Bild aus CSS-Variable (wird per JS gesetzt) */
.carousel__cellap::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--cell-front);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  transform: translateZ(1px); /* leicht vor der Rückseite */
  backface-visibility: hidden;
  z-index: 2;
}

/* Back-Layer: weiße Rückseite (zeigt, wenn Zelle wegrotiert ist) */
.carousel__cellap::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: white;
  transform: rotateX(180deg) translateZ(0);
  backface-visibility: hidden;
  z-index: 1;
}

/* Inhalt (Text) über den Layern platzieren */
.carousel__cellap > .row,
.carousel__cellap > * {
  position: relative;
  z-index: 3;
}

/* Ergänzungen für aufgussplan Front: Inhalte ein-/ausblenden und Front/Back-Layer */
.carousel__cellap {
    --cell-front: none;
    position: absolute;
    transform-style: preserve-3d;
    background-size: contain;
    background-color: white; /* Rückseite weiß */
    overflow: hidden;
}

/* Front-Layer zeigt Bild (CSS-Variable) */
.carousel__cellap::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--cell-front);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1;
  backface-visibility: hidden;
}

/* Weiße Rückseite (soll sichtbar sein, wenn kein Front-Bild gesetzt) */
.carousel__cellap::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: white;
  z-index: 0;
  backface-visibility: hidden;
}

/* Zell-Inhalt (Text) über den Layern */
.carousel__cellap .cell-content {
  position: relative;
  z-index: 2;
  transition: opacity 250ms ease, visibility 250ms;
  opacity: 1;
  visibility: visible;
}

/* Wenn Zelle nicht aktiv, Inhalt ausblenden */
.carousel__cellap[aria-hidden="true"] .cell-content {
  opacity: 0;
  visibility: hidden;
}