/* =====================================================================
   Flohmarkt Großmehring – Market-Mate "Warm Editorial"-Palette
   Deep Teal · Warm Apricot · Burnt Sienna · Warm Canvas · Deep Ink
   Übergangsdesign zur Market-Mate-Plattform
   Display: Schibsted Grotesk · Body: Hanken Grotesk
   ===================================================================== */

:root {
  /* Market-Mate "Warm Editorial"-Palette
     Deep Teal · Warm Apricot · Burnt Sienna · Warm Canvas · Deep Ink · Quiet Olive */
  --bg:          #faf7f2;   /* Warm Canvas   */
  --bg-tint:     #fbeddd;   /* Apricot Tint  */
  --card:        #ffffff;   /* Paper/Card    */

  --brand:       #2f6b62;   /* Deep Teal     */
  --brand-d:     #255a52;
  --brand-l:     #3c857a;

  --marketmate-green: #429d3a; /* Exaktes Grün der MarketMate-Wortmarke */

  --sky:         #e79a54;   /* Warm Apricot (Accent) */
  --sky-d:       #cf8038;

  --amber:       #b8553a;   /* Burnt Sienna (Destructive) */

  --ink:         #20302d;   /* Deep Ink      */
  --ink-2:       #46524e;   /* Ink (Text)    */
  --muted:       #5d6b66;   /* Quiet Olive   */
  --line:        #e3ddd3;   /* Warm Hairline */
  --line-2:      #ece6dc;   /* Soft Mist     */

  --ring:        rgba(47, 107, 98, 0.22);
  --shadow-sm:   0 1px 2px rgba(32, 48, 45, 0.05), 0 1px 3px rgba(32, 48, 45, 0.05);
  --shadow:      0 6px 16px -6px rgba(32, 48, 45, 0.12), 0 10px 30px -12px rgba(32, 48, 45, 0.14);
  --shadow-lg:   0 18px 40px -16px rgba(32, 48, 45, 0.20);
  --shadow-brand:0 10px 24px -8px rgba(47, 107, 98, 0.45);

  --radius:      24px;
  --radius-md:   16px;
  --radius-sm:   12px;

  --maxw: 1140px;

  --font-display: "Schibsted Grotesk", "Hanken Grotesk", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink-2);
  line-height: 1.65;
  background:
    radial-gradient(60% 50% at 50% -10%, var(--bg-tint), transparent 70%),
    var(--bg);
  min-height: 100vh;
}

::selection { background: var(--brand); color: #fff; }

a { color: var(--brand); text-decoration: none; font-weight: 600; transition: color 0.15s ease; }
a:hover { color: var(--sky-d); }

strong { font-weight: 700; color: var(--ink); }

/* MarketMate-Wortmarke: Market folgt der schwarzen/weißen Logo-Variante,
   Mate verwendet immer das originale Logo-Grün. */
.marketmate-wordmark { color: #000; white-space: nowrap; }
.marketmate-wordmark--inverse { color: #fff; }
.marketmate-wordmark__market { color: inherit; }
.marketmate-wordmark__mate { color: var(--marketmate-green); }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================ HEADER / HERO ========================== */
#header {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(80% 120% at 85% -20%, rgba(255, 255, 255, 0.35), transparent 55%),
    linear-gradient(135deg, #3c857a 0%, #2f6b62 45%, #255a52 100%);
  color: #fff;
  overflow: hidden;
}
#header::before {
  /* weiche Licht-/Farbblasen für Tiefe */
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(231, 154, 84, 0.35), transparent 60%);
  filter: blur(30px);
  z-index: -1;
}
#header::after {
  content: "";
  position: absolute;
  left: -8%; bottom: -40%;
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(231, 154, 84, 0.45), transparent 60%);
  filter: blur(28px);
  z-index: -1;
}

