/* ============================================================================
   PHƯỢT 4P — ATELIER ITALIA REAL-PHOTO PNG TRY-ON × XIMITECH 3D STAGE
   Italian Motorsport Luxury (Nero Carbonio × Carrara × Tricolore × Oro Bronzo)
   ============================================================================ */

@property --a3d-fade-start {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}
@property --a3d-fade-end {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

.p4p-atelier3d {
  /* Defer off-screen rendering & pair with contentvisibilityautostatechange in JS */
  content-visibility: auto;
  contain-intrinsic-size: auto none auto 780px;
  scroll-margin-top: 84px;
  position: relative;
  background: linear-gradient(180deg in oklab, #090B0F 0%, #0E121B 52%, #090B0F 100%);
  color: #F8FAFC;
  padding: clamp(2.2rem, 1.6rem + 2vw, 3.4rem) 0 clamp(2.5rem, 1.8rem + 2vw, 3.8rem);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: clip;
  isolation: isolate;
}
/* Razor-thin Italian Tricolore architectural crown */
.p4p-atelier3d::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  block-size: 3px;
  background: linear-gradient(
    90deg,
    #008C45 0% 18%,
    #F8FAFC 18% 25%,
    #CD212A 25% 60%,
    rgba(223, 199, 147, 0.55) 100%
  );
  pointer-events: none;
  z-index: 2;
}
/* Subtle ambient Motor Valley light washes */
.p4p-atelier3d::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(640px 360px at 14% 12%, rgba(0, 140, 69, 0.14), transparent 72%),
    radial-gradient(640px 380px at 86% 18%, rgba(205, 33, 42, 0.16), transparent 72%);
  pointer-events: none;
  z-index: 0;
}
.p4p-atelier3d > .vf-container {
  position: relative;
  z-index: 1;
}

