/* ----------------------------
   Playfair Display Variable (self-hosted, DSGVO-konform)
---------------------------- */
@font-face{
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../fonts/PlayfairDisplay-VariableFont_wght.woff2') format('woff2-variations');
}

@font-face{
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400 900;
  font-display: swap;
  src: url('../fonts/PlayfairDisplay-Italic-VariableFont_wght.woff2') format('woff2-variations');
}

:root{
  --c-bg:#fefefe;
  --c-paper:#dce5dc;
  --c-sand:#dce5dc;
  --c-text:#262015;
  --c-muted:#6f6356;

  --radius:8px;
  --container:1240px;
  --container-shop:1600px;

  --border-soft: rgba(38,32,21,0.10);
  --border-softer: rgba(38,32,21,0.08);
  --glass: rgba(254,254,254,0.86);
  --panel: rgba(254,254,254,0.96);
  --chip: rgba(220,229,220,0.55);

  --font-heading: 'Playfair Display', Didot, 'Didot LT STD', 'Bodoni 72', Georgia, serif;

  /* wird via main.js dynamisch gesetzt */
  --header-offset: 0px;

  /* Footer */
  --c-footer-bg: var(--c-sand);
  --c-footer-accent: #ede8e0;
}

*{ box-sizing:border-box; }

html{
  /* verhindert Layout-Shift bei Overlays (moderne Browser) */
  scrollbar-gutter: stable;
}

body{
  margin:0;
  background:var(--c-bg);
  color:var(--c-text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height:1.6;
}

a{ color:inherit; }

.container{
  width:min(var(--container), calc(100% - 40px));
  margin-inline:auto;
}

.container--shop{
  width:min(var(--container-shop), calc(100% - 32px));
  margin-inline:auto;
}
@media(min-width:981px){
  .container--shop{
    width:min(var(--container-shop), calc(100% - 80px));
  }
}

/* ----------------------------
   Layout
---------------------------- */
.site-main{ padding:36px 0 80px; }

.page-title{
  font-size:28px;
  margin:0 0 18px;
}

/* ----------------------------
   Cards / Lists
---------------------------- */
.post-list{ display:grid; gap:14px; }

.post-card{
  background:var(--c-paper);
  border-radius:var(--radius);
  padding:18px 20px;
}

.post-card__title{ margin:0 0 6px; font-size:18px; }
.post-card__meta{ color:var(--c-muted); font-size:14px; }

.post-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:16px;
}

.card{
  background:var(--c-paper);
  border-radius:var(--radius);
  padding:18px 20px;
}

.card__title{
  margin:0 0 8px;
  font-size:18px;
  line-height:1.25;
}

.card__meta{
  margin:0;
  color:var(--c-muted);
  font-size:14px;
}

@media (max-width: 900px){
  .post-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px){
  .post-grid{ grid-template-columns: 1fr; }
}

/* ----------------------------
   Footer
---------------------------- */
.site-footer{
  background: var(--c-footer-bg);
  /* Below-the-fold Render-Optimierung — Browser kann Layout/Paint defer'n bis Footer im Viewport */
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}

/* ── Hauptzone (Brand + Spalten) ───────────────────────────────────── */
.site-footer__main{
  display: grid;
  grid-template-columns: 1.2fr repeat(var(--footer-col-count, 3), minmax(0, 1fr));
  gap: clamp(24px, 3vw, 56px);
  padding: clamp(40px, 5vw, 64px) 0 clamp(28px, 3vw, 40px);
  align-items: start;
}

/* Brand-Block (eigene Zelle) */
.footer-brand{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-brand__logo{
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--c-text);
  width: max-content;
}

.footer-brand__logo .brand-logo{
  display: block;
  height: auto;
}

.footer-brand__tagline{
  margin: 0;
  max-width: 28ch;
  color: var(--c-muted);
  font-size: 15px;
  line-height: 1.5;
}

.footer-brand__about-link{
  display: inline-block;
  margin-top: 12px;
  color: var(--c-text);
  font-size: 15px;
  text-decoration: none;
}

.footer-brand__about-link:hover{
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Social Icons */
.footer-social{
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  gap: 8px;
}

.footer-social li{ margin: 0; }

.footer-social__link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--c-muted);
  text-decoration: none;
  transition: color 200ms ease-out, background 200ms ease-out;
}

.footer-social__link:hover,
.footer-social__link:focus-visible{
  color: var(--c-text);
  background: rgba(38,32,21,0.06);
  outline: none;
}

.footer-social__link:focus-visible{
  outline: 2px solid var(--c-text);
  outline-offset: 2px;
}