.header-inner {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.2rem 1.5rem 2.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Logo als zentrierter Anker oben in der Hero-Komposition (nicht mehr
   freischwebend in einer Seitenspalte). MarketMate-Logo bringt eigenen
   Rahmen + transparenten Hintergrund mit: object-fit haelt das leicht
   hochkante Format unverzerrt, drop-shadow folgt der echten Ringform. */
.header-logo {
  display: block;
  height: 84px;
  width: 84px;
  object-fit: contain;
  margin-bottom: 1.1rem;
  filter: drop-shadow(0 12px 20px rgba(32, 48, 45, 0.22));
  animation: rise 0.6s ease both;
}

.header-middle { text-align: center; }
.header-middle > * { animation: rise 0.6s ease both; }
.header-middle > *:nth-child(1) { animation-delay: 0.05s; }
.header-middle > *:nth-child(2) { animation-delay: 0.12s; }
.header-middle > *:nth-child(3) { animation-delay: 0.18s; }
.header-middle > *:nth-child(4) { animation-delay: 0.24s; }

.header-eyebrow {
  display: inline-block;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}

.header-middle h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.1rem, 5.5vw, 3.5rem);
  line-height: 1.0;
  letter-spacing: -0.025em;
  color: #fff;
  text-shadow: 0 2px 16px rgba(20, 48, 45, 0.25);
}
.header-middle h1 .accent { color: #fbeddd; }

.header-middle h3 {
  font-weight: 500;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 0.55rem;
}

.countdown-wrap { margin-top: 1.5rem; }
.countdown-label {
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 0.6rem;
}
#flipdown.flipdown { display: inline-block; }

/* ============================ NAVIGATION ============================ */
.topnav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topnav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.nav-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.02rem;
  margin-right: auto;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  letter-spacing: -0.01em;
}
.nav-brand .dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(47, 107, 98, 0.16);
  display: inline-block;
}

.nav-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.2rem; }
.nav-list a {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-2);
  padding: 0.7rem 1rem;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-list a:hover { background: var(--line-2); color: var(--ink); }
.nav-list a.is-active {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-brand);
}

/* Burger-Button (nur auf schmalen Viewports sichtbar, siehe Media-Query) */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease;
}
.nav-burger:hover { background: var(--line-2); }
.nav-burger span {
  display: block;
  height: 2.5px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
/* Icon animiert beim Öffnen zum X */
.nav-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
.nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ============================ LAYOUT =============================== */
.main-container,
.page-container-list {
  max-width: var(--maxw);
  margin: 2.4rem auto;
  padding: 0 1.5rem;
}
.page-container { width: 100%; }

.content-wrapper {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.6rem;
  box-shadow: var(--shadow);
  animation: rise 0.55s ease both;
  animation-delay: 0.1s;
}

/* ============================ CONTENT ============================== */
.intro-box + .intro-box { margin-top: 1.6rem; }

.intro-box h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 2rem 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.intro-box h2:first-child { margin-top: 0; }
.intro-box h2::before {
  content: "";
  width: 10px; height: 26px;
  border-radius: 6px;
  background: linear-gradient(var(--brand-l), var(--brand-d));
  flex: none;
}

.intro-box h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
  margin: 1.5rem 0 0.4rem;
}

.intro-box p { margin: 0.7rem 0; color: var(--ink-2); }
.intro-box ul { margin: 0.6rem 0 0.6rem 1.4rem; color: var(--ink-2); }
.intro-box li { margin: 0.3rem 0; }
.intro-box li::marker { color: var(--brand); }

/* Flyer */
#flyer { text-align: center; margin: 2.2rem 0 0.5rem; }
#flyer img {
  max-width: 400px;
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
#flyer img:hover { transform: translateY(-4px); box-shadow: 0 28px 50px -20px rgba(15, 23, 42, 0.35); }

