/* =========================================================
   Viventra – Room Detail Page (Airbnb-inspiriert)
   ========================================================= */

/* ── Galerie Hero ── */
.room-gallery-hero {
  position: relative;
  margin-top: 0;
  padding-top: 72px; /* header höhe */
}

/* Desktop Mosaic */
.gallery-mosaic {
  display: none;
  position: relative;
}

@media (min-width: 768px) {
  .gallery-mosaic {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 280px 280px;
    gap: 4px;
    max-height: 560px;
    overflow: hidden;
  }
}

@media (min-width: 1024px) {
  .gallery-mosaic {
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 280px 280px;
    max-height: 560px;
  }
}

.mosaic-cell {
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-3);
}

.mosaic-cell img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 0.5s cubic-bezier(0.25,0.46,0.45,0.94), filter 0.3s;
  filter: brightness(0.92);
}
.mosaic-cell:hover img { transform: scale(1.04); filter: brightness(1); }

/* Mosaic Positionen */
.mosaic-0 {
  grid-column: 1;
  grid-row: 1 / 3;
}
@media (min-width: 1024px) {
  .mosaic-0 { grid-column: 1; grid-row: 1 / 3; }
  .mosaic-1 { grid-column: 2; grid-row: 1; }
  .mosaic-2 { grid-column: 2; grid-row: 2; }
  .mosaic-3 { grid-column: 3; grid-row: 1; }
  .mosaic-4 { grid-column: 3; grid-row: 2; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .mosaic-0 { grid-column: 1; grid-row: 1 / 3; }
  .mosaic-1 { grid-column: 2; grid-row: 1; }
  .mosaic-2 { grid-column: 2; grid-row: 2; }
  .mosaic-3, .mosaic-4 { display: none; }
}

/* "Alle Fotos" Button */
.gallery-show-all {
  position: absolute;
  bottom: 16px; right: 16px;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  background: rgba(14,13,11,0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-md);
  border-radius: 999px;
  color: var(--cream);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  z-index: 10;
}
.gallery-show-all:hover { background: rgba(30,28,24,0.95); border-color: var(--gold); }
.gallery-show-all svg { stroke: var(--cream-dim); }

/* Mobile Strip */
.gallery-strip {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 0;
  scrollbar-width: none;
}
.gallery-strip::-webkit-scrollbar { display: none; }

@media (min-width: 768px) { .gallery-strip { display: none; } }

.strip-cell {
  flex: 0 0 100%;
  scroll-snap-align: start;
  cursor: pointer;
}
.strip-cell img {
  width: 100%; height: 72vw; max-height: 380px;
  object-fit: cover; display: block;
}

.strip-counter {
  position: absolute;
  bottom: 16px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  color: #fff; font-size: 12px; font-weight: 500;
  padding: 4px 12px; border-radius: 999px;
  pointer-events: none;
}
@media (min-width: 768px) { .strip-counter { display: none; } }

/* ── Lightbox ── */
.lightbox {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(10,9,8,0.97);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
}
.lightbox.open { opacity: 1; pointer-events: auto; }

.lb-stage {
  flex: 1; display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 60px 80px 16px;
  overflow: hidden;
}

.lb-img {
  max-width: 100%; max-height: 100%;
  object-fit: contain; display: block;
  border-radius: 4px;
  outline: none;
}

.lb-close {
  position: absolute; top: 16px; right: 20px;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(200,180,140,0.2);
  background: rgba(30,28,24,0.8);
  color: var(--cream); font-size: 28px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
  z-index: 10;
}
.lb-close:hover { background: rgba(60,50,40,0.9); }

.lb-prev, .lb-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid rgba(200,180,140,0.2);
  background: rgba(30,28,24,0.8);
  color: var(--cream); font-size: 28px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  z-index: 10;
}
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-prev:hover, .lb-next:hover { background: rgba(60,50,40,0.9); border-color: var(--gold-dim); }

.lb-counter {
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 12px; font-family: 'DM Sans', sans-serif;
}

.lb-thumbs {
  display: flex; gap: 6px; padding: 0 16px 20px;
  overflow-x: auto; max-width: 100%;
  scrollbar-width: thin; scrollbar-color: var(--border-md) transparent;
}
.lb-thumb {
  flex: 0 0 auto;
  width: 64px; height: 48px; object-fit: cover;
  border-radius: 4px; cursor: pointer; opacity: 0.5;
  border: 2px solid transparent;
  transition: opacity 0.2s, border-color 0.2s;
}
.lb-thumb.active, .lb-thumb:hover { opacity: 1; border-color: var(--gold); }

@media (max-width: 640px) {
  .lb-stage { padding: 56px 48px 12px; }
  .lb-prev { left: 6px; } .lb-next { right: 6px; }
  .lb-thumb { width: 48px; height: 36px; }
}

/* ── Room Page Layout ── */
.room-page {
  padding-top: 40px;
  padding-bottom: 80px;
}

