/* G1 mobile-only layout fix. Desktop/tablet >=769px is intentionally untouched. */
@media screen and (max-width:768px){
  .ds-home{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:42px!important;
    overflow:visible!important;
  }

  .ds-home .g1-hero,
  .ds-home .g1-grid-2{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-auto-rows:auto!important;
    align-items:start!important;
    gap:22px!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    height:auto!important;
    overflow:visible!important;
  }

  .ds-home .g1-hero>*,
  .ds-home .g1-grid-2>*{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    height:auto!important;
    min-height:0!important;
    position:static!important;
    float:none!important;
    transform:none!important;
  }

  /* The active app gives every G1 image height:100%. On phones that can make
     an image overflow its grid row. Force images back to their intrinsic height. */
  .ds-home img,
  .ds-home .g1-image,
  .ds-home .g1-hero-image{
    display:block!important;
    position:static!important;
    float:none!important;
    width:100%!important;
    max-width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    aspect-ratio:auto!important;
    object-fit:contain!important;
    transform:none!important;
  }

  .ds-home .g1-gallery{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-auto-rows:auto!important;
    align-items:start!important;
    gap:10px!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    height:auto!important;
    overflow:visible!important;
  }

  .ds-home .g1-gallery>.g1-image{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    aspect-ratio:auto!important;
    object-fit:contain!important;
  }

  .ds-home .g1-section,
  .ds-home .g1-price-box,
  .ds-home .g1-contact{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow:visible!important;
  }

  /* Give text its own normal line box so lines can never sit on top of each other. */
  .ds-home h2{
    line-height:1.08!important;
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
    overflow-wrap:anywhere!important;
  }
  .ds-home h3{
    line-height:1.18!important;
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
    overflow-wrap:anywhere!important;
  }
  .ds-home h4{
    line-height:1.35!important;
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
    overflow-wrap:anywhere!important;
  }
  .ds-home p,
  .ds-home li,
  .ds-home .g1-lead,
  .ds-home .g1-categories{
    line-height:1.58!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    white-space:normal!important;
    overflow:visible!important;
    overflow-wrap:anywhere!important;
  }
}

@media screen and (max-width:390px){
  .ds-home .g1-gallery{
    grid-template-columns:minmax(0,1fr)!important;
  }
}
