/* Theo Properties RC1.0.11.20.13 — iPad Property Class Grid Separation Lock
   Tablet-only composition fix. Keeps every property-class card in its own grid cell
   and prevents inherited carousel/flex rules from overlapping media on iPad. */

@media (min-width:701px) and (max-width:1180px){
  body.theo-app #explore .marketplace-category-showcase{
    overflow:visible!important;
  }

  body.theo-app #explore .category-showcase-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-auto-flow:row!important;
    grid-auto-columns:auto!important;
    align-items:stretch!important;
    gap:16px!important;
    width:100%!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
    scroll-snap-type:none!important;
    scroll-padding:0!important;
  }

  body.theo-app #explore .category-showcase-card.premium-category-card{
    position:relative!important;
    display:block!important;
    isolation:isolate!important;
    flex:none!important;
    flex-basis:auto!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:auto!important;
    min-height:0!important;
    aspect-ratio:1.42 / 1!important;
    margin:0!important;
    overflow:hidden!important;
    opacity:1!important;
    transform:none!important;
    scroll-snap-align:none!important;
    contain:paint!important;
  }

  body.theo-app #explore .premium-category-media{
    position:absolute!important;
    inset:0!important;
    display:block!important;
    width:100%!important;
    height:100%!important;
    min-width:0!important;
    min-height:0!important;
    max-width:100%!important;
    max-height:100%!important;
    object-fit:cover!important;
    object-position:center center!important;
    margin:0!important;
    transform:none!important;
    z-index:0!important;
  }

  body.theo-app #explore .residential .premium-category-media{object-position:center 48%!important}
  body.theo-app #explore .commercial .premium-category-media{object-position:center 50%!important}
  body.theo-app #explore .industrial .premium-category-media{object-position:center 48%!important}
  body.theo-app #explore .agricultural .premium-category-media{object-position:center 50%!important}

  body.theo-app #explore .category-showcase-card.premium-category-card:before{
    position:absolute!important;
    inset:0!important;
    z-index:1!important;
  }
  body.theo-app #explore .category-showcase-card.premium-category-card>.premium-category-card-inner{
    position:relative!important;
    inset:auto!important;
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    z-index:2!important;
  }
  body.theo-app #explore .category-showcase-card.premium-category-card:after{z-index:3!important}

  body.theo-app #explore .category-carousel-controls{
    display:none!important;
  }
}

/* iPad portrait: comfortable card depth and readable copy. */
@media (min-width:701px) and (max-width:899px) and (orientation:portrait){
  body.theo-app #explore .category-showcase-grid{gap:16px!important}
  body.theo-app #explore .category-showcase-card.premium-category-card{
    aspect-ratio:1.34 / 1!important;
  }
  body.theo-app #explore .premium-category-icon{
    top:18px!important;
    left:18px!important;
    width:48px!important;
    height:48px!important;
    border-radius:12px!important;
  }
  body.theo-app #explore .premium-category-icon svg{width:23px!important;height:23px!important}
  body.theo-app #explore .premium-category-copy{left:18px!important;right:16px!important;bottom:17px!important}
}

/* iPad landscape: retain 2x2 so signed-in shell width never squeezes cards into each other. */
@media (min-width:900px) and (max-width:1180px) and (orientation:landscape){
  body.theo-app #explore .category-showcase-grid{gap:14px!important}
  body.theo-app #explore .category-showcase-card.premium-category-card{
    aspect-ratio:1.55 / 1!important;
  }
}
