/* =========================================== */
/*           BILDERGALERIE – STYLES            */
/* =========================================== */

/* === ALLGEMEIN === */
body {
  font-family: Arial, sans-serif;
  background: #f4f4f4;
  color: #333;
  margin: 0;
  padding: 0px;
}

h1 {
  text-align: center;
  color: #333;
  margin-bottom: 10px;
}

.loading {
  text-align: center;
  margin: 20px 0;
  font-style: italic;
  color: #333;
}

/* === GALERIE – 4 PRO ZEILE === */
.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  padding: 10px;
  margin: 0 auto;
  max-width: calc(5 * (200px + 15px));
}

/* === JEDER GALLERY-EINTRAUM === */
.gallery-item {
  width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

/* === VORSCHAUBILDER === */
.thumbnail {
  width: 200px;
  height: 150px;
  object-fit: cover;
  border: 3px solid white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.thumbnail:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* === TITEL UNTER DEM BILD === */
.preview-title {
  margin-top: 8px;
  font-size: 0.95em;
  color: #333;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* === HOVER-VORSCHAU – OBEN RECHTS MIT ABSTAND === */
.hover-preview {
  position: fixed !important;
  right: 20px !important;
  top: 80px !important;
  width: 800px !important;
  max-height: calc(100vh - 385px) !important; /* 80px oben + 305px unten frei */
  min-height: 100px !important;
  border-radius: 12px !important;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.9) !important;
  border: 6px solid white !important;
  object-fit: contain !important;
  background: #000000 !important;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease !important;
  pointer-events: none !important;
  z-index: 99999 !important;
  isolation: isolate !important;
}

/* === MOBILE: KEINE HOVER-VORSCHAU AUF TOUCH-GERÄTEN === */
@media (any-hover: none),
       (max-width: 860px) {
  .hover-preview {
    display: none !important;
  }
}

/* =========================================== */
/*        SHOW-ANSICHT (galerie_show.html)     */
/* =========================================== */

/* === HINTERGRUND DER SHOW-ANSICHT === */
body.show-bg {
  background: #E8E8E8 !important;
  margin: 0 !important;
  padding: 20px !important;
  min-height: 100vh !important;
  color: white !important;
  font-family: Arial, sans-serif !important;
  overflow-y: auto !important;
  display: flex !important;
  justify-content: center !important;
  align-items: flex-start !important;
}

/* === HAUPTINHALT MIT SCHATTEN === */
.lightbox-content {
  text-align: center !important;
  width: 100% !important;
  max-width: 1200px !important;
  margin: 60px auto 20px !important;
  padding: 20px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border-radius: 12px !important;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5) !important;
  position: relative !important;
  z-index: 1 !important;
}

/* === GROßES BILD IN DER SHOW-ANSICHT === */
#lightbox-img {
  max-width: 95% !important;
  max-height: 60vh !important;
  border-radius: 8px !important;
  margin: 15px auto !important;
  display: block !important;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2) !important;
}

/* === TITEL IN DER SHOW-ANSICHT === */
#lightbox-title {
  color: white !important;
  font-size: 1.6em !important;
  font-weight: bold !important;
  text-align: center !important;
  max-width: 90% !important;
  margin: 15px auto 10px !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6) !important;
}

/* === BILDCOUNTER === */
.counter {
  color: rgba(0, 0, 0, 0.9) !important;
  font-size: 1.1em !important;
  margin-bottom: 5px !important;
  font-weight: bold !important;
}

/* === BESCHREIBUNG === */
#lightbox-caption {
  text-align: left !important;
  font-size: 12px !important;
  color: rgb(0, 0, 0) !important;
  line-height: 1.6 !important;
  margin: 10px 0 10px 5% !important;
  max-width: 90% !important;
  padding: 12px !important;
  background: rgba(240, 248, 255, 0.5) !important;
  border-left: 3px solid rgba(163, 17, 56, 1) !important;
  border-radius: 6px !important;
  white-space: pre-line !important;
  display: block !important;
}

