/* Google-Bewertungsaufsteller: ergänzt angebote.css */

/* ── Hero ── */
#hero.bw-hero {
  min-height: 0;
  padding: 9rem 0 4.5rem;
  text-align: center;
}

.bw-hero-wrap {
  width: 100%;
  position: relative;
  z-index: 2;
}

.bw-hero .a-breadcrumb {
  justify-content: center;
  margin-bottom: 2rem;
}

.bw-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
}

.bw-hero-text {
  min-width: 0;
}

.bw-hero-text h1 {
  font-size: clamp(1.6rem, 7vw, 2.75rem);
  line-height: 1.2;
  margin-bottom: 1.25rem;
  max-width: 100%;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.bw-lead .nowrap {
  white-space: nowrap;
}

.bw-lead {
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 34rem;
  margin: 0 auto;
}

.bw-hero-btns {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1rem;
  margin-top: 1.75rem;
}

.bw-hero-btns > .btn-primary,
.bw-hero-btns > .btn-secondary {
  flex: 1 1 11rem;
  width: auto;
  max-width: 16rem;
  min-height: 3.5rem;
  padding: 0.85rem 1.5rem;
  font-size: 0.95rem;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .bw-hero-btns {
    flex-direction: column;
    align-items: stretch;
  }
  .bw-hero-btns > .btn-primary,
  .bw-hero-btns > .btn-secondary {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 768px) {
  #hero.bw-hero {
    padding-top: 7.5rem;
  }
}

@media (min-width: 901px) {
  #hero.bw-hero {
    text-align: left;
  }
  .bw-hero .a-breadcrumb {
    justify-content: flex-start;
  }
  .bw-hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 3rem;
  }
  .bw-hero-text h1 {
    font-size: clamp(1.9rem, 3.5vw, 3.1rem);
  }
  .bw-lead {
    margin: 0;
  }
  .bw-hero-btns {
    justify-content: flex-start;
  }
}

@media (min-width: 1100px) {
  .bw-hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 3.5rem;
  }
  .bw-hero .bw-preview {
    max-width: 33rem;
  }
}

/* ── Design-Vorschau: DIN-A5-Acrylaufsteller ── */
.bw-preview {
  width: 100%;
  max-width: 27rem;
  margin: 0 auto;
  min-width: 0;
}

.bw-stage {
  position: relative;
  padding: 0 3.25rem;
}

.bw-device {
  position: relative;
  padding-bottom: 7.4%;
}

/* weicher Bodenschatten */
.bw-device::after {
  content: "";
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: -1.5%;
  height: 6%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.6), transparent 70%);
  filter: blur(6px);
  z-index: -1;
  pointer-events: none;
}