/* ============================ BUTTONS ============================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.1;
  cursor: pointer;
  border: none;
  border-radius: 999px;
  padding: 0.72rem 1.4rem;
  margin: 0.25rem 0.4rem 0.25rem 0;
  color: #fff;
  background: linear-gradient(180deg, var(--brand-l), var(--brand));
  box-shadow: var(--shadow-brand);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.03); box-shadow: 0 16px 30px -10px rgba(47, 107, 98, 0.55); }
.btn:active { transform: translateY(0); }

.btn-primary,
.btn-save    { background: linear-gradient(180deg, var(--brand-l), var(--brand)); }
.btn-success { background: linear-gradient(180deg, #efb074, var(--sky)); box-shadow: 0 10px 24px -8px rgba(231, 154, 84, 0.5); }
.btn-success:hover { box-shadow: 0 16px 30px -10px rgba(231, 154, 84, 0.55); }
.btn-warning { background: linear-gradient(180deg, #cf6a4a, var(--amber)); color: #fbeddd; box-shadow: 0 10px 24px -8px rgba(184, 85, 58, 0.5); }
.btn-logout  { background: #fff; color: var(--ink); border: 1.5px solid var(--line); box-shadow: var(--shadow-sm); }
.btn-logout:hover { background: var(--line-2); }

/* ============================ FORMS ============================== */
.login-form table,
.neuer-verkaeufer-form table { border-collapse: separate; border-spacing: 0 0.7rem; width: 100%; max-width: 580px; }
.login-form td,
.neuer-verkaeufer-form td { vertical-align: middle; padding-right: 0.9rem; color: var(--ink); font-weight: 600; }
.login-form td:first-child,
.neuer-verkaeufer-form td:first-child { white-space: nowrap; width: 1%; }

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"] {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  width: 100%;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
input::placeholder { color: #9aa39d; }
input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--ring);
}
input[type="checkbox"] { width: 1.15rem; height: 1.15rem; accent-color: var(--brand); vertical-align: -3px; margin-right: 0.35rem; }

label { font-weight: 600; }

/* Fehlermeldungen */
[style*="color:red"], [style*="color: red"] {
  color: var(--brand-d) !important;
  font-weight: 700 !important;
  background: var(--bg-tint);
  border: 1px solid #ecd3b3;
  border-left: 4px solid var(--brand);
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  display: block;
}

/* ====================== ARTIKELLISTE-INTERAKTION ================== */
.stammnummer-box { margin: 1.2rem 0 0.4rem; }
.stammnummer-box p { font-weight: 700; color: var(--ink); }

hr { border: none; border-top: 1px solid var(--line); margin: 1.5rem 0; }

.list_interaction {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.1rem 0 1.5rem;
  padding: 1rem 1.2rem;
  background: var(--line-2);
  border-radius: var(--radius-md);
}
.stammnummer-switch {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
}
.stammnummer-switch label { font-weight: 600; }
.stammnummer-switch select {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
  background: linear-gradient(180deg, var(--brand-l), var(--brand));
  border: none;
  border-radius: 999px;
  padding: 0.35rem 1.15rem;
  cursor: pointer;
  box-shadow: var(--shadow-brand);
}
.form-buttons { display: flex; flex-wrap: wrap; gap: 0.35rem; }

/* ============================ TABELLE ============================ */
.table-container { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.styled-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
.styled-table thead tr { background: var(--line-2); }
.styled-table th {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  text-align: left;
  padding: 0.9rem 1rem;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  border-bottom: 1px solid var(--line);
}
.styled-table td {
  padding: 0.5rem 0.8rem;
  border-bottom: 1px solid var(--line-2);
  color: var(--ink);
}
.styled-table tbody tr:last-child td { border-bottom: none; }
.styled-table tbody tr:hover { background: var(--bg-tint); }
.styled-table td input { box-shadow: none; border-width: 1.5px; padding: 0.45rem 0.65rem; }

/* ============================ RESPONSIVE ========================= */
@media (max-width: 820px) {
  .content-wrapper { padding: 1.6rem; }
  .list_interaction { flex-direction: column; align-items: stretch; }
  .form-buttons .btn { flex: 1; }

  /* Tabelle -> Kartenansicht */
  .table-container { border: none; box-shadow: none; }
  .styled-table { background: transparent; }
  .styled-table thead { display: none; }
  .styled-table, .styled-table tbody, .styled-table tr, .styled-table td { display: block; width: 100%; }
  .styled-table tr {
    margin-bottom: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
  }
  .styled-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
  }
  .styled-table td::before {
    content: attr(data-label);
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--muted);
  }
  .styled-table td input { max-width: 60%; }
}

