/* ─── Lokale Schriften (DSGVO-konform, kein Google-Server-Kontakt) ── */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 300 400;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 300 400;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('../fonts/jost-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('../fonts/jost-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ─── Variablen ─────────────────────────────────────────── */
:root {
  --cream:   #f9f5ef;
  --sand:    #ede5d8;
  --brown:   #3d2f23;
  --text:    #6b5848;
  --terra:   #b87b5e;
  --muted:   #9e8c7e;
  --border:  #e0d5c8;
  --card-bg: #ffffff;
}

/* ─── Basis ─────────────────────────────────────────────── */
body {
  background: var(--cream);
  color: var(--brown);
  font-family: 'Jost', sans-serif;
  font-weight: 300;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
}

#body-wrapper a {
  color: var(--terra);
}

#body-wrapper a:hover {
  color: var(--brown);
}

/* ─── Header / Navigation ───────────────────────────────── */
#header {
  background: var(--cream) !important;
  border-bottom: 1px solid var(--border);
  box-shadow: none !important;
  height: auto !important;
}

#header .navbar-section {
  height: auto !important;
}

#header .navbar {
  padding: 0.5rem 0;
  align-items: center;
}

.navbar-wortmarke {
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  font-size: 2rem !important;
  font-weight: 300 !important;
  letter-spacing: 0.15em;
  color: var(--brown) !important;
  text-decoration: none !important;
  text-transform: lowercase !important;
}

#header nav a,
#header .dropmenu a {
  font-family: 'Jost', sans-serif;
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brown) !important;
}

#header nav a:hover,
#header .dropmenu a:hover {
  color: var(--terra) !important;
}

/* Dropdown-Untermenüs rechtsbündig öffnen, damit sie nicht über den Bildschirmrand hinausgehen */
.dropmenu > ul > li > ul {
  right: 0;
  left: auto;
}

/* Verschachtelte Untermenüs nach links öffnen statt nach rechts */
.dropmenu ul ul ul {
  right: 100%;
  left: auto;
}

/* Desktop-Dropdown: Pfeile nur bei Kategorien in der zweiten Ebene ausblenden („Produktkategorien“ behält Abwärtspfeil) */
#header .dropmenu ul ul li a::before {
  content: none !important;
  display: none !important;
}

#header .dropmenu ul ul li a {
  padding-right: 1.25rem;
}

/* ─── Mobiles Menü ──────────────────────────────────────── */

/* Hamburger-Striche: braun statt blau */
.mobile-menu .button_container span {
  background: var(--brown) !important;
}

/* Overlay-Hintergrund: warmes Dunkelbraun statt schwarz */
.overlay {
  background: rgba(61, 47, 35, 0.97) !important;
}

/* Menüpunkte im Overlay */
.overlay-menu a,
.overlay-menu .tree a {
  color: var(--cream) !important;
  font-family: 'Jost', sans-serif;
  font-weight: 300;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.6rem 1rem;
  display: block;
}

.overlay-menu a:hover {
  color: var(--terra) !important;
}

/* Mobil: Pfeil/Toggler nur bei „Produktkategorien“ (Root-Zeile mit Untermenü); Kategorien ohne Pfeil */
.overlay-menu .treemenu .toggler {
  display: none !important;
}

