/*
 * BubatzBuddy - Kategorieseiten: SEO-Text unter den Produkten (.bb-seo) und Sidebar-Filter.
 * Wird per Snippet "Kategorien: SEO-Text und Filter" nur auf Shop- und Kategorieseiten geladen.
 * Tokens wie pdp.css: Flaechen #F8F8F8, Linien #E5E5E5, Text #333, Sekundaer #666, Gruen #1E4700.
 */

/* ---------- SEO-Text ---------- */
.bb-seo { margin: 64px 0 0; padding-top: 48px; border-top: 1px solid #E5E5E5; color: #333; font-size: 16px; line-height: 1.7; }
.bb-seo h2 { margin: 0 0 16px; font-size: clamp(24px, 2.4vw, 32px); line-height: 1.2; }
.bb-seo h3 { margin: 48px 0 16px; font-size: 20px; line-height: 1.3; }
.bb-seo p { margin: 0 0 16px; }
.bb-seo a { color: #1E4700; text-decoration: underline; text-underline-offset: 2px; }
.bb-seo-intro p { max-width: 760px; font-size: 17px; }

.bb-seo-fakten { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 32px 0; padding: 0; list-style: none; }
.bb-seo-fakten li { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 20px; background: #F8F8F8; border-radius: 8px; }
.bb-seo-fakten svg { margin-bottom: 10px; }
.bb-seo-fakten strong { font-size: 15px; line-height: 1.35; }
.bb-seo-fakten span { color: #666; font-size: 14px; line-height: 1.45; }

.bb-seo-spalten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; margin: 48px 0 0; }
.bb-seo-spalten h3 { margin-top: 0; }

.bb-seo-tabelle { margin: 32px 0; overflow-x: auto; }
.bb-seo-tabelle table { width: 100%; margin: 0; border-collapse: collapse; font-size: 15px; }
.bb-seo-tabelle th { padding: 12px 16px; background: #F8F8F8; font-weight: 600; text-align: left; white-space: nowrap; }
.bb-seo-tabelle td { padding: 12px 16px; border-bottom: 1px solid #E5E5E5; }
.bb-seo-tabelle td:first-child a { font-weight: 600; text-decoration: none; }

.bb-seo-schritte { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 32px; padding: 0; list-style: none; counter-reset: bb-schritt; }
.bb-seo-schritte li { margin: 0; padding: 20px; border: 1px solid #E5E5E5; border-radius: 8px; counter-increment: bb-schritt; }
.bb-seo-schritte li::before { content: counter(bb-schritt); display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-bottom: 12px; border-radius: 50%; background: #1E4700; color: #FFF; font-size: 14px; font-weight: 700; }
.bb-seo-schritte strong { display: block; margin-bottom: 4px; }
.bb-seo-schritte span { display: block; color: #666; font-size: 14px; line-height: 1.5; }

.bb-seo-tipp { margin: 32px 0; padding: 16px 20px; background: #F1F5EE; border-left: 3px solid #1E4700; border-radius: 0 8px 8px 0; }

.bb-seo-faq { max-width: 860px; border-top: 1px solid #E5E5E5; }
.bb-seo-faq details { border-bottom: 1px solid #E5E5E5; }
.bb-seo-faq summary { position: relative; padding: 16px 40px 16px 0; font-weight: 600; cursor: pointer; list-style: none; }
.bb-seo-faq summary::-webkit-details-marker { display: none; }
.bb-seo-faq summary::after { content: ""; position: absolute; top: 50%; right: 6px; width: 8px; height: 8px; border-right: 2px solid #333; border-bottom: 2px solid #333; transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.bb-seo-faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.bb-seo-faq details p { padding-right: 40px; color: #444; }

.bb-seo-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 40px 0 0; }
.bb-seo-links span { margin-right: 4px; font-weight: 600; }
.bb-seo .bb-seo-links a { padding: 6px 14px; border: 1px solid #E5E5E5; border-radius: 999px; color: #333; font-size: 14px; text-decoration: none; }
.bb-seo .bb-seo-links a:hover { border-color: #1E4700; color: #1E4700; }

@media (max-width: 991px) {
	.bb-seo-fakten, .bb-seo-schritte { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	.bb-seo { margin-top: 48px; padding-top: 32px; font-size: 15px; }
	.bb-seo h3 { margin-top: 36px; }
	.bb-seo-intro p { font-size: 16px; }
	.bb-seo-fakten li, .bb-seo-schritte li { padding: 16px; }
	.bb-seo-spalten { grid-template-columns: 1fr; gap: 0; margin-top: 36px; }
	.bb-seo-spalten > div + div { margin-top: 20px; }
	.bb-seo-tabelle table { font-size: 14px; }
	.bb-seo-tabelle th, .bb-seo-tabelle td { padding: 10px 8px; white-space: normal; }
	.bb-seo-faq details p { padding-right: 0; }
}

/* ---------- Sidebar ---------- */
#secondary .widget { margin: 0 0 28px; padding: 0 0 28px; border-bottom: 1px solid #E5E5E5; }
#secondary .widget:last-child { border-bottom: 0; }
#secondary .widget-title { display: block; margin: 0 0 14px; color: #333; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
#secondary .widget ul { margin: 0; padding: 0; list-style: none; }

/* Kategorien: schlanke Liste, aktive Kategorie gruen, Unterkategorien eingerueckt */
#secondary .widget_product_categories li { margin: 0; }
#secondary .widget_product_categories a { display: flex; justify-content: space-between; padding: 6px 0; color: #333; font-size: 15px; text-decoration: none; }
#secondary .widget_product_categories a:hover, #secondary .widget_product_categories .current-cat > a { color: #1E4700; font-weight: 600; }
#secondary .widget_product_categories .children { margin: 0 0 4px 12px; padding-left: 12px; border-left: 1px solid #E5E5E5; }
#secondary .widget_product_categories .children a { font-size: 14px; }

/* Attribut-Filter als Checkboxen */
#secondary .woocommerce-widget-layered-nav-list__item { display: flex; align-items: center; margin: 0; padding-left: 0; }
#secondary .woocommerce-widget-layered-nav-list__item::before, #secondary .woocommerce-widget-layered-nav-list__item::after { display: none; }
#secondary .woocommerce-widget-layered-nav-list__item a { flex: 1; }
#secondary .woocommerce-widget-layered-nav-list__item a { position: relative; display: flex; align-items: center; gap: 10px; padding: 6px 0; color: #333; font-size: 15px; text-decoration: none; }
#secondary .woocommerce-widget-layered-nav-list__item a::before { content: ""; flex: none; width: 18px; height: 18px; border: 1.5px solid #BDBDBD; border-radius: 4px; background: #FFF; transition: border-color .15s, background .15s; }
#secondary .woocommerce-widget-layered-nav-list__item a:hover::before { border-color: #1E4700; }
#secondary .woocommerce-widget-layered-nav-list__item--chosen a::before { border-color: #1E4700; background: #1E4700; box-shadow: inset 0 0 0 3px #FFF; }
#secondary .woocommerce-widget-layered-nav-list__item--chosen a::after { display: none; }
#secondary .woocommerce-widget-layered-nav-list .count { position: static; margin-left: 8px; color: #8C8C8C; font-size: 13px; }

/* Aktive Filter als entfernbare Chips */
#secondary .widget_layered_nav_filters ul { display: flex; flex-wrap: wrap; gap: 6px; }
#secondary .widget_layered_nav_filters li a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: #1E4700; color: #FFF !important; font-size: 13px; text-decoration: none; }
#secondary .widget_layered_nav_filters li a::before { content: "\00D7"; font-size: 15px; line-height: 1; }

/* Preisfilter in Markenfarbe */
#secondary .widget_price_filter .ui-slider .ui-slider-range { background: #1E4700; }
#secondary .widget_price_filter .ui-slider .ui-slider-handle { border: 2px solid #1E4700; background: #FFF; }
#secondary .widget_price_filter .price_slider_amount .button { padding: 6px 14px; border-radius: 4px; background: #333; font-size: 13px; }

/* Kategorien als Menue (Widget "Kategorien" = Menue "Shop Seitenleiste"), gleiche Reihenfolge wie die Hauptnavigation */
#secondary .widget_nav_menu .menu > li { margin: 0 0 6px; }
#secondary .widget_nav_menu .menu > li > a { display: block; padding: 7px 0; color: #333; font-size: 15px; font-weight: 600; text-decoration: none; }
#secondary .widget_nav_menu .sub-menu { margin: 0 0 8px 2px; padding: 0 0 0 14px; border-left: 1px solid #E5E5E5; list-style: none; }
#secondary .widget_nav_menu .sub-menu a { position: relative; display: block; padding: 5px 0; color: #555; font-size: 14px; text-decoration: none; }
#secondary .widget_nav_menu a:hover { color: #1E4700; }
#secondary .widget_nav_menu .current-menu-item > a,
#secondary .widget_nav_menu .current-menu-ancestor > a { color: #1E4700; }
#secondary .widget_nav_menu .sub-menu .current-menu-item > a { font-weight: 600; }
#secondary .widget_nav_menu .sub-menu .current-menu-item > a::before { content: ""; position: absolute; top: 6px; bottom: 6px; left: -15px; width: 2px; background: #1E4700; }

/* Schnellfilter (Chips) ueber den Produkten */
.bb-kat-kopf { margin: 0 0 18px; }
.bb-kat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.bb-kat-chips a { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border: 1px solid #E5E5E5; border-radius: 999px; background: #fff; color: #333; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.bb-kat-chips a:hover { border-color: #333; color: #333; }
.bb-kat-chips a.ist-aktiv { border-color: #333; background: #333; color: #fff; }
@media (max-width: 767px) {
	.bb-kat-chips { flex-wrap: nowrap; overflow-x: auto; margin-right: -15px; padding-right: 15px; scrollbar-width: none; }
	.bb-kat-chips::-webkit-scrollbar { display: none; }
	/* Grosses Kategoriebild am Handy weglassen, damit die Produkte frueher kommen; Beschreibung ohne grauen Kasten, buendig unter der Ueberschrift */
	.woocommerce-products-header img.cg-cat-image { display: none; }
	body header.woocommerce-products-header { background: none; }
	header.woocommerce-products-header .term-description { padding: 0; }
}