/* Acrylplatte: 162 x 226 mm, das Blatt (148 x 210 mm) steckt darin */
.bw-acryl {
  position: relative;
  aspect-ratio: 162 / 226;
  border-radius: 3.2% / 2.3%;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03) 42%, rgba(255, 255, 255, 0.09) 100%),
    rgba(148, 163, 184, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 0 22px rgba(147, 197, 253, 0.16),
    0 28px 50px -22px rgba(0, 0, 0, 0.75),
    0 0 70px rgba(59, 130, 246, 0.1);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

/* Blatt-Fach: exakt 148:210, 7 mm Rand links/rechts/oben, 9 mm unten */
.bw-slot {
  position: absolute;
  left: 4.321%;
  top: 3.097%;
  width: 91.358%;
  aspect-ratio: 148 / 210;
  z-index: 1;
}

/* Platzhalter-Blatt, solange noch kein Design eingesetzt ist (Klasse is-ready fehlt).
   Rein per Hintergrund: grauer Bogen, angedeutete Balken, grauer QR-Platz, Schimmer. */
[data-bw-preview]:not(.is-ready) .bw-slot {
  background-color: #e9edf2;
  background-image:
    linear-gradient(#c2cad5, #c2cad5),
    linear-gradient(#c2cad5, #c2cad5),
    linear-gradient(#c2cad5, #c2cad5),
    repeating-linear-gradient(to bottom, #d3dae3 0 1.6px, transparent 1.6px 9px);
  background-repeat: no-repeat;
  background-size: 27% 19%, 74% 4.5%, 52% 2.5%, 74% 22%;
  background-position: left 36.5% top 62%, left 13% top 12%, left 13% top 19%, left 13% top 26%;
}

[data-bw-preview]:not(.is-ready) .bw-slot::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 35%, rgba(255, 255, 255, 0.75) 50%, rgba(255, 255, 255, 0) 65%) no-repeat;
  background-size: 200% 100%;
  animation: bw-shimmer 1.4s linear infinite;
  pointer-events: none;
}

@keyframes bw-shimmer {
  from { background-position: 150% 0; }
  to { background-position: -50% 0; }
}

@media (prefers-reduced-motion: reduce) {
  [data-bw-preview]:not(.is-ready) .bw-slot::before { animation: none; display: none; }
}

/* wird animiert (herausgleiten / einstecken), clippt bewusst nicht */
.bw-move {
  position: absolute;
  inset: 0;
  transform-origin: 50% 85%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  will-change: transform, opacity;
}

/* Blatt in mm, per JS auf die Slot-Breite skaliert */
.bw-scale {
  position: absolute;
  left: 0;
  top: 0;
  width: 148mm;
  height: 210mm;
  transform-origin: 0 0;
}

/* Glanz und Kante liegen über dem Blatt */
.bw-gloss {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.03) 14%, rgba(255, 255, 255, 0) 26%, rgba(255, 255, 255, 0) 78%, rgba(255, 255, 255, 0.04) 92%, rgba(255, 255, 255, 0.01) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.4),
    inset 0 2px 0 rgba(255, 255, 255, 0.55),
    inset 2px 0 0 rgba(255, 255, 255, 0.22);
}

/* schmale Spiegelung quer über die Platte */
.bw-gloss::before {
  content: "";
  position: absolute;
  left: -10%;
  top: 8%;
  width: 120%;
  height: 14%;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.03), transparent);
  transform: rotate(-24deg);
  transform-origin: 0 0;
}

/* abgeschrägter L-Fuß */
.bw-foot {
  position: absolute;
  left: 3%;
  width: 94%;
  bottom: 0;
  aspect-ratio: 13 / 1;
  z-index: 2;
  clip-path: polygon(2.5% 0, 97.5% 0, 100% 100%, 0 100%);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62) 0, rgba(255, 255, 255, 0.62) 1.5px, transparent 1.5px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(148, 163, 184, 0.1));
}

.bw-arrow {
  position: absolute;
  top: 44%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: rgba(15, 23, 42, 0.7);
  color: var(--heading-color);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 0.15rem;
}

.bw-arrow:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.bw-arrow-prev { left: 0; }
.bw-arrow-next { right: 0; }

.bw-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.bw-tab {
  min-height: 2.5rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-color);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.bw-tab:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--heading-color);
}

.bw-tab[aria-selected="true"] {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

.bw-caption {
  margin: 1rem auto 0;
  min-height: 4.9em;
  font-size: 0.92rem;
  line-height: 1.6;
  text-align: center;
  color: var(--text-color);
}

.bw-caption strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent-color);
}

.bw-note {
  margin: 0.75rem auto 0;
  font-size: 0.8rem;
  line-height: 1.6;
  text-align: center;
  color: var(--text-muted);
}

