/*
Theme Name:   HBW Theme
Theme URI:    https://hbw-shop.de
Description:  Child-Theme für Hello Elementor
Author:       Gerhard Jager
Template:     hello-elementor
Version:      1.0
Text Domain:  hbw-theme
*/

/* Pfeil nach oben - Scroll to top */
#scrollToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  background: rgba(0, 0, 0, 0.25); /* halbtransparentes Grau */
  border-radius: 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease-in-out, visibility 0.3s;
  z-index: 9999;
}

#scrollToTop svg {
  display: block;
  width: 20px;
  height: 20px;
}

#scrollToTop.show {
  opacity: 1;
  visibility: visible;
}

#scrollToTop:hover {
  background: #ca182e;
}

/* ==========================================================
				A-Z Liste
   ========================================================== */
   .az-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.az-letter {
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: .5rem;
}
.az-column ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.az-column li {
  margin: .25rem 0;
}
.az-column a {
  text-decoration: none;
  color: inherit;
}



/* ==========================================================
				Passendes Zubehör Grid
   ========================================================== */
/* Gesamter Block */
.zubehoer-wrapper {
  margin-top: 0px;
}

/* GRID: 4 Spalten */
.zubehoer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}

/* Responsive */
@media (max-width: 1024px) {
  .zubehoer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .zubehoer-grid { grid-template-columns: 1fr; }
}

/* Einzelnes Produkt */
.zubehoer-item {
  text-align: center;
  background: #f6f6f6;
  border: 1px solid #ebebeb;
  border-radius: 0;
  padding-bottom: 20px;
  /* transition: box-shadow 0.2s ease-in-out; */
}
.zubehoer-item:hover {
  /* box-shadow: 0 2px 8px rgba(0,0,0,0.08); */
}

/* Bild */
.zubehoer-item img {
  width: 100%;
  height: auto;
  display: block;
}

/* Kategorie über Titel */
.zubehoer-category {
  font-size: 0.75em;
  color: #999;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 10px;
}

/* Titel */
.zubehoer-item h3 {
  font-size: 16px;
  margin: 6px 0;
  color: #707070; 
}

/* Preis */
.zubehoer-price {
  font-weight: 600;
  color: #000;
  margin-bottom: 10px;
}

/* Button */
.zubehoer-item .button {
  background: #606060 !important;
  color: #fff !important;
  border-radius: 0px;
  padding: 6px 14px;
  display: inline-block;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9em;
}
.zubehoer-item .button:hover {
  background: #333333 !important;
  color: #fff;
}

/* Überschrift (Divider) */
.zubehoer-wrapper .gjws-elementor-divider {
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 25px;
}

.zubehoer-wrapper .gjws-elementor-divider-separator {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 15px;
  color: var(--e-global-color-text);
  font-weight: 500;
  font-size: 20px;
  text-transform: uppercase;
  flex-direction: row-reverse; /* 🔹 entscheidend: kehrt Reihenfolge um */
}

.zubehoer-wrapper .gjws-elementor-divider-separator::before {
  content: "";
  flex: 1;
  height: 1px;
  background-color: #ccc;
}


/* ==========================================================
					Produktvergleich
   ========================================================== */

:root {
    --gjws-red-dark: #C0172C; /* Primärrot */
    --gjws-red-light: #CA182E; /* helleres Rot für 2. Headerzeile */
}

/* =====================
   1. BUTTONS
   ===================== */
.gjws-compare-add {
    display: inline-block;
    padding: 0.65rem 1rem;
    background-color: transparent;
    color: #fff;
    border-radius: 0;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.15s ease;
}
.gjws-compare-add:hover {
    background-color: transparent;
    transform: translateY(-1px);
}
.gjws-compare-add:active { transform: translateY(0); }

.gjws-compare-add.in-compare,
.gjws-compare-add.in-compare:hover {
    background-color: #c0172c;
    color: #fff;
    cursor: default;
    pointer-events: none;
    border: none;
    font-weight: 700;
}
.gjws-remove-product {
    background: transparent !important;
    border: none;
    padding: 0;
    box-shadow: none !important;
}
.gjws-remove-product:disabled {
    background: transparent !important;
}
/* ZUM VERGLEICH → Standard */
a.gjws-compare-add {
    color: #fff !important;
}