@media (max-width: 700px) {
  .nav-burger { display: flex; }

  /* Menü standardmäßig eingeklappt, per Burger-Checkbox aufklappbar */
  .nav-list {
    flex-basis: 100%;
    flex-direction: column;
    gap: 0.15rem;
    display: none;
    padding-top: 0.4rem;
  }
  .nav-toggle:checked ~ .nav-list { display: flex; }
  .nav-list a { padding: 0.85rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ============== FlipDown – flach & modern an Soft-UI angepasst ====== */
.flipdown.flipdown__theme-dark .rotor-group-heading:before {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 700;
  letter-spacing: 0.1em;
}
.flipdown.flipdown__theme-dark .rotor-group:nth-child(n+2):nth-child(-n+3):before,
.flipdown.flipdown__theme-dark .rotor-group:nth-child(n+2):nth-child(-n+3):after {
  background-color: rgba(255, 255, 255, 0.85);
}
.flipdown.flipdown__theme-dark .rotor,
.flipdown.flipdown__theme-dark .rotor-top,
.flipdown.flipdown__theme-dark .rotor-leaf-front {
  color: var(--brand-d);
  background-color: #ffffff;
}
.flipdown.flipdown__theme-dark .rotor-bottom,
.flipdown.flipdown__theme-dark .rotor-leaf-rear {
  color: var(--brand-d);
  background-color: #fbeddd;
}
.flipdown.flipdown__theme-dark .rotor:after {
  border-top: solid 1px rgba(15, 23, 42, 0.08);
}
.flipdown .rotor, .flipdown .rotor-leaf { border-radius: 8px; }
.flipdown .rotor-group { box-shadow: var(--shadow-lg); border-radius: 10px; }

/* Countdown auf Mobilgeräten deutlich kleiner & dezenter */
@media (max-width: 700px) {
  :root { --scale-factor: 0.5; }
  .countdown-wrap { margin-top: 1rem; }
  .countdown-label { font-size: 0.62rem; margin-bottom: 0.4rem; opacity: 0.85; }

  /* flipdown.css koppelt die Breite an feste Pixelwerte (312px * scale), die
     bei den kleinen Rotoren exakt mit der Gruppensumme kollidieren -> die
     Sekunden-Gruppe bricht in die zweite Zeile um. fit-content passt den
     Container exakt an den Inhalt an (kein Umbruch mehr), flow-root fasst die
     gefloateten Gruppen ein, margin-inline: auto haelt ihn zentriert. */
  #flipdown.flipdown {
    display: flow-root;
    width: fit-content;
    max-width: 100%;
    margin-inline: auto;
  }
}
@media (max-width: 400px) {
  :root { --scale-factor: 0.42; }
}

/* =====================================================================
   LAYOUT v3 – Landing-Struktur, Info-Karte, Schritte, Footer, Auth
   ===================================================================== */

/* Breiten-Modifier für den Standard-Container */
.main-container.main--narrow { max-width: 560px; }
.main-container.main--wide   { max-width: var(--maxw); }

/* Landing-Wrapper (Startseite steuert ihre Sektionen selbst) */
.landing { max-width: var(--maxw); margin: 0 auto; padding: 2.4rem 1.5rem 0; }
.landing > section { animation: rise 0.55s ease both; }

.section-eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-d);
  display: inline-block;
  margin-bottom: 0.5rem;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: 1.4rem;
}

/* "So funktioniert's" – Schritt-Karten */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-bottom: 2.6rem;
}
.step {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.6rem 1.4rem 1.4rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 14px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: #fff;
  background: linear-gradient(180deg, var(--brand-l), var(--brand));
  box-shadow: var(--shadow-brand);
  margin-bottom: 0.9rem;
}
.step:nth-child(2) .step-num { background: linear-gradient(180deg, #efb074, var(--sky)); box-shadow: 0 10px 24px -8px rgba(231, 154, 84,0.5); }
.step:nth-child(3) .step-num { background: linear-gradient(180deg, #cf6a4a, var(--amber)); color: #fbeddd; box-shadow: 0 10px 24px -8px rgba(184, 85, 58,0.5); }
.step h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; color: var(--ink); margin-bottom: 0.35rem; }
.step p { color: var(--ink-2); font-size: 0.95rem; margin: 0; }

/* Zweispaltige Sektion: Text + Info-Karte */
.landing-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.6rem;
  align-items: start;
  margin-bottom: 2.6rem;
}
.landing-main {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.2rem;
  box-shadow: var(--shadow);
}
.landing-main p { margin: 0.7rem 0; color: var(--ink-2); }
.landing-main--standalone { margin-bottom: 1.6rem; }

.landing-grid--single { display: block; }
.landing-grid--single .infocard {
  position: static;
  max-width: 760px;
  margin-inline: auto;
}

/* Sticky Info-Karte (nächste Termine + CTAs) */
.infocard {
  position: sticky;
  top: 84px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.7rem;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  isolation: isolate;
}
.infocard::before {
  content: "";
  position: absolute;
  inset: auto -30% -40% auto;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(47, 107, 98,0.55), transparent 60%);
  filter: blur(10px);
  z-index: -1;
}
.infocard h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #fff;
}
.infocard .info-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.infocard .info-row:last-of-type { border-bottom: none; }
.infocard .info-label { color: rgba(255,255,255,0.7); font-size: 0.85rem; font-weight: 600; }
.infocard .info-value { text-align: right; font-weight: 700; font-size: 0.95rem; }
.infocard .info-value small { display: block; font-weight: 500; color: rgba(255,255,255,0.65); font-size: 0.78rem; }
.infocard .infocard-cta { margin-top: 1.3rem; display: flex; flex-direction: column; gap: 0.6rem; }
.infocard .infocard-cta .btn { width: 100%; }

