/* Minimal cards & grid */
.tt-hf-search {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1rem 0;
}
.tt-hf-search input,.tt-hf-search select,.tt-hf-search button {
  padding: .5rem .6rem;
}
.tt-hf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.tt-hf-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.tt-hf-thumb img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}
.tt-hf-body {
  padding: .8rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.tt-hf-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
}
.tt-hf-city { color: #555; font-size: .9rem; }
.tt-hf-price { font-weight: 700; margin-top: .3rem; }
.tt-hf-btn {
  margin-top: .4rem;
  text-align: center;
  padding: .6rem .8rem;
  background: #0d6efd;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
}
.tt-hf-pagination {
  margin-top: 1rem;
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.tt-hf-pagination a {
  padding: .4rem .6rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  text-decoration: none;
}
.tt-hf-pagination a.current {
  background: #0d6efd;
  color: #fff;
  border-color: #0d6efd;
}


/* Elementor wrapper overrides */
.tt-hf-elementor-wrapper .tt-hf-grid {
  gap: var(--tt-hf-gap, 1rem);
  grid-template-columns: repeat(var(--tt-hf-columns, auto-fill), minmax(220px, 1fr));
}


/* Loading state */
.tt-hf-results.tt-hf-loading { opacity: .6; pointer-events: none; transition: opacity .2s ease; }


/* Facets */
.tt-hf-facets{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .5rem 1rem;
  align-items: start;
}
.tt-hf-facet{
  border: 1px solid #eee;
  border-radius: 8px;
  padding: .5rem .6rem;
}
.tt-hf-facet legend{
  font-weight: 600;
  margin-bottom: .4rem;
}
.tt-hf-facet label{
  display: block;
  font-size: .92rem;
  margin: .15rem 0;
}

/* Range */
.tt-hf-range{ display:flex; flex-direction:column; gap:.25rem; min-width: 240px; }
.tt-hf-range input[type=range]{ width: 100%; }
.tt-hf-range-labels{ font-size: .9rem; color: #333; }

/* Infinite scroll sentinel */
.tt-hf-sentinel{ height: 1px; }


/* Two-column layout: 20% sidebar (filters), 80% content (results) */
.tt-hf-layout{
  display: grid;
  grid-template-columns: minmax(220px, 20%) 1fr;
  gap: 1rem;
  align-items: start;
}
.tt-hf-sidebar{
  position: sticky;
  top: 1rem;
  align-self: start;
}
.tt-hf-content{ min-width: 0; }

/* Stack on tablet/mobile */
@media (max-width: 1024px){
  .tt-hf-layout{ grid-template-columns: 1fr; }
  .tt-hf-sidebar{ position: static; }
}

/* Make search form full-width in sidebar */
.tt-hf-sidebar .tt-hf-search{
  display: grid;
  grid-template-columns: 1fr;
}
.tt-hf-sidebar .tt-hf-facets{ grid-template-columns: 1fr; }

/* Optional: tighten card grid in content */
.tt-hf-content .tt-hf-grid{ gap: var(--tt-hf-gap, 1rem); }


/* Add spacing between sidebar and content */
.tt-hf-layout{ gap: 1.5rem; }

/* Card grid inside content */
.tt-hf-content .tt-hf-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px,1fr));
  gap: var(--tt-hf-gap, 1rem);
  align-items: stretch;
}

/* Make all cards equal height */
.tt-hf-card{
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

/* Ensure images scale nicely */
.tt-hf-thumb img{
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}

/* Push button to bottom */
.tt-hf-btn{
  display: block;
  text-align: center;
  margin-top: auto;
}


/* Layout gaps configurable */
.tt-hf-layout{
  display: grid;
  grid-template-columns: minmax(220px, var(--tt-hf-sidebar, 20%)) 1fr;
  gap: var(--tt-hf-layout-gap, 1.25rem);
}
.tt-hf-sidebar{ position: sticky; top: var(--tt-hf-sticky-offset, 16px); }
@media (max-width:1024px){
  .tt-hf-layout{ grid-template-columns: 1fr; }
  .tt-hf-sidebar{ position: static; }
}

/* Equal height cards + tidy alignment */
.tt-hf-grid{ align-items: stretch; }
.tt-hf-card{
  height: 100%;
  display: flex;
  flex-direction: column;
}
.tt-hf-thumb{
  display:block;
  overflow:hidden;
  aspect-ratio: 16 / 10;
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}
.tt-hf-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.tt-hf-body{
  display:flex;
  flex-direction:column;
  gap:.35rem;
  flex:1;
  padding:.5rem .6rem .75rem;
}
.tt-hf-title{ margin:.25rem 0 .15rem; line-height:1.2; }
.tt-hf-price{ font-weight:600; margin-top:auto; }
.tt-hf-btn{
  display:inline-block;
  text-align:center;
  padding:.55rem .8rem;
  margin-top:.5rem;
}

/* Minor grid refinements */
.tt-hf-content .tt-hf-grid{
  gap: var(--tt-hf-gap, 1rem);
  grid-auto-rows: 1fr;
}