.overlay-menu .treemenu.treemenu-root > li {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

.overlay-menu .treemenu.treemenu-root > li > a {
  flex: 1;
  order: 1;
  margin-left: 0.8rem;
  padding-right: 0;
  display: flex;
  align-items: center;
}

.overlay-menu .treemenu.treemenu-root > li > .toggler {
  order: 2;
  flex-shrink: 0;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 48px;
  min-height: 44px;
  float: none;
  padding: 0;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--terra);
  background: rgba(255, 255, 255, 0.07);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.overlay-menu .treemenu.treemenu-root > li > .toggler:active {
  background: rgba(255, 255, 255, 0.15);
}

.overlay-menu .treemenu.treemenu-root > li > ul {
  order: 3;
  width: 100%;
  flex-basis: 100%;
  margin: 0 0 0 0.75rem;
  padding: 0;
}

.overlay-menu .treemenu li.tree-closed > .toggler::before,
.overlay-menu .treemenu li.tree-opened > .toggler::before {
  content: "›";
  font-size: 1.6rem;
  line-height: 1;
  display: block;
  margin: 0;
}

.overlay-menu .treemenu li.tree-closed > .toggler::before {
  transform: rotate(90deg);
}

.overlay-menu .treemenu li.tree-opened > .toggler::before {
  transform: rotate(-90deg);
}

.overlay-menu .treemenu ul ul li {
  display: block;
}

.overlay-menu .treemenu ul ul li > a {
  margin-left: 0;
  padding-right: 1rem;
  display: block;
}

/* Toggler für Desktop-Fallback */
.treemenu .toggler {
  color: var(--muted);
}

/* ─── Zurück-Button ─────────────────────────────────────── */
.zurueck-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: 'Jost', sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted) !important;
  text-decoration: none;
  margin: 2rem 0 0;
  transition: color 0.2s ease;
}

.zurueck-link::before {
  content: '←';
  font-size: 1rem;
  line-height: 1;
}

.zurueck-link:hover {
  color: var(--terra) !important;
}

/* ─── Sections ──────────────────────────────────────────── */
.home-sections {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  padding: 3rem 0 5rem;
}

.home-section {
  margin: 0;
}

/* ─── Section-Titel ─────────────────────────────────────── */
.section-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--brown);
  text-align: center;
  margin: 0 0 2.5rem;
}

.section-title::after {
  content: '';
  display: block;
  width: 2.5rem;
  height: 1px;
  background: var(--terra);
  margin: 0.6rem auto 0;
}

/* ─── Produkte-Grid ─────────────────────────────────────── */
.produkte-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
}

/* Grid-Items dürfen unter min-content schrumpfen (lange Wörter/Titel) */
.produkte-grid > .produkt-karte {
  min-width: 0;
}

/* ─── Produktkarte ──────────────────────────────────────── */
.produkt-karte {
  text-decoration: none;
  color: inherit;
  background: var(--card-bg);
  border-radius: 2px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 2px 12px rgba(61, 47, 35, 0.06);
}

.produkt-karte:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(61, 47, 35, 0.11);
  text-decoration: none;
  color: inherit;
}

.produkt-karte img {
  width: 100%;
  display: block;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.produkt-karte__info {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid var(--sand);
}

.produkt-karte h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 400;
  margin: 0 0 0.3rem;
  letter-spacing: 0.02em;
  color: var(--brown);
}

.produkt-karte .kategorie {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 0.4rem;
  font-family: 'Jost', sans-serif;
  font-weight: 400;
}

.produkt-karte .preis {
  font-size: 0.95rem;
  color: var(--terra);
  margin: 0;
  font-weight: 400;
}

.produkt-karte .artikelnummer {
  font-size: 0.72rem;
  color: #9e8c7e;
  margin: 0.25rem 0 0;
  font-family: 'Jost', sans-serif;
  font-weight: 400;
  letter-spacing: 0.04em;
}

/* ─── Bestellhinweis ────────────────────────────────────── */
.bestellhinweis {
  background: var(--sand);
  border-left: 3px solid var(--terra);
  border-radius: 2px;
  padding: 1.5rem 2rem;
  margin: 2rem 0;
}

#bestellhinweis {
  scroll-margin-top: 7rem;
}

.bestellhinweis__titel {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--brown);
  margin: 0 0 0.75rem;
  letter-spacing: 0.03em;
}

.bestellhinweis__inhalt {
  font-family: 'Jost', sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--brown);
}

.bestellhinweis__inhalt p {
  margin: 0 0 0.5rem;
}

.bestellhinweis__inhalt ul {
  margin: 0.5rem 0;
  padding-left: 1.2rem;
}

.bestellhinweis__inhalt li {
  margin-bottom: 0.25rem;
}

.bestellhinweis__inhalt strong {
  font-weight: 500;
}