/* Section Header */
.p4p-a3d-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.85rem 1.4rem;
  margin-block-end: 1.25rem;
}
.p4p-a3d-head-copy {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  max-inline-size: 46rem;
}
.p4p-a3d-kicker {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #DFC793;
}
.p4p-a3d-title {
  margin: 0;
  font-family: var(--p4p-font, "Plus Jakarta Sans", system-ui, sans-serif);
  font-size: clamp(1.38rem, 2.4vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.14;
  color: #FFFFFF;
}
.p4p-a3d-title em {
  font-style: normal;
  background: linear-gradient(90deg, #FFFFFF 0%, #DFC793 52%, #FF6B76 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.p4p-a3d-sub {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #B8C2D1;
}

/* Quick Italian Presets Strip */
.p4p-a3d-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.42rem;
}
.p4p-a3d-preset-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.82rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #E2E8F0;
  font-size: 0.73rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.p4p-a3d-preset-btn:hover,
.p4p-a3d-preset-btn:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(223, 199, 147, 0.55);
  color: #FFFFFF;
  transform: translateY(-1px);
}
.p4p-a3d-preset-btn.is-active {
  background: linear-gradient(135deg, #CD212A 0%, #9E0B22 100%);
  border-color: #E11D48;
  color: #FFFFFF;
}
.p4p-a3d-preset-btn:focus-visible {
  outline: 2px solid #DFC793;
  outline-offset: 2px;
}

/* Main Split Workspace Shell — minmax(0, 1fr) guarantees zero mobile grid blowout! */
.p4p-a3d-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(392px, 456px);
  border-radius: 22px;
  background: #0D1017;
  border: 1px solid rgba(255, 255, 255, 0.11);
  overflow: clip;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.35),
    0 32px 72px -28px rgba(0, 0, 0, 0.85);
}
@media (max-width: 1023px) {
  .p4p-a3d-shell {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ============================================================================
   LEFT: REAL-PHOTO PNG TRY-ON × XIMITECH 3D PERSPECTIVE SHOWROOM STAGE
   ============================================================================ */
.p4p-a3d-stage {
  --bike-accent: #CD212A;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --cam-x: 0%;
  --cam-y: 0%;
  --cam-scale: 1;
  --user-zoom: 1;
  position: relative;
  min-inline-size: 0;
  max-inline-size: 100%;
  min-block-size: 640px;
  background: #090C12;
  overflow: clip;
  user-select: none;
  -webkit-user-select: none;
}
@media (max-width: 1023px) {
  .p4p-a3d-stage {
    min-block-size: 540px;
  }
}
@media (max-width: 639px) {
  .p4p-a3d-stage {
    min-block-size: 465px;
  }
}

/* 3D Perspective Viewport + XimiTech Camera Choreography */
.p4p-try-viewport {
  position: absolute;
  inset: 0;
  perspective: 1450px;
  perspective-origin: 50% 48%;
  overflow: clip;
  cursor: grab;
  touch-action: pan-y;
}
.p4p-try-viewport.is-dragging {
  cursor: grabbing;
}

.p4p-try-camera {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: translate3d(var(--cam-x), var(--cam-y), 0) scale(calc(var(--cam-scale) * var(--user-zoom)));
  will-change: transform;
  @media (prefers-reduced-motion: no-preference) {
    transition: transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
  }
  @media (prefers-reduced-motion: reduce) {
    transition: transform 0.18s ease-out;
  }
}

/* XimiTech Camera Focus Presets */
.p4p-a3d-stage[data-cam="hero"]   { --cam-x: 0%;    --cam-y: 0%;    --cam-scale: 1; }
.p4p-a3d-stage[data-cam="helmet"] { --cam-x: 20%;   --cam-y: 35%;   --cam-scale: 1.95; }
.p4p-a3d-stage[data-cam="jacket"] { --cam-x: 18%;   --cam-y: 12%;   --cam-scale: 1.68; }
.p4p-a3d-stage[data-cam="pants"]  { --cam-x: 18%;   --cam-y: -15%;  --cam-scale: 1.62; }
.p4p-a3d-stage[data-cam="gloves"] { --cam-x: 18%;   --cam-y: -3%;   --cam-scale: 1.75; }
.p4p-a3d-stage[data-cam="boots"]  { --cam-x: 18%;   --cam-y: -36%;  --cam-scale: 1.92; }
.p4p-a3d-stage[data-cam="bike"]   { --cam-x: -17%;  --cam-y: -2%;   --cam-scale: 1.32; }

@media (max-width: 639px) {
  .p4p-a3d-stage[data-cam="helmet"] { --cam-x: 10%;   --cam-y: 32%;   --cam-scale: 1.72; }
  .p4p-a3d-stage[data-cam="jacket"] { --cam-x: 9%;    --cam-y: 10%;   --cam-scale: 1.48; }
  .p4p-a3d-stage[data-cam="pants"]  { --cam-x: 9%;    --cam-y: -14%;  --cam-scale: 1.46; }
  .p4p-a3d-stage[data-cam="gloves"] { --cam-x: 9%;    --cam-y: -2%;   --cam-scale: 1.54; }
  .p4p-a3d-stage[data-cam="boots"]  { --cam-x: 9%;    --cam-y: -32%;  --cam-scale: 1.68; }
  .p4p-a3d-stage[data-cam="bike"]   { --cam-x: -10%;  --cam-y: 0%;    --cam-scale: 1.18; }
}

.p4p-try-world {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  will-change: transform;
}

/* Layer 0: Real Photographic PKL Motorcycle Studio Backdrop */
.p4p-try-backdrop {
  position: absolute;
  inset: -6%;
  transform: translateZ(-95px) scale(1.09);
  pointer-events: none;
  overflow: hidden;
}
.p4p-try-bg-img {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: 64% 52%;
  filter: brightness(0.76) contrast(1.08) saturate(1.06);
  transition: opacity 0.45s ease, filter 0.45s ease;
}
.p4p-try-bg-img.is-fading {
  opacity: 0.25;
}
.p4p-try-bg-grade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(62% 72% at 32% 52%, rgba(8, 11, 18, 0.22) 0%, rgba(7, 10, 16, 0.72) 100%),
    radial-gradient(45% 40% at 74% 38%, color-mix(in oklab, var(--bike-accent) 26%, transparent), transparent 72%),
    linear-gradient(180deg, rgba(8, 10, 16, 0.72) 0%, rgba(8, 10, 16, 0.08) 26%, rgba(8, 10, 16, 0.14) 74%, rgba(7, 9, 14, 0.88) 100%);
  transition: background 0.45s ease;
}
.p4p-try-floor-glow {
  position: absolute;
  inset: auto 0 0 0;
  block-size: 30%;
  background:
    radial-gradient(50% 60% at 33% 65%, color-mix(in oklab, var(--bike-accent) 20%, transparent), transparent 75%),
    linear-gradient(180deg, transparent 0%, rgba(6, 8, 13, 0.76) 100%);
}

/* Studio Lighting Atmospheres (Milano Carbon · Monza Pit · Carrara Light) */
.p4p-a3d-stage[data-light="monza"] .p4p-try-bg-img {
  filter: brightness(0.66) contrast(1.18) saturate(1.22);
}
.p4p-a3d-stage[data-light="monza"] .p4p-try-bg-grade {
  background:
    radial-gradient(55% 65% at 32% 48%, rgba(205, 33, 42, 0.16) 0%, rgba(5, 7, 12, 0.82) 100%),
    radial-gradient(45% 40% at 76% 32%, rgba(0, 140, 69, 0.22), transparent 70%),
    linear-gradient(180deg, rgba(6, 8, 14, 0.76) 0%, rgba(6, 8, 14, 0.1) 28%, rgba(6, 8, 14, 0.88) 100%);
}
.p4p-a3d-stage[data-light="carrara"] .p4p-try-bg-img {
  filter: brightness(1.02) contrast(1.02) saturate(0.95);
}
.p4p-a3d-stage[data-light="carrara"] .p4p-try-bg-grade {
  background:
    radial-gradient(65% 70% at 34% 50%, rgba(244, 241, 234, 0.18) 0%, rgba(16, 21, 30, 0.45) 100%),
    linear-gradient(180deg, rgba(10, 14, 22, 0.56) 0%, rgba(255, 255, 255, 0.04) 30%, rgba(10, 14, 22, 0.68) 100%);
}

/* ============================================================================
   LAYER 1: REAL HUMAN MODEL + TRANSPARENT PNG CUTOUT GARMENT STACK
   Positioned left-center on the open studio floor right beside the PKL bike!
   ============================================================================ */
.p4p-try-rider-wrap {
  position: absolute;
  inset: 74px auto 62px 7%;
  inline-size: min(44%, 340px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transform-style: preserve-3d;
  pointer-events: none;
}
@media (max-width: 1180px) {
  .p4p-try-rider-wrap {
    inset: 74px auto 62px 5%;
    inline-size: min(46%, 300px);
  }
}
@media (max-width: 639px) {
  .p4p-try-rider-wrap {
    inset: 92px auto 64px 4%;
    inline-size: min(56%, 240px);
  }
}

/* Italian Tricolore Floor Turntable & Grounded Contact Shadow */
.p4p-try-turntable {
  position: absolute;
  inset: auto 50% -10px auto;
  transform: translateX(50%) translateZ(-24px);
  inline-size: 92%;
  block-size: 46px;
  pointer-events: none;
}
.p4p-try-ring-tri {
  position: absolute;
  inset: 6px 0 0 0;
  border-radius: 50%;
  background: conic-gradient(
    from 180deg,
    rgba(0, 140, 69, 0.72) 0deg 105deg,
    rgba(255, 255, 255, 0.6) 105deg 155deg,
    rgba(205, 33, 42, 0.78) 155deg 265deg,
    rgba(223, 199, 147, 0.45) 265deg 360deg
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 1px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 1px));
  opacity: 0.78;
}
.p4p-try-contact-shadow {
  position: absolute;
  inset: 8px 14% 4px 14%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.84) 0%, rgba(0, 0, 0, 0.35) 56%, transparent 100%);
  filter: blur(5px);
}

