/* ==========================================================
   StayGo · Property UI Stable
   Ficha de alojamiento estable para Chrome/Edge/Firefox.
   Una sola capa visual: layout, sidebar y barra móvil.
   ========================================================== */

html,
body{
    overflow-x:hidden !important;
}

/* Layout general */
.property-layout,
.alojamiento-layout,
.ficha-layout,
.property-page,
.property-detail,
.property-grid,
.single-property-grid,
.staygo-property-layout{
    box-sizing:border-box !important;
    width:min(1200px, calc(100% - 32px)) !important;
    max-width:1200px !important;
    margin-left:auto !important;
    margin-right:auto !important;
    display:grid !important;
    grid-template-columns:minmax(0, 1fr) minmax(320px, 420px) !important;
    gap:24px !important;
    align-items:start !important;
}

/* Columna principal */
.property-main,
.property-content,
.alojamiento-main,
.alojamiento-content,
.ficha-main,
.property-gallery,
.galeria-alojamiento,
.photos-grid,
.fotos-grid{
    min-width:0 !important;
    max-width:100% !important;
    box-sizing:border-box !important;
}

/* Columna lateral: escritorio normal, nunca fixed */
.property-sidebar,
.booking-sidebar,
.reserva-sidebar,
.sticky-reserva,
.sidebar-booking,
aside.property-aside{
    position:relative !important;
    top:auto !important;
    right:auto !important;
    left:auto !important;
    transform:none !important;
    width:100% !important;
    max-width:420px !important;
    min-width:0 !important;
    z-index:10 !important;
    box-sizing:border-box !important;
}

/* Tarjetas laterales */
.review-box,
.reviews-box,
.booking-box,
.side-card,
.property-card-side,
.reservation-card,
.booking-resume-card,
.fit-card,
.encaja-card,
.confirm-card,
.tu-reserva{
    position:relative !important;
    top:auto !important;
    right:auto !important;
    left:auto !important;
    transform:none !important;
    max-width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
    z-index:12 !important;
    overflow:hidden !important;
}

/* Popup disponibilidad: en escritorio debe ser tarjeta normal */
.availability-popup,
.confirm-availability-popup,
.floating-confirm-box,
.confirm-disponibilidad,
.solicitud-floating-card{
    position:relative !important;
    right:auto !important;
    bottom:auto !important;
    left:auto !important;
    transform:none !important;
    width:100% !important;
    max-width:100% !important;
    margin-top:16px !important;
    z-index:13 !important;
    box-sizing:border-box !important;
}

/* Barra inferior: DESACTIVADA en escritorio/tablet grande */
@media (min-width: 901px){
    .mobile-reserva-bar,
    .sticky-mobile-booking,
    .bottom-booking-bar,
    .booking-bottom-bar,
    .floating-booking-bar,
    .property-bottom-cta,
    .bottom-sticky-reserve,
    .staygo-bottom-booking,
    [class*="bottom"][class*="booking"],
    [class*="mobile"][class*="booking"],
    [class*="sticky"][class*="booking"]{
        display:none !important;
        visibility:hidden !important;
        opacity:0 !important;
        pointer-events:none !important;
        height:0 !important;
        min-height:0 !important;
        max-height:0 !important;
        overflow:hidden !important;
    }

    body{
        padding-bottom:0 !important;
    }

    main,
    .property-detail,
    .property-page,
    .alojamiento-page,
    .ficha-layout{
        padding-bottom:40px !important;
    }
}

/* Tablet/ventanas estrechas: una columna clara */
@media (max-width:1180px){
    .property-layout,
    .alojamiento-layout,
    .ficha-layout,
    .property-page,
    .property-detail,
    .property-grid,
    .single-property-grid,
    .staygo-property-layout{
        grid-template-columns:1fr !important;
        width:min(920px, calc(100% - 28px)) !important;
        max-width:920px !important;
    }

    .property-sidebar,
    .booking-sidebar,
    .reserva-sidebar,
    .sticky-reserva,
    .sidebar-booking,
    aside.property-aside{
        max-width:100% !important;
        width:100% !important;
    }
}

/* Móvil: barra inferior limpia y útil */
@media (max-width:900px){
    body{
        padding-bottom:132px !important;
    }

    .mobile-reserva-bar,
    .sticky-mobile-booking,
    .bottom-booking-bar,
    .booking-bottom-bar,
    .floating-booking-bar,
    .property-bottom-cta,
    .bottom-sticky-reserve,
    .staygo-bottom-booking{
        position:fixed !important;
        left:10px !important;
        right:10px !important;
        bottom:10px !important;
        transform:none !important;
        width:auto !important;
        max-width:none !important;
        min-width:0 !important;
        z-index:9999 !important;
        box-sizing:border-box !important;
        border-radius:18px !important;
        padding:10px !important;
        display:flex !important;
        align-items:center !important;
        justify-content:space-between !important;
        gap:8px !important;
        overflow:hidden !important;
        box-shadow:0 18px 50px rgba(15, 23, 42, .18) !important;
    }

    .mobile-reserva-bar *,
    .sticky-mobile-booking *,
    .bottom-booking-bar *,
    .booking-bottom-bar *,
    .floating-booking-bar *,
    .property-bottom-cta *,
    .bottom-sticky-reserve *,
    .staygo-bottom-booking *{
        min-width:0 !important;
        max-width:100% !important;
        box-sizing:border-box !important;
    }

    .mobile-reserva-bar a,
    .mobile-reserva-bar button,
    .sticky-mobile-booking a,
    .sticky-mobile-booking button,
    .bottom-booking-bar a,
    .bottom-booking-bar button,
    .booking-bottom-bar a,
    .booking-bottom-bar button,
    .floating-booking-bar a,
    .floating-booking-bar button,
    .property-bottom-cta a,
    .property-bottom-cta button{
        white-space:nowrap !important;
        flex:1 1 auto !important;
        min-width:0 !important;
        font-size:13px !important;
        padding:11px 10px !important;
    }

    .property-layout,
    .alojamiento-layout,
    .ficha-layout,
    .property-page,
    .property-detail,
    .property-grid,
    .single-property-grid,
    .staygo-property-layout{
        width:calc(100% - 18px) !important;
        max-width:100% !important;
        gap:16px !important;
    }
}

/* Formularios y fotos */
form,
textarea,
.checkout-form,
.availability-form,
.solicitud-form{
    position:relative !important;
    z-index:30 !important;
}

img{
    max-width:100% !important;
    height:auto;
}

/* Chrome stacking context */
@supports (-webkit-appearance:none){
    .property-sidebar,
    .booking-sidebar,
    .reserva-sidebar,
    .sticky-reserva,
    .review-box,
    .booking-box,
    .availability-popup,
    .confirm-availability-popup{
        will-change:auto !important;
        contain:none !important;
    }
}