/* CP336: persistent mobile depth for touch devices. Hero styles remain untouched. */
:root {
  --pg-cp336-red: #ff163c;
  --pg-cp336-red-glow: rgba(255, 22, 60, .28);
  --pg-cp336-blue: #109CFF;
  --pg-cp336-blue-glow: rgba(16, 156, 255, .2);
}

@media (max-width: 768px) {
  html body.pg-visual-system main#main > .pg-fx-why-posguard {
    perspective: 1050px;
    transform-style: preserve-3d;
  }

  /* A soft red/blue aura gives the map visible depth without adding a panel or frame. */
  html body.pg-visual-system .pg-fx-network-map {
    position: relative;
    isolation: isolate;
    transform-style: preserve-3d;
  }

  html body.pg-visual-system .pg-fx-network-map::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 16% 7% 12%;
    border-radius: 50%;
    background:
      radial-gradient(ellipse at 66% 50%, rgba(255, 22, 60, .25), transparent 46%),
      radial-gradient(ellipse at 35% 48%, rgba(16, 156, 255, .2), transparent 48%);
    filter: blur(22px);
    pointer-events: none;
  }

  html body.pg-visual-system .pg-fx-network-map-svg {
    position: relative;
    z-index: 1;
    /* Keep the wide mobile map inside the viewport while preserving its 3D tilt. */
    transform: perspective(1050px) rotateX(3.4deg) scale(.985);
    transform-origin: 50% 56%;
    filter:
      drop-shadow(0 16px 14px rgba(0, 0, 0, .38))
      drop-shadow(0 0 12px rgba(255, 22, 60, .13));
  }

  html body.pg-visual-system .pg-fx-why-list li {
    transform-style: preserve-3d;
  }

  html body.pg-visual-system .pg-fx-why-check {
    transform: translateZ(7px);
    box-shadow:
      0 4px 0 rgba(255, 22, 60, .22),
      0 8px 16px rgba(0, 0, 0, .3),
      0 0 13px rgba(255, 22, 60, .12);
  }

  /* Raised edges and inner highlights make cards read as tactile surfaces without hover. */
  html body.pg-visual-system main#main :is(
    .pg-home-compare-card, .pg-bento-card, .pgd-text-category, .pgd-image-card,
    .pgd-product-card, .pg-fx-category-card, .sector-pill-card, .cat-card,
    .pg-stress-card, .pg-catalogue-card, .pg-model-accessory-card,
    .pg-industry-card, .pg-guide-card, .pg-public-category-card,
    .pg-public-contact-card, .pg-public-value-card, .pg-public-link-card,
    .pg-interactive-card
  ):not(.hero *):not(.page-hero *):not(#home-hero *):not(.pgd-hero-section *) {
    border-color: rgba(16, 156, 255, .3);
    box-shadow:
      inset 0 1px 0 rgba(243, 246, 248, .07),
      0 10px 22px rgba(0, 0, 0, .3),
      0 2px 0 rgba(255, 22, 60, .2);
  }

  html body.pg-visual-system main#main :is(
    .pg-bento-icon, .pg-stress-icon, .pg-home-compare-icon,
    .pg-fx-category-card .cat-icon
  ) {
    filter: drop-shadow(0 4px 7px rgba(255, 22, 60, .24));
  }

  /* Preserve the approved shield artwork while giving the real product photo a floating edge. */
  html body.pg-visual-system .pg-fx-product-stage {
    transform-style: preserve-3d;
    box-shadow:
      inset 0 1px 0 rgba(243, 246, 248, .09),
      0 14px 25px rgba(0, 0, 0, .34),
      0 2px 0 rgba(255, 22, 60, .22);
  }

  html body.pg-visual-system .pg-fx-product-stage :is(.product-image, .pg-hq-product-visual img, .pg-premium-model-reference) {
    transform: perspective(950px) rotateY(-1.2deg) translateZ(8px);
    transform-origin: center bottom;
    filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .32));
  }
}

@media (max-width: 380px) {
  html body.pg-visual-system .pg-fx-network-map-svg {
    transform: perspective(900px) rotateX(2.4deg) scale(.985);
  }

  html body.pg-visual-system .pg-fx-product-stage :is(.product-image, .pg-hq-product-visual img, .pg-premium-model-reference) {
    transform: perspective(900px) rotateY(-.6deg) translateZ(5px);
  }
}

@media (min-width: 601px) and (max-width: 768px) {
  html body.pg-visual-system .pg-fx-network-map-svg {
    transform: perspective(1050px) rotateX(3.4deg) scale(.98);
  }
}

@media (prefers-reduced-motion: reduce) {
  html body.pg-visual-system .pg-fx-network-map-svg,
  html body.pg-visual-system .pg-fx-product-stage :is(.product-image, .pg-hq-product-visual img, .pg-premium-model-reference) {
    transform: none;
  }
}
