/*
 * GAINVO Storefront v0.10.61 — Home section title fit refinement
 * Corrects compact-phone section headings after v0.10.57-v0.10.60.
 * Goals:
 * - never collapse the title column beside "See all"
 * - never split ordinary words into vertical fragments
 * - reduce heading size slightly on narrow phones
 * - keep "More to explore" and "Shop local" comfortably on one line
 * - allow "Shop what’s available now" up to two clean lines only when necessary
 */

@media (max-width:759px){
  .screen[data-screen="home"] .section-head{
    display:flex!important;
    align-items:flex-end!important;
    justify-content:space-between!important;
    column-gap:10px!important;
    min-width:0!important;
  }

  /* The text column must own all remaining width. Older rules only set
     min-width:0, which allowed this flex item to collapse almost to zero. */
  .screen[data-screen="home"] .section-head > div:first-child{
    flex:1 1 auto!important;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
  }

  .screen[data-screen="home"] .section-head h2{
    width:auto!important;
    max-width:none!important;
    min-width:0!important;
    margin:0!important;
    font-size:clamp(.96rem,4.15vw,1.08rem)!important;
    line-height:1.10!important;
    letter-spacing:-.024em!important;
    font-weight:820!important;
    word-break:normal!important;
    overflow-wrap:normal!important;
    hyphens:none!important;
    white-space:normal!important;
  }

  /* Keep the short Home section titles intact. */
  .screen[data-screen="home"] #homePopularTitle,
  .screen[data-screen="home"] #homeShopsTitle{
    white-space:nowrap!important;
  }

  /* The longer discovery heading may wrap, but only at normal spaces and
     never into more than two lines on compact phones. */
  .screen[data-screen="home"] #nearbyProductsTitle{
    display:-webkit-box!important;
    -webkit-box-orient:vertical!important;
    -webkit-line-clamp:2!important;
    overflow:hidden!important;
  }

  .screen[data-screen="home"] .section-head .micro{
    font-size:clamp(.61rem,2.55vw,.68rem)!important;
    line-height:1.08!important;
    letter-spacing:.105em!important;
    margin-bottom:3px!important;
  }

  .screen[data-screen="home"] .section-head .text-button,
  .screen[data-screen="home"] .section-head .home-see-all{
    flex:0 0 auto!important;
    white-space:nowrap!important;
    font-size:clamp(.68rem,2.75vw,.76rem)!important;
    line-height:1.1!important;
    min-height:32px!important;
  }

  .screen[data-screen="home"] .home-section-actions{
    flex:0 0 auto!important;
    min-width:max-content!important;
  }
}

/* Extra compact phones (including ~320 CSS px and below). */
@media (max-width:339px){
  .screen[data-screen="home"] .section-head{column-gap:8px!important}
  .screen[data-screen="home"] .section-head h2{
    font-size:.94rem!important;
    line-height:1.09!important;
  }
  .screen[data-screen="home"] .section-head .micro{font-size:.60rem!important}
  .screen[data-screen="home"] .section-head .text-button,
  .screen[data-screen="home"] .section-head .home-see-all{font-size:.67rem!important}
}
