body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: var(--footer-height);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(46vw 46vw at -8vw -10vw, var(--surface-strong), transparent 70%),
    radial-gradient(40vw 40vw at 105vw 100vh, var(--surface), transparent 70%);
}
main { flex: 1 0 auto; }

a { color: var(--accent); }
a:hover { text-decoration: underline; }
p { margin-bottom: 1em; }
ul, ol { padding-left: 1.2em; list-style: revert; }
small, .small { font-size: 0.85em; color: var(--muted); }
sup { line-height: 0; }

h1, h2, h3, h4, h5, h6 { line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 0.5em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); font-weight: 800; }
h2, .bs-h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; }
h3, .bs-h3 { font-size: 1.3rem; font-weight: 700; }
h4, .bs-h4 { font-size: 1.1rem; font-weight: 700; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Kopf ---------- */
.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 0;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  transform: translateY(-120%);
}
.skip-link:focus { transform: none; text-decoration: none; }
main:focus { outline: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar, .site-footer .wrap {
  max-width: var(--container-width);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.site-header .bar {
  min-height: var(--header-height);
  padding-top: 8px;
  padding-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  flex: none;
  background: var(--pill-bg);
  border-radius: 12px;
  padding: 2px 10px;
  box-shadow: var(--shadow-pill);
}
.brand:hover { text-decoration: none; }
.logo { height: 42px; width: auto; display: block; }
.logo-large { display: inline-block; max-width: 100%; padding: 8px 20px; border-radius: var(--radius); background: var(--pill-bg); box-shadow: var(--shadow-pill); }
.logo-large .logo { width: min(750px, 100%); height: auto; }
.logo-word { fill: var(--logo-word); }
.logo-m { fill: var(--logo-m); }
.logo-r { fill: var(--logo-r); }

.site-menu { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.site-nav { display: flex; gap: 6px; }
.site-nav a, .tools a.cart {
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
}
.site-nav a:hover, .site-nav a[aria-current="page"], .tools a.cart:hover {
  color: var(--text);
  background: var(--surface-strong);
  text-decoration: none;
}
.tools { display: flex; align-items: center; gap: 12px; }
.tools .greeting { margin: 0; color: var(--muted); }
.tools .btn { margin: 0; }
.cart { display: inline-flex; align-items: center; gap: 8px; }
.cart-count {
  min-width: 1.6em;
  padding: 0 0.45em;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: var(--on-accent);
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
}
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang a { padding: 5px 12px; color: var(--muted); font-size: 0.85rem; font-weight: 700; }
.lang a:hover { color: var(--text); text-decoration: none; }
.lang a[aria-current="true"] { background: var(--surface-strong); color: var(--text); }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 40px;
  padding: 0;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--text); margin: 4px auto; }
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .site-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 8px var(--gutter) 18px;
    background: var(--bg2);
    border-bottom: 1px solid var(--line);
  }
  body.nav-open .site-menu { display: flex; }
  .site-nav { flex-direction: column; gap: 0; }
  .site-nav a { padding: 14px 12px; border-radius: 10px; }
  .tools { flex-wrap: wrap; padding: 6px 12px 0; }
}

/* ---------- Bühne ---------- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 40px var(--gutter) 56px;
}
.container .container { padding: 0; max-width: none; }

/* ---------- Raster (Bootstrap-kompatible Klassen) ---------- */
.row { display: flex; flex-wrap: wrap; margin-left: calc(var(--gutter) / -2); margin-right: calc(var(--gutter) / -2); }
.row > * { padding-left: calc(var(--gutter) / 2); padding-right: calc(var(--gutter) / 2); max-width: 100%; }
.col { flex: 1 0 0%; min-width: 0; }
.col-md-3, .col-md-4, .col-md-9, .col-md-12 { flex: 0 0 100%; }

@media (min-width: 768px) {
  .col-md-3 { flex-basis: 25%; max-width: 25%; }
  .col-md-4 { flex-basis: 33.3333%; max-width: 33.3333%; }
  .col-md-9 { flex-basis: 75%; max-width: 75%; }
  .col-md-12 { flex-basis: 100%; max-width: 100%; }
  .offset-md-3 { margin-left: 25%; }
  .text-md-right { text-align: right; }
  .text-md-center { text-align: center; }
}
@media (max-width: 767px) {
  .col { flex-basis: 100%; }
  .col-md-3, .col-md-4, .col-md-9 { margin-bottom: 1rem; }
}

/* ---------- Hilfsklassen ---------- */
.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.justify-content-start { justify-content: flex-start; }
.justify-content-end { justify-content: flex-end; }
.justify-content-center { justify-content: center; }
.justify-content-around { justify-content: space-around; }
.h-100 { height: 100%; }
.overflow-auto { overflow: auto; }
.float-left { float: left; }
.float-right { float: right; }
.clearfix::after { content: ""; display: table; clear: both; }
.text-center { text-align: center; }
.text-justify { text-align: justify; }
.text-muted { color: var(--muted); }
.text-danger { color: var(--danger); }
.bg-light { background: var(--surface); }
.bg-white { background: var(--surface-strong); }
.shadow { box-shadow: var(--shadow-card); }

.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.py-3 { padding-top: 1rem; padding-bottom: 1rem; }
.m-3 { margin: 1rem; }
.mx-2 { margin-left: 0.5rem; margin-right: 0.5rem; }
.mx-5 { margin-left: 3rem; margin-right: 3rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.my-2 { margin-top: 0.5rem; margin-bottom: 0.5rem; }
.my-3 { margin-top: 1rem; margin-bottom: 1rem; }
.my-5 { margin-top: 3rem; margin-bottom: 3rem; }
.my-auto { margin-top: auto; margin-bottom: auto; }
.ml-3 { margin-left: 1rem; }
.mr-3 { margin-right: 1rem; }
.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }

@media (max-width: 767px) {
  .float-left, .float-right { float: none; margin-left: 0; margin-right: 0; margin-bottom: 1rem; }
  .text-justify { text-align: left; }
}

/* ---------- Seitenleiste (Katalog) ---------- */
.cosmatx-sidebar-scrollable {
  position: sticky;
  top: calc(var(--header-height) + 16px);
  max-height: calc(100vh - var(--header-height) - var(--footer-height) - 32px);
}
.navbar { display: flex; flex-wrap: wrap; align-items: center; padding: 0; }
.navbar-nav { display: flex; flex-direction: column; width: 100%; list-style: none; margin: 0; border-radius: var(--radius); }
.navbar-nav .navbar-nav { margin-top: 0.4rem; }
.navbar-nav li { border-radius: 8px; }
.navbar-nav a { display: block; }
@media (max-width: 767px) {
  .cosmatx-sidebar-scrollable { position: static; max-height: none; }
}

/* ---------- Fuß ---------- */
.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  height: var(--footer-height);
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.88rem;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.site-footer .wrap {
  width: 100%;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.site-footer .links {
  flex: 0 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.site-footer .links::-webkit-scrollbar { display: none; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.site-footer p { margin: 0; flex: none; white-space: nowrap; }
.site-footer .contract { order: 1; }
@media (min-width: 561px) {
  :root:has(.site-footer.stacked) { --footer-height: 80px; }
  .site-footer.stacked .wrap { flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; }
  .site-footer.stacked p { font-size: 0.8rem; }
}
@media (max-width: 560px) {
  :root { --footer-height: 44px; }
  .site-footer { font-size: 0.8rem; }
  .site-footer .links { gap: 14px; }
  .hide-s { display: none; }
}
