/*
Theme Name: DiviFS
Theme URI:
Description: Child Theme fuer Divi 5
Author:
Author URI:
Template: Divi
Version: 1.0.1
*/

/* ===================================================== */
/* Eigene CSS-Anpassungen ab hier eintragen              */
/* ===================================================== */
/* ===================================================================
   FLYSURFER  Produktkachel mit Hover-Overlay
   Der Präfix ".et-db #et-boc .et-l" entspricht Divis eigenem Kontext
   und hebt die Spezifität über dessen generierte Regeln  dadurch
   greift es auch, solange die alten Modul-Einstellungen noch gesetzt
   sind.
   =================================================================== */


/* --- 1. Container ------------------------------------------------ */
/* Höhe kommt aus dem Seitenverhältnis, nicht aus dem Inhalt. Wichtig,
   weil beide Bilder absolut positioniert sind und der Container sonst
   auf 0 zusammenfällt.                                              */

.et-db #et-boc .et-l .et_pb_group:has(> .product-main-image),
.et-db #et-boc .et-l .fs-product-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}


/* --- 2. Beide Bilder deckungsgleich ------------------------------ */

.et-db #et-boc .et-l .et_pb_group:has(> .product-main-image) > .et_pb_image,
.et-db #et-boc .et-l .fs-product-tile > .et_pb_image {
  position: absolute !important;
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 490px;
  margin: 0;
}

.et-db #et-boc .et-l .et_pb_group:has(> .product-main-image) > .et_pb_image img,
.et-db #et-boc .et-l .fs-product-tile > .et_pb_image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  min-width: 0;
  min-height: 0;
}


/* --- 3. Ebenenreihenfolge ---------------------------------------- */
/* Explizit gesetzt, damit das Overlay nicht von der Quellreihenfolge
   abhängt, falls die Module im Template mal getauscht werden.       */

.et-db #et-boc .et-l .et_pb_group:has(> .product-main-image) > .product-main-image,
.et-db #et-boc .et-l .fs-product-tile > .product-main-image {
  z-index: 1;
  filter: blur(0);
  transition: filter .2s ease;
}


/* --- 4. Overlay --------------------------------------------------- */
/* Angesprochen als "das Image-Modul, das nicht das Produktbild ist" 
   und zusätzlich über die optionale Klasse.                          */

.et-db #et-boc .et-l .et_pb_group:has(> .product-main-image) > .et_pb_image:not(.product-main-image),
.et-db #et-boc .et-l .fs-product-tile > .fs-product-overlay {
  z-index: 2;
  opacity: 0 !important;
  filter: contrast(1.5);
  transition: opacity .2s ease-in-out;
  pointer-events: none;   /* Klicks gehen an den Produktlink durch */
}


/* --- 5. Hover: die ganze Kachel ist der Auslöser ------------------ */

.et-db #et-boc .et-l .et_pb_group:has(> .product-main-image):hover > .product-main-image,
.et-db #et-boc .et-l .fs-product-tile:hover > .product-main-image {
  filter: blur(3px);
}

.et-db #et-boc .et-l .et_pb_group:has(> .product-main-image):hover > .et_pb_image:not(.product-main-image),
.et-db #et-boc .et-l .fs-product-tile:hover > .fs-product-overlay {
  opacity: .8 !important;
}


/* --- 6. Touch-Geräte ---------------------------------------------- */
/* Ohne Mauszeiger gibt es keinen verlässlichen Hover-Zustand. Overlay
   dauerhaft aus, damit es nicht durch einen hängengebliebenen :hover
   sichtbar bleibt. Block entfernen, wenn das Overlay auf Touch
   stattdessen permanent zu sehen sein soll.                         */

@media (hover: none) {
  .et-db #et-boc .et-l .et_pb_group:has(> .product-main-image) > .et_pb_image:not(.product-main-image),
  .et-db #et-boc .et-l .fs-product-tile > .fs-product-overlay {
    opacity: 0 !important;
  }
  .et-db #et-boc .et-l .et_pb_group:has(> .product-main-image):hover > .product-main-image,
  .et-db #et-boc .et-l .fs-product-tile:hover > .product-main-image {
    filter: blur(0);
  }
}


/* ===================================================================

.et-db #et-boc .et-l .et_pb_column:has(.product-main-image2) {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 980px) {
  .et-db #et-boc .et-l .et_pb_column:has(.product-main-image2) {
    grid-template-columns: 1fr;
  }
}
*/
/* Untertext Bars + Boards  .et_pb_text_inner und der Absatz darin */

.et-db #et-boc .et-l .fs_barsboards_lower_text .et_pb_text_inner,
.et-db #et-boc .et-l .fs_barsboards_lower_text .et_pb_text_inner p {
  color: rgb(37, 55, 70);
  cursor: pointer;
  display: block;
  font-family: "DIN Next LT Pro Condensed", "DIN Next LT Pro",
               "Arial Narrow", Arial, sans-serif;
  font-size: 20px;
  font-weight: 300;
  height: 24px;
  line-height: 24px;
  margin: 0;
  padding: 0;
  outline: 0 none rgb(37, 55, 70);
  overflow-wrap: break-word;
  text-align: justify;
  vertical-align: baseline;
}

/* Bars + Boards  Kachel ohne Overlay */

.et-db #et-boc .et-l .et_pb_group:has(> .product-main-image2) {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.et-db #et-boc .et-l .et_pb_group:has(> .product-main-image2) > .product-main-image2 {
  position: absolute !important;
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 490px;
  margin: 0;
  filter: blur(0) !important;
}

.et-db #et-boc .et-l .et_pb_group:has(> .product-main-image2) > .product-main-image2 img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  min-width: 0;
  min-height: 0;
  transform: scale(1);
  transition: transform .3s ease;
}

.et-db #et-boc .et-l .et_pb_group:has(> .product-main-image2):hover > .product-main-image2 img {
  transform: scale(1.05);
}

/* Bars + Boards  Textblock unter der Kachel */

/* Die Textgruppe ist die, die den Untertext enthält */
.et-db #et-boc .et-l .et_pb_group:has(> .fs_barsboards_lower_text) {
  --vertical-gap: 0px;
  row-gap: 0px;
}

/* Trennlinie: Farbe und die negativen Abstände */
.et-db #et-boc .et-l .et_pb_group:has(> .fs_barsboards_lower_text) > .et_pb_divider {
  margin-top: -4px;
  margin-bottom: -8px;
}

.et-db #et-boc .et-l .et_pb_group:has(> .fs_barsboards_lower_text) > .et_pb_divider::before {
  border-top: 1px solid rgb(37, 55, 70);
}

/* Wrapper-Farbe absichern  auf zwei Kacheln steht sie auf Weiß */
.et-db #et-boc .et-l .fs_barsboards_lower_text,
.et-db #et-boc .et-l .fs_barsboards_lower_text .et_pb_text_inner {
  color: rgb(37, 55, 70);
}
