/* CP365: full-width page rhythm, readable Hero, compact model browsing, and visible approved product artwork. */

html,
body.pg-fx-visual-repair,
body.pg-fx-visual-repair .page {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

body.pg-fx-visual-repair main#main {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin-inline: 0 !important;
}

body.pg-fx-visual-repair .page.subpage-shell main#main > section,
body.pg-fx-visual-repair .page.subpage-shell main#main > .pg-public-page {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}

body.pg-fx-visual-repair .page.subpage-shell main#main .container {
  width: min(94%, 1360px) !important;
  max-width: 1360px !important;
  min-width: 0 !important;
  margin-inline: auto !important;
}

/* Desktop Hero: one edge-to-edge canvas, large readable copy, and the full image kept inside its frame. */
@media (min-width: 1024px) {
  html body.pg-fx-visual-repair.pg-page-home .pgd-hero-section > .pg-home-hero-inner {
    width: 100% !important;
    max-width: none !important;
    min-height: clamp(590px, 49vw, 790px) !important;
    grid-template-columns: minmax(360px, .82fr) minmax(0, 1.18fr) !important;
    gap: clamp(22px, 2.2vw, 46px) !important;
    margin: 0 !important;
    padding: clamp(28px, 3.1vw, 56px) 0 clamp(28px, 3.1vw, 56px) clamp(24px, 3.2vw, 64px) !important;
    overflow: hidden !important;
  }

  html body.pg-fx-visual-repair.pg-page-home .pgd-hero-section .pgd-hero-copy {
    width: 100% !important;
    max-width: 620px !important;
    padding-inline: 0 !important;
  }

  html body.pg-fx-visual-repair.pg-page-home .pgd-hero-section .pgd-hero-copy h1 {
    font-size: clamp(40px, 3.6vw, 64px) !important;
    line-height: .99 !important;
    letter-spacing: -.035em !important;
    text-wrap: balance;
  }

  html body.pg-fx-visual-repair.pg-page-home .pgd-hero-section .pgd-hero-copy h1 > .pgd-blue {
    color: #ff163c !important;
    text-shadow: 0 0 26px rgba(255, 22, 60, .22) !important;
  }

  html body.pg-fx-visual-repair.pg-page-home .pgd-hero-section .pgd-hero-copy > p:not(.pgd-hero-eyebrow) {
    max-width: 570px !important;
    font-size: clamp(16px, 1.1vw, 19px) !important;
    line-height: 1.55 !important;
  }

  html body.pg-fx-visual-repair.pg-page-home .pgd-hero-section .pgd-hero-visual {
    width: 100% !important;
    max-width: none !important;
    aspect-ratio: 900 / 580 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    background: transparent !important;
  }

  html body.pg-fx-visual-repair.pg-page-home .pgd-hero-section .pgd-hero-visual :is(picture, img) {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
  }

  html body.pg-fx-visual-repair.pg-page-home .pgd-hero-section .pgd-hero-visual img {
    object-fit: contain !important;
    object-position: center right !important;
  }
}

/* Mobile Hero: avoid cropping the POS image and make the headline and supporting copy readable. */
@media (max-width: 1023px) {
  html body.pg-fx-visual-repair.pg-page-home .pgd-hero-section .pgd-hero-copy {
    width: 100% !important;
    max-width: none !important;
    padding-inline: clamp(18px, 5vw, 30px) !important;
  }

  html body.pg-fx-visual-repair.pg-page-home .pgd-hero-section .pgd-hero-copy h1 {
    font-size: clamp(34px, 8.8vw, 50px) !important;
    line-height: 1 !important;
    letter-spacing: -.035em !important;
    text-wrap: balance;
  }

  html body.pg-fx-visual-repair.pg-page-home .pgd-hero-section .pgd-hero-copy h1 > .pgd-blue {
    color: #ff163c !important;
    text-shadow: 0 0 20px rgba(255, 22, 60, .22) !important;
  }

  html body.pg-fx-visual-repair.pg-page-home .pgd-hero-section .pgd-hero-copy > p:not(.pgd-hero-eyebrow) {
    max-width: 62ch !important;
    font-size: clamp(16px, 4.1vw, 18px) !important;
    line-height: 1.55 !important;
  }

  html body.pg-fx-visual-repair.pg-page-home .pgd-hero-section .pgd-hero-visual img {
    object-fit: contain !important;
    object-position: center !important;
  }
}

/* The real approved shield artwork is visible behind transparent case renders. */
html body.pg-fx-visual-repair .pg-case-category-hero {
  width: 100% !important;
  max-width: none !important;
  background-image:
    radial-gradient(ellipse at 15% 82%, rgba(16, 156, 255, .16), transparent 48%),
    radial-gradient(ellipse at 88% 82%, rgba(255, 22, 60, .16), transparent 44%),
    linear-gradient(180deg, rgba(7, 19, 33, .98), rgba(2, 6, 13, .98) 82%) !important;
  background-position: center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}

html body.pg-fx-visual-repair .pg-case-hero-image {
  position: relative !important;
  isolation: isolate !important;
  min-width: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  border-radius: 12px !important;
  background-color: #020811 !important;
  background-image: none !important;
  background-position: center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}

