/* Schnellansicht, unveraendert aus dem alten Theme uebernommen. */
.bb-qv[hidden] { display: none; }
  .bb-qv {
    /* `inset: 0` stimmt auf dem Desktop (Viewport ohne Scrollbar). Hat die
       Seite aber horizontalen Ueberlauf, wird dieser Block breiter als der
       sichtbare Bereich und das Fenster zentriert sich gegen die falsche
       Breite. Die max-Werte deckeln das auf den sichtbaren Viewport; dvh
       folgt zusaetzlich der ein- und ausfahrenden Browserleiste. */
    position: fixed; inset: 0; z-index: 10001;
    max-width: 100vw; max-height: 100vh; max-height: 100dvh;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    box-sizing: border-box;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Space Grotesk', sans-serif;
  }
  .bb-qv__backdrop { position: absolute; inset: 0; background: rgba(40,20,60,.42); backdrop-filter: blur(2px); }
  .bb-qv__win {
    position: relative; z-index: 1;
    display: flex; gap: 0;
    width: 840px; max-width: calc(100vw - 40px); max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    /* Der Schatten liegt nur rechts und unten. Ohne Ausgleich wirkt das Fenster
       auf schmalen Displays nach rechts verschoben; der Rand nimmt ihn auf. */
    margin: 0 9px 9px 0;
    background: #ffffff; border: 2px solid #7b5bd6; box-shadow: 9px 9px 0 rgba(123,91,214,.28);
    overflow: hidden; animation: bbQvPop .34s cubic-bezier(.34,1.56,.64,1);
  }
  @keyframes bbQvPop { 0% { transform: scale(.85); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
  .bb-qv__x {
    position: absolute; top: 8px; right: 8px; z-index: 2;
    width: 26px; height: 26px; padding: 0; border: 2px solid #7b5bd6; background: #e9dbfa;
    color: #3c2a6e; font-family: 'VT323', monospace; font-size: 20px; line-height: 1; cursor: pointer;
  }
  .bb-qv__x:hover { background: #ff5fb2; color: #fff; }
  .bb-qv__media { position: relative; flex: 0 0 46%; background: #f3e7fa; border-right: 2px solid #7b5bd6; display: flex; align-items: center; justify-content: center; }
  .bb-qv__img { width: 100%; height: 100%; max-height: calc(100dvh - 48px); object-fit: contain; display: block; }
  .bb-qv__nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 34px; height: 34px; padding: 0; cursor: pointer;
    font-family: 'VT323', monospace; font-size: 26px; line-height: 1;
    color: #2b1b4d; background: rgba(255,255,255,.82);
    border: 2px solid #7b5bd6; border-radius: 5px;
  }
  .bb-qv__nav:hover { background: #fff; }
  .bb-qv__nav[hidden] { display: none; }
  .bb-qv__nav--prev { left: 10px; }
  .bb-qv__nav--next { right: 10px; }
  .bb-qv__dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; gap: 6px; justify-content: center; }
  .bb-qv__dot {
    width: 10px; height: 10px; padding: 0; cursor: pointer;
    background: rgba(255,255,255,.8); border: 2px solid #7b5bd6; border-radius: 50%;
  }
  .bb-qv__dot[aria-current="true"] { background: #b478e8; }
  .bb-qv__info { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 30px 28px; overflow-y: auto; }
  .bb-qv__badges { display: flex; flex-wrap: wrap; gap: 6px; }
  .bb-qv__badge {
    font-family: 'VT323', monospace; font-size: 14px; letter-spacing: .06em;
    padding: 1px 8px; border: 2px solid #7b5bd6; background: #e9dbfa; color: #3c2a6e; text-transform: uppercase;
  }
  .bb-qv__badge--worn { border-color: #d9a900; background: #ffd23d; color: #5a4300; border-radius: 5px; }
  .bb-qv__badge--pre { border-color: #ff5fb2; background: #ffe3f1; color: #8a1f52; }
  .bb-qv__title { margin: 0; font-family: 'Unbounded', sans-serif; font-weight: 900; font-size: 26px; line-height: 1.05; color: #141216; }
  .bb-qv__price { font-family: 'Unbounded', sans-serif; font-weight: 700; font-size: 20px;
    background: linear-gradient(90deg,#b478e8,#ff5fb2); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .bb-qv__price s { color: #b3aabf; -webkit-text-fill-color: #b3aabf; margin-left: 8px; font-size: 15px; }
  .bb-qv__desc { font-size: 14.5px; line-height: 1.65; color: #6d6579; max-height: 34vh; overflow-y: auto; }
  .bb-qv__desc p { margin: 0 0 8px; }
  .bb-qv__variants { display: flex; flex-direction: column; gap: 10px; }
  .bb-qv__opt-name { font-family: 'VT323', monospace; font-size: 16px; color: #8a6fc9; letter-spacing: .08em; text-transform: uppercase; }
  .bb-qv__opt-vals { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
  .bb-qv__opt-val {
    padding: 5px 12px; border: 2px solid #7b5bd6; background: #fff; color: #3c2a6e;
    font-family: 'Space Grotesk', sans-serif; font-size: 13px; cursor: pointer;
  }
  .bb-qv__opt-val[aria-pressed="true"] { background: #7b5bd6; color: #fff; }
  .bb-qv__add {
    margin-top: 4px; padding: 13px 22px; border: none; cursor: pointer;
    color: #fff; font-family: 'Unbounded', sans-serif; font-weight: 700; font-size: 12px;
    letter-spacing: .09em; text-transform: uppercase;
    background: linear-gradient(90deg,#b478e8,#ff5fb2,#b478e8); background-size: 200% auto;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
    transition: background-position .4s ease, filter .15s ease, transform .12s ease;
  }
  .bb-qv__add:hover { background-position: 100% 0; filter: brightness(1.06); }
  .bb-qv__add:active { transform: translateY(1px) scale(.99); }
  .bb-qv__add:disabled { filter: grayscale(.7) brightness(.9); cursor: not-allowed; }
  .bb-qv__msg { margin: 0; font-family: 'VT323', monospace; font-size: 18px; color: #2a8a4a; }
  .bb-qv__ship { margin: 0; font-family: 'VT323', monospace; font-size: 18px; color: #b478e8; }
  .bb-qv__msg--err { color: #c0255f; }
  .bb-qv__full { font-size: 13px; color: #b478e8; text-decoration: none; }
  .bb-qv__full:hover { color: #ff5fb2; text-decoration: underline; }
  @media (max-width: 700px) {
    .bb-qv__win {
      flex-direction: column;
      /* Feste Hoehe statt nur einer Obergrenze: nur so hat die Textspalte eine
       * definite Hoehe, und die Beschreibung kann den Rest verlaesslich
       * einnehmen, statt auf Inhaltshoehe zusammenzufallen. */
      height: calc(100vh - 32px);
      height: calc(100dvh - 32px);
      max-height: calc(100vh - 32px);
      max-height: calc(100dvh - 32px);
    }
    /* Produktbilder sind quadratisch. Ein breiter, flacher Medienbereich
       liess mit object-fit:contain Luecken links und rechts stehen, also
       bekommt die Box dasselbe Seitenverhaeltnis wie die Bilder. */
    .bb-qv__media {
      flex: 0 0 auto;
      aspect-ratio: 1 / 1;
      max-height: 44vh;
      max-height: 44dvh;
      border-right: none;
      border-bottom: 2px solid #7b5bd6;
    }
    /* Deckelt die Hoehe den quadratischen Kasten, fuellt `cover` ihn ohne
       seitliche Luecken; beschnitten werden dabei nur wenige Prozent oben
       und unten. */
    .bb-qv__img { max-height: 44vh; max-height: 44dvh; object-fit: cover; }
    /* Kein zweiter Scrollbereich: die Spalte selbst scrollt nicht mehr,
       gescrollt wird nur noch in der Beschreibung. */
    .bb-qv__info { padding: 14px; gap: 7px; overflow: hidden; }
    .bb-qv__desc { flex: 1 1 auto; min-height: 4em; max-height: none; overflow-y: auto; }
  }
  @media (prefers-reduced-motion: reduce) { .bb-qv__win { animation: none; } }

/* ---------- Warenkorb ----------
   Frueher die Schublade des Themes, jetzt eigener Code im selben Fensterlook
   wie die Schnellansicht. */
.bb-cart[hidden] { display: none; }

.bb-cart {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  justify-content: flex-end;
}

.bb-cart__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(40, 20, 60, .42);
  backdrop-filter: blur(2px);
}

.bb-cart__win {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(420px, 100vw);
  background: #fff;
  border-left: 2px solid #7b5bd6;
  animation: bbCartIn .28s cubic-bezier(.34, 1.4, .64, 1);
}

@keyframes bbCartIn {
  from { transform: translateX(16px); opacity: 0; }
}

.bb-cart__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 2px solid #7b5bd6;
  background: #c9aef2;
  font-family: 'VT323', monospace;
  font-size: 20px;
  letter-spacing: .06em;
  color: #3c2a6e;
}

.bb-cart__x {
  border: 0;
  background: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: inherit;
}

.bb-cart__items {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 10px 16px;
}

.bb-cart__row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #eee7f7;
}

.bb-cart__row img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border: 2px solid #e2d6f7;
}

.bb-cart__name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 500;
}

.bb-cart__variant {
  display: block;
  font-size: 12px;
  color: #8d8d93;
}

.bb-cart__qty {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.bb-cart__qty button {
  width: 24px;
  height: 24px;
  border: 1px solid #d8cdf0;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  line-height: 1;
}

.bb-cart__line {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  white-space: nowrap;
}

.bb-cart__empty {
  padding: 36px 0;
  text-align: center;
  color: #9a90ab;
  font-family: 'Space Grotesk', sans-serif;
}

.bb-cart__notice {
  margin: 0 16px 10px;
  padding: 12px 14px;
  border: 2px solid #7b5bd6;
  background: #f2eafc;
  font-family: 'VT323', monospace;
  font-size: 17px;
  line-height: 1.35;
  color: #3c2a6e;
}

.bb-cart__foot {
  padding: 14px 16px 18px;
  border-top: 2px solid #7b5bd6;
  background: #faf7fd;
}

.bb-cart__sum {
  display: flex;
  justify-content: space-between;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 16px;
}

.bb-cart__hint {
  margin: 4px 0 12px;
  font-size: 12px;
  color: #8d8d93;
}

.bb-cart__go {
  width: 100%;
  padding: 14px 18px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #b478e8, #ff5fb2);
  color: #fff;
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .04em;
  cursor: pointer;
}

.bb-cart__go[disabled] { opacity: .6; cursor: default; }

.bb-cart__msg {
  margin: 10px 0 0;
  font-size: 13px;
  color: #c0392b;
}

/* Schwebender Knopf unten rechts, zeigt die Anzahl im Korb */
.bb-cart-fab[hidden] { display: none; }

.bb-cart-fab {
  position: fixed;
  right: 18px;
  bottom: 88px;
  z-index: 940;
  width: 54px;
  height: 54px;
  border: 2px solid #141216;
  border-radius: 50%;
  background: #fff url('/assets/img/bb-cart-plus.svg') center / 22px no-repeat;
  box-shadow: 0 8px 20px rgba(91, 48, 150, .28);
  cursor: pointer;
}

.bb-cart-fab__count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ff4fa8;
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  line-height: 22px;
}

@media screen and (max-width: 749px) {
  .bb-cart-fab { bottom: 86px; right: 16px; }
}
