/* FOODMONSTAS Warenkorb: Symbol in der Navigation und Seitenleiste */

.fm-korb-knopf {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #010101;
  cursor: pointer;
}
.fm-korb-knopf:hover { color: #ea6254; }
.fm-korb-knopf:focus-visible { outline: 2px solid #5685f4; outline-offset: 2px; }

.fm-korb-zahl {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #ea6254;
  color: #fff;
  font: 800 11px/18px Nunito, sans-serif;
  text-align: center;
}
.fm-korb-zahl[hidden] { display: none; }

/* Handy und Tablet: neben dem Menuesymbol */
@media (max-width: 991.98px) {
  .fm-korb-knopf { margin-left: auto; margin-right: 4px; }
}

/* Desktop: rechts neben der Navigation, Menue rueckt fest um die Breite ein */
@media (min-width: 992px) {
  .header .navbar { position: relative; padding-right: 52px; }
  .header .navbar-nav .nav-link { white-space: nowrap; }
  .fm-korb-knopf { position: absolute; right: 0; top: 26px; }
}

.fm-korb-sperre, .fm-korb-sperre body { overflow: hidden; }

.fm-korb-schleier {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(1, 1, 1, .45);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s;
}
.fm-korb-schleier--offen { opacity: 1; visibility: visible; }

.fm-korb {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 3001;
  display: flex;
  flex-direction: column;
  width: 420px;
  max-width: 100%;
  background: #fff;
  color: #010101;
  font-family: Nunito, sans-serif;
  box-shadow: -8px 0 30px rgba(1, 1, 1, .15);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform .25s ease, visibility .25s;
}
.fm-korb--offen { transform: translateX(0); visibility: visible; }
.fm-korb:focus { outline: none; }

.fm-korb-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 2px solid #e0e0e0;
}
.fm-korb-titel { margin: 0; font-size: 22px; font-weight: 900; line-height: 1.2; }
.fm-korb-zu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #010101;
  cursor: pointer;
}

.fm-korb-liste {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 0 20px;
  overflow-y: auto;
  list-style: none;
}
.fm-korb-liste[hidden], .fm-korb-fuss[hidden], .fm-korb-leer[hidden], .fm-korb-bezahlt[hidden] { display: none; }

.fm-korb-zeile {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid #e0e0e0;
}
.fm-korb-bild {
  display: block;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border-radius: 8px;
  background: #f5f5f5;
}
.fm-korb-bild img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fm-korb-mitte { min-width: 0; }
.fm-korb-name {
  display: block;
  color: #010101;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none;
}
.fm-korb-name:hover { color: #ea6254; }
.fm-korb-detail { display: block; margin-top: 2px; color: #555; font-size: 13px; }
.fm-korb-preis { font-size: 15px; font-weight: 800; white-space: nowrap; }

.fm-korb-reihe { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.fm-korb-menge {
  display: inline-flex;
  align-items: center;
  border: 1px solid #c8c8c8;
  border-radius: 6px;
}
.fm-korb-menge button {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #010101;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}
.fm-korb-menge button:disabled { color: #b5b5b5; cursor: not-allowed; }
.fm-korb-wert { min-width: 24px; font-size: 15px; font-weight: 800; text-align: center; }

.fm-korb-link {
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: #010101;
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
}
.fm-korb-link:hover { color: #ea6254; }

.fm-korb-fuss {
  flex: 0 0 auto;
  padding: 16px 20px 20px;
  border-top: 2px solid #e0e0e0;
  background: #fff;
}
.fm-korb-fuss > .fm-korb-link { display: block; margin: 10px auto 0; }
.fm-korb-bezahlt { margin: 0 0 10px; font-size: 14px; }
.fm-korb-summe {
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 800;
}
.fm-korb-hinweis { margin: 2px 0 14px; color: #555; font-size: 13px; }
.fm-korb-hinweis a { color: inherit; text-decoration: underline; }

.fm-korb-haupt {
  display: block;
  width: 100%;
  padding: 13px 18px;
  border-radius: 6px;
  background: #e9a134;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}
.fm-korb-haupt:hover { background: #d48f25; color: #fff; }

.fm-korb-leer { padding: 32px 20px; text-align: center; }
.fm-korb-leer p { margin-bottom: 16px; font-size: 16px; }

@media (max-width: 480px) {
  .fm-korb { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .fm-korb, .fm-korb-schleier { transition: none; }
}
