/* ============================================================
   [stuhl_masse] – Maßzeichnungen mit Maßlinien
   ============================================================ */

.bs-masse {
  /* Höhe der Zeichnungen – hier zentral anpassen */
  --bs-masse-h: clamp(96px, 12vw, 168px);
  --bs-masse-color: #c3121f;
  --bs-masse-text: #bd1522;
  --bs-masse-gap: clamp(18px, 3.5vw, 56px);

  container-type: inline-size;
  width: 100%;
}

.bs-masse__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: var(--bs-masse-gap);
  margin: 0;
}

.bs-masse__item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin: 0;
  padding: 0;
}

/* Bild + Maßlinien in einer Spalte, senkrechte Maßlinie daneben.
   So spannen die oberen Linien exakt über die Zeichnung – nicht über die Höhenlinie. */

.bs-masse__row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.bs-masse__col {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
}

/* --- Maßlinien oberhalb der Zeichnung --- */

.bs-masse__dims {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 10px;
}

.bs-masse__dim {
  flex: var(--bs-masse-flex, 1) 1 0;
  min-width: 0;
  text-align: center;
  border-bottom: 2px solid var(--bs-masse-color);
  padding-bottom: 5px;
  line-height: 1.2;
}

.bs-masse__num {
  display: block;
  font-size: clamp(11px, 1.15vw, 15px);
  font-weight: 500;
  color: var(--bs-masse-text);
  white-space: nowrap;
}

/* --- Zeichnung --- */

.bs-masse__figure {
  display: block;
}

.bs-masse__img {
  display: block;
  height: var(--bs-masse-h);
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* --- Senkrechte Maßlinie (Höhe) --- */

.bs-masse__vdim {
  display: flex;
  align-items: center;
  gap: 7px;
}

.bs-masse__vline {
  display: block;
  width: 2px;
  height: var(--bs-masse-h);
  background: var(--bs-masse-color);
}

.bs-masse__vnum {
  font-size: clamp(11px, 1.15vw, 15px);
  font-weight: 500;
  color: var(--bs-masse-text);
  white-space: nowrap;
}

/* --- Beschriftung: nur für Screenreader, sofern nicht aktiviert --- */

.bs-masse__caption {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.bs-masse--captions .bs-masse__caption {
  position: static;
  width: auto;
  height: auto;
  margin: 10px 0 0;
  overflow: visible;
  clip: auto;
  clip-path: none;
  white-space: normal;
  font-size: clamp(11px, 1.05vw, 13px);
  line-height: 1.35;
  color: #6b6b6b;
  text-align: center;
}

/* --- Mobil: zwei Zeichnungen pro Reihe, dann eine --- */

@container (max-width: 720px) {
  .bs-masse {
    --bs-masse-h: clamp(88px, 22vw, 130px);
    --bs-masse-gap: 18px;
  }
  .bs-masse__num,
  .bs-masse__vnum {
    font-size: 12px;
  }
}

@container (max-width: 400px) {
  .bs-masse {
    --bs-masse-h: 120px;
  }
  .bs-masse__grid {
    gap: 22px 14px;
  }
}

/* Fallback für Browser ohne Container-Queries */

@media (max-width: 782px) {
  .bs-masse {
    --bs-masse-h: clamp(88px, 22vw, 130px);
    --bs-masse-gap: 18px;
  }
}

@media (max-width: 430px) {
  .bs-masse {
    --bs-masse-h: 120px;
  }
  .bs-masse__grid {
    gap: 22px 14px;
  }
}