/* IM VERGLEICH → roter Button mit weißem Text */
.gjws-compare-add.in-compare,
span.gjws-compare-add.in-compare {
    color: #ffffff !important;
}

/* =====================
   2. GRUNDLAYOUT TABELLE
   ===================== */
.gjws-compare-wrap {
    font-family: "Open Sans", Helvetica, Arial, sans-serif;
    margin: 30px 0;
}
.gjws-compare-table {
    display: flex;
    flex-direction: column;
    width: 100%;
}
.gjws-compare-row {
    display: grid;
    grid-template-columns: minmax(200px, 240px) repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}
.gjws-compare-body .gjws-compare-row + .gjws-compare-row {
    margin-top: 20px;
}

.gjws-compare-cell {
    background: #f6f6f6;
    padding: 12px 16px;
    line-height: 1.3;
}

/* =====================
   3. LINKSSPALTE (Funktionsnamen)
   ===================== */
.gjws-compare-cell--feature {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 220px;
    font-weight: 600;
    font-size: 12px;
    color: #424242;
    background: #f6f6f6;
    border: none;
}
.gjws-compare-cell--feature button,
.gjws-compare-cell--feature [type=button] {
    all: unset;
    cursor: pointer;
}

/* =====================
   4. HEADER (zweizeilig)
   ===================== */

.gjws-compare-head .gjws-compare-row {
    gap: 20px;
    padding: 0;
}
.gjws-compare-row--head1 { background: none; }
.gjws-compare-row--head2 { background: none; margin-bottom: 20px; }

/* Linke Kopfzellen separat einfärben */
.gjws-compare-row--head1 .gjws-compare-cell--feature {
    background: var(--gjws-red-dark);
    font-weight: 700;
	font-size: 20px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: left;
    text-align: center;
    padding: 12px 16px;
    border: none;
}
.gjws-compare-row--head2 .gjws-compare-cell--feature {
    background: var(--gjws-red-light);
    font-weight: 400;
	font-size: 16px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: left;
    text-align: center;
    padding: 12px 16px;
    border: none;
}

/* Produktspalten – obere Zeile (Titel + Close) */
.gjws-compare-row--head1 .gjws-compare-cell--product {
    background: #747474;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    position: relative;
    text-align: center;
    padding: 12px 16px;
}