/* Flyer-Band */
.flyer-band {
  background: linear-gradient(135deg, var(--bg-tint), #ffffff);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  margin-bottom: 2.6rem;
  box-shadow: var(--shadow-sm);
}
.flyer-band #flyer { margin: 1rem 0 0; }

/* Bildergalerie – native Scroll-Snap-Fläche mit Vollbildansicht */
.market-gallery {
  margin-bottom: 2.6rem;
  padding: 2rem;
  background: var(--card);
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.gallery-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.5rem;
}
.market-gallery .section-eyebrow { color: var(--brand-d); }
.market-gallery .section-title { color: var(--ink); margin-bottom: 0; }
.gallery-hint {
  display: none;
  align-items: center;
  margin-left: auto;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.gallery-frame { position: relative; }
.gallery-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 1px;
  scroll-behavior: smooth;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch;
  padding: 1px 1px 0.35rem;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-slide {
  position: relative;
  display: block;
  flex: 0 0 72%;
  width: 72%;
  height: clamp(280px, 40vw, 460px);
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--line-2);
  cursor: zoom-in;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  box-shadow: var(--shadow-sm);
}
.gallery-slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
  transition: transform 0.4s ease, filter 0.4s ease;
}
.gallery-slide:hover img { transform: scale(1.018); filter: brightness(0.96); }
.gallery-zoom {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255,255,255,0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}
.gallery-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255,255,255,0.92);
  box-shadow: var(--shadow);
  cursor: pointer;
  transform: translateY(-50%);
}
.gallery-arrow:hover { background: #fff; }
.gallery-arrow--prev { left: 1rem; }
.gallery-arrow--next { right: 1rem; }
.gallery-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
}
.gallery-dots { display: flex; gap: 0.5rem; }
.gallery-dot {
  width: 34px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--line);
  cursor: pointer;
  transition: background 0.2s ease;
}
.gallery-dot.is-active { background: var(--brand); }
.gallery-counter {
  font-family: var(--font-display);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.gallery-counter strong { color: var(--ink); }

.gallery-lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  padding: 0;
  border: 0;
  background: rgba(12,20,18,0.96);
  color: #fff;
}
.gallery-lightbox::backdrop { background: rgba(12,20,18,0.88); backdrop-filter: blur(10px); }
.gallery-lightbox[open] { display: grid; place-items: center; }
.lightbox-shell { position: relative; width: min(94vw, 1500px); height: 92vh; display: grid; place-items: center; }
.lightbox-shell figure { display: flex; flex-direction: column; align-items: center; max-width: 100%; max-height: 100%; }
.lightbox-shell figure img { display: block; max-width: 100%; max-height: calc(92vh - 48px); object-fit: contain; }
.lightbox-shell figcaption { width: 100%; display: flex; justify-content: space-between; gap: 1rem; padding-top: 0.65rem; color: rgba(255,255,255,0.65); font-size: 0.85rem; }
.lightbox-shell figcaption a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.lightbox-close,
.lightbox-arrow {
  position: fixed;
  z-index: 3;
  border: 1px solid rgba(255,255,255,0.28);
  color: #fff;
  background: rgba(255,255,255,0.1);
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.lightbox-close { top: 1rem; right: 1rem; width: 48px; height: 48px; border-radius: 50%; font-size: 2rem; line-height: 1; }
.lightbox-arrow { top: 50%; width: 50px; height: 50px; border-radius: 50%; transform: translateY(-50%); font-size: 1.3rem; }
.lightbox-arrow--prev { left: 1rem; }
.lightbox-arrow--next { right: 1rem; }

.gallery-slide:focus-visible,
.gallery-arrow:focus-visible,
.gallery-dot:focus-visible,
.lightbox-close:focus-visible,
.lightbox-arrow:focus-visible {
  outline: 3px solid #efb074;
  outline-offset: 3px;
}

/* ============================ FOOTER ============================== */
.site-footer {
  margin-top: 3rem;
  background: var(--ink);
  color: rgba(255,255,255,0.75);
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.4rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem 2.5rem;
  justify-content: space-between;
}
.footer-brand { max-width: 320px; }
.footer-brand .footer-title { font-family: var(--font-display); font-weight: 800; color: #fff; font-size: 1.1rem; margin-bottom: 0.4rem; }
.footer-brand p { font-size: 0.9rem; line-height: 1.6; }
.footer-col h4 { font-family: var(--font-display); color: #fff; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.7rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin: 0.35rem 0; }
.footer-col a { color: rgba(255,255,255,0.75); font-weight: 500; font-size: 0.92rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 1rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 1rem;
}
.footer-version {
  margin-left: auto;
  font-family: ui-monospace, "SFMono-Regular", "Menlo", monospace;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.45);
}
@media (max-width: 560px) {
  .footer-bottom { justify-content: center; }
  .footer-version { margin-left: 0; width: 100%; text-align: center; }
}

/* Auth-Seiten: fokussierte schmale Karte */
.main--narrow .content-wrapper { padding: 2.2rem; }
.auth-head { text-align: center; margin-bottom: 1.4rem; }
.auth-head h2 { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; color: var(--ink); }
.auth-head p { color: var(--muted); font-size: 0.95rem; margin-top: 0.3rem; }

/* Responsive */
@media (max-width: 880px) {
  .landing-grid { grid-template-columns: 1fr; }
  .infocard { position: static; }
  .steps { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .market-gallery {
    padding: 1.25rem 1rem 1rem;
    border-radius: var(--radius-md);
  }
  .gallery-heading {
    display: block;
    margin-bottom: 0.85rem;
  }
  .market-gallery .section-eyebrow { margin-bottom: 0.35rem; }
  .market-gallery .section-title {
    max-width: 18ch;
    font-size: clamp(1.35rem, 7vw, 1.75rem);
    line-height: 1.08;
  }
  .gallery-hint {
    display: inline-flex;
    font-size: 0.76rem;
  }
  .gallery-track {
    gap: 0.75rem;
    margin-right: -1rem;
    padding-right: 1rem;
  }
  .gallery-slide {
    flex-basis: calc(100% - 2.75rem);
    width: calc(100% - 2.75rem);
    height: clamp(210px, 68vw, 290px);
    border-radius: var(--radius-sm);
  }
  .gallery-zoom {
    right: 0.65rem;
    bottom: 0.65rem;
    width: 40px;
    height: 40px;
  }
  .gallery-arrow { display: none; }
  .gallery-footer { margin-top: 0.65rem; }
  .gallery-dot { width: 24px; height: 4px; }
  .lightbox-arrow { display: none; }
  .lightbox-shell { width: 100vw; height: 100dvh; padding: 4rem 0.75rem 1rem; }
  .lightbox-shell figure img { max-height: calc(100dvh - 8rem); }
  .lightbox-shell figcaption { padding-inline: 0.25rem; }
}

@media (max-width: 380px) {
  .market-gallery { padding-inline: 0.85rem; }
  .gallery-track { margin-right: -0.85rem; padding-right: 0.85rem; }
  .gallery-slide { flex-basis: calc(100% - 2.25rem); width: calc(100% - 2.25rem); }
  .gallery-hint { font-size: 0.72rem; }
}

/* =====================================================================
   v4 – Hero-CTAs, Logo-Mark, Artikellisten-Topbar
   ===================================================================== */

/* Logo-Mark */
.logo-mark { flex: none; vertical-align: -4px; object-fit: contain; }
.nav-brand { text-decoration: none; }
.nav-logo { color: var(--brand); }
.footer-logo { color: var(--brand); vertical-align: -4px; margin-right: 0.2rem; }
.footer-title { display: inline-flex; align-items: center; gap: 0.4rem; }

/* Hero-CTAs (nur Startseite) */
.hero-cta {
  margin-top: 1.6rem;
  display: flex;
  gap: 0.7rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: rise 0.6s ease both;
  animation-delay: 0.3s;
}
.btn-hero-primary {
  background: #fff;
  color: var(--brand-d);
  box-shadow: var(--shadow-lg);
}
.btn-hero-primary:hover { background: #fff; color: var(--brand-d); }
.btn-hero-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  box-shadow: none;
}
.btn-hero-ghost:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }

/* Artikellisten-Topbar (eingeloggter Arbeitsbereich, ohne Topnav) */
.worktop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
  padding: 0.6rem 0.4rem;
  flex-wrap: wrap;
}
.worktop-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
}
.worktop-logo { color: var(--brand); }
.stnr-badge {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--brand-d);
  background: var(--bg-tint);
  border: 1px solid #ecd3b3;
  padding: 0.45rem 1rem;
  border-radius: 999px;
}
.stnr-badge strong { color: var(--brand-d); font-family: var(--font-display); }

