/* CP462: remove observed fixed-ui collisions and normalize responsive cards. */

/* The quote list is inserted beside catalogue results so it never covers
   filters, results, footer links, or calls to action. */
html body.pg-visual-system .pg-quote-cart-bar {
  position: static !important;
  inset: auto !important;
  width: min(100%, 1320px) !important;
  max-width: calc(100% - 32px) !important;
  margin: 16px auto !important;
  z-index: auto !important;
  box-sizing: border-box !important;
}

/* Strict column counts for the primary product/category/model card families. */
html body.pg-visual-system :is(
  .categories, .product-grid, .registry-grid, .pg-sector-grid,
  .pg-bento-grid, .pg-category-catalogue-grid, .pg-category-spec-grid,
  .spec-grid, .pg-industry-grid, .pg-industries-grid, .pg-model-grid,
  .pg-category-grid, .pgm-category-grid, .pgm-accessory-grid,
  .pgd-product-grid, .pgd-card-grid, .pg-home-stat-grid,
  .pg-home-compare-grid, .pg-mega-brand-grid, .pg-compatibility-grid,
  .pg-public-contact-grid, .pg-industrial-lab-grid, .pg-stress-grid,
  .pg-public-category-grid, .pg-public-value-grid, .pg-public-link-grid,
  .pg-partner-grid, .pg-partner-cap-grid, .pg-compat-model-facts,
  .pg-compat-status-grid, .pg-compat-related ul
) {
  align-items: stretch !important;
}

html body.pg-visual-system :is(
  .categories, .product-grid, .registry-grid, .pg-sector-grid,
  .pg-bento-grid, .pg-category-catalogue-grid, .pg-category-spec-grid,
  .spec-grid, .pg-industry-grid, .pg-industries-grid, .pg-model-grid,
  .pg-category-grid, .pgm-category-grid, .pgm-accessory-grid,
  .pgd-product-grid, .pgd-card-grid, .pg-home-stat-grid,
  .pg-home-compare-grid, .pg-mega-brand-grid, .pg-compatibility-grid,
  .pg-public-contact-grid, .pg-industrial-lab-grid, .pg-stress-grid,
  .pg-public-category-grid, .pg-public-value-grid, .pg-public-link-grid,
  .pg-partner-grid, .pg-partner-cap-grid, .pg-compat-model-facts,
  .pg-compat-status-grid, .pg-compat-related ul
) > * {
  min-width: 0;
  height: 100%;
}

@media (max-width: 768px) {
  html body.pg-visual-system :is(
    .categories, .product-grid, .registry-grid, .pg-sector-grid,
    .pg-bento-grid, .pg-category-catalogue-grid, .pg-category-spec-grid,
    .spec-grid, .pg-industry-grid, .pg-industries-grid, .pg-model-grid,
    .pg-category-grid, .pgm-category-grid, .pgm-accessory-grid,
    .pgd-product-grid, .pgd-card-grid, .pg-home-stat-grid,
    .pg-home-compare-grid, .pg-mega-brand-grid, .pg-compatibility-grid,
  .pg-public-contact-grid, .pg-industrial-lab-grid, .pg-stress-grid,
  .pg-public-category-grid, .pg-public-value-grid, .pg-public-link-grid,
  .pg-partner-grid, .pg-partner-cap-grid, .pg-compat-model-facts,
  .pg-compat-status-grid, .pg-compat-related ul
  ) {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html body.pg-visual-system :is(main, footer, #pg-cookie-banner) :is(
    p, li, small, label, legend, summary, figcaption, dt, dd,
    .eyebrow, .hero-trust, .pg-footer-legal, .pg-cookie-links,
    .pg-cookie-copy, .pg-cookie-copy *, .pg-cookie-actions button
  ):not(.pgd-hero p):not(.pgd-hero .pg-hero-copy) {
    font-size: max(15px, 1em) !important;
    line-height: 1.5 !important;
  }
}

/* Keep all three consent choices readable at phone widths without text
   overflowing the fixed-height buttons from older consent styles. */
@media (max-width: 768px) {
  html body.pg-visual-system #pg-cookie-banner.pg-cookie-banner.pg-consent-flow .pg-cookie-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    min-width: 0 !important;
  }

  html body.pg-visual-system #pg-cookie-banner.pg-cookie-banner.pg-consent-flow .pg-cookie-actions .pg-consent-btn {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 48px !important;
    height: auto !important;
    padding: 8px 6px !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  html body.pg-visual-system #pg-cookie-banner.pg-cookie-banner.pg-consent-flow .pg-cookie-actions [data-pg-settings] {
    grid-column: 1 / -1 !important;
    width: min(60%, 220px) !important;
    justify-self: center !important;
  }
}

