/*
 * PGP v805 — homepage first-paint CSS.
 *
 * These rules previously appeared as four inline <style> blocks inside
 * index.php, including two blocks after the homepage markup.  Keeping the
 * same cascade in one page-specific stylesheet prevents the visible restyle
 * without changing any application or navigation behaviour.
 */

.pgp-app-header{
  position:sticky;
  top:0;
  z-index:900;
  padding:10px 12px 8px;
  background:#ffffff!important;
  background-image:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
.pgp-app-header-inner{
  max-width:1680px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.pgp-app-header-left{display:flex;align-items:center;gap:10px}
.pgp-app-avatar,
.pgp-app-icon-btn{
  width:52px;
  height:52px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.06);
  box-shadow:0 10px 28px rgba(0,0,0,.24);
}
.pgp-app-avatar{object-fit:cover;display:block}
.pgp-app-icon-btn{display:flex;align-items:center;justify-content:center;color:#fff}
.pgp-app-icon-btn svg{width:22px;height:22px}
.pgp-app-tabs{
  display:flex;
  align-items:center;
  gap:10px;
  overflow-x:auto;
  scrollbar-width:none;
}
.pgp-app-tabs::-webkit-scrollbar{display:none}
.pgp-app-tab{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:52px;
  padding:0 24px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.06);
  color:#fff;
  font-size:16px;
  font-weight:800;
  white-space:nowrap;
}
.pgp-app-tab svg{width:21px;height:21px}
.pgp-app-tab.is-active{background:#fff;color:#09090b}
@media(max-width:768px){
  .pgp-app-header{padding:10px 8px 8px}
  .pgp-app-header-inner{gap:6px}
  .pgp-app-header-left{gap:8px}
  .pgp-app-avatar,.pgp-app-icon-btn{width:40px;height:40px}
  .pgp-app-icon-btn svg,.pgp-app-tab svg{width:16px;height:16px;flex:0 0 auto}
  .pgp-app-tabs{gap:6px;flex:1 1 auto;min-width:0}
  .pgp-app-tab{min-height:40px;padding:0 10px;font-size:10px;gap:5px;flex:0 0 auto}
}

/* Home starts below the shared header. */
#home{padding-top:10px!important}
@media(max-width:768px){#home{padding-top:10px!important}}

/* PGP HOME V2 — retained visual contract. */
:root{
  --pgp-red:#f3144e;
  --pgp-red2:#98122d;
  --pgp-gold:#ffb800;
  --pgp-line:rgba(255,255,255,.115);
}
html{scroll-behavior:smooth}
body{
  background:
    radial-gradient(circle at 12% 4%,rgba(243,20,78,.12),transparent 25%),
    linear-gradient(180deg,#0d0d0e 0%,#070707 55%,#050505 100%)!important;
}
@media(min-width:1024px){
  #home>.grid{grid-template-columns:1fr!important}
  #home aside{display:none!important}
}
#home{max-width:1480px!important;padding-top:28px!important}
#home>.grid>.space-y-6>.relative.overflow-visible{
  border-radius:28px!important;
  padding:0!important;
  overflow:hidden!important;
  border:1px solid var(--pgp-line)!important;
  background:linear-gradient(90deg,rgba(10,10,11,.98) 0%,rgba(16,12,13,.94) 52%,rgba(38,10,17,.88) 100%)!important;
  box-shadow:0 28px 80px rgba(0,0,0,.42)!important;
}
#home>.grid>.space-y-6>.relative.overflow-visible::after{
  content:"";
  position:absolute;
  inset:auto 0 0;
  height:4px;
  background:linear-gradient(90deg,var(--pgp-red),var(--pgp-gold),transparent);
}
#home>.grid>.space-y-6>.relative.overflow-visible>.pointer-events-none{
  background:
    radial-gradient(circle at 78% 22%,rgba(243,20,78,.28),transparent 32%),
    linear-gradient(120deg,transparent 0%,rgba(255,255,255,.035) 48%,transparent 49%)!important;
}
#home .relative.z-\[120\]{position:absolute!important;right:22px!important;top:18px!important;margin:0!important}
#home .relative.grid.gap-8.lg\:grid-cols-\[1\.15fr_0\.85fr\]{
  grid-template-columns:minmax(0,1fr) 360px!important;
  padding:58px 44px 42px!important;
  gap:38px!important;
}
#home h1{
  max-width:850px!important;
  margin-top:0!important;
  font-size:clamp(46px,7vw,104px)!important;
  line-height:.88!important;
  letter-spacing:-.075em!important;
  font-weight:950!important;
}
#home h1::before{
  content:"GLOBAL PERFORMANCE PARTS STORE";
  display:block;
  margin-bottom:18px;
  color:var(--pgp-gold);
  font-size:12px;
  line-height:1;
  letter-spacing:.34em;
  font-weight:950;
}
#home h1::after{
  content:"";
  display:block;
  width:90px;
  height:5px;
  border-radius:999px;
  margin-top:24px;
  background:var(--pgp-red);
}
#home h1+p{
  max-width:720px!important;
  margin-top:22px!important;
  color:rgba(255,255,255,.72)!important;
  font-size:18px!important;
  line-height:1.75!important;
}
#home .mt-7.flex a,
#products a,
#products button,
#home button[onclick^="addToCart"],
#home button[onclick^="openPayment"],
#home a[href^="/product"]{
  border-radius:0!important;
  clip-path:polygon(10px 0,100% 0,calc(100% - 10px) 100%,0 100%)!important;
  min-height:46px!important;
  font-weight:950!important;
}
#home .mt-7.flex a:first-child,
#products button[onclick^="openPayment"],
#home button[onclick^="openPayment"]{
  background:linear-gradient(180deg,var(--pgp-red),#bd0f38)!important;
  color:#fff!important;
  box-shadow:0 12px 26px rgba(243,20,78,.22)!important;
}
#home .mt-7.flex a:last-child{
  background:rgba(255,255,255,.06)!important;
  border:1px solid rgba(255,255,255,.14)!important;
}
#home .mt-8.grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;margin-top:34px!important}
#home .mt-8.grid>div,
#home .rounded-\[1\.75rem\],
#home .rounded-\[2rem\].overflow-hidden{
  background:linear-gradient(135deg,rgba(255,255,255,.055),rgba(255,255,255,.02))!important;
  border:1px solid rgba(255,255,255,.11)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04)!important;
}
#home .grid.gap-6.\32xl\:grid-cols-\[minmax\(0\,1\.15fr\)_minmax\(0\,0\.85fr\)\]{grid-template-columns:1fr!important}
#home .grid.gap-6.\32xl\:grid-cols-\[minmax\(0\,1\.15fr\)_minmax\(0\,0\.85fr\)\]>div:nth-child(2){display:none!important}
#home .overflow-hidden.rounded-\[2rem\]{
  border-radius:28px!important;
  background:rgba(13,13,15,.86)!important;
  border:1px solid rgba(255,255,255,.105)!important;
  box-shadow:0 22px 62px rgba(0,0,0,.34)!important;
}

