/*
		Swiss-Plissees - Kategorie-Startseite Plissee mobil (Block .spm in XO_HTMLinhalt, XO_NO 248)
		Aufbau wie Plissee-Held (.phm), Farben/Schrift Swiss. Nur bis 500px aktiv, Desktop unveraendert.
*/
.spm { display: none; }

@media (max-width: 500px) {
	#text_inhalt {
		--spm-navy: #00226A; --spm-navy2: #0A3290; --spm-rot: #C70707; --spm-linie: #D4DAE8; --spm-flaeche: #EEF1F8;
		--spm-hell: #F6F8FC; --spm-grau: #5C6B8A; --spm-text: #14213D; --spm-gruen: #1E8E3E;
	}
	/* doppelter Seitenabstand (inhalt + artikel_alle + text_inhalt) -> 16px */
	.artikel_alle:has(#spm) { padding-left: 0 !important; padding-right: 0 !important; }
	#text_inhalt:has(#spm) { margin-left: 0 !important; margin-right: 0 !important; }

	#text_inhalt .spm { display: block; }
	.spm { margin: 0 0 8px; font-family: Inter, Arial, sans-serif; color: var(--spm-text); line-height: 1.4; }
	.spm * { box-sizing: border-box; }
	.spm a { color: inherit; text-decoration: none; }
	.spm button { margin: 0; font-family: inherit; }
	.spm img { margin: 0; }

	/* Kopf */
	#text_inhalt:has(#spm) > h1.ueberschrift {
		font-family: Inter, Arial, sans-serif; font-size: 22px !important; line-height: 1.2 !important; font-weight: 800 !important;
		margin: 6px 0 12px !important; padding: 0 !important; text-align: left !important; color: var(--spm-navy);
	}
	#text_inhalt:has(#spm) > .bannerWrapper { display: block; height: auto; margin: 0; }
	#text_inhalt:has(#spm) > .bannerWrapper img { width: 100%; height: auto; display: block; margin: 0; border-radius: 14px; }

	/* bestehende Desktop-Bloecke mobil ausblenden (bleiben im HTML) - ersetzt durch .spm */
	#text_inhalt:has(#spm) > .cardsWrapper,
	#text_inhalt:has(#spm) > .farbuebersicht,
	#text_inhalt:has(#spm) > .beliebte_kategorien,
	#text_inhalt:has(#spm) > .eignunguebersicht,
	#text_inhalt:has(#spm) > h2:has(+ .farbuebersicht),
	#text_inhalt:has(#spm) > h2:has(+ .beliebte_kategorien),
	#text_inhalt:has(#spm) > h2:has(+ .eignunguebersicht) { display: none !important; }

	/* Vorteile */
	.spm-usp { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 12px -16px 0; padding: 0 16px 2px; }
	.spm-usp::-webkit-scrollbar { display: none; }
	.spm-usp > * { flex: none; font-size: 12px; font-weight: 700; color: var(--spm-navy) !important; background: var(--spm-flaeche); border-radius: 14px; padding: 6px 11px; white-space: nowrap; }

	/* Ueberschriften */
	.spm h2.spm-h {
		font-family: Inter, Arial, sans-serif; font-size: 17px !important; font-weight: 800 !important; color: var(--spm-navy);
		margin: 26px 0 4px !important; padding: 0 !important; line-height: 1.25 !important; text-align: left !important;
	}
	.spm-sub { font-size: 13px !important; line-height: 1.4 !important; color: var(--spm-grau); margin: 0 0 10px !important; padding: 0 !important; }

	/* Lichtwirkung */
	.spm-filter { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 6px -16px 0; padding: 0 16px 2px; }
	.spm-filter::-webkit-scrollbar { display: none; }
	.spm-filter a, .spm-filter button {
		flex: none; display: flex; align-items: center; gap: 6px; min-height: 44px; border-radius: 22px; border: 1px solid var(--spm-linie);
		background: #fff; padding: 0 14px; font: 600 13px/1.1 Inter, Arial, sans-serif; color: var(--spm-text) !important; white-space: nowrap; cursor: pointer;
	}
	.spm-filter button { border-color: var(--spm-navy); background: var(--spm-navy); color: #fff !important; font-weight: 800; }
	.spm-filter button:hover { background: var(--spm-navy2); color: #fff; }
	.spm-filter a span { display: flex; flex-direction: column; align-items: flex-start; }
	.spm-filter small { display: block; font-size: 10px; font-weight: 600; color: var(--spm-grau); margin-top: 2px; }

	/* Hersteller */
	.spm-hint { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
	.spm-hint a { border-radius: 10px; padding: 8px 10px; font-size: 12px; line-height: 1.3; background: var(--spm-hell); border: 1px solid var(--spm-linie); }
	.spm-hint a:first-child { background: #FFF1F1; border-color: #F3C6C6; }
	.spm-hint b { display: block; font-weight: 800; color: var(--spm-navy); }
	.spm-hint span { color: var(--spm-grau); font-weight: 700; }

	.spm-brands { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
	.spm-card { border: 2px solid var(--spm-linie); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; background: #fff; }
	.spm-card.tipp { border-color: var(--spm-rot); }
	.spm-badge { font-size: 10px; font-weight: 800; padding: 5px 8px; text-transform: uppercase; letter-spacing: .05em; text-align: center; background: var(--spm-navy); color: #fff; }
	.spm-card.tipp .spm-badge { background: var(--spm-rot); }
	.spm-logo { display: flex; flex-direction: column; align-items: center; gap: 6px; border-bottom: 1px solid var(--spm-flaeche); padding: 12px 10px 10px; }
	.spm-logo img { max-width: 100%; max-height: 44px; width: auto; height: auto; display: block; }
	.spm-logo span { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; text-align: center; line-height: 1.1; color: var(--spm-navy); }
	.spm-body { padding: 10px 10px 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
	.spm-claim { font-size: 13px; font-weight: 800; line-height: 1.25; }
	.spm-price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
	.spm-price b { font-size: 18px; font-weight: 800; color: var(--spm-rot); }
	.spm-price s { font-size: 12px; color: var(--spm-grau); }
	.spm-list { list-style: none !important; margin: 0 !important; padding: 0 !important; display: flex; flex-direction: column; gap: 5px; font-size: 12px; line-height: 1.35; font-weight: 600; }
	.spm-list li { position: relative; padding-left: 16px; list-style: none !important; margin: 0; }
	.spm-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--spm-gruen); font-weight: 800; }
	.spm-btn {
		display: flex; align-items: center; justify-content: center; min-height: 46px; border-radius: 12px; background: var(--spm-navy);
		color: #fff !important; font-weight: 800; font-size: 14px; margin-top: auto; text-align: center;
	}
	.spm-btn:hover { background: var(--spm-navy2); }
	.spm-btn2 {
		display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 12px; border: 1px solid var(--spm-navy);
		font-weight: 700; font-size: 13px; color: var(--spm-navy) !important; background: #fff;
	}

	.spm-safe { margin-top: 10px; border: 1px solid var(--spm-linie); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.35; }
	.spm-safe div { display: flex; gap: 8px; }
	.spm-safe div::before { content: "✓"; color: var(--spm-gruen); font-weight: 800; }
	.spm-safe a { text-decoration: underline !important; font-weight: 700; color: var(--spm-navy) !important; }

	.spm-more { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
	.spm-more a { border: 1px solid var(--spm-linie); border-radius: 12px; padding: 10px; font-size: 14px; font-weight: 800; min-height: 52px; display: flex; flex-direction: column; justify-content: center; gap: 2px; color: var(--spm-navy) !important; }
	.spm-more a span { font-size: 11px; font-weight: 500; color: var(--spm-grau); }

	/* Beliebte Stoffe */
	.spm-top { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px; scroll-snap-type: x proximity; }
	.spm-top::-webkit-scrollbar { display: none; }
	.spm-top a { flex: none; width: 140px; border: 1px solid var(--spm-linie); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; scroll-snap-align: start; background: #fff; }
	.spm-top i { display: block; position: relative; height: 150px; background: var(--spm-flaeche); }
	.spm-top i img { width: 100%; height: 100%; object-fit: cover; display: block; }
	.spm-top div { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 2px; }
	.spm-top small { font-size: 10px; font-weight: 800; color: var(--spm-grau); text-transform: uppercase; letter-spacing: .05em; }
	.spm-top b { font-size: 13px; line-height: 1.2; color: var(--spm-text); }
	.spm-top em { font-style: normal; font-size: 12px; font-weight: 800; color: var(--spm-rot); }
	.spm-top a.spm-top-alle { align-items: center; justify-content: center; background: var(--spm-flaeche); border-color: var(--spm-flaeche); }
	.spm-top-alle span { font-size: 14px; font-weight: 800; color: var(--spm-navy); text-align: center; line-height: 1.3; }

	/* Fensterform */
	.spm-formen { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
	.spm-formen a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 1px; border: 1px solid var(--spm-linie); border-radius: 12px; font-size: 11px; font-weight: 700; min-height: 80px; text-align: center; line-height: 1.15; hyphens: manual; color: var(--spm-navy) !important; }
	.spm-formen img { width: 34px; height: 34px; display: block; }

	/* Muster */
	.spm-muster { margin-top: 18px; background: var(--spm-navy); color: #fff; border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
	.spm-muster b { font-size: 18px; }
	.spm-muster p { margin: 0 !important; padding: 0 !important; font-size: 14px !important; line-height: 1.45 !important; color: #fff !important; }
	.spm-muster a { min-height: 46px; border-radius: 12px; background: #fff; color: var(--spm-navy) !important; font-weight: 800; display: flex; align-items: center; justify-content: center; }

	/* Farben */
	.spm-farben { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px 6px; }
	.spm-farben a { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--spm-grau) !important; min-height: 44px; }
	.spm-farben img { width: 40px; height: 40px; border-radius: 50%; display: block; }

	/* SEO-Text als Akkordeon (Inhalt bleibt im HTML) */
	#text_inhalt .spm-acc { margin: 0; }
	#text_inhalt .spm-acc > .spm-acc-kopf {
		position: relative; cursor: pointer; padding: 14px 32px 14px 0 !important; margin: 0 !important; border-top: 1px solid var(--spm-linie);
		font-family: Inter, Arial, sans-serif; font-size: 15px !important; line-height: 1.3 !important; font-weight: 700 !important; text-align: left !important; color: var(--spm-navy);
	}
	#text_inhalt .spm-acc > .spm-acc-kopf br { display: none; }
	#text_inhalt .spm-acc > .spm-acc-kopf span { display: inline !important; font-size: inherit !important; font-weight: inherit !important; color: inherit !important; }
	#text_inhalt .spm-acc > .spm-acc-kopf::after { content: "▾"; position: absolute; right: 4px; top: 14px; color: var(--spm-grau); transition: transform .2s; }
	#text_inhalt .spm-acc:not(.offen) > :not(.spm-acc-kopf) { display: none !important; }
	#text_inhalt .spm-acc.offen > .spm-acc-kopf::after { transform: rotate(180deg); }
	#text_inhalt .spm-acc img { max-width: 100%; height: auto; }
	#text_inhalt .spm-acc-ende { border-top: 1px solid var(--spm-linie); margin: 0 0 16px; }

	/* Listing-Leiste + leeres Listing unter dem Ratgeber ausblenden, solange die Startseite angezeigt wird
	   (nach "Alle Filter" -> Anzeigen blendet das Listing #text_inhalt per style="display: none" aus, dann wieder sichtbar) */
	.mainRight:has(#spm):not(:has(#text_inhalt[style*="none"])) > #lhm-toolbar,
	.mainRight:has(#spm):not(:has(#text_inhalt[style*="none"])) > .lhm-count,
	.mainRight:has(#spm):not(:has(#text_inhalt[style*="none"])) > .blockListing { display: none !important; }

	/* Sticky-Leiste ueber der Swiss-Navigation (#layout_mobile_navigation, 64px) */
	.spm-bar {
		position: fixed; left: 8px; right: 8px; bottom: 72px; z-index: 900; margin: 0; border-radius: 16px; box-shadow: 0 4px 18px rgba(0, 34, 106, .18);
		background: rgba(255, 255, 255, .97); border: 1px solid var(--spm-linie); padding: 8px 10px 10px;
		transform: translateY(calc(100% + 90px)); transition: transform .25s;
	}
	.spm-bar.sichtbar { transform: none; }
	.spm-bar p { margin: 0 0 6px !important; padding: 0 !important; font-size: 12px !important; line-height: 1.3 !important; text-align: center; font-weight: 600; color: var(--spm-grau); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.spm-bar div { display: flex; gap: 8px; }
	.spm-bar .spm-btn { flex: 1; margin: 0; }
	.spm-bar .spm-btn2 { padding: 0 14px; }
	html.lhm-filter-offen .spm-bar, html.lhm-sort-offen .spm-bar { display: none; }
}

/* 04.11.2026 Feinschliff Bedienbarkeit: groessere Schrift/Tippflaechen, Silbentrennung in schmalen Karten */
@media (max-width: 500px) {
	.spm-usp > * { display: flex; align-items: center; min-height: 36px; padding: 0 13px; font-size: 13px; border-radius: 18px; }
	.spm-filter small { font-size: 11px; }
	.spm-badge { font-size: 11px; }
	.spm-top small { font-size: 11px; }
	.spm-farben a { font-size: 12px; }
	.spm-formen a { font-size: 12px; }
	.spm-list { font-size: 13px; hyphens: auto; -webkit-hyphens: auto; }
	.spm-claim { hyphens: auto; -webkit-hyphens: auto; }
	.spm-hint a { font-size: 13px; min-height: 48px; }
	.spm-safe a { display: inline-block; padding: 6px 0; margin: -6px 0; }
	.spm-safe { font-size: 14px; }
	.spm-sub { font-size: 14px !important; }
}

/* 05.11.2026 Variante B: Rabatt-Button am Banner, Bestseller direkt darunter */
@media (max-width: 500px) {
	#text_inhalt .spm-weg { display: none !important; }
	html.spm-b #text_inhalt:has(#spm) > a.bannerWrapper { position: relative; display: block; border-radius: 14px; overflow: hidden; box-shadow: 0 2px 10px rgba(0, 34, 106, .15); }
	html.spm-b #text_inhalt:has(#spm) > a.bannerWrapper img { border-radius: 14px 14px 0 0; }
	.spm-banner-cta {
		display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 10px;
		background: #C70707; color: #fff; padding: 10px 14px; min-height: 52px; font-family: Inter, Arial, sans-serif; text-decoration: none;
	}
	.spm-banner-cta b { font-size: 17px; font-weight: 800; line-height: 1.15; color: #fff; }
	.spm-banner-cta span { grid-column: 1; font-size: 13px; font-weight: 500; opacity: .95; color: #fff; }
	.spm-banner-cta i { grid-row: 1 / span 2; grid-column: 2; font-style: normal; font-size: 30px; line-height: 1; color: #fff; }

	html.spm-b .spm-best-box h2.spm-h-best { margin-top: 18px !important; }
	.spm-best { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 4px; scroll-snap-type: x proximity; }
	.spm-best::-webkit-scrollbar { display: none; }
	.spm-best-karte { flex: none; width: 152px; border: 1px solid var(--spm-linie); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; background: #fff; scroll-snap-align: start; }
	.spm-best-bild { position: relative; display: block; height: 160px; background: var(--spm-flaeche); }
	.spm-best-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
	.spm-best-bild em { position: absolute; top: 8px; left: 8px; font-style: normal; background: #C70707; color: #fff; font-size: 12px; font-weight: 800; border-radius: 6px; padding: 2px 7px; }
	.spm-best-text { padding: 8px 10px 6px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
	.spm-best-text small { font-size: 11px; font-weight: 800; color: var(--spm-grau); text-transform: uppercase; letter-spacing: .05em; }
	.spm-best-text b { font-size: 14px; line-height: 1.2; color: var(--spm-text); }
	.spm-best-preis { font-size: 14px; font-weight: 800; color: #C70707; }
	.spm-best-preis s { font-size: 12px; font-weight: 500; color: var(--spm-grau); }
	.spm-best-btn { display: flex; align-items: center; justify-content: center; min-height: 42px; margin: 0 8px 8px; border-radius: 10px; background: var(--spm-navy); color: #fff !important; font-size: 14px; font-weight: 800; }
	.spm-best-alle { flex: none; width: 120px; border-radius: 14px; background: var(--spm-flaeche); display: flex; align-items: center; justify-content: center; text-align: center; }
	.spm-best-alle span { font-size: 15px; font-weight: 800; color: var(--spm-navy); line-height: 1.3; }
	html.spm-b .spm-usp { margin-top: 16px; }
}
@media (max-width: 500px) {
	html.spm-b a.bannerWrapper, html.spm-b a.bannerWrapper * { text-decoration: none !important; }
	.spm-banner-cta i { color: #fff !important; }
}
/* Variante B kompakter: Schnell-finden-Leiste soll auf dem ersten Bildschirm anfangen */
@media (max-width: 500px) {
	.spm-best-bild { height: 128px; }
	.spm-best-karte { width: 142px; }
	.spm-best-box .spm-sub { margin-bottom: 8px !important; }
	html.spm-b .spm-h-best + .spm-sub { display: none; }
	html.spm-b .spm-best-box h2.spm-h-best { margin: 14px 0 8px !important; }
	html.spm-b .spm-best-box + h2.spm-h { margin-top: 18px !important; }
}
@media (max-width: 500px) {
	html.spm-b #text_inhalt:has(#spm) > h1.ueberschrift { font-size: 19px !important; margin: 4px 0 10px !important; }
	.spm-best-bild { height: 112px; }
	.spm-best-text { padding: 6px 10px 4px; }
	.spm-best-btn { min-height: 40px; }
	html.spm-b .spm-best-box + h2.spm-h { margin-top: 14px !important; margin-bottom: 6px !important; }
	html.spm-b .spm-best-box h2.spm-h-best { margin: 12px 0 8px !important; }
}
@media (max-width: 500px) {
	.spm-best-licht { font-size: 12px; color: var(--spm-grau); line-height: 1.2; }
	.spm-best-dach { border-color: var(--spm-navy); }
}
/* 05.11.2026 Vorteile direkt unter dem Banner (vor den Bestsellern) */
@media (max-width: 500px) {
	html.spm-b .spm > .spm-usp { margin-top: 10px; }
	html.spm-b .spm-usp + .spm-best-box h2.spm-h-best { margin-top: 12px !important; }
}