/* Spalten (Widget-Areas) */
.footer-col-wrap{
  display: block;
}

.footer-col{
  margin: 0 0 16px;
}

.footer-col__title{
  margin: 0 0 12px;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--c-muted);
}

/* Bestehende .footer-menu (legacy) + Widget-Output (rendert <ul class="menu">) */
.footer-menu,
.site-footer .footer-col > ul,
.site-footer .footer-col .menu{
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-menu li,
.site-footer .footer-col > ul li,
.site-footer .footer-col .menu li{
  margin: 0;
}

.footer-menu a,
.site-footer .footer-col > ul a,
.site-footer .footer-col .menu a{
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 0;
  text-decoration: none;
  font-size: 15px;
  color: var(--c-text);
}

.footer-menu a:hover,
.site-footer .footer-col > ul a:hover,
.site-footer .footer-col .menu a:hover{
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-col__text{
  max-width: 36ch;
  color: var(--c-muted);
  font-size: 15px;
  line-height: 1.65;
}

/* ── Rechtlicher Hinweis (nur Shop) ───────────────────────────────── */
.site-footer__legal-note{
  border-top: 1px solid var(--border-soft);
  padding: 18px 0;
}

.footer-legal-note__text{
  margin: 0 auto;
  max-width: 130ch;
  font-size: 12px;
  line-height: 1.6;
  color: var(--c-text);
  text-align: center;
}

/* ── Divider + Bottom-Row ──────────────────────────────────────────── */
.footer-divider{
  border: 0;
  height: 1px;
  background: var(--border-soft);
  margin: 0;
}

.site-footer__bottom{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  padding: 20px 0 28px;
}

.site-footer__bottom-meta{
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

/* Legal-Menü (im Bottom-Row) */
.footer-legal{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}

.footer-legal li{ margin: 0; }

.footer-legal li::before{ content: none; }

.footer-legal li + li a::before{
  content: "·";
  margin-right: 8px;
  color: var(--border-soft);
  font-weight: 400;
}

.footer-legal a{
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 0;
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-muted);
}

.footer-legal a:hover{
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Cookie-Settings-Button — wirft Consent-Dialog wieder auf */
.footer-cookie-btn{
  background: transparent;
  border: 0;
  padding: 4px 0;
  min-height: 44px;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-muted);
  cursor: pointer;
  text-decoration: none;
}

.footer-cookie-btn:hover,
.footer-cookie-btn:focus-visible{
  color: var(--c-text);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-locale{
  font-size: 13px;
  color: var(--c-muted);
  letter-spacing: 0.04em;
}

.footer-copyright{
  margin: 0;
  font-size: 12px;
  color: var(--c-muted);
}

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 980px){
  .site-footer__main{
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
  }

  /* Brand spannt erste Zeile, Spalten 2x2 darunter */
  .footer-brand{
    grid-column: 1 / -1;
  }

  .footer-col-wrap{
    grid-column: span 1;
  }
}

@media (max-width: 600px){
  .site-footer__main{
    grid-template-columns: 1fr;
    text-align: center;
    gap: 28px;
  }

  .footer-brand{
    align-items: center;
  }

  .footer-brand__logo,
  .footer-social{
    justify-content: center;
  }

  .footer-brand__tagline{
    max-width: none;
  }

  .footer-menu a,
  .site-footer .footer-col > ul a,
  .site-footer .footer-col .menu a{
    justify-content: center;
  }

  .site-footer__bottom{
    flex-direction: column;
    text-align: center;
  }

  .footer-legal{
    justify-content: center;
  }
}

@media (max-width: 480px){
  .footer-legal{
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .footer-legal li + li a::before{
    content: none;
  }
}

/* ----------------------------
   Breadcrumbs (global, used on single + shop)
---------------------------- */
.breadcrumbs{
  margin: 0 0 16px;
}

.breadcrumbs__list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--c-muted);
}

.breadcrumbs__item{
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.breadcrumbs__item:not(:last-child)::after{
  content: '›';
  margin: 0 8px;
  opacity: 0.45;
}

.breadcrumbs__link{
  text-decoration: none;
  color: var(--c-muted);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.breadcrumbs__link:hover{
  text-decoration: underline;
  text-underline-offset: 4px;
}

.breadcrumbs__home{
  display: block;
  min-width: 44px;
  text-align: center;
}

.breadcrumbs__link--current{
  color: var(--c-text);
  cursor: default;
  text-transform: none;
  letter-spacing: 0;
}

.breadcrumbs__link--current:hover{
  text-decoration: none;
}

.breadcrumbs__link:focus-visible{
  outline: 2px solid var(--c-text);
  outline-offset: 2px;
}

.breadcrumbs__link{
  scroll-margin-inline: 16px;
}

@media (max-width: 768px) {
  .breadcrumbs__list{
    font-size: 12px;
    letter-spacing: 0.15em;
  }
  .breadcrumbs__item:not(:last-child)::after{
    margin: 0 6px;
  }
  .breadcrumbs__link{
    min-height: 44px;
  }
}

/* ----------------------------
   Page Hero & Body
---------------------------- */
.page-hero{
  text-align: center;
  padding: clamp(32px, 5vw, 56px) 0 clamp(24px, 3vw, 40px);
}

.page-hero .breadcrumbs{
  margin-bottom: 16px;
}

.page-hero .breadcrumbs__list{
  justify-content: center;
}

.page-hero__title{
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 400;
  letter-spacing: -0.018em;
  line-height: 1.1;
  text-wrap: balance;
  font-size: clamp(36px, 4.2vw, 56px);
}

.page-body{
  max-width: 1092px;
  margin: 0 auto;
  padding: 0 20px clamp(48px, 6vw, 80px);
}

.page-body .entry-content{
  margin: 0 auto;
}

@media (max-width: 560px){
  .page-hero{
    padding: 20px 0 20px;
  }

  .page-hero__title{
    font-size: clamp(30px, 8.5vw, 40px);
  }
}

/* ----------------------------
   A11y
---------------------------- */
.sr-only{
  position:absolute!important;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);
  white-space:nowrap;border:0;
}

.skip-link{
  position:absolute;
  left:-9999px; top:12px;
  background:#fff;
  padding:10px 12px;
  border-radius:12px;
  z-index:9999;
}
.skip-link:focus{ left:12px; }

/* Header CSS liegt jetzt in /assets/css/header.css */

/* ----------------------------
   404 Error Page
---------------------------- */
section.error-404{
  text-align: center;
  padding: clamp(32px, 5vw, 56px) 0 clamp(48px, 6vw, 80px);
  max-width: 560px;
  margin: 0 auto;
}

.error-404__illustration{
  display: block;
  margin: 0 auto 28px;
  width: clamp(180px, 30vw, 280px);
  height: auto;
  opacity: 0.85;
}

.error-404__title{
  margin: 0 0 14px;
  font-family: var(--font-heading);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-size: clamp(30px, 3.5vw, 44px);
}

.error-404__text{
  margin: 0 0 28px;
  color: var(--c-muted);
  font-size: 16px;
  line-height: 1.7;
  max-width: 42ch;
  margin-left: auto;
  margin-right: auto;
}

/* Suchformular: zentriert, volle Breite */
section.error-404 .searchform{
  max-width: 360px;
  margin: 0 auto 28px;
  padding: 6px 6px 6px 18px;
  border: 1px solid var(--border-soft);
  background: transparent;
}

section.error-404 .searchform__input{
  flex: 1;
  width: auto;
  font-size: 15px;
}

section.error-404 .searchform__btn{
  flex-shrink: 0;
}

/* Kategorie-Chips */
.error-404__cats{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}

.error-404__chip{
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 16px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--c-text);
  transition: background 0.15s, border-color 0.15s;
}

.error-404__chip:hover{
  background: var(--c-sand);
  border-color: var(--border-softer);
}

/* Startseite-Link */
.error-404__home{
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 12px;
  color: var(--c-muted);
}

.error-404__home:hover{
  color: var(--c-text);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ----------------------------
   Back to Top
---------------------------- */
.back-to-top{
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--c-bg, #fff);
  color: var(--c-text);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.25s, background 0.15s, border-color 0.15s;
  pointer-events: none;
}

.back-to-top[hidden]{ display: none; }

.back-to-top.is-visible{
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover{
  background: var(--c-paper);
  border-color: var(--border-soft);
}

@media (max-width: 980px){
  .back-to-top{
    bottom: calc(56px + env(safe-area-inset-bottom) + 12px);
  }
}

@media (prefers-reduced-motion: reduce){
  .back-to-top{ transition: none; }
}

/* ----------------------------
   Print
---------------------------- */
@media print{
  body{
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

  .site-header,
  .site-footer,
  .breadcrumbs,
  .share-section,
  .share-buttons,
  .reading-progress,
  .comments-section,
  .related,
  .archive-pagination,
  .skip-link,
  .back-to-top{
    display: none !important;
  }

  a{ color: inherit; text-decoration: underline; }

  img{ max-width: 100% !important; page-break-inside: avoid; }

  .single-hero__media{ border: none; }

  .container{ width: 100%; max-width: 100%; }
}