/* Komponenten (Erlenwein), mobile-first. Basis = Smartphone; ab 768px (md) werden Werte erweitert. */
:root {
  --brand: #8fa69a;
  --ink: #36424a;
  --line: #ddd;
  --surface: #f4f4f4;
  --tap: 44px; /* Mindestgroesse fuer Touch-Ziele */
}

/* Button */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); padding: .6em 1.25em;
  background: var(--ink); color: #fff; border: 1.5px solid var(--ink); border-radius: 3px; text-decoration: none; font-weight: 600; line-height: 1.2; }
.btn:hover, .btn:focus-visible { background: #fff; color: var(--ink); }

/* Bewegungsschicht: Knoepfe treten beim Hover, druecken beim Klick; verlinkte Karten heben sich 2px.
   Ohne Bewegung (prefers-reduced-motion) bleibt alles ruhig. */
@media (prefers-reduced-motion: no-preference) {
  .btn, .header-cart, .cat-chips__chip, .product-actions .submit.add_to_cart, .buybox .submit_container button,
  .content-iso-cart .submit, .co .submit, .co-btn { will-change: transform; }
  .btn:hover, .header-cart:hover, .cat-chips__chip:hover, .product-actions .submit.add_to_cart:hover,
  .buybox .submit_container button:hover, .content-iso-cart .submit:hover, .co .submit:hover, .co-btn:hover { transform: translateY(-1px); }
  .btn:active, .cat-chips__chip:active, .product-actions .submit.add_to_cart:active,
  .buybox .submit_container button:active, .content-iso-cart .submit:active, .co .submit:active, .co-btn:active { transform: translateY(1px); }
}
.btn--outline { background: transparent; color: var(--ink); }
/* Links INNERHALB von Btns erben die Button-Farbe (auch im Hover-Invert). Der Altbundle faerbt
   #footer-Links spezifisch braun (1-2-1) - hier mit derselben ID-Spezifitaet zuruecksetzen,
   sonst bleibt der Text beim Hover braun auf Ink (= unlesbar). */
.btn a { color: inherit; }
#footer .inside :is(.footertop, .footerbottom) .btn a { color: inherit; }
.btn--outline:hover, .btn--outline:focus-visible { background: var(--ink); color: #fff; }
.btn--full { display: flex; width: 100%; }

/* Trennlinie */
.divider { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* Hero: Bild als Hintergrund (object-fit), Text per Grid positioniert */
.hero { position: relative; display: grid; min-height: var(--hero-h-sm, 60vh); background: var(--hero-bg, var(--brand)); color: var(--hero-fg, #fff); overflow: hidden; isolation: isolate; }
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media figure, .hero__media picture { margin: 0; display: block; height: 100%; }
.hero__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(to top, rgba(0,0,0,.38), rgba(0,0,0,0) 65%); }
.hero__content { align-self: end; justify-self: start; max-width: 40rem; padding: var(--space-m) var(--gutter); }
.hero__content--v-top { align-self: start; } .hero__content--v-center { align-self: center; } .hero__content--v-bottom { align-self: end; }
.hero__content--h-left { justify-self: start; text-align: left; }
.hero__content--h-center { justify-self: center; text-align: center; }
.hero__content--h-right { justify-self: end; text-align: right; }
.hero__title { margin: 0 0 .4em; color: inherit; font-size: clamp(1.6rem, 6vw, 3rem); line-height: 1.15; text-shadow: 0 1px 10px rgba(0,0,0,.45); }
.hero__text { margin: 0 0 1em; text-shadow: 0 1px 8px rgba(0,0,0,.45); }
.hero__text > :last-child { margin-bottom: 0; }

/* Box */
.box { background: var(--box-bg, #fff); color: var(--box-fg, inherit); padding: var(--space-m); height: 100%; box-sizing: border-box; }
.box--left { text-align: left; } .box--center { text-align: center; }
.box--border-left { border-left: 1px solid var(--line); }
.box--border-sides { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.box__icon { margin-bottom: .6em; font-size: 2rem; line-height: 1; }
.box__image { margin: calc(var(--space-m) * -1) calc(var(--space-m) * -1) var(--space-s); }
.box__image figure, .box__image picture { margin: 0; display: block; }
.box__image img { display: block; width: 100%; height: auto; }
.box__title { margin: 0 0 .5em; color: inherit; }
.box__text > :last-child { margin-bottom: 0; }
.box__link { display: inline-flex; align-items: center; min-height: var(--tap); margin-top: .5em; color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: .2em; }

/* Bildwechsel: nur CSS */
.slideshow { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #000; }
.slideshow::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,var(--overlay, 0)); pointer-events: none; }
.slideshow__slide { position: absolute; inset: 0; opacity: 0; animation-duration: calc(var(--interval) * var(--slides)); animation-delay: calc(var(--interval) * var(--i)); animation-iteration-count: infinite; animation-timing-function: linear; }
.slideshow__slide figure, .slideshow__slide picture { margin: 0; display: block; height: 100%; }
.slideshow__slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.slideshow[data-slides="1"] .slideshow__slide { opacity: 1; animation: none; }
@media (min-width: 768px) { .slideshow { aspect-ratio: 16 / 9; } .hero { min-height: var(--hero-h-md, 50vh); } }
@media (prefers-reduced-motion: reduce) { .slideshow__slide { animation: none; } .slideshow__slide:first-child { opacity: 1; } }

/* Galerie (content-gallery, perRow -> cols-N): Grid statt Default-Liste. 4 Spalten Desktop,
   2 mobil; gleichmaessige 4:3-Crops, sanfter Hover-Zoom, Lightbox-Zeiger (Site-DNA: 3px-Radius). */
.content-gallery ul { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-s, 1rem); list-style: none; margin: 0; padding: 0; }
.content-gallery figure { margin: 0; }
.content-gallery a { display: block; cursor: zoom-in; }
.content-gallery img { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; border-radius: 3px; }
@media (prefers-reduced-motion: no-preference) { .content-gallery a img { transition: transform .3s ease; } .content-gallery a:hover img, .content-gallery a:focus-visible img { transform: scale(1.03); } }
@media (max-width: 767px) { .content-gallery ul { grid-template-columns: repeat(2, 1fr); gap: .6rem; } }
@keyframes fade-2 { 0% { opacity: 0; transform: scale(1); } 4% { opacity: 1; } 50.00% { opacity: 1; } 54.00% { opacity: 0; transform: scale(1.1); } 100% { opacity: 0; transform: scale(1.1); } }
.slideshow[data-slides="2"] .slideshow__slide { animation-name: fade-2; }
@keyframes fade-3 { 0% { opacity: 0; transform: scale(1); } 4% { opacity: 1; } 33.33% { opacity: 1; } 37.33% { opacity: 0; transform: scale(1.1); } 100% { opacity: 0; transform: scale(1.1); } }
.slideshow[data-slides="3"] .slideshow__slide { animation-name: fade-3; }
@keyframes fade-4 { 0% { opacity: 0; transform: scale(1); } 4% { opacity: 1; } 25.00% { opacity: 1; } 29.00% { opacity: 0; transform: scale(1.1); } 100% { opacity: 0; transform: scale(1.1); } }
.slideshow[data-slides="4"] .slideshow__slide { animation-name: fade-4; }
@keyframes fade-5 { 0% { opacity: 0; transform: scale(1); } 4% { opacity: 1; } 20.00% { opacity: 1; } 24.00% { opacity: 0; transform: scale(1.1); } 100% { opacity: 0; transform: scale(1.1); } }
.slideshow[data-slides="5"] .slideshow__slide { animation-name: fade-5; }
@keyframes fade-6 { 0% { opacity: 0; transform: scale(1); } 4% { opacity: 1; } 16.67% { opacity: 1; } 20.67% { opacity: 0; transform: scale(1.1); } 100% { opacity: 0; transform: scale(1.1); } }
.slideshow[data-slides="6"] .slideshow__slide { animation-name: fade-6; }
@keyframes fade-7 { 0% { opacity: 0; transform: scale(1); } 4% { opacity: 1; } 14.29% { opacity: 1; } 18.29% { opacity: 0; transform: scale(1.1); } 100% { opacity: 0; transform: scale(1.1); } }
.slideshow[data-slides="7"] .slideshow__slide { animation-name: fade-7; }
@keyframes fade-8 { 0% { opacity: 0; transform: scale(1); } 4% { opacity: 1; } 12.50% { opacity: 1; } 16.50% { opacity: 0; transform: scale(1.1); } 100% { opacity: 0; transform: scale(1.1); } }
.slideshow[data-slides="8"] .slideshow__slide { animation-name: fade-8; }

/* Klaro-Cookie-Hinweis: volle Breite unten statt Box, die Inhalte/Buttons ueberdeckt.
   Geometrie haengt an CSS-Variablen von Klaro (klaro.css, per JS als <style> NACH unseren Regeln injiziert
   -> hoehere Spezifitaet mit body-Praefix noetig). */
body .klaro .cookie-notice:not(.cookie-modal-notice) {
  --notice-left: 0; --notice-right: 0; --notice-bottom: 0; --notice-top: auto; --notice-max-width: none;
  border-radius: 0 !important; box-shadow: 0 -6px 18px rgba(0,0,0,.25);
}
body .klaro .cookie-notice .cn-body { max-width: 1220px; margin: 0 auto; padding: .9rem var(--gutter); }
body .klaro .cookie-notice .cn-ok { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .9rem; }
body .klaro .cookie-notice .cn-buttons { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; }
body .klaro .cookie-notice .cm-btn { min-height: 44px; }
body .klaro .cookie-notice .cm-btn.cm-btn-decline { color: #fff; border: 1px solid rgba(255,255,255,.65); background: rgba(255,255,255,.08); }
/* Platz unter dem Inhalt schaffen, solange der Hinweis offen ist (CTAs bleiben erreichbar) */
body:has(.klaro .cookie-notice:not(.cookie-modal-notice)) { padding-bottom: 9.5rem; }
@media (min-width: 1024px) { body:has(.klaro .cookie-notice:not(.cookie-modal-notice)) { padding-bottom: 6.5rem; } }

/* ---------- Polish (web-design-guidelines + taste) ---------- */
/* Kontrast: das Altbundle faerbt Cinzel-Zwischenueberschriften im Inhalt salbei (#8fa69a, 2.2:1 auf Weiss).
   Alle Ueberschriften des Inhalts auf das Braun der Seiten-Headings (7.6:1). */
main .teaser :is(h1, h2, h3), main .imgtext :is(h1, h2, h3), main .frame :is(h1, h2, h3), main .content-headline,
.product :is(h1, h2, h3), #right :is(h1, h2, h3, h4), .mod_newslist :is(h2, h3),
main .content-text .rte :is(h2, h3), main .content-iso-orderdetails :is(h2, h3) { color: #563e34; }

/* Typografie-Feinschliff */
:is(h1, h2, h3, h4) { text-wrap: balance; }
:is(.price, .offer, .baseprice, .total, td.total, .co-final__sum, .mobile-cart-total) { font-variant-numeric: tabular-nums; }
main :is(h1, h2) { overflow-wrap: break-word; }

/* Fokus: sichtbar ueberall (0-Spezifitaet, starke Seitenregeln bleiben) */
:where(a, button, input, select, textarea, [tabindex]):focus-visible { outline: 3px solid #563e34; outline-offset: 2px; }

/* Touch: Doppeltipp-Zoom auf Bedienelementen unterbinden */
:where(a, button, [role=button], input[type=submit]) { touch-action: manipulation; }

/* Hero: Abdunkeln nur wenn Text drin liegt (Gradient dient der Lesbarkeit); content-Div rendert das
   Template nur bei vorhandenem Inhalt. Ohne Inhalt = reines Foto ohne Verlaufflaeche. */
.hero::after { display: none; }
.hero:has(.hero__content:not(:empty))::after { display: block; }

/* Kontrast (WCAG AA, Audit 2026-11-18): Fusszeilentext #563e34 auf #8fa69a hatte nur 3,8:1 -> dunkler (5,2:1) */
#footer, #footer p, #footer h1, #footer h2, #footer h3, #footer h4, #footer strong, #footer a, #footer .rte, #footer .mod_customnav a, #footer .mod_customnav h4 { color: #3d2b24 !important; }

/* Klaro-Einwilligungsbanner: Kontrast Link/Button auf >= 4,5:1 */
.klaro .cookie-modal a { color: #0b6a4e !important; }
/* Cookie-Hinweis hat dunklen Hintergrund (#333): heller Link, Kontrast > 7:1 */
.klaro .cookie-notice a.cm-link, .klaro .cn-ok a.cm-link { color: #9be8c8 !important; }
.klaro .cm-btn.cm-btn-success, .klaro .cn-ok .cm-btn { background-color: #12714f !important; color: #fff !important; }

/* Footer-Titel sind h3 (vorher h4, Heading-Reihenfolge): Optik wie bisher */
#footer h3 { font-size: 16.8px; font-weight: 400; line-height: 26.208px; margin: 0 0 8.4px; padding: 0 0 8px; letter-spacing: normal; text-transform: none; }

/* Klickflaechen >= 24px (WCAG 2.5.8) fuer Footer-Navigation und alleinstehende Footer-Links */
nav.mod_customnav a, #footer .rte p > a { display: inline-block; min-height: 24px; line-height: 24px; }
/* Titel von Kategorie-Chips und Mini-Warenkorb sind h2 (Heading-Reihenfolge), Optik wie vorher */
.cat-chips__title { font-size: 13.6px; font-weight: 600; letter-spacing: .544px; text-transform: uppercase; line-height: 21.2px; margin: 0 0 8px; }
aside#right .mini > h2 { font-size: 19.8px; font-weight: 400; letter-spacing: normal; text-transform: none; line-height: 30.9px; margin: 0 0 9.9px; color: #563e34; }

/* Antippflaechen mindestens 24px; der Knopf "Vertrag widerrufen" ist auf ganzer Flaeche anklickbar */
.breadcrumb a { display: inline-block; padding-block: .2rem; }
#footer .btn { position: relative; }
#footer .btn a::after { content: ""; position: absolute; inset: 0; }
