/* =========================================================
   PGP v264 — Plain black product name under image
   المطلوب:
   - حذف البادج/الإطار الأسود حول اسم المنتج.
   - اسم المنتج بلون أسود فقط.
   - الاسم يكون مباشرة تحت الصورة.
   - إذا الاسم طويل ينزل لسطر ثاني.
   - لا يغير السعر ولا القلب ولا حجم الصور.
   ========================================================= */

/* product cards only, not garage cards */
html body #home .pgp-most-product:not(.pgp-most-garage){
  position:relative!important;
}

/* put the name directly under the image area */
html body #home .pgp-most-product:not(.pgp-most-garage) > .pgp-most-info{
  position:absolute!important;
  left:8px!important;
  right:8px!important;
  top:calc(64% + 6px)!important;
  bottom:auto!important;
  z-index:80!important;

  display:block!important;
  visibility:visible!important;
  opacity:1!important;

  width:auto!important;
  height:auto!important;
  min-height:0!important;
  max-height:34px!important;

  margin:0!important;
  padding:0!important;
  background:transparent!important;
  background-color:transparent!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  overflow:hidden!important;
  pointer-events:none!important;
  text-align:left!important;
}

/* remove every black badge style from current/old name markup */
html body #home .pgp-most-product:not(.pgp-most-garage) > .pgp-most-info > strong,
html body #home .pgp-most-product:not(.pgp-most-garage) :is(
  .pgp-v260-name-badges,
  .pgp-v261-name-badges,
  .pgp-v262-name-badges,
  .pgp-v260-name-line,
  .pgp-v261-name-line,
  .pgp-v262-name-line
){
  display:-webkit-box!important;
  visibility:visible!important;
  opacity:1!important;

  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;

  margin:0!important;
  padding:0!important;
  box-sizing:border-box!important;

  color:#111111!important;
  background:transparent!important;
  background-color:transparent!important;
  background-image:none!important;

  font-size:9.2px!important;
  line-height:1.22!important;
  font-weight:850!important;
  letter-spacing:0!important;
  text-shadow:none!important;

  white-space:normal!important;
  word-break:normal!important;
  overflow:hidden!important;
  text-overflow:clip!important;

  -webkit-line-clamp:2!important;
  -webkit-box-orient:vertical!important;

  border:0!important;
  outline:0!important;
  border-radius:0!important;
  clip-path:none!important;
  box-shadow:none!important;

  -webkit-box-decoration-break:slice!important;
  box-decoration-break:slice!important;
}

/* remove pseudo caps from old badge attempts */
html body #home .pgp-most-product:not(.pgp-most-garage) :is(
  .pgp-v260-name-line,
  .pgp-v261-name-line,
  .pgp-v262-name-line
)::before,
html body #home .pgp-most-product:not(.pgp-most-garage) :is(
  .pgp-v260-name-line,
  .pgp-v261-name-line,
  .pgp-v262-name-line
)::after{
  content:none!important;
  display:none!important;
}

/* if older server markup has name line spans, show them as normal text */
html body #home .pgp-most-product:not(.pgp-most-garage) :is(
  .pgp-v260-name-line,
  .pgp-v261-name-line,
  .pgp-v262-name-line
){
  display:inline!important;
}

/* hide source/details only */
html body #home .pgp-most-product:not(.pgp-most-garage) > .pgp-most-info > span:not(.pgp-v260-name-line):not(.pgp-v261-name-line):not(.pgp-v262-name-line){
  display:none!important;
  visibility:hidden!important;
  opacity:0!important;
  height:0!important;
  max-height:0!important;
  overflow:hidden!important;
}

/* price and heart stay unchanged */
html body #home .pgp-most-product:not(.pgp-most-garage) > .pgp-most-price{
  z-index:90!important;
}

html body #home .pgp-most-product:not(.pgp-most-garage) :is(
  .heart-btn,
  .pgp-heart-btn,
  .pgp-card-heart,
  .pgp-home-card-heart,
  .wishlist-btn,
  .save-btn,
  .favorite-btn,
  button[data-pgp-heart],
  button[data-heart]
){
  z-index:95!important;
}

/* mobile: smaller text, longer line, directly under 58% image area */
@media(max-width:768px){
  html body #home .pgp-most-product:not(.pgp-most-garage) > .pgp-most-info{
    left:6px!important;
    right:6px!important;
    top:calc(58% + 5px)!important;
    max-height:28px!important;
  }

  html body #home .pgp-most-product:not(.pgp-most-garage) > .pgp-most-info > strong,
  html body #home .pgp-most-product:not(.pgp-most-garage) :is(
    .pgp-v260-name-badges,
    .pgp-v261-name-badges,
    .pgp-v262-name-badges,
    .pgp-v260-name-line,
    .pgp-v261-name-line,
    .pgp-v262-name-line
  ){
    font-size:7.2px!important;
    line-height:1.18!important;
  }
}

/* very small phones */
@media(max-width:390px){
  html body #home .pgp-most-product:not(.pgp-most-garage) > .pgp-most-info{
    left:5px!important;
    right:5px!important;
    top:calc(58% + 4px)!important;
    max-height:27px!important;
  }

  html body #home .pgp-most-product:not(.pgp-most-garage) > .pgp-most-info > strong,
  html body #home .pgp-most-product:not(.pgp-most-garage) :is(
    .pgp-v260-name-badges,
    .pgp-v261-name-badges,
    .pgp-v262-name-badges,
    .pgp-v260-name-line,
    .pgp-v261-name-line,
    .pgp-v262-name-line
  ){
    font-size:6.8px!important;
    line-height:1.16!important;
  }
}
