:root {
  --qv-text: #111111;
  --qv-muted: #6b7280;
  --qv-line: rgba(0, 0, 0, 0.10);
  --qv-line-soft: rgba(0, 0, 0, 0.06);
  --qv-accent: #ff8a1c;
  --qv-accent-soft: rgba(255, 138, 28, 0.10);
  --qv-shadow-soft: 0 10px 30px rgba(0,0,0,0.05);
  --qv-danger: #b42318;
  --qv-success: #0f6a22;
}

/* =========================
   BACKDROP + MODAL
========================= */

.qv-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50000;
  display: block;
  visibility: hidden;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.qv-backdrop.open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.qv-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(1120px, 94vw);
  max-height: min(88vh, 900px);
  transform: translate(-50%, -50%) scale(0.985);
  transition: transform 0.2s ease, opacity 0.2s ease;
  background: rgba(255,255,255,0.98);
  border-radius: 22px;
  box-shadow:
    0 30px 80px rgba(15, 23, 42, 0.18),
    0 8px 24px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  color: var(--qv-text);
}

.qv-backdrop.open .qv-modal {
  transform: translate(-50%, -50%) scale(1);
}

.qv-content {
  position: relative;
  padding: 30px 34px 24px;
  overflow-y: auto;
  max-height: inherit;
}

/* =========================
   TOPBAR
========================= */

.qv-topbar {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 16px;
  margin-bottom: 8px;
}

.qv-title {
  margin: 0;
  font-size: clamp(2rem, 1.35rem + 1.5vw, 3.25rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 900;
  color: #0f172a;

  text-wrap: balance;
  max-width: none;   /* 🔥 wichtig */
}

.qv-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 14px;
  background: rgba(255,255,255,0.94);
  color: #64748b;
  box-shadow: 0 8px 20px rgba(15,23,42,0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.qv-close:hover {
  background: #fff;
  box-shadow: 0 12px 24px rgba(15,23,42,0.12);
}

.qv-close:active {
  opacity: 0.88;
}

.qv-close-desktop,
.qv-close-mobile {
  line-height: 1;
  font-weight: 800;
}

.qv-close-desktop {
  display: inline;
  font-size: 1.15rem;
}

.qv-close-mobile {
  display: none;
}

/* =========================
   MAIN
========================= */

.qv-main {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 84px;
  align-items: start;
  margin-top: 6px;
}

.qv-media {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.qv-imgcard {
  width: 100%;
}

.qv-imgwrap {
  overflow: hidden;
}

.qv-imgwrap,
.qv-imgwrap img {
  border-radius: 0 !important;
}

.qv-imgwrap img {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 420px;
  height: auto;
  object-fit: contain;
}

.qv-info {
  min-width: 0;
}

/* =========================
   SPECS – KEINE PANELS
========================= */

.qv-specs {
  width: 100%;
  max-width: 520px;
  margin: 10px 0 0;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
}

.qv-spec-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 58px;
  padding: 0;
  border-top: 1px solid var(--qv-line-soft);
}

.qv-spec-row:first-child {
  border-top: 1px solid var(--qv-line);
}

.qv-spec-label {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  line-height: 1.25;
}

.qv-spec-value {
  font-size: 1.06rem;
  line-height: 1.35;
  font-weight: 800;
  color: #0f172a;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* =========================
   FOOTER
========================= */

.qv-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--qv-line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
  grid-template-areas:
    "left legal"
    "actions legal";
  gap: 8px 34px;
  align-items: start;
}

.qv-footer-actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-width: 0;
  margin-top: -2px;
}

.qv-footer-actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-width: 0;
}

.qv-footer-legal {
  grid-area: legal;
  min-width: 0;
  align-self: stretch;
}

/* =========================
   AVAILABILITY + QTY
========================= */

.qv-availability {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
}

.qv-availability.in-stock {
  color: #16a34a;
}

.qv-availability.out-stock {
  color: #dc2626;
}

.qv-qty {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 6px 8px;
  border-radius: 16px;
  background: rgba(255,255,255,0.84);
  border: 1px solid rgba(15,23,42,0.08);
  box-shadow: 0 6px 16px rgba(15,23,42,0.06);
}

.qv-qty-btn {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(15,23,42,0.10);
  background: #fff;
  border-radius: 10px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0;
  line-height: 1;
  font-size: 1rem;
  font-weight: 700;

  cursor: pointer;
  transition: transform 0.15s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.qv-qty-btn:hover {
  background: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(15,23,42,0.08);
}

.qv-qty-btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: saturate(0.7);
  transform: none !important;
}