.bestellhinweis__inhalt a {
  color: var(--terra);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bestellhinweis__inhalt a:hover {
  color: var(--brown);
}

/* Aufklappbare Variante */
.bestellhinweis--klappbar {
  cursor: pointer;
}

.bestellhinweis--klappbar .bestellhinweis__titel {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  cursor: pointer;
}

.bestellhinweis--klappbar .bestellhinweis__titel::-webkit-details-marker {
  display: none;
}

.bestellhinweis--klappbar .bestellhinweis__titel::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--terra);
  line-height: 1;
  transition: transform 0.25s ease;
}

.bestellhinweis--klappbar[open] .bestellhinweis__titel::after {
  transform: rotate(45deg);
}

.bestellhinweis--klappbar .bestellhinweis__inhalt {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

/* ─── Herstellerangaben & Sicherheitshinweise (Produktdetail) ─ */
.produkt-gpsr {
  margin: 0;
  padding: 0;
  border: 0;
}

/* Abstand nur, wenn wirklich etwas Sichtbares gerendert wird (nicht bei nur ungültigen Codes) */
.produkt-gpsr:has(.produkt-gpsr__hersteller),
.produkt-gpsr:has(.produkt-gpsr__material),
.produkt-gpsr:has(.produkt-gpsr__sicherheit) {
  margin-top: 1.75rem;
}

.produkt-gpsr__block + .produkt-gpsr__block {
  margin-top: 1.25rem;
}

.produkt-gpsr__titel {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 0.5rem;
  letter-spacing: 0.03em;
}

.produkt-gpsr__titel--sicherheit {
  font-size: 1.05rem;
  font-weight: 500;
}

.produkt-gpsr__zeile {
  font-family: 'Jost', sans-serif;
  font-size: 0.88rem;
  font-weight: 300;
  line-height: 1.65;
  color: var(--text);
  margin: 0 0 0.35rem;
}

.produkt-gpsr__zeile:last-child {
  margin-bottom: 0;
}

.produkt-gpsr__zeile a {
  color: var(--terra);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.produkt-gpsr__zeile a:hover {
  color: var(--brown);
}

.produkt-gpsr__zeile--hinweis {
  margin-bottom: 0.5rem;
}

.produkt-gpsr__zusatz {
  font-family: 'Jost', sans-serif;
  font-size: 0.88rem;
  font-weight: 300;
  line-height: 1.65;
  color: var(--text);
  margin: 0.75rem 0 0;
}

/* Nur Überschrift, aber keine gültigen Texte und kein Zusatz → nichts anzeigen */
.produkt-gpsr__sicherheit:not(:has(.produkt-gpsr__zeile--hinweis)):not(:has(.produkt-gpsr__zusatz)),
.produkt-gpsr__material:not(:has(.produkt-gpsr__zeile--hinweis)) {
  display: none;
}

/* ─── Kategorie-Karte ───────────────────────────────────── */
.kategorie-karte {
  position: relative;
}

.kategorie-karte img {
  aspect-ratio: 3/2;
  filter: brightness(0.88);
  transition: filter 0.3s ease, transform 0.3s ease;
}

.kategorie-karte:hover img {
  filter: brightness(0.78);
  transform: scale(1.02);
}

.kategorie-karte h2 {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0;
  padding: 1rem 1.25rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);
  background: linear-gradient(to top, rgba(61,47,35,0.55) 0%, transparent 100%);
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
  line-height: 1.25;
}

/* ─── Footer ─────────────────────────────────────────────── */
#footer {
  padding: 1.5rem 0;
}

.footer-legal {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

.footer-legal a {
  color: var(--muted);
  text-decoration: none;
}

.footer-legal a:hover {
  color: var(--brown);
  text-decoration: underline;
}

/* ─── Produktdetailseite ──────────────────────────────────
   Layout und Darstellung der einzelnen Produktseite inkl.
   Bild-Galerie, Lightbox, Produktinfos und Bestellhinweis.
   Die Struktur dazu kommt aus templates/produkt.html.twig. */
.produkt-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  padding: 3rem 0 5rem;
  align-items: start;
}

@media (max-width: 768px) {
  .produkt-detail {
    grid-template-columns: 1fr;
  }
}

