/*
Theme Name:   Kadence Child
Theme URI:    https://example.com/kadence-child
Description:  Ein Child Theme für das Kadence-Theme
Author:       Dein Name
Author URI:   https://example.com
Template:     kadence  
Version:      1.0
Text Domain:  kadence-child
*/

/* Hier kannst du zusätzliche Styles hinzufügen */

/* Normfilter, ansicht in spalten */
.wpc-filters-ul-list {
  column-width: 200px; /* Mindestbreite pro Spalte */
  column-gap: 20px;
  list-style: none;
  padding: 0;
}

.wpc-filters-ul-list li {
  break-inside: avoid;
  padding-bottom: 5px;
}

.wpc-term-count-value::before {
  content: " (";
}

.wpc-term-count-value::after {
  content: ")";
}

body .wpc-filter-link {
  color: var(--kadence-accent-color-2);
}

/*Kachelansicht */
/* Gridive responsive */
body.woocommerce ul.products-grid-view {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  gap: 1.0rem !important;
}

/* Wenn nur 1 Produkt angezeigt wird */
body.woocommerce ul.products-grid-view li.product:only-child {
  max-width: 180px;       /* gleiche Breite wie bei mehreren */
  width: 100%;            /* füllt innerhalb max-width */
  justify-self: start;    /* linksbündig im Grid */
}

/*Listenansicht*/
/* Bild verkleinern */
body.woocommerce ul.products-list-view li.product img {

  max-height: 250px;
  width: auto;
  height: auto;
  margin: 0;
}
/*Kurzbeschreinung kleiner*/
body.woocommerce .product-excerpt p {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  line-height: 1.3;
  font-size: 1rem;
}
/*Zeilenabstand kleiner*/
body.woocommerce .grid-cols {
    gap: 1rem !important; /* oder z.B. 0.5rem für sehr engen Abstand */
}
/*Rechts neben Bild abstand */
/*Textcontainer nach rechts schieben */
body.woocommerce ul.products-list-view li.product > *:last-child {
  padding-left: 1.5rem !important;
}

/*Second Menü Style wie Hauptmenü (Grüner Strich rechts)*/
/* Graue Linie am rechten Rand */
.widget_nav_menu ul.menu {
  border-right: 2px solid #ccc;
  padding-right: 10px;
  position: relative;
}

/* Menülink-Container */
.widget_nav_menu ul.menu li {
  position: relative;
  padding-right: 12px;
}

/* Der Farbakzent am grauen Strich */
.widget_nav_menu ul.menu li::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0; /* direkt auf dem grauen Strich */
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background-color: transparent;
  transition: background-color 0.3s ease;
  border-radius: 2px;
}

/* Beim Hover oder aktiv */
.widget_nav_menu ul.menu li:hover::after,
.widget_nav_menu ul.menu li.current-menu-item::after,
.widget_nav_menu ul.menu li.current-post-ancestor::after,
.widget_nav_menu ul.menu li.current-product-ancestor::after,
.widget_nav_menu ul.menu li.current-product-cat::after,
.widget_nav_menu ul.menu li.current_page_parent::after {
  background-color: var(--global-palette2, #00aaff); /* Kadence Akzent 2 */
}

/* Katalogansicht: Bilder in ein Quadrat mit Weißem Hintergrund und Padding */
body.woocommerce ul.products li.product img {
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background-color: transparent; /* Kein Hintergrund */
  padding: 10px;
  width: 100%;
  height: auto;
}

/* Gesamte Produkt-Kachel leicht einrahmen */
body.woocommerce ul.products li.product {
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  padding: 1rem;
  background-color: #fff;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Schatten bei Hover mit zweiter Akzentfarbe */
body.woocommerce ul.products li.product:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  border-color: var(--global-palette2, #28a745); /* zweite Akzentfarbe */
}

/* Trennlinie zwischen Bild und Titel */
body.woocommerce ul.products li.product .woocommerce-loop-product__title {
  border-top: 2px solid var(--global-palette2, #28a745); /* Akzentlinie */
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  font-weight: 600;
  font-size: 1rem;
}


/* Einzelproduktseite: Hauptbild im quadratischen Frame */
body.single-product div.product div.images img {
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background-color: #fff; /* Weißer Hintergrund */
  padding: 10px;
  width: 100%;
  height: auto;
  border-radius: 8px; /* optional, für abgerundete Ecken */
  border: 1px solid #e2e2e2; /* leichter Rahmen */
  box-sizing: border-box;
}

/* Vorschaubilder etwas nach unten verschieben */
body.single-product div.product div.images .flex-control-thumbs {
  margin-top: 1rem;
  position: relative;
  z-index: 10;
}

/* Feiner Rahmen um die Galerie-Thumbnails */
body.single-product div.product div.images .flex-control-thumbs li {
  border: 1px solid #e2e2e2;
  border-radius: 4px;
  margin-right: 0.5rem;
  padding: 2px;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

/* Rahmenfarbe bei Hover oder aktivem Thumbnail */
body.single-product div.product div.images .flex-control-thumbs li:hover,
body.single-product div.product div.images .flex-control-thumbs li.selected {
  border-color: var(--global-palette2, #28a745);
}

/*Trennstrich über Related Artikel */
.single-product .related.products {
  border-top: 1px solid #ccc;
  margin-top: 3rem;
  padding-top: 2rem;
}

/*Bei der Produktansicht in den Warenkorb und Preis ausblenden */
body.single-product .variations_button,
body.single-product .woocommerce-variation-price,
body.single-product .woocommerce-variation-description,
body.single-product .woocommerce-variation-availability,
body.single-product .single_add_to_cart_button,
body.single-product .quantity {
  display: none !important;
}

/* Preis & Buttons in allen Shop-Listen ausblenden */
ul.products li.product .price,
ul.products li.product .button {
    display: none !important;
}

/*Kachelansicht mehr platz */
body.woocommerce ul.products li.product {
  padding: 0 !important;; 
}

.woocommerce ul.products li.product .entry-content-wrap {
  padding: 0 !important;;
}


/* Style für Kurzbeschreibung in Gallerieansicht
   Grid-Ansicht (kein .is-list) 
ul.products:not(.is-list) li.product {
  position: relative;
  height: 280px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

ul.products:not(.is-list) li.product .product-info-wrapper {
  position: relative;
  z-index: 10;
  padding: 6px;
  transition: background-color 0.3s ease;
  background-color: transparent;
  border-radius: 4px;
}

ul.products:not(.is-list) li.product:hover .product-info-wrapper {
  background-color: rgba(255, 255, 255, 0.85);
}

ul.products:not(.is-list) li.product:hover .woocommerce-loop-product__title {
  transform: translateY(-50px);
  background-color: rgba(255, 255, 255, 1);
}

ul.products:not(.is-list) li.product:hover .woocommerce-product-details__short-description {
  max-height: 120px;
  opacity: 1;
  margin-top: 2px;
  transform: translateY(-50px);
}

/* Titel 
ul.products:not(.is-list) li.product .woocommerce-loop-product__title {
  margin-bottom: 2px;
  font-size: 1.1rem;
  background: transparent;
  padding: 0;
  transition: transform 0.3s ease;
}

/* Kurzbeschreibung 
ul.products:not(.is-list) li.product .woocommerce-product-details__short-description {
  font-size: 0.85rem;
  color: #444;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin: 0;
  line-height: 1.2;

  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;

  transition: max-height 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

*/
