/* =========================================================
   PGP v209 — Unified soft separator line + section frame
   هذا ملف منعزل يكون مسؤول عن الإطار والخط الناعم للسكشنات.
   المصدر بصرياً: نفس فكرة سكشن الصفحة الرئيسية، لكن الخط هنا يختفي ناعماً عند الزوايا.
   يطبق على:
   - الصفحة الرئيسية
   - صفحة البارتات
   - صفحة الكراجات / كراجي
   ========================================================= */

:root{
  --pgp-section-frame-bg:#ffffff;
  --pgp-section-frame-line:rgba(0,0,0,.095);
  --pgp-section-frame-line-soft:rgba(0,0,0,.135);
  --pgp-section-frame-radius:28px;
  --pgp-section-frame-shadow:0 12px 30px rgba(0,0,0,.040), 0 8px 20px rgba(0,0,0,.026);
}

/* One unified outer section frame */
html body :is(
  .pgp-most-viewed-card,
  .pgp-home-managed-section,
  .pgp-parts-wrap .pgp-part-card,
  .iq-wrap .garage-card,
  .garage-card,
  .store-card
){
  border:1px solid var(--pgp-section-frame-line)!important;
  border-radius:var(--pgp-section-frame-radius)!important;
  background:var(--pgp-section-frame-bg)!important;
  background-color:var(--pgp-section-frame-bg)!important;
  background-image:none!important;
  box-shadow:var(--pgp-section-frame-shadow)!important;
  overflow:hidden!important;
}

/* Remove old/doubled frames from parts and garages only */
html body :is(
  .pgp-parts-wrap .pgp-part-card,
  .iq-wrap .garage-card,
  .garage-card,
  .store-card
)::before,
html body :is(
  .pgp-parts-wrap .pgp-part-card,
  .iq-wrap .garage-card,
  .garage-card,
  .store-card
)::after{
  content:none!important;
  display:none!important;
  opacity:0!important;
  visibility:hidden!important;
  background:transparent!important;
  background-image:none!important;
  border:0!important;
  box-shadow:none!important;
}

/* Header areas that should carry the ONE soft line */
html body :is(
  .pgp-most-head,
  .pgp-home-managed-section > .pgp-most-head,
  .pgp-home-managed-section .pgp-most-head,
  .pgp-parts-wrap .pgp-part-card .pgp-part-top,
  .iq-wrap .garage-card .garage-top,
  .garage-card .garage-top,
  .store-card .products-head,
  .store-card .store-main
){
  position:relative!important;
  border:0!important;
  border-bottom:0!important;
  box-shadow:none!important;
  background:transparent!important;
  background-image:none!important;
  padding-bottom:18px!important;
  margin-bottom:18px!important;
}

/* The soft line: fades at left/right edges so corners don't look harsh */
html body :is(
  .pgp-most-head,
  .pgp-home-managed-section > .pgp-most-head,
  .pgp-home-managed-section .pgp-most-head,
  .pgp-parts-wrap .pgp-part-card .pgp-part-top,
  .iq-wrap .garage-card .garage-top,
  .garage-card .garage-top,
  .store-card .products-head,
  .store-card .store-main
)::after{
  content:""!important;
  display:block!important;
  position:absolute!important;
  left:0!important;
  right:0!important;
  bottom:0!important;
  height:1px!important;
  opacity:1!important;
  visibility:visible!important;
  pointer-events:none!important;
  border:0!important;
  box-shadow:none!important;
  background:linear-gradient(
    90deg,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,.035) 5%,
    var(--pgp-section-frame-line-soft) 16%,
    var(--pgp-section-frame-line-soft) 84%,
    rgba(0,0,0,.035) 95%,
    rgba(0,0,0,0) 100%
  )!important;
}

/* Kill any old straight line that was placed directly on these internal wrappers */
html body :is(
  .pgp-parts-wrap .pgp-product-scroll-wrap,
  .iq-wrap .product-scroll-wrap,
  .garage-card .product-scroll-wrap,
  .store-card .products-grid,
  .store-card .product-row
){
  border:0!important;
  border-top:0!important;
  border-bottom:0!important;
  box-shadow:none!important;
}

/* Keep spacing clean under the unified line */
html body :is(
  .pgp-parts-wrap .pgp-part-card .pgp-product-scroll-wrap,
  .iq-wrap .garage-card .product-scroll-wrap,
  .garage-card .product-scroll-wrap
){
  margin-top:0!important;
}

/* Hero/filter cards need visible overflow for dropdowns */
html body :is(.pgp-parts-hero,.iq-hero){
  overflow:visible!important;
}