/* Exact Aspect-Locked Mannequin Coordinate Container (369 × 1035 = 0.3565) */
.p4p-try-mannequin {
  position: relative;
  block-size: 100%;
  max-block-size: 495px;
  aspect-ratio: 369 / 1035;
  transform-style: preserve-3d;
  @media (prefers-reduced-motion: no-preference) {
    transition: transform 0.52s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.32s ease;
  }
}
.p4p-try-mannequin.is-turning {
  transform: rotateY(82deg) scale(0.95);
  opacity: 0.35;
}

/* Base Real Italian Male Model Slices */
.p4p-try-base {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: contain;
  display: block;
  transform: translateZ(0px);
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.55));
  pointer-events: none;
}
.p4p-try-base[hidden] {
  display: none !important;
}
.p4p-try-base--head {
  z-index: 12;
  clip-path: inset(0 0 79% 0);
}
.p4p-try-base--body {
  z-index: 6;
  clip-path: inset(19% 0 0 0);
  transition: opacity 0.32s ease;
}
.p4p-try-base--body.is-covered {
  opacity: 0.1;
}
.p4p-try-base--body.is-partial {
  opacity: 0.82;
}
.p4p-try-base--back {
  z-index: 10;
}

/* Shared Transparent PNG Garment Layer Rules */
.p4p-try-layer {
  --lx: 50%;
  --ly: 50%;
  --lw: 50%;
  --lrot: 0deg;
  --lflip: 1;
  --lz: 10px;
  --fit-s: 1;
  --fit-y: 0%;
  position: absolute;
  left: var(--lx);
  top: calc(var(--ly) + var(--fit-y));
  width: var(--lw);
  transform-style: preserve-3d;
  transform:
    translate3d(-50%, -50%, var(--lz))
    scale(var(--fit-s))
    scaleX(var(--lflip))
    rotate(var(--lrot));
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.52));
  pointer-events: none;
  will-change: transform, opacity;
  @media (prefers-reduced-motion: no-preference) {
    transition: opacity 0.28s ease, transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), filter 0.28s ease;
  }
}
.p4p-try-layer[hidden] {
  display: none !important;
}
.p4p-try-layer img {
  display: block;
  inline-size: 100%;
  block-size: auto;
}
.p4p-try-layer.is-swapping {
  opacity: 0.18;
  transform:
    translate3d(-50%, calc(-50% - 8px), calc(var(--lz) + 18px))
    scale(calc(var(--fit-s) * 1.07))
    scaleX(var(--lflip))
    rotate(var(--lrot));
}

/* Surgically Calibrated Anatomical Garment Anchors (verified on 369×1035 rider_base_front) */
.p4p-try-layer--bag-front {
  z-index: 4;
  --lx: 68%;
  --ly: 29.5%;
  --lw: 54%;
  --lrot: -7deg;
}
.p4p-try-layer--boots {
  z-index: 16;
  --lx: 48.5%;
  --ly: 90.2%;
  --lw: 65%;
}
.p4p-try-layer--pants {
  z-index: 20;
  --lx: 48%;
  --ly: 64.5%;
  --lw: 83%;
}
.p4p-try-layer--jacket {
  z-index: 24;
  --lx: 50%;
  --ly: 34.2%;
  --lw: 105%;
}
/* Full-Body 1PC Racing Suit Expansion (e.g. Laguna Seca 6 1PC) */
.p4p-a3d-stage[data-suit-mode="1pc"] .p4p-try-layer--jacket {
  --lx: 49.5%;
  --ly: 51.4%;
  --lw: 100%;
}
.p4p-try-layer--glove-l {
  z-index: 28;
  --lx: 12.5%;
  --ly: 52.5%;
  --lw: 19%;
  --lrot: 174deg;
}
.p4p-try-layer--glove-r {
  z-index: 28;
  --lx: 68%;
  --ly: 52.5%;
  --lw: 19.5%;
  --lflip: -1;
  --lrot: 194deg;
}
.p4p-try-layer--bag-back {
  z-index: 26;
  --lx: 46%;
  --ly: 32.5%;
  --lw: 62%;
  --lrot: 2deg;
}
.p4p-try-layer--helmet {
  z-index: 36;
  --lx: 48.5%;
  --ly: 8.6%;
  --lw: 50%;
}
.p4p-a3d-stage[data-helmet-style="jet34"] .p4p-try-layer--helmet {
  --lx: 48.5%;
  --ly: 8.2%;
  --lw: 48%;
}
.p4p-a3d-stage[data-helmet-style="motocross"] .p4p-try-layer--helmet {
  --lx: 49.5%;
  --ly: 8.6%;
  --lw: 55%;
}
.p4p-try-layer--intercom {
  z-index: 42;
  --lx: 28%;
  --ly: 12.2%;
  --lw: 15.5%;
  --lrot: 12deg;
}
.p4p-try-layer--goggles {
  z-index: 44;
  --lx: 51%;
  --ly: 9.4%;
  --lw: 34%;
}

