/* Theo Properties RC1.0.15.88 — Desktop Exact Tiling & Grid Alignment Lock
   Desktop public marketplace only. Creates one common desktop content rail and exact
   4 / 4 / 3 card tiling for category, featured and explore sections respectively.
   No tablet/mobile rules or interaction changes. */

@media (min-width:1181px){
  :root{
    --tp88-shell:min(1480px, calc(100vw - 96px));
    --tp88-gap:24px;
    --tp88-line:rgba(18,55,75,.10);
    --tp88-shadow:0 12px 30px rgba(13,39,57,.065);
  }

  /* One exact desktop alignment rail for every marketplace section. */
  body.theo-app #explore .marketplace-category-showcase,
  body.theo-app #explore .theo-featured-marketplace,
  body.theo-app #explore #available-properties.marketplace-results,
  body.theo-app #explore .how-theo-works.how-theo-works-v2{
    width:var(--tp88-shell)!important;
    max-width:var(--tp88-shell)!important;
    margin-left:auto!important;
    margin-right:auto!important;
    padding-left:0!important;
    padding-right:0!important;
    overflow:visible!important;
    box-sizing:border-box!important;
  }

  /* Section headings align exactly with first and last tile edges. */
  body.theo-app #explore .category-showcase-head,
  body.theo-app #explore .theo-featured-head,
  body.theo-app #explore #available-properties .marketplace-results-head,
  body.theo-app #explore #available-properties .marketplace-results-description,
  body.theo-app #explore #available-properties .alert-actions{
    width:100%!important;
    max-width:none!important;
    margin-left:0!important;
    margin-right:0!important;
    box-sizing:border-box!important;
  }

  /* ----------------------------------------------------------
     Property class: exactly four equal tiles, no rail/overflow.
     ---------------------------------------------------------- */
  body.theo-app #explore .category-showcase-grid{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    grid-auto-flow:row!important;
    gap:var(--tp88-gap)!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
    scroll-snap-type:none!important;
    transform:none!important;
    box-sizing:border-box!important;
  }
  body.theo-app #explore .category-showcase-grid > .category-showcase-card,
  body.theo-app #explore .category-showcase-grid > .premium-category-card{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin:0!important;
    flex:none!important;
    transform:none!important;
    scroll-snap-align:none!important;
    aspect-ratio:1.56 / 1!important;
    min-height:0!important;
    border-radius:16px!important;
    overflow:hidden!important;
  }

  /* ----------------------------------------------------------
     Featured: exactly four equal premium tiles.
     ---------------------------------------------------------- */
  body.theo-app #explore .theo-featured-grid{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    grid-auto-flow:row!important;
    gap:var(--tp88-gap)!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
    scroll-snap-type:none!important;
    transform:none!important;
    align-items:stretch!important;
    box-sizing:border-box!important;
  }
  body.theo-app #explore .theo-featured-grid > .premium-property-card{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    height:100%!important;
    margin:0!important;
    flex:none!important;
    transform:none!important;
    scroll-snap-align:none!important;
    border-radius:17px!important;
    border:1px solid var(--tp88-line)!important;
    box-shadow:var(--tp88-shadow)!important;
    overflow:hidden!important;
  }
  body.theo-app #explore .theo-featured-grid .premium-property-card .property-photo.property-gallery,
  body.theo-app #explore .theo-featured-grid .premium-property-card .property-photo-overlay{
    width:100%!important;
    aspect-ratio:16 / 10!important;
    height:auto!important;
    min-height:0!important;
  }
  body.theo-app #explore .theo-featured-grid .premium-property-card .property-body{
    display:flex!important;
    flex-direction:column!important;
    min-height:260px!important;
    padding:18px 19px 19px!important;
  }
  body.theo-app #explore .theo-featured-grid .premium-property-card .property-body h3{
    min-height:2.52em!important;
    margin-bottom:8px!important;
    font-size:.90rem!important;
    line-height:1.26!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }
  body.theo-app #explore .theo-featured-grid .premium-property-card .property-price{
    font-size:1.18rem!important;
  }
  body.theo-app #explore .theo-featured-grid .premium-property-card .property-price small{
    font-size:.60rem!important;
  }
  body.theo-app #explore .theo-featured-grid .premium-property-card .address{
    min-height:2.15em!important;
    font-size:.73rem!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }
  body.theo-app #explore .theo-featured-grid .premium-property-card .property-meta.property-facts{
    margin-top:auto!important;
  }
  body.theo-app #explore .theo-featured-grid .premium-property-card .view-property{
    margin-top:15px!important;
    min-height:43px!important;
    font-size:.74rem!important;
  }

  /* ----------------------------------------------------------
     Explore Rentals: exactly three equal editorial tiles.
     ---------------------------------------------------------- */
  body.theo-app #explore #available-properties .property-grid{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    grid-auto-flow:row!important;
    gap:28px!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
    scroll-snap-type:none!important;
    transform:none!important;
    align-items:stretch!important;
    box-sizing:border-box!important;
  }
  body.theo-app #explore #available-properties .property-grid > .premium-property-card,
  body.theo-app #explore #available-properties .property-grid > .property.premium-property-card{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    height:100%!important;
    margin:0!important;
    flex:none!important;
    transform:none!important;
    scroll-snap-align:none!important;
    border-radius:17px!important;
    border:1px solid var(--tp88-line)!important;
    box-shadow:var(--tp88-shadow)!important;
    overflow:hidden!important;
  }
  body.theo-app #explore #available-properties .premium-property-card .property-photo.property-gallery,
  body.theo-app #explore #available-properties .premium-property-card .property-photo-overlay{
    width:100%!important;
    aspect-ratio:16 / 10!important;
    height:auto!important;
    min-height:0!important;
  }
  body.theo-app #explore #available-properties .premium-property-card .property-body{
    display:flex!important;
    flex-direction:column!important;
    min-height:250px!important;
    padding:18px 20px 20px!important;
  }
  body.theo-app #explore #available-properties .premium-property-card .property-body h3{
    min-height:2.52em!important;
    margin-bottom:8px!important;
    font-size:.92rem!important;
    line-height:1.26!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }
  body.theo-app #explore #available-properties .premium-property-card .property-price{
    font-size:1.20rem!important;
  }
  body.theo-app #explore #available-properties .premium-property-card .property-price small{
    font-size:.61rem!important;
  }
  body.theo-app #explore #available-properties .premium-property-card .address{
    min-height:2.15em!important;
    font-size:.74rem!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }
  body.theo-app #explore #available-properties .premium-property-card .property-meta.property-facts{
    margin-top:auto!important;
  }
  body.theo-app #explore #available-properties .premium-property-card .view-property{
    margin-top:16px!important;
    min-height:44px!important;
    font-size:.75rem!important;
  }

  /* Prevent desktop tiles from being shifted by legacy rail affordances. */
  body.theo-app #explore .category-showcase-grid::before,
  body.theo-app #explore .category-showcase-grid::after,
  body.theo-app #explore .theo-featured-grid::before,
  body.theo-app #explore .theo-featured-grid::after,
  body.theo-app #explore #available-properties .property-grid::before,
  body.theo-app #explore #available-properties .property-grid::after{
    content:none!important;
    display:none!important;
  }
}

/* Large desktop gets a little more canvas, still exact columns. */
@media (min-width:1680px){
  :root{--tp88-shell:min(1540px, calc(100vw - 112px));}
}
