/* Hofladen Bergblick — Demo-Website für ricooess.ch
   Palette: Leinen, Olivgrün, Terrakotta, Ofenschwarz. */

@font-face {
  font-family: 'Bricolage';
  src: url('../assets/fonts/bricolage-vf.woff2') format('woff2-variations');
  font-weight: 300 800;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/inter-vf.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --linen: #f7f3ea;
  --linen-2: #efe8da;
  --olive: #3f5237;
  --olive-dark: #2a3826;
  --terra: #c1552d;
  --terra-soft: #e08a5f;
  --wheat: #e8c37a;
  --ink: #241f19;
  --ink-soft: #6a6153;
  --line: rgba(36, 31, 25, .12);
  --radius: 16px;
  --shadow: 0 22px 50px -28px rgba(36, 31, 25, .45);
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  background: var(--linen);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.is-locked { overflow: hidden; }

img, svg { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: 'Bricolage', system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.02em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.5rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: inherit; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
section { padding: clamp(3.5rem, 8vw, 7rem) 0; }

.eyebrow {
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: .9rem;
}

.section-head { max-width: 620px; margin-bottom: 2.8rem; }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; }

/* ---------- Demo-Hinweis ---------- */

.demobar {
  background: var(--olive-dark);
  color: #e7e2d4;
  font-size: .82rem;
  text-align: center;
  padding: .55rem 1rem;
}
.demobar strong { color: var(--wheat); }
.demobar a { color: #fff; }

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(247, 243, 234, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; gap: 1.2rem; height: 74px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; margin-right: auto; }
.brand__mark { width: 40px; height: 40px; flex: none; }
.brand__name { font-family: 'Bricolage', sans-serif; font-weight: 700; font-size: 1.25rem; line-height: 1.05; display: block; }
.brand__sub { font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); }

.nav__links { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.nav__links a { text-decoration: none; font-size: .95rem; font-weight: 500; }
.nav__links a:hover { color: var(--terra); }

.nav__toggle { display: none; border: 1px solid var(--line); background: none; border-radius: 10px; font: inherit; padding: .5rem .7rem; cursor: pointer; }

.cartbtn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--olive);
  color: #fff;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: .92rem;
  font-weight: 600;
  padding: .6rem 1.1rem;
  cursor: pointer;
}
.cartbtn svg { width: 18px; height: 18px; }
.cartbtn__count {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--terra);
  font-size: .74rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 .35rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .8rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s, background .18s, color .18s;
}
.btn:hover { transform: translateY(-2px); }
.btn--terra { background: var(--terra); color: #fff; }
.btn--olive { background: var(--olive); color: #fff; }
.btn--ghost { border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--linen); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
/* Der Weg zur Kasse ist ein Link, kein Button — ohne dies bliebe er trotz
   leerem Warenkorb klickbar. */
a.btn[disabled] { pointer-events: none; }

/* ---------- Hero ---------- */

.hero { padding: clamp(3rem, 6vw, 5.5rem) 0 clamp(3rem, 6vw, 5rem); }
.hero__inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero p.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 44ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.hero__badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }
.badge {
  font-size: .78rem;
  font-weight: 600;
  background: var(--linen-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .35rem .85rem;
}
.hero figure { margin: 0; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); }

/* ---------- Bänder ---------- */

.strip { background: var(--olive); color: #eef0e6; padding: 1.1rem 0; overflow: hidden; }
.strip__row { display: flex; gap: 3rem; font-family: 'Bricolage', sans-serif; font-weight: 600; letter-spacing: .04em; white-space: nowrap; animation: marquee 32s linear infinite; }
.strip__row span { display: inline-flex; align-items: center; gap: 3rem; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.band { background: var(--linen-2); }
.band-dark { background: var(--olive-dark); color: #e7e2d4; }
.band-dark .section-head p { color: #b9bcac; }

/* ---------- Karten / Raster ---------- */

.grid { display: grid; gap: 1.6rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.band-dark .card { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); }

/* ---------- Produkte ---------- */

.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 2rem; }
.filter {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  font: inherit;
  font-size: .9rem;
  padding: .45rem 1rem;
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s;
}
.filter[aria-pressed="true"] { background: var(--olive); border-color: var(--olive); color: #fff; font-weight: 600; }
.filters__search { margin-left: auto; }
.filters__search input {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .5rem 1rem;
  font: inherit;
  font-size: .9rem;
  min-width: 220px;
  background: #fff;
}

.product {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.product:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.product__art { aspect-ratio: 4 / 3; background: var(--linen-2); position: relative; }
.product__art svg { width: 100%; height: 100%; }
.product__flag {
  position: absolute;
  top: .7rem;
  left: .7rem;
  background: var(--terra);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: .2rem .6rem;
}
.product__body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.product__name { font-family: 'Bricolage', sans-serif; font-weight: 700; font-size: 1.05rem; margin: 0 0 .2rem; }
.product__meta { font-size: .84rem; color: var(--ink-soft); margin: 0 0 .8rem; }
.product__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.product__price { font-weight: 700; font-variant-numeric: tabular-nums; }
.product__price small { display: block; font-weight: 400; font-size: .74rem; color: var(--ink-soft); }
.product__add {
  border: 0;
  background: var(--olive);
  color: #fff;
  border-radius: 999px;
  font: inherit;
  font-size: .85rem;
  font-weight: 600;
  padding: .5rem 1rem;
  cursor: pointer;
  transition: background .18s;
}
.product__add:hover { background: var(--olive-dark); }
.product__add[data-done] { background: var(--terra); }
.product--out .product__add { background: var(--line); color: var(--ink-soft); cursor: not-allowed; }

.empty { padding: 3rem 0; color: var(--ink-soft); }

/* ---------- Warenkorb ---------- */

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(36, 31, 25, .45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
  z-index: 80;
}
.scrim[data-open] { opacity: 1; pointer-events: auto; }

.cart {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100%);
  background: var(--linen);
  z-index: 90;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -20px 0 60px -30px rgba(0, 0, 0, .6);
}
.cart[data-open] { transform: none; }
.cart__head { display: flex; align-items: center; justify-content: space-between; padding: 1.2rem 1.4rem; border-bottom: 1px solid var(--line); }
.cart__head h3 { margin: 0; }
.cart__close { background: none; border: 0; font-size: 1.5rem; line-height: 1; cursor: pointer; padding: .2rem .4rem; }
.cart__body { flex: 1; overflow-y: auto; padding: 1.2rem 1.4rem; }
.cart__foot { border-top: 1px solid var(--line); padding: 1.2rem 1.4rem 1.6rem; background: var(--linen-2); }

.line { display: flex; gap: .9rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.line__art { width: 62px; height: 62px; border-radius: 10px; background: #fff; border: 1px solid var(--line); flex: none; overflow: hidden; }
.line__body { flex: 1; min-width: 0; }
.line__name { font-weight: 600; font-size: .95rem; margin: 0; }
.line__meta { font-size: .8rem; color: var(--ink-soft); margin: .1rem 0 .5rem; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.qty button { width: 28px; height: 28px; border: 0; background: none; font: inherit; font-size: 1rem; cursor: pointer; color: var(--ink); }
.qty span { min-width: 26px; text-align: center; font-size: .9rem; font-variant-numeric: tabular-nums; }
.line__price { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.line__drop { background: none; border: 0; color: var(--ink-soft); font-size: .78rem; text-decoration: underline; cursor: pointer; padding: 0; margin-top: .35rem; display: block; }

.totals { display: grid; grid-template-columns: 1fr auto; gap: .4rem 1rem; font-size: .95rem; margin-bottom: 1rem; }
.totals dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.totals .total { font-family: 'Bricolage', sans-serif; font-weight: 700; font-size: 1.25rem; }
.totals .save { color: var(--terra); }

.coupon { display: flex; gap: .5rem; margin-bottom: 1rem; }
.coupon input { flex: 1; border: 1px solid var(--line); border-radius: 999px; padding: .5rem .9rem; font: inherit; font-size: .88rem; background: #fff; }
.coupon button { border: 1px solid var(--ink); background: none; border-radius: 999px; font: inherit; font-size: .85rem; padding: .5rem 1rem; cursor: pointer; }
.coupon-note { font-size: .8rem; margin: -.5rem 0 1rem; }
.coupon-note[data-ok] { color: var(--olive); }
.coupon-note[data-bad] { color: #b3261e; }

.freeship { font-size: .82rem; color: var(--ink-soft); margin-bottom: .8rem; }
.freeship__bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: .35rem; }
.freeship__bar i { display: block; height: 100%; background: var(--olive); transition: width .3s; }

/* ---------- Kasse ---------- */

.checkout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 2.5rem; align-items: start; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: .3rem; }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .7rem .9rem;
  font: inherit;
  font-size: .95rem;
  background: #fff;
  color: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--olive); outline-offset: 1px; }
.field--error input, .field--error select { border-color: #b3261e; }
.field__error { display: none; color: #b3261e; font-size: .8rem; margin: .25rem 0 0; }
.field--error .field__error { display: block; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.mode { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-bottom: 1.4rem; }
.mode label {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .9rem 1rem;
  background: #fff;
  cursor: pointer;
  display: block;
  transition: border-color .18s, background .18s;
}
.mode label:has(input:checked) { border-color: var(--olive); background: #fff; box-shadow: inset 0 0 0 1px var(--olive); }
.mode input { margin-right: .5rem; }
.mode b { font-family: 'Bricolage', sans-serif; }
.mode small { display: block; color: var(--ink-soft); font-size: .82rem; }

.slotgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.slot {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  font: inherit;
  font-size: .88rem;
  padding: .6rem .7rem;
  cursor: pointer;
  text-align: left;
}
.slot[aria-pressed="true"] { border-color: var(--olive); box-shadow: inset 0 0 0 1px var(--olive); font-weight: 600; }
.slot[disabled] { opacity: .4; cursor: not-allowed; }
.slot b { display: block; }
.slot small { color: var(--ink-soft); }

.summary { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; position: sticky; top: 100px; }
.summary ul { list-style: none; margin: 0 0 1rem; padding: 0; font-size: .92rem; }
.summary li { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; }

.orderdone { max-width: 620px; margin: 0 auto; text-align: center; }
.orderdone__ref { font-family: 'Bricolage', sans-serif; font-size: 1.7rem; background: var(--linen-2); border-radius: 12px; padding: .5rem 1.3rem; display: inline-block; margin: .6rem 0 1rem; letter-spacing: .06em; }

/* ---------- Wochenkiste ---------- */

.boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.4rem; }
.box { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 1.6rem; display: flex; flex-direction: column; }
.box--hero { background: var(--olive); color: #fff; border-color: var(--olive); }
.box__price { font-family: 'Bricolage', sans-serif; font-size: 2rem; margin: .3rem 0 1rem; }
.box ul { list-style: none; margin: 0 0 1.4rem; padding: 0; font-size: .93rem; }
.box li { padding: .3rem 0 .3rem 1.4rem; position: relative; }
.box li::before { content: '·'; position: absolute; left: .4rem; font-weight: 700; }
.box .btn { margin-top: auto; }

/* ---------- Öffnungszeiten ---------- */

.hours { list-style: none; margin: 0; padding: 0; }
.hours li { display: flex; justify-content: space-between; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.hours li[data-today] { color: var(--terra); font-weight: 700; }

/* ---------- Footer ---------- */

.footer { background: var(--olive-dark); color: #b9bcac; padding: 4rem 0 2rem; font-size: .92rem; }
.footer h4 { color: #fff; font-family: 'Bricolage', sans-serif; margin: 0 0 .7rem; font-size: 1.05rem; }
.footer a { color: inherit; text-decoration: none; }
.footer a:hover { color: var(--wheat); }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem; }
.footer__bottom { margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: .84rem; }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  /* Ohne visibility bliebe die Meldung ein unsichtbarer, aber gerenderter
     Balken am Seitenende — in Vollseiten-Screenshots sichtbar, für
     Screenreader vorhanden. */
  visibility: hidden;
  left: 50%;
  bottom: 1.5rem;
  transform: translate(-50%, 140%);
  background: var(--ink);
  color: var(--linen);
  border-radius: 999px;
  padding: .7rem 1.4rem;
  font-size: .9rem;
  z-index: 100;
  transition: transform .3s;
}
.toast[data-show] { transform: translate(-50%, 0); visibility: visible; }

/* ---------- Bewegung ---------- */

.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */

@media (max-width: 940px) {
  .hero__inner { grid-template-columns: 1fr; }
  .checkout { grid-template-columns: 1fr; }
  .summary { position: static; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute;
    top: 74px; left: 0; right: 0;
    background: var(--linen);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    padding: .5rem 1.25rem 1.2rem;
    display: none;
  }
  .nav__links[data-open] { display: flex; }
  .nav__links a { display: block; padding: .75rem 0; border-bottom: 1px solid var(--line); }
  .filters__search { margin-left: 0; width: 100%; }
  .filters__search input { width: 100%; }
  .mode { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .strip__row { animation: none; }
  .btn:hover, .product:hover { transform: none; }
}