/* ============================================================================
   LAYER 2: RIGHT-SIDE PKL TELEMETRY & REAL MOTO-GEAR CUTOUT SHOWCASE DOCK
   ============================================================================ */
.p4p-try-moto-dock {
  position: absolute;
  inset: auto 18px 66px auto;
  inline-size: min(44%, 296px);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
  transform: translateZ(var(--lz, 24px));
  pointer-events: none;
  z-index: 3;
}
@media (max-width: 639px) {
  .p4p-try-moto-dock {
    inset: auto 10px 62px auto;
    inline-size: min(44%, 155px);
    gap: 0.35rem;
  }
}

.p4p-try-bike-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0.55rem 0.78rem 0.55rem 0.92rem;
  border-radius: 14px;
  background: rgba(9, 12, 18, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  text-align: right;
  overflow: hidden;
  max-inline-size: 100%;
  box-shadow: 0 14px 28px -16px rgba(0, 0, 0, 0.85);
}
.p4p-try-bike-stripe {
  position: absolute;
  inset: 0 auto 0 0;
  inline-size: 3.5px;
  background: var(--bike-accent, #CD212A);
}
.p4p-try-bike-seg {
  font-size: 0.57rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #DFC793;
}
.p4p-try-bike-name {
  font-size: 0.82rem;
  font-weight: 900;
  color: #FFFFFF;
  line-height: 1.18;
}
.p4p-try-bike-spec {
  font-size: 0.65rem;
  font-weight: 600;
  color: #CBD5E1;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 639px) {
  .p4p-try-bike-card {
    padding: 0.4rem 0.52rem 0.4rem 0.62rem;
  }
  .p4p-try-bike-name {
    font-size: 0.69rem;
  }
  .p4p-try-bike-spec {
    font-size: 0.58rem;
  }
}

/* Active Moto-Mounted Real PNG Cutout Badges (Topcase, Panniers, Tankbag, Crashbars, Windscreen) */
.p4p-try-acc-stage {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
  max-inline-size: 100%;
}
.p4p-try-acc-chip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem 0.56rem 0.32rem 0.36rem;
  border-radius: 12px;
  background: rgba(10, 14, 22, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  pointer-events: auto;
  text-decoration: none !important;
  color: #FFFFFF !important;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.p4p-try-acc-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(223, 199, 147, 0.65);
}
.p4p-try-acc-chip img {
  inline-size: 38px;
  block-size: 38px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.55));
  flex-shrink: 0;
}
.p4p-try-acc-chip-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-align: left;
}
.p4p-try-acc-chip-meta strong {
  font-size: 0.64rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.15;
}
.p4p-try-acc-chip-meta span {
  font-family: var(--p4p-price-font, "Chakra Petch", sans-serif);
  font-size: 0.62rem;
  font-weight: 800;
  color: #FCA5A5;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 639px) {
  .p4p-try-acc-chip img {
    inline-size: 28px;
    block-size: 28px;
  }
  .p4p-try-acc-chip-meta span {
    display: none;
  }
}

/* ============================================================================
   FLAT-LAY EXPLODED REAL-PHOTO PNG SHOWCASE OVERLAY
   ============================================================================ */
.p4p-try-flatlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.85rem;
  padding: 76px 18px 68px;
  background: radial-gradient(circle at 50% 42%, rgba(20, 26, 38, 0.94), rgba(8, 11, 17, 0.97));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow-y: auto;
}
.p4p-try-flatlay[hidden] {
  display: none !important;
}
.p4p-try-flatlay-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}
.p4p-try-flatlay-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #DFC793;
}
.p4p-try-flatlay-bike {
  font-size: 0.72rem;
  font-weight: 800;
  color: #FFFFFF;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.p4p-try-flatlay-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
  gap: 0.65rem;
}
@media (max-width: 639px) {
  .p4p-try-flatlay {
    padding: 96px 12px 62px;
  }
  .p4p-try-flatlay-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }
}
.p4p-flat-card {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  padding: 0.62rem;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.11);
  color: #FFFFFF !important;
  text-decoration: none !important;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.p4p-flat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(223, 199, 147, 0.6);
}
.p4p-flat-slot {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #DFC793;
}
.p4p-flat-img-box {
  block-size: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}
.p4p-flat-img-box img {
  max-inline-size: 100%;
  max-block-size: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.6));
}
.p4p-flat-name {
  font-size: 0.7rem;
  font-weight: 700;
  color: #F8FAFC;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.p4p-flat-price {
  font-family: var(--p4p-price-font, "Chakra Petch", sans-serif);
  font-size: 0.74rem;
  font-weight: 800;
  color: #FCA5A5;
  font-variant-numeric: tabular-nums;
  margin-top: auto;
}