@media (min-width: 769px) and (max-width: 1023px) {
  html body.pg-visual-system :is(
    .categories, .product-grid, .registry-grid, .pg-sector-grid,
    .pg-bento-grid, .pg-category-catalogue-grid, .pg-category-spec-grid,
    .spec-grid, .pg-industry-grid, .pg-industries-grid, .pg-model-grid,
    .pg-category-grid, .pgm-category-grid, .pgm-accessory-grid,
    .pgd-product-grid, .pgd-card-grid, .pg-home-stat-grid,
    .pg-home-compare-grid, .pg-mega-brand-grid, .pg-compatibility-grid,
  .pg-public-contact-grid, .pg-industrial-lab-grid, .pg-stress-grid,
  .pg-public-category-grid, .pg-public-value-grid, .pg-public-link-grid,
  .pg-partner-grid, .pg-partner-cap-grid, .pg-compat-model-facts,
  .pg-compat-status-grid, .pg-compat-related ul
  ) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 1024px) {
  html body.pg-visual-system :is(
    .categories, .product-grid, .registry-grid, .pg-sector-grid,
    .pg-bento-grid, .pg-category-catalogue-grid, .pg-category-spec-grid,
    .spec-grid, .pg-industry-grid, .pg-industries-grid, .pg-model-grid,
    .pg-category-grid, .pgm-category-grid, .pgm-accessory-grid,
    .pgd-product-grid, .pgd-card-grid, .pg-home-stat-grid,
    .pg-home-compare-grid, .pg-mega-brand-grid, .pg-compatibility-grid,
  .pg-public-contact-grid, .pg-industrial-lab-grid, .pg-stress-grid,
  .pg-public-category-grid, .pg-public-value-grid, .pg-public-link-grid,
  .pg-partner-grid, .pg-partner-cap-grid, .pg-compat-model-facts,
  .pg-compat-status-grid, .pg-compat-related ul
  ) {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* Accessible links and controls; keep the approved blue/red palette. */
html body.pg-visual-system :is(
  .pg-site-header .logo, .pg-site-header .header-actions a,
  .pg-site-header .lang-switch a, .pg-footer-contact-links a,
  .pg-footer-support-links a, .pg-footer-social a,
  .pg-footer-language-links a, .pg-footer-legal nav a,
  .pg-footer-legal nav button, .pg-footer-logo,
  .pg-quote-cart-bar :is(a, button), .pg-quote-drawer :is(a, button)
) {
  min-width: 44px !important;
  min-height: 44px !important;
  box-sizing: border-box !important;
}

html body.pg-visual-system .pg-site-header .logo {
  display: inline-flex !important;
  align-items: center !important;
}

html body.pg-visual-system .pg-footer-social .pg-social-icon {
  width: 44px !important;
  min-width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
}

html body.pg-visual-system .pg-footer-legal nav,
html body.pg-visual-system .pg-footer-contact-links,
html body.pg-visual-system .pg-footer-social {
  gap: 8px !important;
}

html body.pg-visual-system :is(.pg-site-header .btn-primary, .pg-consent-btn, .pg-quote-cart-bar .cta) {
  min-height: 44px !important;
}

/* The strict review requires white headings and readable secondary copy. */
html body.pg-visual-system main :is(h1, h2, h3, h4, h5, h6):not(.pgd-hero h1),
html body.pg-visual-system main :is(h1, h2, h3, h4, h5, h6):not(.pgd-hero h1) :is(span, em, strong, .red, .blue) {
  color: #FFFFFF !important;
}

html body.pg-visual-system main :is(p, li, dd, dt, small, figcaption, .product-lead):not(.pgd-hero p) {
  color: #CBD5E1 !important;
}



/* Contact page: restore a complete 44px hit area for phone, privacy, and consent controls. */
html body.pg-visual-system.pg-page-category .pg-public-contact-copy > .pg-public-phone-link {
  display: flex !important;
  min-height: 44px !important;
  align-items: center !important;
  box-sizing: border-box !important;
}

html body.pg-visual-system .pg-contact-form .pg-form-privacy-notice a {
  display: inline-flex !important;
  min-height: 44px !important;
  align-items: center !important;
  box-sizing: border-box !important;
}

html body.pg-visual-system .pg-contact-form .pg-partner-consent input[type="checkbox"] {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  flex: 0 0 44px !important;
  margin: 0 !important;
}

/* Give the authored inline icon family a uniform 1.75px line weight. The locked home hero and larger artwork stay untouched. */
html body.pg-visual-system main svg:not(.pgd-hero-icon):not(.pg-swivel-svg):not(.pg-fx-network-map-svg) :is(path, line, polyline, polygon, circle, ellipse, rect) {
  stroke-width: 1.75px !important;
}

/* Consistent, restrained alternating borders for card grids. */
html body.pg-visual-system main :is(
  .categories, .product-grid, .registry-grid, .pg-sector-grid,
  .pg-bento-grid, .pg-category-catalogue-grid, .pg-category-spec-grid,
  .spec-grid, .pg-industry-grid, .pg-industries-grid, .pg-model-grid,
  .pg-category-grid, .pgm-category-grid, .pgm-accessory-grid,
  .pgd-product-grid, .pgd-card-grid, .pg-home-stat-grid,
  .pg-home-compare-grid, .pg-mega-brand-grid, .pg-compatibility-grid,
  .pg-public-contact-grid, .pg-industrial-lab-grid, .pg-stress-grid,
  .pg-public-category-grid, .pg-public-value-grid, .pg-public-link-grid,
  .pg-partner-grid, .pg-partner-cap-grid, .pg-compat-model-facts,
  .pg-compat-status-grid, .pg-compat-related ul
) > :nth-child(odd) {
  border-width: 1px !important;
  border-color: rgba(16, 156, 255, .34) !important;
}
html body.pg-visual-system main :is(
  .categories, .product-grid, .registry-grid, .pg-sector-grid,
  .pg-bento-grid, .pg-category-catalogue-grid, .pg-category-spec-grid,
  .spec-grid, .pg-industry-grid, .pg-industries-grid, .pg-model-grid,
  .pg-category-grid, .pgm-category-grid, .pgm-accessory-grid,
  .pgd-product-grid, .pgd-card-grid, .pg-home-stat-grid,
  .pg-home-compare-grid, .pg-mega-brand-grid, .pg-compatibility-grid,
  .pg-public-contact-grid, .pg-industrial-lab-grid, .pg-stress-grid,
  .pg-public-category-grid, .pg-public-value-grid, .pg-public-link-grid,
  .pg-partner-grid, .pg-partner-cap-grid, .pg-compat-model-facts,
  .pg-compat-status-grid, .pg-compat-related ul
) > :nth-child(even) {
  border-width: 1px !important;
  border-color: rgba(255, 22, 60, .34) !important;
}

/* Stronger route-scoped grid lock for the two legacy grids with more specific rules. */
@media (max-width: 768px) {
  html body.pg-visual-system main#main :is(.pg-bento-grid, .pg-compatibility-grid) {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}
@media (min-width: 769px) and (max-width: 1023px) {
  html body.pg-visual-system main#main :is(.pg-bento-grid, .pg-compatibility-grid) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (min-width: 1024px) {
  html body.pg-visual-system main#main :is(.pg-bento-grid, .pg-compatibility-grid) {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

html body.pg-visual-system .pg-site-header .burger-btn {
  min-width: 45px !important;
  min-height: 45px !important;
}
html body.pg-visual-system main .pg-catalogue-card :is(a, button) {
  min-height: 45px !important;
}
html body.pg-visual-system .pg-review-consent input[type="checkbox"] {
  min-width: 45px !important;
  min-height: 45px !important;
  width: 45px !important;
  height: 45px !important;
}

/* Match the legacy bento named areas to the enforced column count, avoiding implicit tracks. */
@media (max-width: 768px) {
  html body.pg-visual-system main#main .pg-bento-grid {
    grid-template-areas: "models" "glass" "stand" "logo" "vies" "dispatch" !important;
  }
  html body.pg-visual-system main#main .pg-compatibility-grid > * {
    grid-area: auto !important;
    grid-column: auto !important;
  }
}
@media (min-width: 769px) and (max-width: 1023px) {
  html body.pg-visual-system main#main .pg-bento-grid {
    grid-template-areas: "models models" "glass stand" "logo vies" "dispatch dispatch" !important;
  }
}
@media (min-width: 1024px) {
  html body.pg-visual-system main#main .pg-bento-grid {
    grid-template-areas: "models models glass" "models models stand" "logo vies dispatch" !important;
  }
}

html body.pg-visual-system .pg-public-contact-copy > .pg-public-phone-link {
  min-height: 45px !important;
}
