/* Empty media slots inherit the catalogue background instead of showing a placeholder. */
.product-image {
  background: #f1f2f4;
}

.product-image > span {
  display: none;
}

.gallery-placeholder {
  background: #f1f2f4;
  color: transparent;
}

.product-grid {
  background: transparent;
  border: 0;
}

.product-card {
  border: 1px solid rgba(48, 55, 68, 0.16);
}

.product-detail.has-images {
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: clamp(40px, 6vw, 90px);
}

.gallery-main {
  height: auto;
  display: block;
  line-height: 0;
}

.gallery-stage {
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
}

.gallery-controls {
  position: absolute;
  inset: 50% 18px auto;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: none;
}

.gallery-controls button {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,.55);
  background: rgba(48,64,139,.9);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  transition: background .2s, transform .2s;
}

.gallery-controls button:hover {
  background: #30408b;
  transform: scale(1.06);
}

.gallery-thumbs button[aria-current="true"] {
  border-color: #30408b;
}

.gallery-main img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.detail-content {
  min-width: 0;
}

.detail-summary h1 {
  overflow-wrap: normal;
  word-break: normal;
  -webkit-hyphens: auto;
  hyphens: auto;
}

.has-images .detail-summary {
  position: static;
}

.has-images .detail-description {
  grid-column: auto;
  margin-top: clamp(42px, 5vw, 65px);
}

.has-images .formatted-description {
  margin-top: 26px;
}

.has-images .detail-contact {
  margin-top: 45px;
}

.no-images {
  display: block;
}

.no-images .detail-content {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(55px, 9vw, 140px);
  align-items: start;
  padding: clamp(24px, 3vw, 45px) 0 50px;
}

.no-images .detail-summary {
  position: static;
  padding-top: 0;
  grid-column: 1;
  grid-row: 1;
}

.no-images .detail-description {
  grid-column: 2;
  grid-row: 1 / span 2;
  padding-top: 0;
}

.no-images .formatted-description {
  margin-top: 34px;
}

.no-images .detail-contact {
  grid-column: 1;
  grid-row: 2;
  margin-top: 0;
}

.product-detail .video-section {
  grid-column: 1 / -1;
}

#angebote {
  scroll-margin-top: 88px;
}

.market-back-wrap {
  max-width: 1500px;
  margin: -70px auto 110px;
  padding: 0 4vw;
}

.back-to-market {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid currentColor;
  color: #30408b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.back-to-market span {
  font-size: 18px;
  line-height: 1;
}

@media (max-width: 950px) {
  .product-detail.has-images,
  .no-images .detail-content {
    grid-template-columns: 1fr;
  }

  .product-detail.has-images .detail-content {
    display: contents;
  }

  .product-detail.has-images .detail-summary {
    order: 1;
  }

  .product-detail.has-images .detail-gallery {
    order: 2;
  }

  .product-detail.has-images .detail-description {
    order: 3;
  }

  .product-detail.has-images .detail-contact {
    order: 4;
  }

  .product-detail.has-images .video-section {
    order: 5;
  }

  .no-images .detail-content {
    gap: 55px;
  }

  .no-images .detail-summary,
  .no-images .detail-description,
  .no-images .detail-contact {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 650px) {
  .gallery-controls {
    left: 10px;
    right: 10px;
  }

  .gallery-controls button {
    width: 42px;
    height: 42px;
  }

  .market-back-wrap {
    padding: 0 5vw;
  }
}
