/* com_bawmakler – Druckbares Exposé */
.baw-expose {
  --navy: #28364b;
  --gold: #cebd88;
  --cream: #f1f0e8;
  --muted: #7a7a7a;
  --line: #d9d7cc;
  box-sizing: border-box;
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 1.25rem 2rem;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  background: #fff;
}

.baw-expose *,
.baw-expose *::before,
.baw-expose *::after {
  box-sizing: border-box;
}

.baw-expose__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  background: var(--cream);
  border: 1px solid var(--line);
}

.baw-expose__toolbar-hint {
  margin: 0;
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  color: var(--muted);
}

.baw-expose__toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.baw-expose__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65em 1.2em;
  border: 0;
  border-radius: 0.3rem;
  background: var(--navy);
  color: var(--gold);
  font-family: system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.baw-expose__btn--ghost {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--navy);
}

.baw-expose__sheet {
  padding: 0.5rem 0 0;
}

.baw-expose__brand {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin: 0 0 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 2px solid var(--gold);
}

.baw-expose__brand-name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.baw-expose__brand-url {
  margin: 0.15rem 0 0;
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
}

.baw-expose__ref {
  margin: 0;
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
}

.baw-expose__title {
  margin: 0 0 0.5rem;
  font-size: 2.2rem; /* legacy-edge-fallback */
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.2;
}

.baw-expose__price {
  margin: 0 0 1.25rem;
  font-family: system-ui, sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
}

.baw-expose__avail {
  margin-left: 0.75rem;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--gold);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  vertical-align: middle;
}

.baw-expose__hero {
  margin: 0 0 1.25rem;
  break-inside: avoid;
  page-break-inside: avoid;
}

.baw-expose__hero img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 320px;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  background: #eceae2;
}

.baw-expose__intro {
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: #3a4654;
}

.baw-expose__section {
  margin: 0 0 1.35rem;
}

.baw-expose__section--keep {
  break-inside: avoid;
  page-break-inside: avoid;
}

.baw-expose__section h2 {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.35rem;
  break-after: avoid;
  page-break-after: avoid;
}

.baw-expose__specs {
  width: 100%;
  border-collapse: collapse;
  font-family: system-ui, sans-serif;
  font-size: 0.82rem;
  line-height: 1.2;
}

.baw-expose__specs th,
.baw-expose__specs td {
  padding: 0.18rem 0.3rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: baseline;
}

.baw-expose__specs th {
  width: 38%;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.03em;
}

.baw-expose__gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.baw-expose__gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #eceae2;
}

.baw-expose__appendix {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.baw-expose__appendix--continued {
  margin-top: 1.25rem;
  padding-top: 0;
  border-top: 0;
}

.baw-expose__appendix h2 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
}

.baw-expose__gallery--appendix {
  gap: 0.65rem;
}

.baw-expose__gallery--appendix figure {
  margin: 0;
}

.baw-expose__gallery--appendix img {
  display: block;
}

.baw-expose__history {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: system-ui, sans-serif;
}

.baw-expose__history li {
  display: flex;
  gap: 0.75rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.baw-expose__history strong {
  flex: 0 0 6.5rem;
  color: var(--muted);
  font-weight: 600;
}

.baw-expose__section--text {
  font-size: 0.98rem;
  line-height: 1.55;
}

.baw-expose__section--text h2 {
  break-after: avoid;
  page-break-after: avoid;
}

.baw-expose__qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 1rem;
}

.baw-expose__qr {
  margin: 0;
  text-align: center;
  font-family: system-ui, sans-serif;
}

.baw-expose__qr img {
  display: block;
  width: 168px;
  height: 168px;
  margin: 0 auto 0.5rem;
  background: #fff;
  border: 1px solid var(--line);
}

.baw-expose__qr figcaption strong {
  display: block;
  font-size: 0.9rem;
  color: var(--navy);
}

.baw-expose__qr figcaption span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: var(--muted);
}

/* Seitenfüllende Anhangsseiten (Grundriss) */
.baw-expose__fullpage {
  break-before: page;
  page-break-before: always;
  break-inside: avoid;
  page-break-inside: avoid;
  margin: 1.5rem 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.baw-expose__fullpage-frame {
  margin: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  break-inside: avoid;
  page-break-inside: avoid;
}

.baw-expose__fullpage-frame img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 5rem);
  background: #eceae2;
}

.baw-expose__fullpage--cover img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.baw-expose__fullpage--contain img {
  aspect-ratio: auto;
  object-fit: contain;
  background: #f7f6f1;
}

.baw-expose__fullpage-frame figcaption {
  flex: 0 0 auto;
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}

.baw-expose__pagebreak {
  display: none;
}

@media print {
  @page {
    size: A4;
    margin: 12mm;
  }

  .no-print {
    display: none !important;
  }

  html,
  body {
    background: #fff !important;
  }

  .baw-expose {
    max-width: none;
    padding: 0;
  }

  .baw-expose__pagebreak {
    display: block;
    break-after: page;
    page-break-after: always;
    height: 0;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .baw-expose__section {
    margin: 0 0 0.85rem;
  }

  .baw-expose__section h2 {
    margin: 0 0 0.4rem;
    padding-bottom: 0.2rem;
    font-size: 0.95rem;
  }

  .baw-expose__specs {
    font-size: 0.78rem;
  }

  .baw-expose__specs th,
  .baw-expose__specs td {
    padding: 0.12rem 0.25rem;
  }

  .baw-expose__specs th {
    font-size: 0.65rem;
  }

  .baw-expose__fullpage {
    break-before: page;
    page-break-before: always;
    break-inside: avoid;
    page-break-inside: avoid;
    height: auto;
    min-height: 0;
    margin: 0;
  }

  .baw-expose__fullpage-frame {
    height: auto;
    justify-content: flex-start;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .baw-expose__fullpage-frame img {
    height: auto;
    max-height: 230mm;
  }

  .baw-expose__fullpage--cover img {
    width: 100%;
    height: auto;
    max-height: 230mm;
    aspect-ratio: 4 / 3;
    object-fit: cover;
  }

  .baw-expose__fullpage--contain img {
    width: 100%;
    height: auto;
    max-height: 230mm;
    object-fit: contain;
  }

  .baw-expose__fullpage-frame figcaption {
    break-before: avoid;
    page-break-before: avoid;
  }

  .baw-expose__appendix {
    break-before: page;
    page-break-before: always;
  }

  .baw-expose__gallery--appendix figure {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .baw-expose__section--keep,
  .baw-expose__hero,
  .baw-expose__qr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
}

@media (max-width: 640px) {
  .baw-expose__gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}