.qv-qty-btn.is-disabled:hover {
  transform: none !important;
  box-shadow: none !important;
  background: #fff;
}

.qv-qty-value {
  min-width: 18px;
  text-align: center;
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
}

/* =========================
   BUTTONS
========================= */

.qv-btn {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 15px;
  font-size: 0.98rem;
  font-weight: 800;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.88);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.18s ease, background 0.18s ease;
  position: relative;
  z-index: 2;
}

.qv-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(15,23,42,0.08);
}

.qv-btn.qv-fav {
  background: linear-gradient(135deg, #ff2e55, #ff4b6e);
  color: #fff;
  border: none;
  box-shadow: 0 12px 20px rgba(255,90,95,0.22);
}

.qv-btn.qv-fav:hover {
  box-shadow: 0 16px 26px rgba(255,90,95,0.28);
}

.qv-btn.qv-fav.active {
  background: linear-gradient(135deg, #d90429, #ef233c);
  box-shadow: 0 16px 26px rgba(217,4,41,0.32);
}

.qv-btn.primary {
  background: linear-gradient(135deg, #ff5a00, #ff9500);
  color: #fff;
  border: none;
  box-shadow:
    0 14px 28px rgba(255,106,0,0.34),
    inset 0 1px 0 rgba(255,255,255,0.30);
}

.qv-btn.primary:hover {
  box-shadow:
    0 18px 32px rgba(255,106,0,0.40),
    inset 0 1px 0 rgba(255,255,255,0.34);
}

.qv-btn.is-disabled {
  background: linear-gradient(135deg, #ff7a1a, #ffae42) !important;
  color: #fff !important;
  border: none !important;
  opacity: 0.82;
  filter: saturate(0.78) brightness(0.96);
  cursor: not-allowed;
  transform: none !important;
  box-shadow: 0 10px 20px rgba(255,120,0,0.14) !important;
}

.qv-btn.is-disabled:hover {
  transform: none !important;
  box-shadow: 0 10px 20px rgba(255,120,0,0.14) !important;
  background: linear-gradient(135deg, #ff7a1a, #ffae42) !important;
}

/* =========================
   LEGAL – LINIENSTIL, KEINE PANELS
========================= */

.qv-legal-card {
  width: 100%;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
}

.qv-legal-title {
  margin: 0 0 10px;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}

.qv-legal-list {
  display: grid;
}

.qv-legal-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid var(--qv-line-soft);
}

.qv-legal-item:first-child {
  border-top: 1px solid var(--qv-line);
}

.qv-legal-label {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
  line-height: 1.35;
}

.qv-legal-value {
  font-size: 0.94rem;
  line-height: 1.45;
  font-weight: 700;
  color: #0f172a;
  overflow-wrap: anywhere;
}

.qv-legal-value a {
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 800;
}

.qv-legal-value a:hover {
  text-decoration: underline;
}

.qv-legal-note {
  margin-top: 6px;        /* vorher 12px */
  padding-top: 6px;       /* vorher 10px */
  border-top: 1px solid var(--qv-line-soft);
  font-size: 0.82rem;
  line-height: 1.4;
  color: #64748b;
}

/* =========================
   TOAST
========================= */

.qv-toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  z-index: 99999;
  padding: 14px 18px;
  border-radius: 16px;
  font-size: 0.95rem;
  font-weight: 800;
  text-align: center;
  color: white;
  box-shadow: 0 18px 44px rgba(0,0,0,0.30);
  opacity: 0;
  pointer-events: none;
}

.qv-toast.show {
  animation: qvToastUp 1.2s ease forwards;
}

@keyframes qvToastUp {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(14px) scale(.96);
  }

  12% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }

  70% {
    opacity: 1;
    transform: translateX(-50%) translateY(-8px);
  }

  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-36px) scale(.96);
  }
}

.qv-toast.success {
  background: linear-gradient(135deg, rgba(22,163,74,0.96), rgba(34,197,94,0.96));
}

.qv-toast.error {
  background: linear-gradient(135deg, rgba(220,38,38,0.97), rgba(239,68,68,0.97));
}

body.qv-open {
  overflow: hidden;
}

/* =========================
   LAPTOP
========================= */

@media (max-width: 1100px) {
  .qv-modal {
    width: min(980px, 94vw);
  }

  .qv-content {
    padding: 26px 28px 22px;
  }

  .qv-main {
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 52px;
  }

  .qv-spec-row {
    grid-template-columns: 145px minmax(0, 1fr);
  }

  .qv-footer {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 330px);
    gap: 14px 22px;
  }

  .qv-legal-item {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 10px;
  }
}

/* =========================
   TABLET
========================= */