.produkt-detail__bilder {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.6rem;
}

@media (max-width: 500px) {
  .produkt-detail__bilder {
    grid-template-columns: repeat(2, 1fr);
  }
}

.lightbox-trigger {
  display: block;
  overflow: hidden;
  border-radius: 2px;
}

.lightbox-trigger img {
  width: 100%;
  display: block;
  aspect-ratio: 4/3;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.lightbox-trigger:hover img {
  transform: scale(1.04);
  filter: brightness(0.92);
}

/* Overlay für die Bild-Lightbox (wird per JS ein-/ausgeblendet) */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(30, 20, 12, 0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.lightbox-overlay.aktiv {
  display: flex;
}

/* Zentrum: Bild + Touch-Wisch; Pfeile/Close per absolute */
.lightbox-stage {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.lightbox-stage img {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 2px;
  display: block;
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  z-index: 3;
  background: none;
  border: none;
  color: var(--cream);
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
  font-family: 'Jost', sans-serif;
  font-weight: 300;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  opacity: 1;
}

.lightbox-close:focus-visible,
.lightbox-prev:focus-visible,
.lightbox-next:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 3px;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  padding: 0.5rem 0.85rem;
  margin: 0;
  background: none;
  border: none;
  color: var(--cream);
  font-size: 3rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.55;
  font-family: 'Jost', sans-serif;
  font-weight: 300;
}

.lightbox-prev {
  left: 0.35rem;
}

.lightbox-next {
  right: 0.35rem;
}

.lightbox-prev:hover,
.lightbox-prev:focus-visible,
.lightbox-next:hover,
.lightbox-next:focus-visible {
  opacity: 1;
}

.lightbox-overlay--single .lightbox-prev,
.lightbox-overlay--single .lightbox-next {
  display: none;
}

/* Rechte Spalte mit den Produktinfos bleibt beim Scrollen sichtbar (Desktop) */
.produkt-detail__info {
  position: sticky;
  top: 2rem;
}

.produkt-detail__kategorie {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 0.6rem;
  font-family: 'Jost', sans-serif;
  font-weight: 400;
}

.produkt-detail__titel {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2.2rem;
  font-weight: 300;
  letter-spacing: 0.03em;
  color: var(--brown);
  margin: 0 0 0.6rem;
  line-height: 1.2;
}

.produkt-detail__preiszeile {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--border);
  margin: 0 0 0.6rem;
}

.produkt-detail__preis {
  font-size: 1.2rem;
  color: var(--terra);
  margin: 0;
  font-family: 'Jost', sans-serif;
  font-weight: 400;
}

.produkt-detail__bestelllink {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  font-family: 'Jost', sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted) !important;
  text-decoration: none;
  transition: color 0.2s ease;
}

.produkt-detail__bestelllink::after {
  content: '↓';
  font-size: 0.85rem;
  line-height: 1;
}

.produkt-detail__bestelllink:hover {
  color: var(--terra) !important;
}

.produkt-detail__mwst {
  font-size: 0.75rem;
  color: var(--muted);
  font-family: 'Jost', sans-serif;
  font-weight: 300;
  margin: 0 0 2rem;
}

.produkt-detail__artikelnummer {
  font-size: 0.78rem;
  color: var(--muted);
  font-family: 'Jost', sans-serif;
  font-weight: 400;
  letter-spacing: 0.05em;
  margin: 0 0 1.4rem;
}

.produkt-detail__beschreibung {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text);
  font-family: 'Jost', sans-serif;
  font-weight: 300;
}

.produkt-detail__beschreibung ul {
  padding-left: 1.2rem;
  margin: 0.75rem 0;
}

.produkt-detail__beschreibung li {
  margin-bottom: 0.3rem;
}