html body.pg-fx-visual-repair .pg-case-hero-image::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
  pointer-events: none !important;
  background: linear-gradient(180deg, rgba(2, 8, 17, .06), rgba(2, 8, 17, .18)) !important;
}

html body.pg-fx-visual-repair .pg-case-hero-image img {
  position: relative !important;
  z-index: 1 !important;
  display: block !important;
  max-width: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, .62)) !important;
}

/* Preserve the requested 270% stage zoom while adding a low-contrast, complete shield behind it. */
html body.pg-fx-visual-repair .pg-fx-product-stage {
  position: relative !important;
  isolation: isolate !important;
  overflow: hidden !important;
  background-size: 270% auto !important;
  background-position: center top !important;
  background-repeat: no-repeat !important;
}

html body.pg-fx-visual-repair .pg-fx-product-stage::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
  pointer-events: none !important;
  opacity: .28 !important;
  background-image: none !important;
  background-position: center !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  mix-blend-mode: screen !important;
}

/* Compact, responsive model browsing: results become cards instead of full-width strips. */
html body.pg-fx-visual-repair.pg-page-registry.pg-posguard-template .page > main#main > .models-container {
  width: min(96%, 1560px) !important;
  max-width: 1560px !important;
  margin-inline: auto !important;
  padding-inline: 0 !important;
}

html body.pg-fx-visual-repair.pg-page-registry.pg-posguard-template .models-grid#modelsGrid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  gap: 14px !important;
  width: 100% !important;
}

html body.pg-fx-visual-repair.pg-page-registry.pg-posguard-template .models-grid#modelsGrid > .model-card {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto auto auto 1fr !important;
  align-content: start !important;
  align-items: start !important;
  gap: 10px !important;
  min-width: 0 !important;
  min-height: 100% !important;
  padding: 14px !important;
  border-color: rgba(110, 140, 165, .28) !important;
  background: linear-gradient(145deg, rgba(8, 19, 30, .98), rgba(3, 9, 16, .98)) !important;
}

html body.pg-fx-visual-repair.pg-page-registry.pg-posguard-template .models-grid#modelsGrid .model-identity {
  align-items: flex-start !important;
  flex-wrap: wrap !important;
  gap: 5px 8px !important;
}

html body.pg-fx-visual-repair.pg-page-registry.pg-posguard-template .models-grid#modelsGrid .model-identity h2 {
  min-width: 0 !important;
  font-size: clamp(15px, 1vw, 17px) !important;
  line-height: 1.3 !important;
  overflow-wrap: anywhere !important;
}

html body.pg-fx-visual-repair.pg-page-registry.pg-posguard-template .models-grid#modelsGrid .status-badge {
  white-space: normal !important;
}

html body.pg-fx-visual-repair.pg-page-registry.pg-posguard-template .models-grid#modelsGrid .card-actions {
  align-self: end !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  width: 100% !important;
  gap: 8px !important;
}

html body.pg-fx-visual-repair.pg-page-registry.pg-posguard-template .models-grid#modelsGrid .card-actions > a {
  min-width: 0 !important;
  min-height: 44px !important;
  padding-inline: 8px !important;
  white-space: normal !important;
  text-align: center !important;
}

html body.pg-fx-visual-repair.pg-page-registry.pg-posguard-template .filter-panel {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

@media (min-width: 1600px) {
  html body.pg-fx-visual-repair.pg-page-registry.pg-posguard-template .models-grid#modelsGrid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 769px) and (max-width: 1023px) {
  html body.pg-fx-visual-repair.pg-page-registry.pg-posguard-template .page > main#main > .models-container {
    width: 96% !important;
  }

  html body.pg-fx-visual-repair.pg-page-registry.pg-posguard-template .models-grid#modelsGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 768px) {
  body.pg-fx-visual-repair .page.subpage-shell main#main .container {
    width: 100% !important;
    max-width: 1360px !important;
    padding-inline: 16px !important;
  }

  html body.pg-fx-visual-repair.pg-page-registry.pg-posguard-template .page > main#main > .models-container {
    width: 100% !important;
    padding-inline: 16px !important;
  }

  html body.pg-fx-visual-repair.pg-page-registry.pg-posguard-template .models-grid#modelsGrid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html body.pg-fx-visual-repair.pg-page-registry.pg-posguard-template .models-grid#modelsGrid > .model-card {
    grid-template-columns: minmax(0, 1fr) !important;
    min-height: 0 !important;
  }

  html body.pg-fx-visual-repair .pg-case-category-hero {
    background-position: center !important;
    background-size: cover !important;
  }
}

@media (max-width: 480px) {
  html body.pg-fx-visual-repair.pg-page-home .pgd-hero-section .pgd-hero-copy h1 {
    font-size: clamp(32px, 9vw, 42px) !important;
  }

  html body.pg-fx-visual-repair .pg-case-hero-image {
    min-height: 210px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body.pg-fx-visual-repair .pg-fx-product-stage img,
  html body.pg-fx-visual-repair .pg-case-hero-card,
  html body.pg-fx-visual-repair .pgd-hero-section * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
