/* ==========================================================================
   Hofkieker – Frontend
   Farben: Grün #173C31 · Orange #E96F3A · Fast-Weiß #FFFEFA · Creme #F8F5ED · Schwarz #140A08
   Schriften: Barlow (Text/Headlines), Fraunces (Akzente) – lokal eingebunden
   ========================================================================== */

@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/barlow-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/fraunces-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/fraunces-latin-700-normal.woff2") format("woff2"); }

:root {
  --green: #173C31;
  --green-light: #2F8A4E;
  --orange: #E96F3A;
  --white: #FFFEFA;
  --cream: #F8F5ED;
  --black: #140A08;
  --muted: #5d5753;
  --line: #e7e1d3;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 2px 10px rgba(20, 10, 8, .08);
  --wrap: 1240px;
  --sans: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.5; color: var(--black); background: var(--cream); overflow-x: clip; }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.1; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 4.5vw, 3.1rem); color: var(--green); }
h2 { font-size: 1.55rem; font-weight: 600; }
h3 { font-size: 1.45rem; font-weight: 600; color: var(--green); }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons & Chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .75rem; min-height: 50px; padding: .6rem 1.6rem;
       background: var(--green); color: var(--white); border: 0; border-radius: var(--radius-sm); font: 500 1rem var(--sans);
       text-decoration: none; cursor: pointer; transition: filter .15s; }
.btn:hover { filter: brightness(1.2); }
.btn img { width: 18px; height: 18px; }
.btn-block { display: flex; width: 100%; }
.btn-dark { background: var(--black); }
.btn-ghost { background: transparent; color: var(--green); border: 1.5px solid var(--green); }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .7rem; }
.chip { display: inline-flex; align-items: center; height: 38px; padding: 0 .75rem; border-radius: 99px; background: var(--green); color: var(--white);
        font-weight: 500; font-size: 1rem; text-decoration: none; border: 0; cursor: pointer; font-family: var(--sans); }
.chip:hover, .chip.active { background: var(--orange); }
.chip-soft { background: var(--cream); color: var(--black); height: 40px; padding: 0 .75rem; }
.chips .is-extra { display: none; }
.chips.open .is-extra { display: list-item; }