.versandhinweis {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

/* Trennlinie oberhalb des Bestellhinweis-Footers (AGB/Widerruf) */
.bestellhinweis__trenner {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1rem 0 0.75rem;
}

/* Kurzer Widerrufshinweis im Bestellblock
   - Standard: 14 Tage Widerrufsrecht
   - Variante .widerrufshinweis--kein-recht bei individuell: true */
.widerrufshinweis {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* ─── Kopieren-Button (Artikelnummer) ─────────────────────
   Button neben der Artikelnummer, der per JS die Nummer
   in die Zwischenablage schreibt und kurz „Kopiert!" zeigt. */
.kopieren-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 0 0 0.4rem;
  color: var(--muted);
  font-size: 0.85rem;
  vertical-align: middle;
  line-height: 1;
  transition: color 0.2s ease;
}

.kopieren-btn:hover {
  color: var(--terra);
}

.kopieren-bestaetigung {
  display: none;
  font-size: 0.72rem;
  font-family: 'Jost', sans-serif;
  font-weight: 400;
  color: var(--terra);
}

.kopieren-btn.kopiert .kopieren-icon {
  display: none;
}

.kopieren-btn.kopiert .kopieren-bestaetigung {
  display: inline;
}

/* ─── WhatsApp-Button ─────────────────────────────────────
   Link, der die zentrale WhatsApp-Nummer aus site.yaml nutzt
   und eine vorausgefüllte Nachricht mit Art.-Nr. und Titel setzt. */
.whatsapp-btn {
  display: inline-block;
  margin: 1.5rem 0 1.25rem;
  padding: 0.7rem 1.5rem;
  background: var(--terra);
  color: var(--cream) !important;
  font-family: 'Jost', sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none !important;
  border-radius: 2px;
  transition: background 0.2s ease;
}

.whatsapp-btn:hover {
  background: var(--brown);
  color: var(--cream) !important;
}

/* ─── Katalog-Layout: Hauptspalte + Sidebar (Bestellhinweis, Tags) ─ */
.katalog-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: flex-start;
}

.katalog-layout__main {
  flex: 1;
  min-width: 0;
}

/* Schmalere Sidebar = mehr Breite fürs Grid (3 Spalten statt 2) */
.katalog-sidebar {
  flex: 0 0 200px;
  max-width: 220px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: 5.5rem;
  align-self: flex-start;
  overflow: visible;
}

/* Desktop: Tags in der Sidebar scrollen; Abstand + dezente, schmale Leiste */
@media (min-width: 769px) {
  .katalog-sidebar {
    max-height: calc(100vh - 6rem);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* Luft zwischen Text und Scrollbalken (nicht „im Weg“) */
    padding-right: 0.65rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(158, 140, 126, 0.4) transparent;
  }

  .katalog-sidebar::-webkit-scrollbar {
    width: 4px;
  }

  .katalog-sidebar::-webkit-scrollbar-thumb {
    background: rgba(158, 140, 126, 0.38);
    border-radius: 4px;
  }

  .katalog-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(158, 140, 126, 0.55);
  }

  .katalog-sidebar::-webkit-scrollbar-track {
    background: transparent;
  }
}

/* Tag-Cloud: redaktionell, ohne Pill-Rahmen — wie feine Text-Filter */
.katalog-sidebar .tag-filter.tag-filter--cloud {
  margin: 0;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  align-content: flex-start;
  justify-content: center;
  gap: 0.35rem 0.75rem;
  row-gap: 0.4rem;
}

/* Kleine Überschrift über der Wortwolke (nur Desktop-Sidebar) */
@media (min-width: 769px) {
  .katalog-sidebar .tag-filter.tag-filter--cloud::before {
    content: 'Themen';
    flex: 1 0 100%;
    text-align: center;
    font-family: 'Jost', sans-serif;
    font-size: 0.58rem;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.35rem;
  }
}

