/* =============================================
   PÁGINA DE DETALHES
============================================= */
.details-wrapper {
  max-width: 1040px;
  margin: 40px auto;
  padding: 0 20px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
  padding: 0;
  margin-bottom: 28px;
  transition: gap var(--transition);
}
.back-btn:hover { gap: 12px; }

/* Grid de duas colunas: info + sidebar de reserva */
.details-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
}

@media (min-width: 720px) {
  .details-grid { grid-template-columns: 1fr 340px; }
}

/* =============================================
   GALERIA DE FOTOS
============================================= */
#details-gallery {
  margin-bottom: 32px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 220px);
  gap: 10px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}
.gallery-item {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.gallery-item:hover img {
  transform: scale(1.03);
}
.gallery-item.large {
  grid-column: span 2;
  grid-row: span 2;
}
.gallery-item:hover::after {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.1);
  pointer-events: none;
}
.btn-show-all {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  z-index: 2;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-show-all:hover {
  background: #f9fafb;
  transform: scale(1.02);
}

@media (max-width: 900px) {
  .gallery-grid {
    grid-template-rows: repeat(2, 160px);
  }
}

@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-template-rows: 280px;
  }
  .gallery-item.small { display: none; }
  .gallery-item.large {
    grid-column: 1;
    grid-row: 1;
  }
  .btn-show-all {
    bottom: 12px;
    right: 12px;
  }
}

/* Bloco de informações */
.details-info { margin-top: 20px; }

.details-meta { margin-bottom: 6px; }

.details-tipo {
  display: inline-block;
  background: var(--primary-lt);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
}

.details-title {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 6px;
}

.details-address {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.details-desc {
  font-size: 0.93rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 24px;
}

/* Comodidades */
.amenities-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.amenity-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #F3F4F6;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 500;
}
.amenity-icon { font-size: 1rem; }

/* Preço na seção de info */
.details-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.details-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}
.details-price-label { font-size: 0.88rem; color: var(--text-muted); }

/* =============================================
   PAINEL DE RESERVA (sidebar direita)
============================================= */
.booking-panel {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
  position: sticky;
  top: calc(var(--navbar-h) + 20px);
}

.booking-panel h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.booking-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
}

/* Slots de horário */
.booking-slots-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.availability-slots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.slot-btn {
  background: #F3F4F6;
  border: 1.5px solid transparent;
  border-radius: 6px;
  padding: 7px 4px;
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  color: var(--text);
  transition: all var(--transition);
}
.slot-btn:hover:not(.slot-unavailable) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-lt);
}
.slot-btn.slot-selected {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.slot-btn.slot-unavailable {
  background: #F9FAFB;
  color: #D1D5DB;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* Resumo de valores */
.booking-summary {
  background: var(--bg);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 16px;
  font-size: 0.85rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: var(--text-muted);
}
.summary-row strong { color: var(--text); }
.summary-row.total {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: 4px;
  margin-bottom: 0;
}
.summary-installment {
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 8px;
}
.summary-hint {
  color: var(--text-muted);
  font-size: 0.82rem;
  text-align: center;
}

/* Botão de reserva */
.btn-book {
  width: 100%;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-size: 0.95rem;
  font-weight: 700;
  transition: background var(--transition), transform var(--transition);
}
.btn-book:hover:not(:disabled) {
  background: var(--primary-dk);
  transform: translateY(-1px);
}
.btn-book:disabled {
  background: var(--border);
  color: var(--text-muted);
  cursor: not-allowed;
}