/* Precision Fit Nudge Mini-Bar */
.p4p-try-fitbar {
  position: absolute;
  inset: 66px 14px auto auto;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  padding: 0.42rem 0.72rem;
  border-radius: 12px;
  background: rgba(9, 12, 18, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(223, 199, 147, 0.42);
  font-size: 0.68rem;
  color: #F8FAFC;
}
.p4p-try-fitbar[hidden] {
  display: none !important;
}
.p4p-try-fitbar-lbl {
  font-weight: 800;
  color: #DFC793;
}
.p4p-try-fit-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  font-weight: 700;
  color: #CBD5E1;
}
.p4p-try-fit-ctrl input[type="range"] {
  inline-size: 68px;
  accent-color: #CD212A;
  cursor: pointer;
}
.p4p-try-fit-reset {
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  font-size: 0.64rem;
  font-weight: 700;
  cursor: pointer;
}
.p4p-try-fit-reset:hover {
  background: #CD212A;
  border-color: #CD212A;
}

/* ============================================================================
   FLOATING HUD OVERLAYS (SINGLE-ROW TOP BAR — ZERO HEAD OVERLAP)
   ============================================================================ */
.p4p-a3d-hud-top {
  position: absolute;
  inset: 12px 12px auto 12px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.45rem;
  pointer-events: none;
}
.p4p-a3d-hud-top > * {
  pointer-events: auto;
}
.p4p-a3d-telemetry {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0.42rem 0.68rem;
  border-radius: 12px;
  background: rgba(9, 12, 18, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  max-inline-size: min(240px, 100%);
}
.p4p-a3d-tel-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #DFC793;
}
.p4p-a3d-tel-bike {
  font-size: 0.76rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.18;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.p4p-a3d-tel-meta {
  font-size: 0.63rem;
  font-weight: 600;
  color: #94A3B8;
  font-variant-numeric: tabular-nums;
}

/* Compact Single-Row Top-Right Toolbar */
.p4p-a3d-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
}
.p4p-a3d-seg {
  display: inline-flex;
  align-items: center;
  padding: 2.5px;
  border-radius: 999px;
  background: rgba(9, 12, 18, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.13);
  gap: 2px;
}
.p4p-a3d-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  min-block-size: 27px;
  padding: 0.2rem 0.54rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: #CBD5E1;
  font-size: 0.66rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.p4p-a3d-tool-btn:hover,
.p4p-a3d-tool-btn:focus-visible {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.11);
}
.p4p-a3d-tool-btn.is-active {
  background: #FFFFFF;
  color: #0B0F14;
}
.p4p-a3d-tool-btn--solo {
  background: rgba(9, 12, 18, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: rgba(255, 255, 255, 0.14);
}
.p4p-a3d-tool-btn--solo.is-active {
  background: #CD212A;
  border-color: #E11D48;
  color: #FFFFFF;
}
.p4p-a3d-tool-btn:focus-visible {
  outline: 2px solid #DFC793;
  outline-offset: 2px;
}

/* Bottom XimiTech Camera Zoom Bar */
.p4p-a3d-hud-bottom {
  position: absolute;
  inset: auto 12px 12px 12px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  pointer-events: none;
  max-inline-size: calc(100% - 24px);
}
.p4p-a3d-hud-bottom > * {
  pointer-events: auto;
}
.p4p-a3d-cams {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 3px;
  padding: 3.5px;
  border-radius: 999px;
  background: rgba(9, 12, 18, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.13);
  max-inline-size: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.p4p-a3d-cams::-webkit-scrollbar {
  display: none;
}
.p4p-a3d-cam-btn {
  flex: 0 0 auto;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: #CBD5E1;
  font-size: 0.67rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.16s ease, color 0.16s ease;
}
.p4p-a3d-cam-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.1);
}
.p4p-a3d-cam-btn.is-active {
  background: #CD212A;
  color: #FFFFFF;
}
.p4p-a3d-cam-btn:focus-visible {
  outline: 2px solid #DFC793;
  outline-offset: 2px;
}

