/* ========== SECCIÓN CABEÑAS ========== */
.seccion-cabañas {
    position: relative;

}

/* ========== GRID DESKTOP (>950px) - 3 COLUMNAS ========== */
.cabañas-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-content: center;
    gap: 20px;
    margin: 0 auto;
}

.cabaña-card {
    width: 100%;
    max-width: 375px;
    border-radius: 16px;
    overflow: hidden;
    background: #FEFDFC;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    position: relative;
    justify-self: center;
    height: auto;
}

.cabaña-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}

.cabaña-card a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.image-container {
    height: 389px;
    overflow: hidden;
    display: flex;
    align-items: center; 
    justify-content: center;
}

.cabaña-img {
    width: 100%;
    height: 100%;
    object-fit: cover;    
    object-position: center; 
    display: block;
}

.cabaña-content {
    padding: 16px;
    height: auto;
    min-height: 135px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    border: 1px solid #AF9286;
    border-top: none;
    border-radius: 0 0 16px 16px;}

/* Título */
.cabaña-titulo {
    margin: 0;
    color: #181818;
    font-weight: 500;
    font-size: 20px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    margin-bottom: 1em;
    line-height: 1.4;
    word-break: break-word;
    display: block;
}

/* Descripción */
.cabaña-desc {
    color: #6A6A6A;
    font-size: 14px;
    line-height: 17px;
    margin: 4px 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 34px;
}

/* Fila inferior */
.cabaña-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.cabaña-precio {
    font-size: 18px;
    line-height: 24px;
    color: #000;
}

/* Botón */
.cabaña-btn {
    width: 124px;
    height: 37px;
    background: #FFBF00;
    border-radius: 8px;
    border: none;
    color: #181818;
    font-weight: 500;
    font-size: 16px;
    line-height: 19px;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.cabaña-btn:hover {
    background: #E6AC00;
}

.cabaña-categoria {
    display: none;
}

/* BADGE "RESERVAS YA" */
.badge-reservas {
    position: absolute;
    top: 12px;
    left: 0;
    background: #FFBF00;
    color: #333;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 0 16px 16px 0;
    z-index: 10;
    width: 50%;
    text-align: left;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* FONDO PARA CABEÑAS CON RESERVAS YA */
.cabaña-content.con-reservas {

}

/* Indicador visual de cabañas ocultas (para debug) */
.cabaña-oculta {
    opacity: 0.7;
    filter: grayscale(50%);
    border: 1px dashed #ccc;
}

.btn-reintentar {
    padding: 8px 16px;
    background: #FFBF00;
    color: #000;
    border: 1px solid #875C4A;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 4px;
}

.btn-reintentar:hover {
    background: #e6ac00;
    transform: scale(1.05);
}

.error-carga {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    border: 1px dashed #875C4A;
    border-radius: 8px;
    background: #fff9f0;
}

/* Contador de visibilidad (opcional, para debug) */
.visibilidad-contador {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    z-index: 1000;
}

/* ========== TABLET (<=950px) - 2 COLUMNAS ========== */
@media (max-width: 950px) {
    .cabañas-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .cabaña-card {
        max-width: 100%;
        justify-self: center;
    }
}

/* ========== MÓVIL (<=610px) - 1 COLUMNA ========== */
@media (max-width: 610px) {
    .cabañas-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cabaña-card {
        max-width: 375px;
        margin: 0 auto;
    }
    .image-container {
    height: 173px;
}

    
}

/* ========== MÓVIL HORIZONTAL (420px - 610px) ========== */
@media (max-width: 610px) and (min-width: 320px) {
    .cabaña-card {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        padding: 0 !important;
        height: 173px !important;
        flex: none !important;
        order: 0 !important;
        flex-grow: 0 !important;
        margin: 0 auto !important;
    }
    
    .cabaña-card a {
        display: flex !important;
        width: 100% !important;
        height: 100% !important;
        text-decoration: none !important;
        color: inherit !important;
    }
    
    
    .cabaña-content {
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        padding: 12px !important;
        gap: 6px !important;
        width: 171px !important;
        height: 173px !important;
        border: 1px solid #875C4A !important;
        border-left: none !important;
        border-radius: 0 16px 16px 0 !important;
        flex: none !important;
        order: 1 !important;
        align-self: stretch !important;
        flex-grow: 1 !important;
        position: relative !important;
        overflow: hidden !important;
    }
.cabaña-titulo {
    font-size: 16px !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    font-weight: 600 !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    overflow: visible !important;
    text-overflow: clip !important;
    max-height: none !important;
    width: 100% !important;
}
    
    .cabaña-precio {
        font-size: 14px !important;
        font-weight: 600 !important;
    }
    
    .cabaña-categoria {
        font-size: 12px !important;
        color: #666 !important;
    }
    
    .badge-reservas {
        position: absolute !important;
        top: 8px !important;
        right: 8px !important;
        color: #333 !important;
        font-size: 10px !important;
        font-weight: 600 !important;
        padding: 4px 8px !important;
        border-radius: 3px !important;
        z-index: 10 !important;
    }
}

.resultados-busqueda-titulo {
    grid-column: 1 / -1; 
    width: 100%;
    font-size: 32px;
    font-weight: 500;
    text-align: left;
}