/* =====================================================================
   v5 – Stammnummern als Reiter (statt Dropdown)
   ===================================================================== */
.stnr-panel {
  background: var(--line-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.2rem 1.2rem;
  margin: 1.1rem 0 1.5rem;
}
.stnr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}
.stnr-head-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
}
.stnr-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}

.stnr-tabs {
  display: grid;
  /* auto-fill (nicht auto-fit): einzelne Reiter in einer nicht vollen letzten
     Reihe behalten ihre Breite, statt auf volle Breite zu strecken. So sehen
     auch krumme Anzahlen (5, 7, 8 ...) gleichmaessig aus. */
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.7rem;
  margin-bottom: 1.2rem;
}
.stnr-tab {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
button.stnr-tab:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.stnr-tab-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.stnr-tab-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--ink);
}
.stnr-tab-check {
  color: var(--brand);
  font-weight: 700;
  font-size: 1.1rem;
}
.stnr-tab-sub {
  font-size: 0.85rem;
  color: var(--muted);
}

.stnr-tab.is-active {
  background: rgba(47, 107, 98, 0.08);
  border-color: var(--brand);
  border-width: 2px;
  box-shadow: 0 0 0 3px rgba(47, 107, 98, 0.10);
}
.stnr-tab.is-active .stnr-tab-sub { color: var(--brand-d); font-weight: 600; }

