.mgr-flc{
  --mgr-bg:#f7f4ee;
  --mgr-text:#171717;
  --mgr-muted:#656565;
  --mgr-line:#ddd7ca;
  --mgr-card:#fff;
  --mgr-gap:20px;
  color:var(--mgr-text);
  box-sizing:border-box;
}
.mgr-flc *{box-sizing:border-box}

.mgr-flc-head,
.mgr-home-carousel-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:24px;
  margin:0 0 24px;
}

.mgr-kicker{
  display:block;
  font-size:12px;
  font-weight:700;
  letter-spacing:.18em;
  margin-bottom:8px;
}

.mgr-flc h2,
.mgr-home-carousel h2{
  font-size:clamp(28px,4vw,46px);
  line-height:1.05;
  margin:0 0 8px;
}

.mgr-flc p{color:var(--mgr-muted)}

.mgr-flc-toolbar{
  display:flex;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  margin-bottom:18px;
}

.mgr-tabs{display:flex;gap:8px;flex-wrap:wrap}

.mgr-tabs button,
.mgr-tools select,
.mgr-tools input{
  border:1px solid var(--mgr-line);
  background:#fff;
  color:var(--mgr-text);
  border-radius:999px;
  padding:10px 14px;
}

.mgr-tabs button.active{background:var(--mgr-text);color:#fff}
.mgr-tools{display:flex;gap:8px;flex-wrap:wrap}
.mgr-flc-count{margin:0 0 14px;color:var(--mgr-muted)}

.mgr-flc-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:22px;
}

.mgr-card{
  background:var(--mgr-card);
  border:1px solid var(--mgr-line);
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 10px 30px rgba(0,0,0,.06);
}

.mgr-photo{
  position:relative;
  aspect-ratio:4/3;
  background:#eee;
  overflow:hidden;
}

.mgr-photo img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition:transform .35s ease;
}

.mgr-card:hover .mgr-photo img{transform:scale(1.02)}

.mgr-photo-placeholder{
  height:100%;
  display:grid;
  place-items:center;
  font-weight:800;
  font-size:32px;
  letter-spacing:.16em;
  background:#eee8dc;
}

.mgr-badge{
  position:absolute;
  left:14px;
  top:14px;
  background:#fff;
  color:#111;
  padding:7px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
}

.mgr-card-body{padding:18px}
.mgr-price{font-size:24px;font-weight:800;margin-bottom:7px}
.mgr-card h3{font-size:19px;line-height:1.25;margin:0 0 6px;color:#171717}
.mgr-location{color:var(--mgr-muted);margin-bottom:12px}
.mgr-facts{display:flex;gap:14px;flex-wrap:wrap;font-size:13px;color:#444;margin:12px 0}

.mgr-details,
.mgr-carousel-view-all{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-weight:700;
  text-decoration:none;
  color:#171717;
}

.mgr-empty,
.mgr-empty-static,
.mgr-flc-error{
  padding:22px;
  border:1px solid var(--mgr-line);
  border-radius:14px;
  background:#fff;
}

/* Homepage carousel */
.mgr-home-carousel{
  width:100%;
  padding:18px 0;
  overflow:hidden;
}

.mgr-home-carousel-head{
  align-items:center;
}

.mgr-home-carousel-actions{
  display:flex;
  gap:8px;
  flex:0 0 auto;
}

.mgr-carousel-arrow{
  width:44px;
  height:44px;
  border-radius:50%;
  border:1px solid var(--mgr-line);
  background:#fff;
  color:#171717;
  font-size:26px;
  line-height:1;
  cursor:pointer;
}

.mgr-carousel-arrow:hover,
.mgr-carousel-arrow:focus{
  background:#171717;
  color:#fff;
  outline:2px solid transparent;
}

.mgr-carousel-viewport{
  overflow:hidden;
  width:100%;
  position:relative;
}

.mgr-carousel-track{
  display:flex;
  gap:var(--mgr-gap);
  width:max-content;
  will-change:transform;
  transform:translate3d(0,0,0);
}

.mgr-carousel-card{
  flex:0 0 calc((min(1200px, 100vw) - var(--mgr-gap)) / 2);
  width:calc((min(1200px, 100vw) - var(--mgr-gap)) / 2);
  max-width:560px;
  min-width:320px;
}

.mgr-carousel-card-link{
  display:block;
  height:100%;
  color:inherit;
  text-decoration:none;
}

.mgr-home-carousel-footer{
  display:flex;
  justify-content:flex-end;
  margin-top:14px;
}

/* Tablet */
@media(max-width:1024px){
  .mgr-flc-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .mgr-carousel-card{
    flex-basis:calc((100vw - 56px - var(--mgr-gap)) / 2);
    width:calc((100vw - 56px - var(--mgr-gap)) / 2);
    min-width:280px;
  }
}

/* Mobile */
@media(max-width:700px){
  .mgr-flc{
    --mgr-gap:12px;
  }

  .mgr-flc-grid{grid-template-columns:1fr}

  .mgr-flc-head,
  .mgr-home-carousel-head{
    align-items:flex-start;
    flex-direction:column;
    gap:14px;
  }

  .mgr-home-carousel-actions{
    align-self:flex-end;
  }

  .mgr-tools{width:100%}
  .mgr-tools input{flex:1;min-width:0}

  .mgr-carousel-card{
    flex-basis:calc((100vw - 34px - var(--mgr-gap)) / 2);
    width:calc((100vw - 34px - var(--mgr-gap)) / 2);
    min-width:0;
    border-radius:14px;
  }

  .mgr-carousel-card .mgr-photo{
    aspect-ratio:1.15/1;
  }

  .mgr-carousel-card .mgr-card-body{
    padding:10px;
  }

  .mgr-carousel-card .mgr-price{
    font-size:16px;
    margin-bottom:4px;
  }

  .mgr-carousel-card h3{
    font-size:13px;
    line-height:1.2;
    margin-bottom:4px;
  }

  .mgr-carousel-card .mgr-location{
    font-size:11px;
    line-height:1.25;
    margin-bottom:7px;
  }

  .mgr-carousel-card .mgr-facts{
    gap:6px;
    margin:7px 0;
    font-size:10px;
  }

  .mgr-carousel-card .mgr-details{
    font-size:11px;
  }

  .mgr-carousel-card .mgr-badge{
    left:8px;
    top:8px;
    padding:5px 7px;
    font-size:9px;
  }

  .mgr-carousel-arrow{
    width:40px;
    height:40px;
  }

  .mgr-home-carousel-footer{
    justify-content:center;
    margin-top:12px;
  }

  .mgr-carousel-view-all{
    font-size:13px;
  }
}

/* Very small phones */
@media(max-width:430px){
  .mgr-home-carousel h2{font-size:28px}
  .mgr-home-carousel p{font-size:13px}

  .mgr-carousel-card{
    flex-basis:calc((100vw - 26px - 10px) / 2);
    width:calc((100vw - 26px - 10px) / 2);
  }

  .mgr-carousel-card .mgr-card-body{padding:8px}
  .mgr-carousel-card .mgr-price{font-size:15px}
  .mgr-carousel-card h3{font-size:12px}
  .mgr-carousel-card .mgr-location{font-size:10px}
  .mgr-carousel-card .mgr-facts{font-size:9px;gap:4px}
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .mgr-carousel-track{transform:none !important}
}