/* Entfernen-Button – wie im Original leicht außerhalb platziert */
.gjws-remove-product {
    position: absolute;
    top: -10px;          /* leicht außerhalb platzieren */
    right: -10px;        /* nach rechts überstehen lassen */
    z-index: 10;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

/* Icon-Knopf selbst */
.gjws-remove-product i {
    width: 28px;
    height: 28px;
    font-size: 28px;
    color: #424242;            
    background-color: #fff;    /* weißer Hintergrund */
    border: 2px solid #424242; /* rote Kontur */
    border-radius: 50%;        /* rund */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 4px rgba(0,0,0,0.15); /* leichter Schatten */
    transition: all 0.2s ease;
}

/* Hover-Effekt: leicht dunkler & größer */
.gjws-remove-product button:hover,
.gjws-remove-product:hover,
.gjws-compare-add:hover {
    background-color: transparent !important;
    color: #fff !important;
    transform: scale(1.05);
}

/* Produktspalten – zweite Zeile (Bild + Preis) */
.gjws-compare-row--head2 .gjws-compare-cell--product {
    background: #7A7A7A;
    color: #222;
    display: flex; align-items: center; justify-content: center;
    gap: 15px; padding: 12px 16px;
}
.gjws-product-image { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; }

/* Runder Bild-Container */
.gjws-product-thumb {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    background: #fff; /* optional, sorgt für saubere Kante */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Bild leicht kleiner, damit es perfekt zentriert bleibt */
.gjws-product-thumb .gjws-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.gjws-product-pricebox { display: flex; flex-direction: column; align-items: flex-start; }
.gjws-product-price { 
	font-size: 32px; 
	font-weight: 600;
    letter-spacing: -1px; 
	color: white;
	}
.gjws-product-tax { 
	font-size: 16px; 
	color: #fff; 
	}

/* =====================
   5. WERTEZELLEN
   ===================== */
.gjws-compare-cell--value {
    text-align: center;
}
.gjws-check  { color: #009933; font-size: 18px; font-weight: bold; }
.gjws-cross  { color: #999; font-size: 18px; }

/* ==========================================================
   6. MELDUNG AB DREI PRODUKTEN
   ========================================================== */
.gjws-compare-notice {
  background:#fff3cd;
  color:#664d03;
  border:1px solid #ffe69c;
  padding:8px 12px;
  margin:10px 0 14px;
  border-radius:4px;
  font-size:14px;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */

/* --- Tablet & größere Smartphones: horizontales Scrollen --- */
@media (max-width: 1024px) {

  .gjws-compare-wrap {
    overflow-x: auto;
  }

  .gjws-compare-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }

  .gjws-compare-row {
    display: flex !important;
    flex-wrap: nowrap;
    min-width: 750px;
    gap: 10px;
  }

  .gjws-compare-cell {
    display: block;
    white-space: normal;
    padding: 10px;
  }

  /* linke Feature-Spalte fixiert + Schatten */
  .gjws-compare-cell--feature {
    flex: 0 1 170px;        /* war 0 0 180px → jetzt flexibel */
    min-width: 160px;       /* darf schmaler werden */
    max-width: 180px;       /* bleibt trotzdem lesbar */;
    position: sticky;
    left: 0;
    z-index: 5;
    background: #F6F6F6;
    box-shadow: none;
  }

  /* Produktspalten dynamisch – passen sich der Displaygröße an */
  .gjws-compare-cell--product,
  .gjws-compare-cell--value {
    flex: 1 1 180px;          /* flexibler statt starr */
    min-width: 150px;         /* darf kleiner werden */
    max-width: 220px;         /* aber nicht zu groß */
    text-align: center;
}

  /* Kopfzeilen kompakter */
  .gjws-compare-row--head1 .gjws-compare-cell--feature {
    font-size: 18px;
    padding: 8px 10px;
  }
  .gjws-compare-row--head2 .gjws-compare-cell--feature {
    font-size: 14px;
    padding: 6px 10px;
  }
  .gjws-compare-row--head1 .gjws-compare-cell--product,
  .gjws-compare-row--head2 .gjws-compare-cell--product {
    padding: 6px 10px;
    font-size: 14px;
  }

  /* Produktbilder */
  .gjws-product-thumb {
    width: 70px;
    height: 70px;
  }
  .gjws-product-thumb img,
  .gjws-product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  /* Preise kleiner */
  .gjws-product-price {
    font-size: 24px;
    line-height: 1.1;
  }
  .gjws-product-tax {
    font-size: 13px;
  }

  /* Werte-Zellen */
  .gjws-compare-cell--value {
    font-size: 13px;
    padding: 6px 8px;
    line-height: 1.2;
  }

  /* Feature-Namen */
  .gjws-feature-link {
    font-size: 14px;
    line-height: 1.2;
    cursor: pointer;
  }
  .gjws-compare-table {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;

    padding-bottom: 20px; /* 🔹 Platz zwischen Inhalt und Scrollbar */
    box-sizing: border-box;
  }  
}

/* --- Sehr kleine Smartphones (<480px) --- */
@media (max-width: 480px) {

  /* Kopfzeilen enger */
  .gjws-compare-head .gjws-compare-row {
    gap: 6px;
    padding: 0;
  }

  /* Tabellenzeilen enger zusammen */
  .gjws-compare-body .gjws-compare-row {
    gap: 6px;
    margin-top: 4px;
    padding: 0;
  }

  /* Zellen mit weniger Innenabstand */
  .gjws-compare-cell {
    padding: 4px 6px;
    line-height: 1.2;
  }

  /* Feature-Namen (linke Spalte) kompakter */
  .gjws-compare-cell--feature {
    font-size: 13px;
    padding: 4px 6px;
  }

  /* Werte-Zellen kompakt */
  .gjws-compare-cell--value {
    font-size: 11px;
    line-height: 1.1;
    padding: 6px 6px;
  }

  /* Preis & Steuer kleiner */
  .gjws-product-price {
    font-size: 18px;
    line-height: 1.1;
  }
  .gjws-product-tax {
    font-size: 11px;
  }

  /* Produktbilder richtig skalieren */
  .gjws-product-thumb {
    width: 60px;
    height: 60px;
  }
  .gjws-product-thumb img,
  .gjws-product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  /* Kein extra gap von Eltern */
  .gjws-compare-table,
  .gjws-compare-body {
    gap: 0;
  }

  /* Kleine Labels klickbar lassen */
  .gjws-feature-link,
  .info-icon {
    cursor: pointer;
  }
    /* 1️⃣ Vertikale Zeilen kompakter machen */
  .gjws-compare-body .gjws-compare-row + .gjws-compare-row {
    margin-top: 6px;        /* statt 4px */
  }

  .gjws-compare-cell {
    padding-top: 8px;       /* vertikales Padding reduzieren */
    padding-bottom: 8px;
    line-height: 1.1;       /* dichterer Text */
  }
    /* 3️⃣ Falls Feature-Namen zu viel Höhe erzeugen */
  .gjws-feature-link {
    display: inline-block;
    line-height: 1.2;
    margin: 0;
  }
}


/***********************/
/* Produktdetail-Seite */
/***********************/
span.zzgl_mwst_versand {
  font-size: 12px;
  padding-left: 5px;
  font-style: normal;
}
/* Vorrätig-Anzeige */
/* Gemeinsames Grundlayout */
.stock {
    display: inline-flex;
    align-items: center;
    gap: 6px; /* Abstand zwischen Icon und Text */
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
}

/* Vorrätig */
.stock.in-stock {
    color: #6c6c6c !important; 
}

.stock.in-stock i {
    color: #6c6c6c !important;
    font-size: 16px;
}

/* Nicht vorrätig */
.stock.out-of-stock {
    color: #b53b3b !important; /* freundliches, aber auffälliges Rot */
}

.stock.out-of-stock i {
    color: #b53b3b !important;
    font-size: 16px;
}

/* Optional: etwas Abstand zum Button */
.single_add_to_cart_button + .stock {
    margin-left: 10px;
}

/* Funktionen-Liste */
/* --- Tabellenstruktur --- */

/* ==========================================================
   FUNKTIONSLISTE – im Stil der Vergleichstabelle
   ========================================================== */

.funktionen-tabelle {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto; /* 🔹 linke Spalte breiter */
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-family: inherit;
}

/* Jede Zeile */
.funktion {
  display: contents; /* jede Funktion = eine Grid-Zeile */
}

/* Titel- und Werte-Zellen */
.funktion-title,
.funktion-value {
  padding: 10px 15px;
  font-weight: 500;
  background-color: #fff;
  line-height: 1.3;
}

/* Abwechselnde Hintergründe */
.funktion:nth-child(even) .funktion-title,
.funktion:nth-child(even) .funktion-value {
  background-color: #f9f9f9;
}

/* Linke Spalte */
.funktion-title {
  display: inline-flex;            /* 🔹 inline-flex statt flex – richtet sich am Text aus */
  align-items: center;
  justify-content: flex-start;     /* 🔹 Text & Icon bleiben beieinander */
  gap: 6px;
  color: #222;
  font-weight: 500;
  word-break: normal;
  overflow-wrap: break-word;
  flex: 1 1 auto;                  /* erlaubt flexibles Mitwachsen */
  min-width: 0;
}


/* Rechte Spalte */
.funktion-value {
  text-align: right;
  color: #424242;
  word-break: break-word;       /* erlaubt Umbruch bei langen Wörtern */
  overflow-wrap: anywhere;      /* zusätzliche Umbruchhilfe */
  white-space: normal;          /* erlaubt Umbruch */
  font-weight: 500;
}

/* Nur das Häkchen bleibt ohne Umbruch */
.funktion-value:has(> span.haken),
.funktion-value.haken {
  white-space: nowrap;
}

.funktion-value .haken {
  color: #424242 !important;
  font-size: 14px;
  font-family: Arial, sans-serif !important; /* oder deine Standardschrift */
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
}

/* Info-Icon */
.info-icon {
  color: #9b7956;
  font-size: 16px;
  flex-shrink: 0;
}
.info-icon:hover {
  color: #6c543a;
}

/* Link-Stil wie im Vergleich */
.funktion-link {
  position: relative;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

/* gestrichelte Linie unter dem Text */
.funktion-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background-image: repeating-linear-gradient(
    to right,
    currentColor 0 6px,
    transparent 6px 9px
  );
  opacity: 0.6;
  transition: opacity 0.3s ease, height 0.2s ease, background-image 0.3s ease;
}

/* Hover-Effekt: Linie wird durchgezogen */
.funktion-link:hover::after {
  background-image: linear-gradient(to right, currentColor 0 100%);
  opacity: 1;
  height: 1px;
}

/* Info-Icon – identisch zur Vergleichstabelle */
.info-icon {
  cursor: pointer;
  color: #9b7956;
  font-size: 16px;
  margin-left: 6px;
  flex-shrink: 0;
}
.info-icon:hover {
  color: #6c543a;
}


/* Responsive */
@media (max-width: 768px) {
  .funktionen-tabelle {
    grid-template-columns: minmax(160px, 1fr) auto;
  }

  .funktion-title,
  .funktion-value {
    font-size: 14px;
    padding: 8px 10px;
  }

  .info-icon {
    font-size: 14px;
  }
}


/* --- Popup Styling --- */
/* === POPUP BASIS === */
.funktion-popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.funktion-popup.active {
  display: flex;
}

.funktion-popup .popup-inner {
  background: #fff;
  max-width: 800px;
  width: 90%;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  position: relative;
  padding: 30px;
  animation: fadeIn 0.25s ease;
}

/* === SCHLIESSEN-BUTTON === */
.funktion-popup .popup-close {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 26px;
  color: #777;
  cursor: pointer;
  line-height: 1;
}

.funktion-popup .popup-close:hover {
  color: #000;
}

/* === INHALTS-BEREICH: Bild links, Text rechts === */
.popup-content {
  display: flex;
  align-items: flex-start;
  gap: 30px;
}

.popup-left {
  flex: 0 0 180px;
  border-right: 1px solid #ddd;
  padding-right: 25px;
  text-align: center;
}

.popup-right {
  flex: 1;
}

/* === BILD === */
.popup-image img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

/* === TEXT === */
.popup-title {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.4em;
  color: #333;
  font-weight: 600;
}

.popup-text {
  color: #444;
  font-size: 0.95em;
  line-height: 1.6;
}

/* === MOBILE ANSICHT === */
@media (max-width: 600px) {
  .popup-content {
    flex-direction: column;
  }

  .popup-left {
    border-right: none;
    border-bottom: 1px solid #ddd;
    padding-right: 0;
    padding-bottom: 20px;
    margin-bottom: 20px;
  }
}

/* === ANIMATION === */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

/* Popup mobil optimieren */
@media (max-width: 600px) {
    .popup-inner {
        max-width: 90%;
        padding: 20px;
    }
    .popup-title {
        font-size: 18px;
    }
    .popup-text {
        font-size: 15px;
    }
}
/* ===================================
   Ladeoverlay für Produktvergleich
   =================================== */
.gjws-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity .3s ease;
  opacity: 0;
  pointer-events: none;
}
.gjws-loading-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.gjws-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #ccc;
  border-top-color: #b32025; /* dein Rot */
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.gjws-loading-overlay {
  transition: opacity .4s ease;
}
