.detail-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 16px 12px 60px;
}

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 16px;
  padding: 6px 0;
}

.detail-back:hover { text-decoration: underline; }

/* ── Gallery ── */
.detail-gallery {
  margin-bottom: 20px;
}

.gallery-main {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  background: #f0f4f0;
  position: relative;
  cursor: zoom-in;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s;
}

.gallery-main .placeholder-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: #5fa463;
}
.gallery-main .placeholder-icon svg { width: 88px; height: 88px; }
.related-placeholder { color: #5fa463; }
.related-placeholder svg { width: 42px; height: 42px; }

.gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.gallery-thumbs::-webkit-scrollbar { display: none; }

.gallery-thumb {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
  cursor: pointer;
  border: 2.5px solid transparent;
  flex-shrink: 0;
  transition: border-color 0.15s, opacity 0.15s;
  opacity: 0.65;
}

.gallery-thumb.active {
  border-color: var(--green);
  opacity: 1;
}

.gallery-thumb:hover { opacity: 1; }

/* ── Detail Info ── */
.detail-info {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.detail-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: #f0f0f0;
  padding: 3px 10px;
  border-radius: 20px;
}

.detail-name {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
}

.detail-avail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 5px 12px;
  border-radius: 30px;
}

.detail-avail::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.detail-avail.available { background: var(--green-bg); color: var(--green); }
.detail-avail.unavailable { background: var(--red-bg); color: var(--red); }

.detail-rented-until {
  display: block;
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.detail-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--green);
  background: var(--green-bg);
  padding: 5px 14px;
  border-radius: 30px;
}

.detail-description {
  margin-top: 14px;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
}

/* ── Details Section ── */
.detail-section {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}

.detail-section h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-section h2::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.detail-section p {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
}

/* ── Contact ── */
.detail-contact {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.detail-contact h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.detail-contact p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.detail-contact-phone {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--blue-bg);
  color: var(--blue);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.detail-contact-phone svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex-shrink: 0;
}

.detail-contact-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s;
}

.detail-cta svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  flex-shrink: 0;
}

.detail-cta.whatsapp { background: var(--whatsapp); color: white; }
.detail-cta.whatsapp:hover { background: var(--whatsapp-dark); }
.detail-cta.phone { background: var(--blue-bg); color: var(--blue); }
.detail-cta.phone:hover { background: #bbdefb; }

/* ── Card more button ── */
.card-more-btn {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--green);
}

/* ── Lightbox ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 8px;
  object-fit: contain;
  pointer-events: none;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
}

.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: white;
  font-size: 1.6rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.3); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

/* ── Error state ── */
.detail-error {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.detail-error .error-icon { font-size: 3rem; display: block; margin-bottom: 12px; }
.detail-error a { color: var(--green); font-weight: 600; }

@media (min-width: 600px) {
  .detail-name { font-size: 1.75rem; }
  .gallery-thumb { width: 88px; height: 88px; }
}

/* ── Anfrage Form ── */
.anfrage-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.anfrage-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.anfrage-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.anfrage-field .optional-label {
  font-weight: 400;
  color: #bbb;
}

.anfrage-field input[type="date"],
.anfrage-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  background: #fafafa;
  transition: border-color 0.15s;
}

.anfrage-field input[type="date"]:focus,
.anfrage-field textarea:focus {
  outline: none;
  border-color: var(--green);
  background: white;
}

.anfrage-field textarea {
  resize: vertical;
  min-height: 70px;
}

.anfrage-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px;
  border-radius: 12px;
  border: none;
  background: var(--whatsapp);
  color: white;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  width: 100%;
}

.anfrage-btn:hover { background: var(--whatsapp-dark); }

.anfrage-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  flex-shrink: 0;
}

.anfrage-unavail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.anfrage-unavail-text {
  font-size: 0.875rem;
  color: var(--text-muted);
}
.anfrage-btn--ask {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1.5px solid #a5d6a7;
}
.anfrage-btn--ask:hover { background: #c8e6c9; }

/* ── Detail Title Row (mit Teilen-Button) ── */
.detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.share-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  margin-top: 2px;
}
.share-btn:hover { background: #f5f5f5; border-color: #bbb; color: var(--text); }
.share-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a1a;
  color: white;
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 500;
  animation: shareToastIn 0.2s ease;
  white-space: nowrap;
}
@keyframes shareToastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── Preisrechner ── */
.anfrage-calc {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f1f8e9;
  border: 1px solid #c8e6c9;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 0.875rem;
  color: #2e7d32;
}
.anfrage-calc strong {
  font-size: 1rem;
  font-weight: 800;
}

/* ── Mindestmietdauer ── */
.detail-min-rental {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff8e1;
  color: #f57f17;
  border: 1px solid #ffe082;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ── Ähnliche Geräte ── */
.related-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.related-section h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 480px) { .related-grid { grid-template-columns: 1fr 1fr; } }
.related-card {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}
.related-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.related-card img, .related-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: #f5f5f5;
  display: block;
}
.related-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
}
.related-info {
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.related-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-price { font-size: 0.8rem; font-weight: 700; color: var(--green); }
.related-avail {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.related-avail.available { color: var(--green); }
.related-avail.unavailable { color: var(--red); }
