:root {
  --viewer-min-h: 420px;
}

body.stl-page {
  min-height: 100vh;
  background:
    linear-gradient(105deg, rgba(3, 8, 14, 0.9), rgba(3, 8, 14, 0.62)),
    url("../../assets/backgrounds/produkte-bg.jpg") center / cover fixed no-repeat;
}

.stl-page .site-header {
  min-height: 72px;
}

.model-selector-wrap {
  margin-bottom: 22px;
}

.model-selector-wrap label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
}

.model-selector-wrap select {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 5px;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%23ffffff'%3E%3Cpath d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.model-selector-wrap select option,
.model-selector-wrap select optgroup {
  color: #1a1a1a;
  background: #ffffff;
}

.model-detail {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 28px;
  align-items: stretch;
}

.model-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.model-info h1 {
  margin: 0 0 14px;
  font-size: clamp(1.4rem, 2vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.model-info #model-description {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.98rem;
  white-space: pre-wrap;
}

.preview-hint {
  margin: 0 0 18px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
}

.preview-hint .preview-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.preview-hint p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.preview-hint .arrow {
  color: #ffffff;
  font-weight: 700;
}

.model-size {
  margin: 0 0 16px;
  font-size: 0.85rem;
  color: var(--muted);
}

.model-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}

.model-actions .button.primary {
  min-height: 48px;
  padding: 12px 22px;
  font-size: 0.95rem;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  font-size: 1.1rem;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.btn-icon:hover,
.btn-icon:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
}

.toast {
  margin: 10px 0 0;
  font-size: 0.82rem;
  color: var(--accent);
  opacity: 0;
  height: 0;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.toast.visible {
  opacity: 1;
  height: auto;
}

.model-viewer-wrap {
  position: relative;
  min-height: var(--viewer-min-h);
  background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.08), rgba(3, 8, 14, 0.65));
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 5px;
  overflow: hidden;
}

.model-viewer-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.viewer-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  background: rgba(3, 8, 14, 0.55);
}

.hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .model-detail {
    grid-template-columns: 1fr;
  }

  .model-viewer-wrap {
    min-height: 360px;
    order: -1;
  }
}
