
/* AutoPilot V25.22 — actual detail hero overflow fix.
   Root cause: legacy CSS still imposed max-height:286/300/320px !important
   on the right card and photo, so the new sixth metric + CTA could not fit. */

.detail-hero{
  align-items:stretch!important;
}

/* Remove ALL legacy fixed-height caps from both sides. */
.detail-main{
  height:auto!important;
  min-height:320px!important;
  max-height:none!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
  display:flex!important;
  flex-direction:column!important;
}

.detail-photo{
  height:auto!important;
  min-height:320px!important;
  max-height:none!important;
  align-self:stretch!important;
}

/* Image follows the stretched photo card. */
.detail-photo img{
  width:100%!important;
  height:100%!important;
  min-height:320px!important;
  object-fit:cover!important;
}

/* Six metrics remain a compact 3 × 2 grid. */
@media(min-width:901px){
  .detail-quick{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:7px!important;
    margin-top:auto!important;
    align-content:start!important;
  }
}

/* CTA occupies a full row inside the right card, never outside it. */
.detail-quick .detail-compare-cta{
  grid-column:1 / -1!important;
  position:static!important;
  width:100%!important;
  max-width:none!important;
  min-height:48px!important;
  height:auto!important;
  margin:0!important;
  padding:10px 14px!important;
  box-sizing:border-box!important;
  transform:none!important;
}

/* Prevent metric tiles from forcing artificial height. */
.detail-quick .q{
  min-height:64px!important;
  height:auto!important;
  box-sizing:border-box!important;
}

@media(max-width:900px){
  .detail-main{
    min-height:0!important;
  }
  .detail-photo{
    height:280px!important;
    min-height:280px!important;
  }
  .detail-photo img{
    min-height:280px!important;
  }
  .detail-quick .detail-compare-cta{
    grid-column:1 / -1!important;
  }
}

@media(max-width:650px){
  .detail-photo{
    height:230px!important;
    min-height:230px!important;
  }
  .detail-photo img{
    min-height:230px!important;
  }
}
