/* BAI lower-home desktop v2 — hard reset of legacy shell/grid behavior. */
@media (min-width:900px){
  /* Keep the approved first-screen split, but make the next row begin immediately after it. */
  body[data-page="home"] .v66-home,
  body[data-page="home"] .page{
    grid-template-rows:156px minmax(0,1fr) auto!important;
    row-gap:14px!important;
  }

  /* The lower home is ONE full-width vertical flow. Never inherit shell/grid placement. */
  body[data-page="home"] main.page>.v66-lower,
  body[data-page="home"] .v66-home>.v66-lower,
  body[data-page="home"] .v66-lower{
    grid-column:1 / -1!important;
    grid-row:3!important;
    justify-self:stretch!important;
    align-self:start!important;
    position:relative!important;
    float:none!important;
    clear:both!important;
    width:100%!important;
    max-width:1320px!important;
    min-width:0!important;
    height:auto!important;
    margin:18px 0 0!important;
    padding:34px 0 52px!important;
    display:flex!important;
    flex-direction:column!important;
    flex-wrap:nowrap!important;
    gap:0!important;
  }

  body[data-page="home"] .v66-lower>*{
    position:relative!important;
    float:none!important;
    clear:both!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    grid-column:auto!important;
    grid-row:auto!important;
    justify-self:stretch!important;
    align-self:stretch!important;
  }

  /* Section 1: compact category bar. */
  body[data-page="home"] .v66-lower .lower-vibe-head{
    order:1!important;
    display:flex!important;
    margin:0 0 14px!important;
  }
  body[data-page="home"] .v66-lower .v651-vibe-row{
    order:2!important;
    display:grid!important;
    grid-template-columns:repeat(8,minmax(0,1fr))!important;
    gap:10px!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
  }
  body[data-page="home"] .v66-lower .v651-vibe-chip{
    width:100%!important;
    min-width:0!important;
    height:56px!important;
  }

  /* Section 2: primary editorial grid. */
  body[data-page="home"] .v66-lower .lower-feature-head{
    order:3!important;
    display:flex!important;
    margin:46px 0 16px!important;
  }
  body[data-page="home"] .v66-lower #homePicks{
    order:4!important;
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:20px!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
  }
  body[data-page="home"] .v66-lower #homePicks>.place-mini{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
  }
  body[data-page="home"] .v66-lower #homePicks>.place-mini:nth-child(n+4){display:none!important}
  body[data-page="home"] .v66-lower #homePicks .place-mini img{height:230px!important;width:100%!important;object-fit:cover!important}

  /* Section 3: secondary discovery grid — use the whole desktop width. */
  body[data-page="home"] .v66-lower .lower-more-head{
    order:5!important;
    display:flex!important;
    margin:48px 0 16px!important;
  }
  body[data-page="home"] .v66-lower #homePlaces{
    order:6!important;
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:16px!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
  }
  body[data-page="home"] .v66-lower #homePlaces>.place-mini{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
  }
  body[data-page="home"] .v66-lower #homePlaces .place-mini img{height:165px!important;width:100%!important;object-fit:cover!important}

  /* Closing CTA must sit BELOW the grid, never beside it. */
  body[data-page="home"] .v66-lower .driverbanner{
    order:7!important;
    position:relative!important;
    float:none!important;
    clear:both!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    min-height:112px!important;
    margin:52px 0 0!important;
    padding:22px 28px!important;
    display:grid!important;
    grid-template-columns:52px minmax(0,1fr) auto!important;
    align-items:center!important;
    gap:16px!important;
    border-radius:26px!important;
    background:linear-gradient(135deg,#062744,#0a365d)!important;
    color:#fff!important;
    overflow:hidden!important;
  }
  body[data-page="home"] .v66-lower .driverbanner div,
  body[data-page="home"] .v66-lower .driverbanner small,
  body[data-page="home"] .v66-lower .driverbanner b,
  body[data-page="home"] .v66-lower .driverbanner span{visibility:visible!important;opacity:1!important}

  /* Cleaner lower section headings. */
  body[data-page="home"] .v66-lower .sectionrow{
    min-height:44px!important;
    justify-content:space-between!important;
    align-items:flex-end!important;
  }
  body[data-page="home"] .v66-lower .sectionrow h2{font-size:27px!important}
}

@media (min-width:1200px){
  body[data-page="home"] .v66-lower #homePlaces{grid-template-columns:repeat(5,minmax(0,1fr))!important}
}

@media (min-width:900px) and (max-width:1050px){
  body[data-page="home"] .v66-lower .v651-vibe-row{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  body[data-page="home"] .v66-lower #homePlaces{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}