/* ---------- Header / Navigation ---------- */
.site-header { background: var(--cream); border-bottom: 1px solid var(--line); position: relative; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 84px; }
.logo { display: block; }
.logo img { height: 48px; width: auto; }
.main-nav { display: flex; gap: 1.6rem; }
.main-nav a { font-weight: 600; font-size: 1.3rem; text-decoration: none; color: var(--black); }
.main-nav a:hover, .main-nav a[aria-current] { color: var(--green); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.menu-toggle { display: none; background: none; border: 0; padding: 6px; cursor: pointer; }
@media (max-width: 800px) { .main-nav { display: none; } .menu-toggle { display: block; } }
.menu-toggle img { width: 32px; height: 32px; }
.nav-drawer { position: fixed; inset: 0 0 0 auto; width: min(360px, 88vw); background: var(--white); box-shadow: -8px 0 30px rgba(0,0,0,.12);
              transform: translateX(100%); transition: transform .25s ease; z-index: 100; padding: 24px 28px; overflow-y: auto; visibility: hidden; }
.nav-drawer.open { transform: none; visibility: visible; }
.nav-drawer .close { float: right; background: none; border: 0; cursor: pointer; }
.nav-drawer nav { clear: both; padding-top: 1rem; }
.nav-drawer a { display: block; padding: .55rem 0; text-decoration: none; font-weight: 500; font-size: 1.15rem; color: var(--green); border-bottom: 1px solid var(--line); }
.nav-drawer h4 { margin: 1.5rem 0 .3rem; font: 600 .8rem var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.nav-backdrop { position: fixed; inset: 0; background: rgba(20,10,8,.35); z-index: 90; opacity: 0; pointer-events: none; transition: opacity .25s; }
.nav-backdrop.open { opacity: 1; pointer-events: auto; }

/* ---------- Footer ---------- */
.site-footer { background: var(--green); color: var(--white); margin-top: 3rem; padding: 4.5rem 0; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; }
.site-footer a { color: var(--white); text-decoration: none; margin-left: 1.5rem; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .osm { opacity: .6; font-size: .8rem; flex-basis: 100%; }
.site-footer .osm a { margin: 0; }

/* ---------- Wellen-Maskierung (freihand) ---------- */
.wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: clamp(40px, 6vw, 90px); pointer-events: none; }
.wave path { fill: var(--cream); }

/* ---------- Startseite: Hero ---------- */
.hero { position: relative; min-height: clamp(520px, 46vw, 660px); display: flex; align-items: center;
        background: #c9d8e4 url("images/overview.webp") center 30% / cover no-repeat; }
.hero .wrap { position: relative; width: 100%; padding-bottom: 60px; }
.hero .kicker { font-weight: 600; margin: 0 0 1rem; }
.hero h1 { color: var(--black); font-size: clamp(2.9rem, 6vw, 4.2rem); line-height: .9; margin-bottom: 1.6rem; }
.hero h1 em { display: block; font: 700 1em/0.9 var(--serif); font-style: normal; color: var(--orange); margin-top: -.08em; letter-spacing: -.01em; }
.hero .lead { max-width: 620px; margin-bottom: 1.6rem; }

.search { display: flex; align-items: center; gap: .5rem; background: var(--white); border-radius: var(--radius-sm); padding: 6px 6px 6px 22px; max-width: 510px; box-shadow: var(--shadow); }
.search img.pin { width: 28px; height: 28px; flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; font: 500 1rem var(--sans); background: transparent; color: var(--black); padding: .6rem .3rem; }
.search input::placeholder { color: #44403c; }
.search .btn { min-height: 44px; padding: 0 1.1rem; font-size: 1.05rem; flex: none; }
.search .btn img { width: 24px; height: 24px; }

.section { padding: 3rem 0 1rem; }
.home-chips { margin: 4rem 0 2rem; }

/* ---------- Karten (Höfe) ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.card { background: var(--white); border-radius: var(--radius-sm); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.card-img { aspect-ratio: 405 / 220; background: var(--line); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 18px 10px 10px; display: flex; flex-direction: column; flex: 1; }
.card h3 { color: var(--black); font-size: 1.5rem; margin-bottom: .4rem; }
.card h3 a { text-decoration: none; }
.card .loc { display: flex; align-items: center; gap: .5rem; margin: 0 0 .3rem; }
.card .loc img { width: 20px; height: 20px; }
.card .teaser { margin-bottom: .6rem; }
.card .chips { gap: .6rem; margin-bottom: 1rem; }
.card .btn { margin-top: auto; }
.card .status { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .6rem; }
.pill { font-size: .8rem; font-weight: 600; padding: .1rem .6rem; border-radius: 99px; border: 1.5px solid var(--green); color: var(--green); }
.pill.on { --live: #22b35e; display: inline-flex; align-items: center; gap: .4rem; background: #e3f6ea; border-color: var(--live); color: #12813f; }
.pill.on::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(34,179,94,.6); animation: hk-live 1.8s ease-out infinite; }
@keyframes hk-live { 0% { box-shadow: 0 0 0 0 rgba(34,179,94,.55); } 70% { box-shadow: 0 0 0 7px rgba(34,179,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,179,94,0); } }
@media (prefers-reduced-motion: reduce) { .pill.on::before { animation: none; } }
.pill.orange { border-color: var(--orange); color: var(--orange); }
.more { display: flex; justify-content: center; margin: 2rem 0 1rem; }
.more .btn { min-width: min(382px, 100%); }

/* ---------- Hofseite ---------- */
.farm-cover { position: relative; height: clamp(240px, 26vw, 360px); background: var(--line) center / cover no-repeat; }
.farm-cover .wave { height: clamp(50px, 7vw, 110px); }

.farm-top { display: grid; grid-template-columns: 300px minmax(0, 1fr) 405px; gap: 0 3.6rem; align-items: start; }
.farm-avatar { width: 300px; height: 300px; border-radius: 50%; overflow: hidden; margin-top: -88px; position: relative; z-index: 2;
               box-shadow: 0 6px 14px rgba(20,10,8,.18); background: var(--white); display: grid; place-items: center; font: 700 6rem var(--sans); color: var(--green); }
.farm-avatar img { width: 100%; height: 100%; object-fit: cover; }
.farm-intro { padding-top: 0; margin-top: -34px; position: relative; z-index: 2; }
.farm-intro h1 { margin-bottom: .7rem; }
.farm-intro .desc { max-width: 380px; }
.farm-intro .badges { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .8rem; }
.updated { font-size: .85rem; color: var(--muted); margin-top: 1rem; }

.panel { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 32px; }
.panel-title { display: flex; align-items: center; gap: 1.2rem; margin-bottom: 1.2rem; }
.panel-title img { width: 34px; height: 34px; }
.panel-title h2 { margin: 0; font-size: 1.55rem; }

.contact { margin-top: -120px; position: relative; z-index: 3; }
.contact address { font-style: normal; margin: 0 0 1rem 54px; }
.contact .btn { margin-bottom: 1.2rem; }
.contact ul { list-style: none; margin: 0; padding: 0; }
.contact li { display: flex; align-items: center; gap: 1.2rem; min-height: 58px; }
.contact li img { width: 34px; height: 34px; flex: none; }
.contact li a { text-decoration: none; overflow-wrap: anywhere; }
.contact li a:hover { text-decoration: underline; }
.contact .distance { margin: -.5rem 0 1rem 54px; font-size: .9rem; color: var(--muted); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--green); text-decoration: underline; cursor: pointer; }

.farm-body { display: grid; grid-template-columns: minmax(0, 1fr) 405px; gap: 12px; margin-top: 3rem; align-items: start; }
.farm-main { display: flex; flex-direction: column; gap: 24px; }
.farm-side { display: flex; flex-direction: column; gap: 24px; }
.map { height: 200px; border-radius: 4px; overflow: hidden; background: var(--line); z-index: 1; }
.farm-side .map { margin-right: 12px; }

/* Sortiment */
.cat-title { display: flex; align-items: center; gap: .8rem; margin: 1.8rem 0 .6rem; }
.cat-title:first-of-type { margin-top: .4rem; }
.cat-title img { width: 32px; height: 32px; }
.cat-title h3 { margin: 0; font-family: var(--serif); font-weight: 600; }
.menu { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 1rem; }
.menu th { font: 600 .95rem var(--sans); text-align: left; padding: .4rem 0 .9rem; }
.menu td { padding: .45rem 0; vertical-align: top; }
.menu th:nth-child(1) { width: 30%; } .menu th:nth-child(2) { width: 30%; } .menu th:nth-child(3) { width: 21%; }
.menu .pname { font-weight: 600; }
.menu .sub { display: block; font-size: .85rem; color: var(--muted); font-weight: 400; }
.menu .cert { display: inline-block; font-size: .72rem; font-weight: 600; color: var(--green); border: 1px solid var(--green); border-radius: 99px; padding: 0 .45rem; margin: .15rem .2rem 0 0; }
.avail { display: inline-flex; align-items: center; gap: .55rem; }
.avail::before { content: ""; width: 20px; height: 20px; border-radius: 50%; background: var(--green-light); flex: none; }
.avail.low_stock::before { background: #f0a23a; }
.avail.out_of_stock::before { background: var(--orange); }
.avail.preorder::before, .avail.seasonal::before { background: #bdb5a6; }
.menu tr.out_of_stock .pname { color: var(--muted); }

/* Öffnungszeiten */
.hours { width: 100%; border-collapse: collapse; }
.hours th { text-align: left; font-weight: 600; padding: .2rem 0; }
.hours td { text-align: right; padding: .2rem 0; }
.hours tr.today th, .hours tr.today td { color: var(--green); }
.hours-note { margin: .8rem 0 0; }
.panel h4 { margin: 1.2rem 0 .4rem; font-size: 1rem; }

.offers ul { list-style: none; margin: 0; padding: 0; }
.offers li { padding: .6rem 0; border-top: 1px solid var(--line); }
.offers li:first-child { border-top: 0; }
.offers .price { color: var(--orange); font-weight: 700; }
.prose p:last-child { margin: 0; }

/* ---------- Stadt / Listen ---------- */
.page-head { padding: 2.5rem 0 1rem; }
.page-head .lead { max-width: 720px; }
.breadcrumb { font-size: .875rem; color: var(--muted); padding-top: 1.2rem; }
.breadcrumb a { color: var(--muted); }
.city-map { height: 380px; border-radius: var(--radius); margin: 1rem 0 2rem; }
.inline-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.faq details { background: var(--white); border-radius: var(--radius-sm); padding: 1rem 1.2rem; margin-bottom: .6rem; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; font-weight: 600; }
.cms { margin: 2rem 0; }
.placeholder { border: 2px dashed var(--line); border-radius: var(--radius); padding: 3rem; text-align: center; color: var(--muted); margin: 2rem 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .farm-top { grid-template-columns: 220px minmax(0, 1fr); gap: 0 2rem; }
  .farm-avatar { width: 220px; height: 220px; margin-top: -70px; }
  .contact { grid-column: 1 / -1; margin-top: 2rem; }
  .farm-intro { margin-top: 0; padding-top: 1rem; }
  .farm-body { grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; }
  .farm-side .map { margin-right: 0; }
}
@media (max-width: 800px) {
  body { font-size: 16px; }
  .site-header .wrap { height: 68px; }
  .logo img { height: 30px; }
  .hero { min-height: 560px; }
  .search { padding-left: 14px; }
  .search .btn span { display: none; }
  .farm-top { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .farm-avatar { width: 180px; height: 180px; margin-top: -90px; }
  .farm-intro .desc { margin: 0 auto 1em; }
  .farm-intro .chips, .farm-intro .badges { justify-content: center; }
  .contact { text-align: left; width: 100%; }
  .farm-body { grid-template-columns: 1fr; margin-top: 2rem; }
  .panel { padding: 20px 16px; }
  .menu thead { display: none; }
  .menu, .menu tbody, .menu tr, .menu td { display: block; width: 100%; }
  .menu tr { display: grid; grid-template-columns: 1fr auto; gap: .1rem 1rem; padding: .7rem 0; border-top: 1px solid var(--line); }
  .menu td { padding: 0; }
  .menu td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .menu td:nth-child(3) { grid-column: 2; grid-row: 1; text-align: right; font-weight: 600; }
  .menu td:nth-child(2) { grid-column: 1; grid-row: 2; font-size: .875rem; color: var(--muted); }
  .menu td:nth-child(2)::before { content: "Bestand: "; }
  .menu td:nth-child(4) { grid-column: 2; grid-row: 2; text-align: right; font-size: .9rem; }
  .avail::before { width: 14px; height: 14px; }
  .site-footer { padding: 2.5rem 0; }
  .site-footer a { margin: 0 1.2rem 0 0; }
}

/* Karte: Marker & Popup */
.hk-pin { background: none; border: 0; }
.leaflet-popup-content { font: 400 .95rem/1.4 var(--sans); color: var(--black); }
.leaflet-popup-content a { color: var(--green); font-weight: 600; }
.leaflet-popup-content-wrapper { border-radius: var(--radius-sm); }
.map-products { list-style: none; margin: .4rem 0; padding: 0; }
.map-products li { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); padding: .15rem 0; }
.map-products span { color: var(--orange); font-weight: 600; white-space: nowrap; }

/* ==========================================================================
   Hofseite: zwei große Karten (links Hof + Sortiment, rechts Kontakt/Karte/Zeiten)
   ========================================================================== */
.farm-cards { display: grid; grid-template-columns: minmax(0, 1fr) 405px; gap: 24px; align-items: start; margin-top: -120px; position: relative; z-index: 3; }
.big-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; }
.card-sec + .card-sec { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 28px; }
.card-sec h2 { margin-bottom: .6rem; }

.farm-head { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 2rem; align-items: center; padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.farm-head .farm-avatar { width: 200px; height: 200px; margin-top: -80px; align-self: start; font-size: 4.5rem; }
.farm-head .farm-intro { margin: 0; padding: 0; }
.farm-head .farm-intro .desc { max-width: 560px; }

.farm-card-side { position: sticky; top: 20px; }
.farm-card-side .contact { margin: 0; }
.farm-card-side .map { margin: 28px -32px 0; border-radius: 0; height: 220px; }
.farm-card-side .map + .card-sec { border-top: 0; margin-top: 26px; }

@media (max-width: 1100px) {
  .farm-cards { grid-template-columns: minmax(0, 1fr) 340px; }
  .farm-head { grid-template-columns: 150px minmax(0, 1fr); gap: 1.4rem; }
  .farm-head .farm-avatar { width: 150px; height: 150px; margin-top: -60px; }
}
@media (max-width: 800px) {
  .farm-cards { grid-template-columns: 1fr; margin-top: -60px; }
  .big-card { padding: 22px 16px; }
  .farm-head { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .farm-head .farm-avatar { margin-top: -90px; width: 150px; height: 150px; }
  .farm-card-side { position: static; }
  .farm-card-side .map { margin: 22px -16px 0; }
}
