/* Fox Cars – Fahrzeugbild-Galerie */
.fxg-lightbox [type=button],
.fxg-lightbox [type=submit],
.fxg-lightbox button {

border: 1px solid var(--colorotherlink) !important;
    border-radius: 3px;
    color: var(--colorotherlink) !important;

    }

.fxg-lightbox [type=button]:focus,
.fxg-lightbox [type=button]:hover,
.fxg-lightbox [type=submit]:focus,
.fxg-lightbox [type=submit]:hover,
.fxg-lightbox button:focus,
.fxg-lightbox button:hover {
    background-color: var(--colorotherlink) !important;
    color: #fff !important;
    text-decoration: none;
}
/* ---------- Grundgerüst (beide Modi) ---------- */
.foxcarimgdiv.fxg-ready .foxmainimgcontainer {
  position: relative;
}

.foxcarimgdiv.fxg-ready .slidescarcontainermain {
  position: relative;
  width: 100%;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: var(--fxg-ratio, 4 / 3);
  overflow: hidden;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.foxcarimgdiv.fxg-ready .slidescarcontainermain::-webkit-scrollbar { display: none; }

/* Track (#slidescarcontainer) – keine Transform-Animation mehr, Scroll-Position übernimmt */
.foxcarimgdiv.fxg-ready .slidescarcontainermain > * {
  display: flex;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  transform: none !important;
  transition: none !important;
}

.foxcarimgdiv.fxg-ready .slidecarone {
  flex: 0 0 100%;
  width: 100% !important;
  height: 100% !important;
  background-size: contain;      /* "cover" = Bild füllt komplett, wird ggf. beschnitten */
  background-position: center;
  background-repeat: no-repeat;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.foxcarimgdiv.fxg-ready .fxg-disabled {
  visibility: hidden;
  pointer-events: none;
}
.foxcarimgdiv.fxg-single .foxmainimgcontbutleft,
.foxcarimgdiv.fxg-single .foxmainimgcontbutright {
  display: none !important;
}

/* Thumbnail-Leiste – wie früher: Leiste wird per transform verschoben, Überstand abgeschnitten */
.foxcarimgdiv.fxg-ready .foxcarimgslider {
  position: relative;
  overflow: hidden;
}
.foxcarimgdiv.fxg-ready .foxcarimgslidercontainer {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  margin-left: 0 !important;
  transition: transform .25s ease;
  will-change: transform;
}
.foxcarimgdiv.fxg-ready .sliderimgfox {
  flex: 0 0 auto;
  position: relative;
  cursor: pointer;
}
/* kleine Pfeile über den Thumbnails halten */
.foxcarimgdiv.fxg-ready .foxcarimgslider > .foxmainimgcontbutleft,
.foxcarimgdiv.fxg-ready .foxcarimgslider > .foxmainimgcontbutright {
  z-index: 2;
  cursor: pointer;
}
@media (prefers-reduced-motion: reduce) {
  .foxcarimgdiv.fxg-ready .foxcarimgslidercontainer { transition: none; }
}

/* Zoom-Button & Zähler */
.foxcarimgdiv .fxg-zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.foxcarimgdiv .fxg-zoom:hover { background: rgba(0, 0, 0, .8); }

.foxcarimgdiv .fxg-counter {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  padding: 3px 9px;
  border-radius: 12px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 13px;
  line-height: 1.4;
  pointer-events: none;
}

/* ---------- DESKTOP: Pfeile, Thumbnails, Zoom ---------- */
.foxcarimgdiv.fxg-desktop .slidescarcontainermain { cursor: zoom-in; }
.foxcarimgdiv.fxg-desktop .fxg-counter { display: none; }

.foxcarimgdiv.fxg-desktop .foxmainimgcontainer > .foxmainimgcontbutleft,
.foxcarimgdiv.fxg-desktop .foxmainimgcontainer > .foxmainimgcontbutright {
  z-index: 3;
  cursor: pointer;
  opacity: .55;
  transition: opacity .2s;
}
.foxcarimgdiv.fxg-desktop .foxmainimgcontainer:hover > .foxmainimgcontbutleft,
.foxcarimgdiv.fxg-desktop .foxmainimgcontainer:hover > .foxmainimgcontbutright,
.foxcarimgdiv.fxg-desktop .foxmainimgcontainer > [role="button"]:focus-visible {
  opacity: 1;
}

/* ---------- MOBIL: nur Wischen ---------- */
.foxcarimgdiv.fxg-mobile .slidescarcontainermain {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;   /* vertikales Seiten-Scrollen bleibt möglich */
}
.foxcarimgdiv.fxg-mobile .foxmainimgcontbutleft,
.foxcarimgdiv.fxg-mobile .foxmainimgcontbutright,
.foxcarimgdiv.fxg-mobile .fxg-zoom,
.foxcarimgdiv.fxg-mobile .foxcarimgslider {   /* Zeile entfernen, falls Thumbnails mobil sichtbar bleiben sollen */
  display: none !important;
}

/* ---------- Vollbild ---------- */
html.fxg-lb-open,
html.fxg-lb-open body { overflow: hidden; }

.fxg-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(24, 24, 27, .94);
  user-select: none;
}
.fxg-lightbox[hidden] { display: none; }

/* Bühne = ganzer Bildschirm; Bild in voller Höhe, mittig */
.fxg-lb-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fxg-lb-img {
  display: block;
  flex: 0 0 auto;
  max-width: none !important;
  max-height: none !important;
  transform-origin: 50% 50%;
  transition: opacity .2s;
  -webkit-user-drag: none;
  touch-action: none;
  will-change: transform;
}
.fxg-lightbox.fxg-animate .fxg-lb-img { transition: transform .25s ease, opacity .2s; }
.fxg-lightbox.fxg-zoomed .fxg-lb-img { cursor: grab; }
.fxg-lightbox.fxg-dragging .fxg-lb-img { cursor: grabbing; transition: none; }
.fxg-lightbox.fxg-loading .fxg-lb-img { opacity: .3; }

/* Zähler oben links */
.fxg-lb-counter {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  padding: 10px 14px;
  color: #fff;
  font: 13px/1 system-ui, sans-serif;
  background: rgba(30, 30, 30, .6);
}

/* Werkzeugleiste oben rechts:  −  +  × */
.fxg-lb-toolbar {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  display: flex;
}
.fxg-lb-btn,
.fxg-lb-nav {
  border: 0;
  margin: 0;
  padding: 0;
  color: #ccc;
  background: rgba(30, 30, 30, .6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s, background .15s, opacity .15s;
}
.fxg-lb-btn { width: 44px; height: 44px; }
.fxg-lb-btn svg,
.fxg-lb-nav svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.fxg-lb-btn:hover,
.fxg-lb-nav:hover { color: #fff; background: rgba(30, 30, 30, .9); }
.fxg-lb-btn:disabled { opacity: .35; cursor: default; color: #ccc; background: rgba(30, 30, 30, .6); }

/* Pfeile links / rechts am Rand */
.fxg-lb-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 40px;
  height: 40px;
  transform: translateY(-50%);
}
.fxg-lb-prev { left: 0; }
.fxg-lb-next { right: 0; }
.fxg-lb-nav:disabled { opacity: 0; pointer-events: none; }

.fxg-lightbox button:focus-visible,
.foxcarimgdiv .fxg-zoom:focus-visible,
.foxcarimgdiv [role="button"]:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -2px;
}

@media (prefers-reduced-motion: reduce) {
  .fxg-lightbox.fxg-animate .fxg-lb-img { transition: none; }
}