.pgp-most-viewed-card{
  overflow:hidden;
  border-radius:28px;
  border:1px solid rgba(255,255,255,.105);
  background:rgba(13,13,15,.88);
  box-shadow:0 22px 62px rgba(0,0,0,.34);
}
.pgp-most-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
  border-bottom:1px solid rgba(255,255,255,.10);
  padding:22px 24px;
}
.pgp-most-head p{margin:0;color:rgba(255,255,255,.44);font-size:11px;font-weight:950;letter-spacing:.28em;text-transform:uppercase}
.pgp-most-head h2{margin:7px 0 0;color:#fff;font-size:26px;font-weight:950;letter-spacing:-.04em}
.pgp-most-head span{display:block;margin-top:7px;color:rgba(255,255,255,.62);font-size:14px;line-height:1.7}
.pgp-most-count{min-height:40px;padding:0 15px;border-radius:999px;border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.05);color:#fff;display:inline-flex;align-items:center;font-size:12px;font-weight:950}
.pgp-most-scroll-wrap{position:relative;padding:18px;overflow:hidden}
.pgp-most-row{display:flex;flex-wrap:nowrap;gap:12px;overflow-x:auto;overflow-y:hidden;scroll-behavior:smooth;scrollbar-width:none;-webkit-overflow-scrolling:touch;scroll-snap-type:x mandatory;padding-bottom:4px}
.pgp-most-row::-webkit-scrollbar{display:none}
.pgp-most-product{position:relative;flex:0 0 calc((100% - 48px)/5);min-width:calc((100% - 48px)/5);height:240px;border-radius:22px;border:1px solid rgba(255,255,255,.08);background:#111113;overflow:hidden;text-decoration:none;color:#fff;scroll-snap-align:start;transition:transform .18s ease,border-color .18s ease}
.pgp-most-product:hover{transform:translateY(-4px);border-color:rgba(243,20,78,.42)}
.pgp-most-media{position:absolute;inset:0;background:rgba(255,255,255,.04)}
.pgp-most-media img{width:100%;height:100%;object-fit:cover;object-position:center;display:block;transition:transform .35s ease}
.pgp-most-product:hover .pgp-most-media img{transform:scale(1.04)}
.pgp-most-media:after{content:"";position:absolute;inset:45% 0 0;background:linear-gradient(180deg,transparent,rgba(0,0,0,.74));pointer-events:none}
.pgp-most-price{position:absolute;top:12px;left:12px;min-height:32px;padding:0 12px;border-radius:999px;background:rgba(0,0,0,.52);color:#fff;display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:950;z-index:2;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.pgp-most-price s{opacity:.68;font-weight:700}
.pgp-most-views{position:absolute;top:12px;right:12px;min-height:30px;padding:0 10px;border-radius:999px;background:rgba(243,20,78,.88);color:#fff;display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:950;z-index:2;box-shadow:0 10px 20px rgba(243,20,78,.18)}
.pgp-most-views .pgp-eye-icon{width:13px;height:13px}
.pgp-most-logo{position:absolute;left:12px;bottom:58px;width:44px;height:44px;border-radius:999px;overflow:hidden;border:1px solid rgba(255,255,255,.16);background:rgba(0,0,0,.34);z-index:2;box-shadow:0 8px 22px rgba(0,0,0,.28)}
.pgp-most-logo img{width:100%;height:100%;object-fit:cover;display:block}
.pgp-most-info{position:absolute;left:13px;right:13px;bottom:13px;z-index:2;display:grid;gap:5px}
.pgp-most-info strong{color:#fff;font-size:15px;font-weight:950;line-height:1.15;text-shadow:0 3px 10px rgba(0,0,0,.5);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.pgp-most-info span{color:rgba(255,255,255,.72);font-size:11px;font-weight:800;line-height:1.2;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
.pgp-most-arrow{position:absolute;top:50%;transform:translateY(-50%);width:52px;height:52px;border-radius:999px;border:0;background:rgba(255,255,255,.10);color:#fff;font-size:28px;cursor:pointer;display:flex;align-items:center;justify-content:center;z-index:5;padding:0;transition:.2s ease;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.pgp-most-arrow:hover{background:rgba(255,255,255,.18)}
.pgp-most-arrow:active,.pgp-most-arrow.is-pressed{background:#ee154e!important;color:#fff!important}
.pgp-most-arrow.left{left:26px}.pgp-most-arrow.right{right:26px}
@media(max-width:1100px){.pgp-most-product{flex-basis:calc((100% - 24px)/3);min-width:calc((100% - 24px)/3)}}
@media(max-width:768px){
  .pgp-most-scroll-wrap{padding:10px}
  .pgp-most-head{padding:18px}
  .pgp-most-row{gap:8px}
  .pgp-most-product{flex-basis:calc((100% - 16px)/3);min-width:calc((100% - 16px)/3);height:150px;border-radius:14px}
  .pgp-most-info{left:8px;right:8px;bottom:9px}
  .pgp-most-info strong{font-size:9.4px}
  .pgp-most-info span{font-size:7.7px}
  .pgp-most-price{top:6px;left:6px;min-height:20px;padding:0 6px;font-size:7px}
  .pgp-most-views{top:6px;right:6px;min-height:20px;padding:0 6px;font-size:7px}
  .pgp-most-views .pgp-eye-icon{width:10px;height:10px}
  .pgp-most-garage .pgp-most-logo{display:none!important}
  .pgp-most-arrow{width:42px;height:42px;font-size:22px}
  .pgp-most-arrow.left{left:14px}
  .pgp-most-arrow.right{right:14px}
}

#products{border-radius:28px!important;background:rgba(13,13,15,.88)!important}
#products>.grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:18px!important;padding:18px!important}
#products article{border-radius:22px!important;background:#111113!important;border:1px solid rgba(255,255,255,.10)!important;overflow:hidden!important;transition:transform .18s ease,border-color .18s ease!important}
#products article:hover{transform:translateY(-4px)!important;border-color:rgba(243,20,78,.42)!important}
#products article .relative.h-64{height:220px!important}
#products article h3{font-size:18px!important;line-height:1.25!important}
#products article p{font-size:13px!important;line-height:1.65!important}
#products article .text-xl.font-black.text-amber-300{color:#fff!important;font-size:18px!important}

#terms .pgp-terms-card{border-radius:24px!important;background:#fff!important;border:1.5px solid rgba(0,0,0,.18)!important;box-shadow:0 12px 30px rgba(0,0,0,.040),0 8px 20px rgba(0,0,0,.026)!important}
#terms .pgp-terms-eyebrow{color:#a7aab1!important;font-weight:900!important}
#terms .pgp-terms-title{color:#050505!important}
#terms .pgp-terms-copy{color:#6b6f76!important;font-weight:800!important}
.tc-bottom-bar{z-index:1000!important}

@media(max-width:1100px){
  #home .relative.grid.gap-8.lg\:grid-cols-\[1\.15fr_0\.85fr\]{grid-template-columns:1fr!important;padding:54px 28px 32px!important}
  #products>.grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:768px){
  #home{padding-inline:12px!important;padding-top:14px!important}
  #home>.grid>.space-y-6>.relative.overflow-visible{border-radius:24px!important}
  #home .relative.grid.gap-8.lg\:grid-cols-\[1\.15fr_0\.85fr\]{padding:68px 18px 24px!important;gap:24px!important}
  #home .relative.z-\[120\]{right:16px!important;top:14px!important}
  #home h1{font-size:clamp(42px,13vw,60px)!important;line-height:.92!important}
  #home h1::before{font-size:10px!important;letter-spacing:.22em!important;margin-bottom:14px!important}
  #home h1+p{font-size:15px!important;line-height:1.7!important}
  #home .mt-7.flex{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important}
  #home .mt-7.flex a{padding-inline:12px!important;min-height:46px!important;font-size:12px!important}
  #home .mt-8.grid{grid-template-columns:1fr!important}
  #products>.grid{grid-template-columns:1fr!important;padding:12px!important}
  #products article .relative.h-64{height:210px!important}
}
@media(max-width:430px){#home .mt-7.flex{grid-template-columns:1fr!important}}

/* Final homepage cleanup overrides, preserved in their original order. */
#home{padding-top:0!important}
#home .space-y-6{gap:24px!important}
.pgp-most-garage .pgp-most-logo{display:none!important}
.pgp-parts-menu-wrap,.pgp-parts-menu-toggle,#pgpPartsMenu{display:none!important}
@media(min-width:1024px){
  #home{max-width:1480px!important;margin-left:auto!important;margin-right:auto!important}
}