.katalog-sidebar .tag-filter--cloud .tag-btn {
  width: auto;
  max-width: 100%;
  flex: 0 1 auto;
  text-align: center;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 0.78rem;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.01em;
  text-transform: none;
  line-height: 1.45;
  padding: 0.08rem 0;
  margin: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  color: var(--text);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.katalog-sidebar .tag-filter--cloud .tag-btn:hover {
  color: var(--terra);
  border-bottom-color: rgba(184, 123, 94, 0.4);
  background: transparent;
}

.katalog-sidebar .tag-filter--cloud .tag-btn--aktiv {
  color: var(--brown);
  font-weight: 500;
  border-bottom-color: var(--terra);
  background: transparent;
}

.katalog-sidebar .tag-filter--cloud .tag-btn--aktiv:hover {
  color: var(--terra);
  border-bottom-color: var(--terra);
  background: transparent;
}

.katalog-sidebar .tag-filter--cloud .tag-btn:focus-visible {
  outline: 1px solid var(--terra);
  outline-offset: 3px;
  border-radius: 1px;
}

/* Im Katalog-Layout: etwas kleinere Mindestbreite → öfter 3 Spalten */
.katalog-layout .produkte-grid {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.5rem;
}

/* Mobil: Sidebar oben; Sticky aus; kein max-height */
@media (max-width: 768px) {
  .katalog-layout {
    flex-direction: column;
  }

  .katalog-layout__main {
    order: 2;
  }

  .katalog-sidebar {
    order: 1;
    flex-basis: auto;
    width: 100%;
    max-width: none;
    align-self: stretch;
    min-width: 0;
    position: static;
    max-height: none;
    overflow: visible;
  }

  /* Volle Breite bis an den Rand der Sektion: section.section 1rem + .container 0.4rem (Spectre) */
  .katalog-sidebar .tag-filter-details {
    order: 1;
    display: block;
    --katalog-seitenrand: calc(1rem + 0.4rem);
    width: calc(100% + 2 * var(--katalog-seitenrand));
    max-width: none;
    margin-left: calc(-1 * var(--katalog-seitenrand));
    margin-right: calc(-1 * var(--katalog-seitenrand));
    box-sizing: border-box;
  }

  .katalog-sidebar .tag-filter-details__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
  }

  .katalog-sidebar .tag-filter-details__summary::after {
    float: none;
    flex-shrink: 0;
  }

  /* Tags mobil besser lesbar (Desktop bleibt feiner) */
  .katalog-sidebar .tag-filter--cloud .tag-btn {
    font-size: 1rem;
    line-height: 1.5;
    padding: 0.15rem 0;
  }

  .katalog-sidebar .tag-filter.tag-filter--cloud {
    gap: 0.45rem 0.85rem;
    row-gap: 0.5rem;
  }
}

/* Tag-Filter in <details> (mobil klappbar, Desktop per JS offen) */
.tag-filter-details {
  margin: 0;
}

.tag-filter-details__summary {
  list-style: none;
  cursor: pointer;
  font-family: 'Jost', sans-serif;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brown);
  padding: 0.65rem 1rem;
  background: var(--sand);
  border-left: 3px solid var(--terra);
  border-radius: 2px;
}

.tag-filter-details__summary::-webkit-details-marker {
  display: none;
}

.tag-filter-details__summary::after {
  content: '+';
  float: right;
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--terra);
  line-height: 1.2;
}

.tag-filter-details[open] .tag-filter-details__summary::after {
  content: '−';
}

@media (min-width: 769px) {
  .katalog-sidebar .tag-filter-details > .tag-filter-details__summary {
    display: none;
  }

  .katalog-sidebar .tag-filter-details {
    border: 0;
    padding: 0;
  }
}

/* Abstand zwischen Summary und Buttons (mobil) */
.katalog-sidebar .tag-filter-details .tag-filter {
  margin-top: 0.75rem;
}

@media (min-width: 769px) {
  .katalog-sidebar .tag-filter-details .tag-filter {
    margin-top: 0;
  }
}

/* ─── Tag-Filter ──────────────────────────────────────────
   Klickbare Tag-Buttons; in der Sidebar als Cloud (.tag-filter--cloud).
   Aktiver Button hebt sich durch terra-Hintergrund ab. */
.tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 2rem 0 0;
  justify-content: center;
}

.tag-btn {
  font-family: 'Jost', sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.tag-btn:hover {
  border-color: var(--terra);
  color: var(--terra);
}

.tag-btn--aktiv {
  background: var(--terra);
  border-color: var(--terra);
  color: var(--cream);
}

.tag-btn--aktiv:hover {
  background: var(--brown);
  border-color: var(--brown);
  color: var(--cream);
}