.bw-note a {
  color: var(--primary-color);
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

/* Ohne JavaScript: Liste statt leerer Fläche */
.bw-nojs {
  position: absolute;
  inset: 0;
  padding: 7% 8%;
  background: #f8f6f1;
  color: #1d1d1b;
  font-size: 0.82rem;
  line-height: 1.5;
  text-align: left;
  overflow: hidden;
}

.bw-nojs strong {
  display: block;
  margin-bottom: 0.6rem;
  font-family: var(--font-heading);
  font-size: 1rem;
}

.bw-nojs ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bw-nojs li {
  margin-bottom: 0.55rem;
}

.bw-nojs li span {
  display: block;
  font-weight: 600;
}

@media (max-width: 560px) {
  .bw-stage { padding: 0; }
  .bw-arrow { display: none; }
}

@media (pointer: coarse) {
  .bw-tab { min-height: 2.75rem; }
}

/* ── Weitere Seitenelemente ── */
.bw-preiskarte.bw-featured {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 1px var(--primary-color), 0 12px 40px rgba(59, 130, 246, 0.15);
}

/* vier Preiskarten: 2 x 2 statt 3 + 1 */
@media (min-width: 769px) {
  .bw-preise-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* zwei Karten: zwei Spalten, mittig */
@media (min-width: 601px) {
  .bw-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ── Grossansicht ── */
.bw-preview.is-zoomable .bw-acryl { cursor: zoom-in; }

.bw-zoom-row {
  display: flex;
  justify-content: center;
  margin-top: 0.9rem;
}

.bw-zoom {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--heading-color);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}

.bw-zoom:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.bw-zoom[hidden] { display: none; }

html.bw-lock { overflow: hidden; }

.bw-dialog {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(5, 8, 16, 0.94);
  color: var(--text-color);
  overflow: hidden;
}

.bw-dialog:not([open]) { display: none; }

.bw-dialog::backdrop { background: rgba(5, 8, 16, 0.7); }

.bw-dlg-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 3;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: rgba(15, 23, 42, 0.85);
  color: var(--heading-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.bw-dlg-close:hover { border-color: var(--primary-color); color: var(--primary-color); }

.bw-dlg-body {
  height: 100%;
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) 4.5rem;
  grid-template-rows: minmax(0, 1fr) auto;
  grid-template-areas:
    "prev stage next"
    ". info .";
  padding: 1rem 0.5rem 0.75rem;
  gap: 0.5rem 0;
}

.bw-dlg-stage {
  grid-area: stage;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.bw-dlg-paper {
  position: relative;
  flex: none;
  overflow: hidden;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), 0 24px 60px rgba(0, 0, 0, 0.6);
}

.bw-dlg-scale {
  position: absolute;
  left: 0;
  top: 0;
  width: 148mm;
  height: 210mm;
  transform-origin: 0 0;
}

.bw-dlg-arrow {
  align-self: center;
  justify-self: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: rgba(15, 23, 42, 0.8);
  color: var(--heading-color);
  font-size: 1.7rem;
  line-height: 1;
  padding: 0 0 0.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bw-dlg-arrow:hover { border-color: var(--primary-color); color: var(--primary-color); }
.bw-dlg-prev { grid-area: prev; }
.bw-dlg-next { grid-area: next; }

.bw-dlg-info {
  grid-area: info;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.bw-dlg-title {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.bw-dlg-title strong {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--heading-color);
}

.bw-dlg-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem 1rem;
}

.bw-dlg-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.bw-dlg-btn {
  min-height: 2.75rem;
  padding: 0.55rem 1.4rem;
  font-size: 0.92rem;
  white-space: nowrap;
}

/* Mobil: Pfeile neben der Infoleiste statt neben dem Blatt, nie ueber dem QR-Code */
@media (max-width: 700px) {
  .bw-dlg-body {
    grid-template-columns: 3rem minmax(0, 1fr) 3rem;
    grid-template-areas:
      "stage stage stage"
      "prev info next";
    padding: 3.5rem 0.5rem 0.75rem;
    gap: 0.75rem 0.25rem;
  }
  .bw-dlg-stage { padding: 0 0.25rem; }
  .bw-dlg-arrow { width: 2.75rem; height: 2.75rem; }
  .bw-dlg-prev, .bw-dlg-next { align-self: center; }
  .bw-dlg-cta { flex-direction: column; gap: 0.3rem; }
  .bw-dlg-btn { padding: 0.5rem 1.2rem; }
}

@media (max-height: 560px) and (min-width: 701px) {
  .bw-dlg-cta { flex-direction: row; }
}