.p4p-a3d-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.64rem;
  border-radius: 999px;
  background: rgba(9, 12, 18, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #CBD5E1;
  font-size: 0.65rem;
  font-weight: 600;
}
.p4p-a3d-zoom-grp {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.p4p-a3d-zoom-btn {
  inline-size: 22px;
  block-size: 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.p4p-a3d-zoom-btn:hover {
  background: #CD212A;
  border-color: #CD212A;
}

/* ============================================================================
   RIGHT: CUSTOMIZER RAIL ("THANH CUSTOM KẾ BÊN" — MANNEQUIN & PKL GARAGE)
   ============================================================================ */
.p4p-a3d-panel {
  display: flex;
  flex-direction: column;
  min-inline-size: 0;
  max-inline-size: 100%;
  background: #121620;
  border-inline-start: 1px solid rgba(255, 255, 255, 0.1);
  min-block-size: 640px;
  max-block-size: 690px;
}
@media (max-width: 1023px) {
  .p4p-a3d-panel {
    border-inline-start: 0;
    border-block-start: 1px solid rgba(255, 255, 255, 0.1);
    min-block-size: 0;
    max-block-size: none;
  }
}

/* Accessible Single-Row Scrollable Slot Tablist (modern-web-guidance `tabs`) */
.p4p-a3d-tabs-wrap {
  min-inline-size: 0;
  max-inline-size: 100%;
  border-block-end: 1px solid rgba(255, 255, 255, 0.09);
  background: #0E121A;
  padding-inline: 6px;
}
.p4p-a3d-tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 1px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: inline proximity;
  scroll-padding-inline: 1.5rem;
  scrollbar-width: none;
  --fade-size: 1.5rem;
}
.p4p-a3d-tabs::-webkit-scrollbar {
  display: none;
}
@supports (animation-timeline: scroll(self inline)) {
  .p4p-a3d-tabs {
    mask:
      linear-gradient(black, black) no-clip subtract,
      linear-gradient(to right, black, transparent) 0 0 / var(--a3d-fade-start) 100% no-repeat no-clip,
      linear-gradient(to right, transparent, black) 100% 0 / var(--a3d-fade-end) 100% no-repeat no-clip;
    animation: p4pA3dFadeStart linear both, p4pA3dFadeEnd linear both;
    animation-timeline: scroll(self inline);
    animation-range: 0 var(--fade-size), calc(100% - var(--fade-size)) 100%;
  }
}
@keyframes p4pA3dFadeStart {
  to { --a3d-fade-start: var(--fade-size); }
}
@keyframes p4pA3dFadeEnd {
  from { --a3d-fade-end: var(--fade-size); }
}

/* Compact 8-tab fit so ALL 8 tabs (Mũ -> Xe PKL) fit cleanly on desktop! */
.p4p-a3d-tab {
  position: relative;
  flex: none;
  scroll-snap-align: start;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-inline-size: 48px;
  padding: 9px 5px 10px;
  border: 0;
  background: transparent;
  color: #94A3B8;
  font-size: 0.64rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.16s ease, background-color 0.16s ease;
}
.p4p-a3d-tab i {
  font-size: 0.84rem;
}
.p4p-a3d-tab:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.04);
}
/* Non-color active indicator using border on ::after (WCAG 1.4.1 + Forced Colors safe) */
.p4p-a3d-tab[aria-selected="true"] {
  color: #FFFFFF;
}
.p4p-a3d-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset: auto 5px 0 5px;
  border-block-end: 2.5px solid #CD212A;
}
.p4p-a3d-tab:focus-visible {
  outline: 2px solid #DFC793;
  outline-offset: -3px;
}
.p4p-a3d-tab-dot {
  position: absolute;
  inset: 6px 5px auto auto;
  inline-size: 5px;
  block-size: 5px;
  border-radius: 50%;
  background: #008C45;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.p4p-a3d-tab.has-equipped .p4p-a3d-tab-dot {
  opacity: 1;
}

/* Tab Panels Container — zero padding/border on [role="tabpanel"] itself (hidden="until-found" rule!) */
.p4p-a3d-panels {
  flex: 1 1 auto;
  min-block-size: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
.p4p-a3d-tabpanel {
  grid-area: 1 / 1;
}
.p4p-a3d-tabpanel-inner {
  padding: 12px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 0.78rem;
}

/* Slot Controls Header */
.p4p-a3d-slot-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.p4p-a3d-slot-title {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 800;
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}
.p4p-a3d-unequip-btn {
  padding: 0.24rem 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: #CBD5E1;
  font-size: 0.67rem;
  font-weight: 700;
  cursor: pointer;
}
.p4p-a3d-unequip-btn:hover {
  border-color: #CD212A;
  color: #FFFFFF;
  background: rgba(205, 33, 42, 0.22);
}

.p4p-a3d-note-pill {
  padding: 0.48rem 0.68rem;
  border-radius: 10px;
  background: rgba(223, 199, 147, 0.08);
  border: 1px solid rgba(223, 199, 147, 0.24);
  color: #E2E8F0;
  font-size: 0.69rem;
  line-height: 1.4;
}

/* Real DB Product Cards inside Customizer */
.p4p-a3d-item-list {
  display: flex;
  flex-direction: column;
  gap: 0.46rem;
}
.p4p-a3d-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.62rem;
  padding: 0.5rem 0.6rem;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: #F8FAFC;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}
.p4p-a3d-item:hover {
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 255, 255, 0.2);
}
.p4p-a3d-item.is-selected {
  background: color-mix(in oklab, #CD212A 16%, #141925);
  border-color: rgba(205, 33, 42, 0.72);
}
.p4p-a3d-item:focus-visible {
  outline: 2px solid #DFC793;
  outline-offset: 2px;
}
.p4p-a3d-item-thumb {
  inline-size: 54px;
  block-size: 54px;
  border-radius: 10px;
  background: radial-gradient(circle at 50% 45%, #232A39, #131823);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: clip;
}
.p4p-a3d-item-thumb img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.45));
}
.p4p-a3d-item-info {
  min-inline-size: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.p4p-a3d-item-brand-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.p4p-a3d-item-brand {
  font-size: 0.59rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #DFC793;
}
.p4p-a3d-item-tag {
  font-size: 0.54rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: #E2E8F0;
}
.p4p-a3d-item-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.26;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.p4p-a3d-item-price {
  font-family: var(--p4p-price-font, "Chakra Petch", sans-serif);
  font-size: 0.76rem;
  font-weight: 800;
  color: #FCA5A5;
  font-variant-numeric: tabular-nums;
}
.p4p-a3d-item-check {
  inline-size: 22px;
  block-size: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.24);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: transparent;
  flex-shrink: 0;
}
.p4p-a3d-item.is-selected .p4p-a3d-item-check {
  background: #008C45;
  border-color: #008C45;
  color: #FFFFFF;
}

