/* Ficha individual de hotel (single-hotel.php) — mobile-first */
.hotel-ficha {
    /* #content de GP es flex: sin width la ficha se encogería */
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

/* Cabecera */
.hotel-cabecera {
    margin-bottom: 16px;
}
.hotel-cabecera h1 {
    font-size: 26px;
    line-height: 1.2;
    margin: 0 0 8px;
}
.hotel-direccion {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 15px;
    color: #777;
    margin: 0;
}
.icono-pin {
    flex: 0 0 auto;
    margin-top: 3px;
    color: #2ecc71;
}

/* Layout: una columna en móvil, contenido + tarjeta sticky en escritorio */
.hotel-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}
@media (min-width: 900px) {
    .hotel-layout {
        grid-template-columns: minmax(0, 1fr) 340px;
        gap: 32px;
        align-items: start;
    }
    .hotel-aside {
        position: sticky;
        top: 24px;
    }
}

/* Galería */
.hotel-imagen-principal {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: #eef2ef;
    border-radius: 12px;
    overflow: hidden;
    cursor: zoom-in;
    aspect-ratio: 16 / 10;
}
.hotel-imagen-principal img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hotel-galeria-zoom {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
}
.hotel-galeria-miniaturas {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.hotel-galeria-miniaturas li {
    flex: 0 0 auto;
    margin: 0;
}
.hotel-galeria-miniaturas .gallery-item {
    display: block;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    background: none;
    cursor: pointer;
    opacity: 0.75;
    transition: opacity 0.15s ease, border-color 0.15s ease;
}
.hotel-galeria-miniaturas .gallery-item img {
    display: block;
    width: 84px;
    height: 62px;
    object-fit: cover;
}
.hotel-galeria-miniaturas .gallery-item:hover,
.hotel-galeria-miniaturas .gallery-item.activa {
    opacity: 1;
    border-color: #2ecc71;
}

/* Descripción */
.hotel-description {
    margin-top: 24px;
    font-size: 16px;
    line-height: 1.7;
    white-space: pre-line;
}

/* Tarjeta de reserva */
.hotel-booking-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 20px;
}
.hotel-booking-titulo {
    font-size: 18px;
    margin: 0 0 14px;
}
.reserva-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 12px 24px;
    background-color: #2ecc71;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 17px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.2s ease;
}
.reserva-btn:hover,
.reserva-btn:focus {
    background-color: #27ae60;
    color: #fff;
}
.hotel-booking-card .hotel-map {
    height: 240px;
    margin-top: 16px;
    border-radius: 8px;
    overflow: hidden;
}
.hotel-como-llegar {
    display: block;
    margin-top: 10px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: #27ae60;
    text-decoration: none;
}
.hotel-como-llegar:hover {
    text-decoration: underline;
}
.hotel-sin-mapa {
    margin: 16px 0 0;
    font-size: 14px;
    color: #777;
    text-align: center;
}

/* Mapa más alto en móvil (ocupa el ancho completo) */
@media (max-width: 899px) {
    .hotel-booking-card .hotel-map {
        height: 300px;
    }
}

/* CTA fija abajo en móvil */
.hotel-cta-movil {
    display: none;
}
@media (max-width: 899px) {
    .hotel-cta-movil {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 100;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, 0.97);
        border-top: 1px solid #e5e5e5;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    }
    /* deja hueco para que la barra no tape el final de la página */
    .hotel-ficha {
        padding-bottom: 90px;
    }
    /* en móvil el CTA de la tarjeta es redundante con la barra fija */
    .hotel-booking-card > .reserva-btn {
        display: none;
    }
    .hotel-booking-titulo {
        margin-bottom: 4px;
    }
}

/* Lightbox */
.hotel-lightbox {
    border: 0;
    padding: 0;
    background: transparent;
    max-width: 100vw;
    max-height: 100vh;
}
.hotel-lightbox::backdrop {
    background: rgba(0, 0, 0, 0.9);
}
.hotel-lightbox[open] {
    display: flex;
    align-items: center;
    justify-content: center;
}
.hotel-lightbox img {
    max-width: 92vw;
    max-height: 86vh;
    object-fit: contain;
    border-radius: 6px;
}
.lightbox-cerrar,
.lightbox-nav {
    position: fixed;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease;
}
.lightbox-cerrar:hover,
.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.35);
}
.lightbox-cerrar {
    top: 16px;
    right: 16px;
}
.lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
}
.lightbox-anterior {
    left: 12px;
}
.lightbox-siguiente {
    right: 12px;
}
