* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, sans-serif;
}

body {
  background: #f6f7f9;
  color: #222;
}

.header {
  padding: 1.5rem;
  text-align: center;
  background: #1e293b;
  color: #fff;
}

.container {
  padding: 1rem;
  display: flex;
}
.containerDetalle {
  padding: 1rem;
  display:grid;
  gap: 1.5rem;
}
.apartment-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.apartment-card img {
  width: 100%;
  display: block;
}

.apartment-card h2 {
  padding: 1rem 1rem 0;
}

.apartment-card p {
  padding: 0.5rem 1rem;
  color: #555;
}

.apartment-card button {
  margin: 1rem;
  padding: 0.75rem;
  width: calc(100% - 2rem);
  border: none;
  border-radius: 8px;
  background: #2563eb;
  color: white;
  font-size: 1rem;
  cursor: pointer;
}

.apartment-card button:hover {
  background: #1d4ed8;
}

.footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.85rem;
  color: #666;
}

/* Desktop */
@media (min-width: 768px) {
  .containerDetalle {
    grid-template-columns: repeat(2, 1fr);
    max-width: 900px;
    margin: auto;
  }
}
@media (min-width: 768px) {
  .container {
    grid-template-columns: repeat(2, 1fr);
    max-width: 900px;
    margin: auto;
  }
}
.btn {
  display: block;
  text-align: center;
  margin: 1rem;
  padding: 0.75rem;
  background: #2563eb;
  color: white;
  border-radius: 8px;
  text-decoration: none;
}
.selector {
  margin-bottom: 1rem;
}

.selector select {
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.5rem;
  border-radius: 6px;
}

.gallery img {
  width: 100%;
  border-radius: 12px;
}

.details {
  margin-top: 1rem;
}

.price {
  margin-top: 0.5rem;
  font-size: 1.1rem;
}

.alert {
  margin: 0px;
  padding: 1rem;
  background: #fff3cd;
  border-left: 4px solid #facc15;
  font-size: 0.9rem;
}
.gallery {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.gallery img,
.gallery video {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}
@media (min-width: 768px) {
  .gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery video {
    grid-column: span 2;
  }
}
.carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 12px;
  background: #f1f1f1;
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.3s ease-in-out;
}

.slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.slide img,
.slide video {
  width: 100%;
  height: 100%;
  object-fit: cover; 
}


/* Flechas */
.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  font-size: 2rem;
  padding: 0.25rem 0.75rem;
  cursor: pointer;
  z-index: 2;
  border-radius: 50%;
}

.nav.prev {
  left: 10px;
}

.nav.next {
  right: 10px;
}

/* Desktop un poco más grande */
@media (min-width: 768px) {
  .nav {
    font-size: 2.5rem;
  }
}
.back-title {
  cursor: pointer;
}

.back-title:active {
  opacity: 0.7;
}
.details {
  margin-bottom: 1rem;
}

.details h2 {
  margin-bottom: 0.5rem;
}

.details p {
  margin-bottom: 0.5rem;
}

.selector {
  margin: 0px;
}
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.lightbox.hidden {
  display: none;
}

.lightbox-content img,
.lightbox-content video {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
}
@media (min-width: 768px) {
  .carousel {
    aspect-ratio: 16 / 9;
  }
}
.booking {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.nights select {
  width: 100%;
  padding: 0.5rem;
  border-radius: 6px;
}

.total {
  font-size: 1.2rem;
}

.btn-pago {
  padding: 0.9rem;
  background: #16a34a;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
}

.btn-pago:hover {
  background: #15803d;
}
.nights input {
  width: 100%;
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1rem;
}
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-content button {
  padding: 0.8rem;
  background: #16a34a;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.modal-content button:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}
    