/* PKL Motorcycle Garage Selector */
.p4p-a3d-bike-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
}
.p4p-a3d-pill-choice {
  padding: 0.23rem 0.56rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #CBD5E1;
  font-size: 0.67rem;
  font-weight: 700;
  cursor: pointer;
}
.p4p-a3d-pill-choice.is-active {
  background: #FFFFFF;
  border-color: #FFFFFF;
  color: #0B0F14;
}
.p4p-a3d-bike-search {
  inline-size: 100%;
  padding: 0.45rem 0.72rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #FFFFFF;
  font-size: 0.75rem;
}
.p4p-a3d-bike-search::placeholder {
  color: #94A3B8;
}
.p4p-a3d-bike-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.4rem;
}
.p4p-a3d-bike-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.58rem;
  padding: 0.54rem 0.7rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: #F8FAFC;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.p4p-a3d-bike-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
}
.p4p-a3d-bike-btn.is-selected {
  background: color-mix(in oklab, #008C45 18%, #121822);
  border-color: rgba(0, 140, 69, 0.8);
}
.p4p-a3d-bike-dot {
  inline-size: 11px;
  block-size: 11px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  flex-shrink: 0;
}
.p4p-a3d-bike-meta {
  flex: 1 1 auto;
  min-inline-size: 0;
}
.p4p-a3d-bike-meta strong {
  display: block;
  font-size: 0.77rem;
  font-weight: 800;
  color: #FFFFFF;
}
.p4p-a3d-bike-meta span {
  display: block;
  font-size: 0.65rem;
  color: #94A3B8;
}
.p4p-a3d-bike-cc {
  font-family: var(--p4p-price-font, "Chakra Petch", sans-serif);
  font-size: 0.67rem;
  font-weight: 800;
  color: #DFC793;
  white-space: nowrap;
}

/* Sticky Outfit Summary & Zalo CTA Footer (extra right clearance from floating site buttons) */
.p4p-a3d-footer {
  padding: 12px 26px 14px 14px;
  background: #0B0E15;
  border-block-start: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0.62rem;
}
.p4p-a3d-summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.65rem;
}
.p4p-a3d-summary-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-inline-size: 0;
}
.p4p-a3d-summary-meta small {
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94A3B8;
}
.p4p-a3d-summary-meta span {
  font-size: 0.72rem;
  font-weight: 700;
  color: #E2E8F0;
}
.p4p-a3d-total-price {
  font-family: var(--p4p-price-font, "Chakra Petch", sans-serif);
  font-size: 1.14rem;
  font-weight: 900;
  color: #FFFFFF;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.p4p-a3d-cta-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
}
.p4p-a3d-zalo-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  min-block-size: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #CD212A 0%, #9E0B22 100%);
  color: #FFFFFF !important;
  font-size: 0.75rem;
  font-weight: 800;
  text-decoration: none !important;
  box-shadow: 0 10px 22px -12px rgba(205, 33, 42, 0.85);
  transition: filter 0.16s ease, transform 0.16s ease;
}
.p4p-a3d-zalo-cta:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.p4p-a3d-reset-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #E2E8F0;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}
.p4p-a3d-reset-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
}

/* ============================================================================
   STAGE NUMBERED CALLOUT PINS & LAYER SPOTLIGHT HIGHLIGHT
   ============================================================================ */
.p4p-try-layer.is-highlighted {
  filter:
    drop-shadow(0 0 14px rgba(223, 199, 147, 0.92))
    drop-shadow(0 12px 22px rgba(205, 33, 42, 0.55));
}

.p4p-stage-pins {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 48;
  transform: translateZ(48px);
}
.p4p-a3d-stage[data-view="back"] .p4p-stage-pins,
.p4p-a3d-stage[data-view="flatlay"] .p4p-stage-pins {
  display: none;
}
.p4p-stage-pin {
  position: absolute;
  left: var(--px, 0%);
  top: var(--py, 0%);
  transform: translate(-50%, -50%);
  inline-size: 24px;
  block-size: 24px;
  border-radius: 999px;
  border: 1.5px solid rgba(223, 199, 147, 0.85);
  background: rgba(9, 12, 18, 0.88);
  color: #DFC793;
  font-family: var(--p4p-price-font, "Chakra Petch", sans-serif);
  font-size: 0.64rem;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.65);
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.p4p-stage-pin::after {
  content: "";
  position: absolute;
  top: 50%;
  inline-size: 14px;
  block-size: 1px;
  background: rgba(223, 199, 147, 0.55);
  pointer-events: none;
}
.p4p-stage-pin.is-left::after {
  left: 100%;
}
.p4p-stage-pin.is-right::after {
  right: 100%;
}
.p4p-stage-pin:hover,
.p4p-stage-pin:focus-visible,
.p4p-stage-pin.is-active {
  background: #CD212A;
  border-color: #FFFFFF;
  color: #FFFFFF;
  transform: translate(-50%, -50%) scale(1.16);
}
.p4p-stage-pin:focus-visible {
  outline: 2px solid #DFC793;
  outline-offset: 2px;
}

/* ============================================================================
   BOTTOM FULL-WIDTH: ORDERED PRODUCT MANIFEST ("LIỆT KÊ THỨ TỰ MÓN ĐỒ 01 → 0N")
   ============================================================================ */