.room-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: start;
}

@media (min-width: 1024px) {
  .room-layout {
    grid-template-columns: 1fr 380px;
    gap: 64px;
  }
}

/* ── Room Main ── */
.room-header-block { margin-bottom: 28px; }

.room-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 400;
  color: var(--cream);
  margin: 0 0 12px;
  line-height: 1.15;
}

.room-meta-row {
  display: flex; flex-wrap: wrap;
  align-items: center; gap: 8px;
  color: var(--text-muted); font-size: 15px;
}

.room-meta-item {
  display: flex; align-items: center; gap: 5px;
}
.room-meta-item svg { stroke: var(--text-muted); flex-shrink: 0; }
.room-meta-dot { color: var(--border-md); }

.room-hr {
  border: none; border-top: 1px solid var(--border);
  margin: 32px 0;
}

.room-section { margin-bottom: 0; }

.room-section-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.4rem; font-weight: 400;
  color: var(--cream); margin: 0 0 20px;
}

.room-description-text {
  color: var(--text-muted);
  font-size: 16px; line-height: 1.8;
  font-weight: 300;
}

/* Preisbreakdown */
.price-breakdown { display: flex; flex-direction: column; gap: 0; }
.price-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px; color: var(--cream-dim);
}
.price-row:last-child { border-bottom: none; }
.price-row em { font-style: normal; font-size: 13px; color: var(--text-muted); margin-left: 6px; }
.price-val { color: var(--cream); font-weight: 500; white-space: nowrap; }
.price-row-total { border-top: 2px solid var(--border-md); margin-top: 8px; padding-top: 16px; }

/* Photo Grid (mobile alle Fotos) */
.room-all-photos { display: block; }
@media (min-width: 1024px) { .room-all-photos { display: none; } }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  border-radius: var(--radius);
  overflow: hidden;
}

@media (min-width: 640px) {
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
}

.photo-grid-cell {
  aspect-ratio: 4/3;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-3);
}
.photo-grid-cell img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.4s ease, filter 0.3s;
  filter: brightness(0.9);
}
.photo-grid-cell:hover img { transform: scale(1.06); filter: brightness(1); }

/* ── Booking Widget ── */
.room-aside { }

@media (min-width: 1024px) {
  .room-aside { position: sticky; top: calc(72px + 32px); }
}

.booking-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-md);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 4px 40px rgba(0,0,0,0.5);
}

.booking-widget-price {
  display: flex; align-items: baseline; gap: 6px;
  margin-bottom: 24px;
}

.bw-price-main {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2rem; font-weight: 400; color: var(--cream);
}
.bw-price-unit {
  font-size: 14px; color: var(--text-muted); font-weight: 300;
}

/* Login Prompt */
.bw-login-prompt {
  text-align: center;
}
.bw-login-prompt p {
  font-size: 14px; color: var(--text-muted);
  margin: 0 0 20px; line-height: 1.6;
}
.bw-login-prompt .btn { width: 100%; }

/* Datumsfelder */
.bw-dates {
  border: 1px solid var(--border-md);
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  margin-bottom: 0;
}

.bw-date-field {
  padding: 14px 16px;
  background: var(--bg-3);
  cursor: pointer;
  transition: background 0.2s;
}
.bw-date-field:hover { background: var(--surface); }

.bw-date-field label {
  display: block;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 4px;
  cursor: pointer;
}

.bw-date-field input[type="date"] {
  border: none; background: transparent;
  padding: 0; margin: 0; width: 100%;
  font-size: 14px; color: var(--cream);
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  box-shadow: none; border-radius: 0;
  color-scheme: dark;
}
.bw-date-field input[type="date"]:focus { outline: none; box-shadow: none; border-color: transparent; }

.bw-date-divider {
  width: 1px; background: var(--border); align-self: stretch;
}

/* Nächte + Total */
.bw-nights {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px;
  background: rgba(201,169,110,0.06);
  border: 1px solid rgba(201,169,110,0.15);
  border-top: none;
  border-radius: 0 0 8px 8px;
  font-size: 14px; color: var(--cream-dim);
}
.bw-total { color: var(--gold); font-weight: 500; font-size: 15px; }

/* Submit Button */
.bw-form { display: flex; flex-direction: column; gap: 0; }
.bw-submit {
  width: 100%; margin-top: 16px;
  background: var(--gold); color: var(--bg);
  font-size: 15px; font-weight: 500;
  letter-spacing: 0.04em;
  min-height: 54px;
  border-radius: 12px;
}
.bw-submit:hover { background: var(--cream); }

/* Hinweis unter Button */
.bw-note {
  text-align: center; font-size: 12px; color: var(--text-dim);
  margin-top: 12px;
}

/* Error in Widget */
.bw-form .error {
  border-radius: 0;
  border-left: none; border-right: none; border-top: none;
  margin: 0; padding: 10px 16px;
  font-size: 13px;
}