@media (max-width: 860px) {
  .qv-modal {
    width: min(760px, 94vw);
    border-radius: 20px;
  }

  .qv-content {
    padding: 24px 22px 20px;
  }

  .qv-topbar {
    display: block;
    padding-right: 56px;
    margin-bottom: 12px;
  }

  .qv-title {
    max-width: none;
    font-size: 1.5rem;
    line-height: 1.1;
  }

  .qv-main {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 12px;
  }

  .qv-media {
    max-width: 340px;
  }

  .qv-specs {
    max-width: none;
  }

  .qv-footer {
    grid-template-columns: 1fr;
    grid-template-areas:
      "left"
      "actions"
      "legal";
    align-items: stretch;
    gap: 12px;
  }

  .qv-footer-actions {
    justify-content: flex-start;
  }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 560px) {
  .qv-backdrop {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

.qv-modal {
  width: 100vw;
  height: calc(100dvh - 60px);
  max-height: calc(100dvh - 60px);
  top: 60px;
  left: 50%;
  transform: translate(-50%, 0) !important;
  border-radius: 0 !important;
  box-shadow: none;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

  .qv-backdrop.open .qv-modal {
    transform: translate(-50%, 0) !important;
  }

.qv-content {
  padding: 0 14px calc(96px + env(safe-area-inset-bottom));
  min-height: auto;
  box-sizing: border-box;
}

  .qv-topbar {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0 0 14px;
    padding: 10px 0 8px;
    min-height: 40px;
  }

  .qv-close {
    position: static;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: transparent;
    box-shadow: none;
    color: #0f172a;
    order: -1;
  }

  .qv-close-desktop {
    display: none !important;
  }

  .qv-close-mobile {
    display: inline !important;
    font-size: 1.35rem;
    font-weight: 900;
  }

  .qv-title {
    margin: 0;
    padding: 0;
    max-width: none;
    font-size: 1.56rem;
    line-height: 1.12;
  }

  .qv-main {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 0;
  }

  .qv-media {
    max-width: 180px;
    margin: 0 auto;
  }

  .qv-imgwrap img {
    max-height: 220px;
    width: auto;
    max-width: 100%;
  }

  .qv-spec-row {
    grid-template-columns: 98px minmax(0, 1fr);
    gap: 10px;
    min-height: 40px;
  }

  .qv-spec-label {
    font-size: 0.68rem;
    letter-spacing: 0.06em;
  }

  .qv-spec-value {
    font-size: 0.9rem;
    line-height: 1.25;
  }

  .qv-footer {
    grid-template-columns: 1fr;
    grid-template-areas:
      "left"
      "actions"
      "legal";
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
  }

  .qv-footer-left {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    justify-items: start;
  }

  .qv-availability {
    justify-content: flex-start;
    text-align: left;
    font-size: 1rem;
    padding-left: 0;
  }

  .qv-qty {
    justify-content: center;
    min-height: 40px;
    padding: 4px 6px;
    gap: 8px;
  }

  .qv-qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 0.9rem;
    padding: 0;
    line-height: 1;
  
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .qv-qty-value {
    font-size: 0.9rem;
  }

  .qv-footer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
  }

  .qv-btn {
    width: 100%;
    min-height: 40px;
    padding: 0 10px;
    border-radius: 12px;
    font-size: 0.84rem;
  }

  .qv-legal-title {
    font-size: 0.7rem;
    margin-bottom: 8px;
  }

  .qv-legal-item {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 8px;
    padding: 10px 0;
  }

  .qv-legal-label {
    font-size: 0.66rem;
  }

  .qv-legal-value {
    font-size: 0.84rem;
    line-height: 1.35;
  }

  .qv-legal-note {
    font-size: 0.76rem;
    line-height: 1.35;
  }

  .qv-toast {
    bottom: 14px;
    width: calc(100vw - 16px);
    min-width: 0;
    border-radius: 14px;
    font-size: 0.88rem;
    padding: 12px 14px;
  }
}

.recently-viewed-section {
  max-width: 1100px;
  margin: 36px auto;
  padding: 0 16px;
}

.recently-viewed-head h2 {
  margin: 0;
  font-size: 1.25rem;
}

.recently-viewed-head span {
  font-size: 0.9rem;
  opacity: 0.75;
}

.recently-viewed-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.recent-card {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255,255,255,0.85);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

.recent-card img {
  width: 48px;
  height: 68px;
  object-fit: contain;
}

.qv-similar {
  margin-top: 20px;
}

.qv-similar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.qv-similar-item {
  cursor: pointer;
  text-align: center;
  font-size: 12px;
}

.qv-similar-item img {
  width: 100%;
  border-radius: 6px;
}