.p4p-a3d-manifest {
  grid-column: 1 / -1;
  min-inline-size: 0;
  max-inline-size: 100%;
  padding: 16px 18px 18px;
  background: linear-gradient(180deg in oklab, #0B0E16 0%, #0E131E 100%);
  border-block-start: 1px solid rgba(255, 255, 255, 0.11);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.p4p-mf-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
}
.p4p-mf-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-inline-size: 0;
}
.p4p-mf-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #DFC793;
}
.p4p-mf-sub {
  font-size: 0.72rem;
  color: #94A3B8;
}
.p4p-mf-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.p4p-mf-bike-pill,
.p4p-mf-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  min-block-size: 32px;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #E2E8F0;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.p4p-mf-bike-pill i {
  color: #DFC793;
}
.p4p-mf-bike-pill:hover,
.p4p-mf-copy-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(223, 199, 147, 0.55);
  color: #FFFFFF;
}
.p4p-mf-copy-btn.is-copied {
  background: #008C45;
  border-color: #008C45;
  color: #FFFFFF;
}
.p4p-mf-copy-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

/* Semantic Ordered List Grid of Numbered Garment Cards */
.p4p-mf-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(296px, 1fr));
  gap: 0.65rem;
}
.p4p-mf-card {
  position: relative;
  min-inline-size: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto 46px minmax(0, 1fr);
  align-items: center;
  gap: 0.62rem;
  padding: 0.62rem 0.72rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.03);
  transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}
.p4p-mf-card:hover,
.p4p-mf-card.is-active {
  background: color-mix(in oklab, #CD212A 12%, #131824);
  border-color: rgba(223, 199, 147, 0.55);
}
.p4p-mf-card.is-empty {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.015);
}
.p4p-mf-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 28px;
  block-size: 28px;
  border-radius: 9px;
  background: rgba(223, 199, 147, 0.14);
  border: 1px solid rgba(223, 199, 147, 0.35);
  font-family: var(--p4p-price-font, "Chakra Petch", sans-serif);
  font-size: 0.74rem;
  font-weight: 900;
  color: #DFC793;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.p4p-mf-card:hover .p4p-mf-num,
.p4p-mf-card.is-active .p4p-mf-num {
  background: #CD212A;
  border-color: #E11D48;
  color: #FFFFFF;
}
.p4p-mf-card.is-empty .p4p-mf-num {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  color: #94A3B8;
}
.p4p-mf-thumb {
  inline-size: 46px;
  block-size: 46px;
  border-radius: 10px;
  background: radial-gradient(circle at 50% 45%, #232A39, #131823);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: clip;
  flex-shrink: 0;
}
.p4p-mf-thumb img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.45));
}
.p4p-mf-thumb i {
  font-size: 0.95rem;
  color: #64748B;
}
.p4p-mf-body {
  min-inline-size: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.p4p-mf-slot-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}
.p4p-mf-slot-lbl {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #DFC793;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.p4p-mf-name {
  font-size: 0.74rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.p4p-mf-card.is-empty .p4p-mf-name {
  color: #94A3B8;
  font-weight: 600;
}
.p4p-mf-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.45rem;
  margin-top: 2px;
}
.p4p-mf-price {
  font-family: var(--p4p-price-font, "Chakra Petch", sans-serif);
  font-size: 0.74rem;
  font-weight: 800;
  color: #FCA5A5;
  font-variant-numeric: tabular-nums;
}
.p4p-mf-btns {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.p4p-mf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-block-size: 22px;
  padding: 0 7px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #E2E8F0 !important;
  font-size: 0.62rem;
  font-weight: 700;
  text-decoration: none !important;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.p4p-mf-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(223, 199, 147, 0.6);
  color: #FFFFFF !important;
}
.p4p-mf-btn--rm {
  padding: 0 6px;
  color: #FCA5A5 !important;
}
.p4p-mf-btn--rm:hover {
  background: #CD212A;
  border-color: #CD212A;
  color: #FFFFFF !important;
}
.p4p-mf-btn--add {
  background: rgba(0, 140, 69, 0.22);
  border-color: rgba(0, 140, 69, 0.55);
  color: #86EFAC !important;
}
.p4p-mf-btn--add:hover {
  background: #008C45;
  border-color: #008C45;
  color: #FFFFFF !important;
}

/* Mobile Compact Tweaks — Zero Clipping on 390×844! */
@media (max-width: 639px) {
  .p4p-stage-pins {
    display: none;
  }
  .p4p-a3d-manifest {
    padding: 13px 12px 16px;
  }
  .p4p-mf-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.48rem;
  }
  .p4p-a3d-hud-top {
    inset: 8px 8px auto 8px;
    gap: 0.35rem;
  }
  .p4p-a3d-hud-bottom {
    inset: auto 8px 8px 8px;
    max-inline-size: calc(100% - 16px);
  }
  .p4p-a3d-hint {
    display: none;
  }
  .p4p-a3d-telemetry {
    display: none;
  }
  .p4p-a3d-toolbar {
    inline-size: 100%;
    justify-content: space-between;
  }
  .p4p-a3d-tool-btn {
    padding: 0.18rem 0.44rem;
    font-size: 0.62rem;
  }
  .p4p-a3d-panels {
    max-block-size: 410px;
  }
  .p4p-try-fitbar {
    inset: 52px 8px auto 8px;
  }
}

/* Forced Colors Mode Accessibility */
@media (forced-colors: active) {
  .p4p-a3d-shell,
  .p4p-a3d-item,
  .p4p-a3d-bike-btn,
  .p4p-a3d-preset-btn,
  .p4p-a3d-tool-btn,
  .p4p-a3d-cam-btn,
  .p4p-flat-card,
  .p4p-mf-card,
  .p4p-stage-pin {
    border: 1px solid CanvasText !important;
  }
  .p4p-a3d-tab[aria-selected="true"]::after {
    border-block-end-color: Highlight;
  }
}