/* === NEU: KAUF-BUTTON ("Zum Kauf") === */
.buy-button {
  display: inline-block !important;
  margin: 15px 0 !important;
  padding: 10px 20px !important;
  background: #a31138 !important;
  color: white !important;
  font-weight: bold !important;
  font-size: 14px !important;
  border-radius: 6px !important;
  text-decoration: none !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
  transition: all 0.2s ease !important;
}

.buy-button:hover {
  background: #c01442 !important;
  transform: translateY(-2px) !important;
}

/* === NEU: BILDPARAMETER-FELD === */
.field-parameter {
  text-align: left !important;
  font-size: 12px !important;
  color: #333 !important;
  margin: 10px 0 10px 5% !important;
  max-width: 90% !important;
  padding: 10px 12px !important;
  background: rgba(200, 200, 200, 0.2) !important;
  border-left: 3px solid #666 !important;
  border-radius: 6px !important;
  white-space: pre-line !important;
  line-height: 1.5 !important;
}

/* === THUMBNAILS-ZEILE === */
.thumbnails-container {
  width: 100% !important;
  max-width: 100% !important;
  margin: 15px auto !important;
  padding: 10px 0 !important;
  overflow-x: auto !important;
  white-space: nowrap !important;
  text-align: center !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border-radius: 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* === THUMBNAILS-SCROLLLEISTE === */
.thumbnails-container::-webkit-scrollbar {
  height: 6px;
}
.thumbnails-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}
.thumbnails-container::-webkit-scrollbar-thumb {
  background: white;
  border-radius: 3px;
}

/* === KLEINE THUMBNAILS === */
.thumbnails {
  display: inline-flex !important;
  gap: 12px !important;
  padding: 5px 20px !important;
  justify-content: center !important;
}

.thumb-small {
  width: 70px !important;
  height: 70px !important;
  object-fit: cover !important;
  border: 2px solid rgba(255, 255, 255, 0.6) !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
}

.thumb-small.active {
  border-color: white !important;
  transform: scale(1.1) !important;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6) !important;
}

.thumb-small:hover {
  border-color: white !important;
}

/* === SCHLIEßEN-BUTTON === */
.close-btn {
  position: fixed !important;
  top: 20px !important;
  right: 20px !important;
  width: 50px !important;
  height: 50px !important;
  background: white !important;
  color: #684f55 !important;
  border: 2px solid #684f55 !important;
  border-radius: 50% !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  font-size: 30px !important;
  font-weight: bold !important;
  cursor: pointer !important;
  z-index: 1002 !important;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3) !important;
  transition: all 0.2s ease !important;
}

.close-btn:hover {
  background: #a31138 !important;
  color: white !important;
  transform: scale(1.1) !important;
}

/* === NAVIGATIONSPFEILE === */
.nav-btn {
  position: fixed !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 50px !important;
  height: 50px !important;
  background: rgba(255, 255, 255, 0.9) !important;
  color: #a31138 !important;
  font-size: 36px !important;
  font-weight: bold !important;
  border-radius: 50% !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  cursor: pointer !important;
  z-index: 1003 !important;
  border: 2px solid #684f55 !important;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3) !important;
}

.nav-prev { left: 20px !important; }
.nav-next { right: 20px !important; }

/* Auf Mobil ausblenden */
@media (max-width: 860px) {
  .nav-btn {
    display: none !important;
  }
}

/* === DIASHOW-STEUERUNG === */
.controls {
  display: flex !important;
  justify-content: center !important;
  gap: 10px !important;
  margin: 15px 0 !important;
}

.control-btn {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #a31138 !important;
  border: none !important;
  padding: 8px 15px !important;
  border-radius: 5px !important;
  cursor: pointer !important;
  font-size: 0.95em !important;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.3) !important;
}