/* =========================================================
   PGP v238 — precise fix: remove red stripe inside Most Visited Garages cards
   السبب الأدق: الخط الأحمر ليس من الصورة نفسها، بل من border/box-shadow
   الذي يُطبّق على كارت الكراج بعد حالة Follow أو من قواعد الكارت العامة.
   هذا التعديل يمس كارتات "أكثر الكراجات زيارة" فقط.
   ========================================================= */

/* Target managed Most Visited Garages sections and fallback most-visited-garages */
html body #home :is(
  #most-visited-garages,
  .pgp-home-managed-section[data-home-section="most_visited_garages"],
  .pgp-home-managed-section[data-home-section="manual_garages"]
) .pgp-most-product.pgp-most-garage,
html body #home :is(
  #most-visited-garages,
  .pgp-home-managed-section[data-home-section="most_visited_garages"],
  .pgp-home-managed-section[data-home-section="manual_garages"]
) .pgp-most-product.pgp-most-garage:is(.pgp-garage-is-following,.pgp-home-section-is-following,[data-pgp-following="1"]){
  border-color:rgba(0,0,0,.10)!important;
  border-bottom-color:rgba(0,0,0,.10)!important;
  box-shadow:0 7px 18px rgba(0,0,0,.024)!important;
  background:#ffffff!important;
  background-image:none!important;
}

/* Remove any red bottom stripe from the media area and the card itself */
html body #home :is(
  #most-visited-garages,
  .pgp-home-managed-section[data-home-section="most_visited_garages"],
  .pgp-home-managed-section[data-home-section="manual_garages"]
) .pgp-most-product.pgp-most-garage :is(.pgp-most-media,.pgp-most-media img,.pgp-most-info),
html body #home :is(
  #most-visited-garages,
  .pgp-home-managed-section[data-home-section="most_visited_garages"],
  .pgp-home-managed-section[data-home-section="manual_garages"]
) .pgp-most-product.pgp-most-garage:is(.pgp-garage-is-following,.pgp-home-section-is-following,[data-pgp-following="1"]) :is(.pgp-most-media,.pgp-most-media img,.pgp-most-info){
  border-top:0!important;
  border-right:0!important;
  border-left:0!important;
  border-bottom:0!important;
  outline:0!important;
  box-shadow:none!important;
  background-clip:padding-box!important;
}

/* Kill pseudo-elements on card/media/info that can draw a line after scripts add follow classes */
html body #home :is(
  #most-visited-garages,
  .pgp-home-managed-section[data-home-section="most_visited_garages"],
  .pgp-home-managed-section[data-home-section="manual_garages"]
) .pgp-most-product.pgp-most-garage::before,
html body #home :is(
  #most-visited-garages,
  .pgp-home-managed-section[data-home-section="most_visited_garages"],
  .pgp-home-managed-section[data-home-section="manual_garages"]
) .pgp-most-product.pgp-most-garage::after,
html body #home :is(
  #most-visited-garages,
  .pgp-home-managed-section[data-home-section="most_visited_garages"],
  .pgp-home-managed-section[data-home-section="manual_garages"]
) .pgp-most-product.pgp-most-garage :is(.pgp-most-media,.pgp-most-info)::before,
html body #home :is(
  #most-visited-garages,
  .pgp-home-managed-section[data-home-section="most_visited_garages"],
  .pgp-home-managed-section[data-home-section="manual_garages"]
) .pgp-most-product.pgp-most-garage :is(.pgp-most-media,.pgp-most-info)::after{
  content:none!important;
  display:none!important;
  opacity:0!important;
  visibility:hidden!important;
  background:none!important;
  background-image:none!important;
  border:0!important;
  box-shadow:none!important;
}

/* If the red line is painted by the image edge/shadow, neutralize only the bottom edge */
html body #home :is(
  #most-visited-garages,
  .pgp-home-managed-section[data-home-section="most_visited_garages"],
  .pgp-home-managed-section[data-home-section="manual_garages"]
) .pgp-most-product.pgp-most-garage .pgp-most-media img{
  display:block!important;
  border-bottom:0!important;
  box-shadow:none!important;
  outline:0!important;
}

/* Keep the actual follow ring/logo effects untouched; this is only for the product/card media stripe */
html body #home :is(
  #most-visited-garages,
  .pgp-home-managed-section[data-home-section="most_visited_garages"],
  .pgp-home-managed-section[data-home-section="manual_garages"]
) .pgp-most-product.pgp-most-garage .pgp-most-media{
  overflow:hidden!important;
  clip-path:inset(0 0 1px 0 round 14px)!important;
}

/* Mobile: same rule, stronger because the line is more visible on small cards */
@media(max-width:768px){
  html body #home :is(
    #most-visited-garages,
    .pgp-home-managed-section[data-home-section="most_visited_garages"],
    .pgp-home-managed-section[data-home-section="manual_garages"]
  ) .pgp-most-product.pgp-most-garage,
  html body #home :is(
    #most-visited-garages,
    .pgp-home-managed-section[data-home-section="most_visited_garages"],
    .pgp-home-managed-section[data-home-section="manual_garages"]
  ) .pgp-most-product.pgp-most-garage:is(.pgp-garage-is-following,.pgp-home-section-is-following,[data-pgp-following="1"]){
    border-bottom-color:rgba(0,0,0,.08)!important;
    box-shadow:0 6px 14px rgba(0,0,0,.02)!important;
  }
}
