/* Green Pi V6.33 - premium product title overflow correction.
   Scoped only to single Green Pi product detail pages. */

body.single-greenpi_product .gp-premium-product__hero-grid{
  grid-template-columns:minmax(420px,1.05fr) minmax(390px,1fr) minmax(270px,.55fr) !important;
  column-gap:30px !important;
}

body.single-greenpi_product .gp-premium-product__intro{
  min-width:0 !important;
  width:100%;
  max-width:100%;
  overflow:visible;
  padding-right:8px;
}

body.single-greenpi_product .gp-premium-product__intro h1{
  display:block;
  width:100%;
  max-width:100%;
  margin:0;
  font-size:clamp(34px,2.75vw,54px) !important;
  line-height:1.04 !important;
  letter-spacing:-.025em !important;
  overflow-wrap:anywhere;
  word-break:normal;
  hyphens:auto;
  text-wrap:pretty;
}

/* Prevent the title from ever painting underneath the quote card. */
body.single-greenpi_product .gp-premium-product__intro,
body.single-greenpi_product .gp-premium-product__intro h1,
body.single-greenpi_product .gp-premium-lead{
  box-sizing:border-box;
}

body.single-greenpi_product .gp-premium-quote{
  position:relative;
  z-index:3;
  min-width:0;
}

/* Large desktop: keep title prominent while preserving the three-column hero. */
@media (min-width:1500px){
  body.single-greenpi_product .gp-premium-product__hero-grid{
    grid-template-columns:minmax(440px,1.08fr) minmax(420px,1fr) minmax(280px,.54fr) !important;
  }
  body.single-greenpi_product .gp-premium-product__intro h1{
    font-size:clamp(38px,2.65vw,56px) !important;
  }
}

/* Medium desktop / laptop: move quote card below before the title becomes cramped. */
@media (max-width:1320px){
  body.single-greenpi_product .gp-premium-product__hero-grid{
    grid-template-columns:minmax(400px,1.05fr) minmax(350px,.95fr) !important;
  }
  body.single-greenpi_product .gp-premium-quote{
    grid-column:1 / -1;
    width:min(100%,620px);
    justify-self:center;
  }
  body.single-greenpi_product .gp-premium-product__intro h1{
    font-size:clamp(34px,4vw,50px) !important;
  }
}

@media (max-width:900px){
  body.single-greenpi_product .gp-premium-product__hero-grid{
    grid-template-columns:1fr !important;
  }
  body.single-greenpi_product .gp-premium-product__intro{
    padding-right:0;
  }
  body.single-greenpi_product .gp-premium-product__intro h1{
    font-size:clamp(32px,7.5vw,48px) !important;
    overflow-wrap:break-word;
  }
  body.single-greenpi_product .gp-premium-quote{
    grid-column:auto;
    width:100%;
  }
}

@media (max-width:560px){
  body.single-greenpi_product .gp-premium-product__intro h1{
    font-size:clamp(30px,10vw,42px) !important;
    line-height:1.06 !important;
  }
}
