/*
Theme Name: Divi Child
Template: Divi
Version: 1.0.0
*/

/* Importiere die CSS-Datei des übergeordneten Divi-Themes */
@import url("../Divi/style.css");

/* Verkleinert die Schriftgröße von Untermenüpunkten im Top-Menü */
#top-menu li li a {
   font-size: 13px !important;
}

/* Setzt die Hintergrundfarbe des Haupt-Headers auf Produktseiten auf einen goldähnlichen Farbton */
.single-product .et_header_style #main-header {
    background-color: #bd9267 !important;
}

/* Setzt die Hintergrundfarbe des oberen Headers (Top-Header) und der Info-Leiste auf Produktseiten */
.single-product #top-header,
.single-product #et-info {
    background-color: #bd9267 !important;
}

/* Stellt sicher, dass die Schriftfarbe in der Info-Leiste weiß ist – für bessere Lesbarkeit */
.single-product #et-info span,
.single-product #et-info a {
    color: white !important;
}

/* Entfernt die Zählerblase bei Produktkategorien (Anzahl der Produkte in Klammern) und stellt sie neutral dar */
.product-category .count,
.product-category .count mark,
.product-category mark.count {
    background: transparent !important;
    color: inherit !important;
    padding: 0 !important;
    font-weight: normal !important;
    font-style: normal !important;
}

/* Gestaltet die Überschriften (h2) der Produktkategorien – zentriert, gleichmäßige Höhe */
.woocommerce .product-category h2 {
    min-height: 3.5em;
    display: flex;
    align-items: flex-end;
    text-align: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
}

/* Verkleinert die Schrift der Zähler (Anzahl Produkte) innerhalb der Kategorieüberschrift */
.woocommerce .product-category h2 .count {
    font-size: 0.85em;
    font-weight: normal;
    opacity: 0.7;
    margin-left: 0.3em;
    display: inline-block;
}

/* Fügt Abstand oberhalb des Gruppierungs-Blocks hinzu (damit er vom Bild absteht) */
.grouped-products-wrapper-under-image {
    clear: both;
    margin-top: 3rem;
}

/* Button-Design für „In den Warenkorb“ – mit Goldton und Hover-Effekt */
.grouped-product-box .button {
    background-color: #e2b165;
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

/* Button Hover-Effekt – dunklerer Goldton beim Überfahren mit der Maus */
.grouped-product-box .button:hover {
    background-color: #c99e4d;
}

/* Mobilansicht optimieren: Produktname einzeilig & responsive */
@media (max-width: 768px) {
  .group_table .product-label {
    max-width: 110px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.95rem;
    display: inline-block;
    vertical-align: middle;
  }

  .group_table .product-label label {
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .group_table td.product-label {
    padding-right: 0;
  }
}

/* 🔧 Kategorie-Anzeige korrigieren: Zentrierung & Styling */
.woocommerce .product-category h2 {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.4;
  margin-top: 0.5em;
}

/* 🟡 Gelben Hintergrund entfernen, kleinere Schrift für Zähler */
.woocommerce .product-category h2 mark {
  background: transparent !important;
  font-size: 0.75em;
  font-weight: normal;
  color: inherit;
  padding: 0;
}

/* Abstand unter dem Beschreibungstext auf Kategorie-Seiten */
.woocommerce .term-description {
  margin-bottom: 2.5em;
}

/* Abstand & Trennlinie oberhalb "Ähnliche Produkte" */
.woocommerce .related {
  margin-top: 4em;
  padding-top: 2em;
  border-top: 1px solid #ccc;
  text-align: center;
}

/* ================================
   Ähnliche Produkte: Optimiert & final
   Datum: 2025-04-06 | CET
   ================================ */

.woocommerce .related ul.products li.product {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  text-align: center;
  padding-bottom: 1.5em;
}

/* Artikeltitel etwas kleiner */
.woocommerce .related ul.products li.product .woocommerce-loop-product__title {
  font-size: 1rem;
  margin-bottom: 0.3em;
}

/* Preis deutlich größer */
.woocommerce .related ul.products li.product .price {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0.3em 0;
}

/* MwSt & Versand kleiner */
.woocommerce .related ul.products li.product .price + * {
  font-size: 0.85rem;
  margin-bottom: 0.2em;
}
.woocommerce .related ul.products li.product .price + * + * {
  font-size: 0.8rem;
}

/* Einheitlicher Warenkorb-Button, zentriert und schmal */
.woocommerce .related .add_to_cart_button {
  width: 220px;
  margin: 0 auto;
  display: block;
  padding: 0.7em 1em;
  font-size: 1rem;
  text-align: center;
  line-height: 1.2em;
  border: 1px solid #bfa074;
  color: #bfa074;
  background: none;
  transition: all 0.3s ease;
  min-height: 44px;
}

/* Hover-Effekt ohne Höhenveränderung */
.woocommerce .related .add_to_cart_button:hover {
  background-color: #bfa074;
  color: #fff;
}

/* Mobil Sidebar oben anzeigen */
/* 📱 Sidebar mobil nach oben schieben – Stand: 2025-04-07 */
@media only screen and (max-width: 980px) {
  #content-area {
    display: flex;
    flex-direction: column;
  }

  #sidebar {
    order: -1; /* Sidebar kommt vor Content */
  }

  #left-area {
    order: 0;
  }
}