.stnr-tab-add {
  border-style: dashed;
  background: transparent;
  justify-content: center;
}
.stnr-tab-add .stnr-tab-num { font-size: 1.15rem; color: var(--muted); }
button.stnr-tab-add:hover { border-color: var(--brand); }
button.stnr-tab-add:hover .stnr-tab-num { color: var(--brand-d); }

.stnr-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
}
.stnr-actions .btn-warning { margin-left: auto; }

/* Auto-Save Statusanzeige */
.save-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.75rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  background: var(--line-2);
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease;
}
.save-status-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.save-status[data-state="saved"]  { background: rgba(47, 107, 98, 0.12);  color: var(--brand-d); }
.save-status[data-state="dirty"]  { background: rgba(231, 154, 84, 0.16); color: var(--sky-d); }
.save-status[data-state="saving"] { background: var(--line-2);             color: var(--muted); }
.save-status[data-state="error"]  { background: rgba(184, 85, 58, 0.14);  color: var(--amber); }
.save-status[data-state="saving"] .save-status-dot { animation: save-pulse 1s ease-in-out infinite; }

@keyframes save-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}
@media (prefers-reduced-motion: reduce) {
  .save-status[data-state="saving"] .save-status-dot { animation: none; }
}

@media (max-width: 560px) {
  .stnr-tabs { grid-template-columns: 1fr 1fr; }
  .stnr-actions .btn { flex: 1 1 auto; }
  .stnr-actions .btn-warning { margin-left: 0; }
}
