/* Final mobile safety layer: prevents clipped copy and cards on narrow screens. */
@media (max-width:820px){
  html,body{width:100%;max-width:100%;overflow-x:hidden!important}
  body *{min-width:0}
  main,section,header,footer,nav,article,aside,dialog,
  .shell,.product-v2-shell,.product-v2-content,.portal-shell,
  .footer-v5>.shell{max-width:100%}
  img,svg,video,iframe{max-width:100%}
  h1,h2,h3,h4,p,a,button,span,strong,small,dt,dd{
    overflow-wrap:break-word;
    word-break:normal;
  }
  .btn,.product-v2-actions a,.product-v2-doc-actions a,
  .product-v2-document-actions a,.footer-promo-actions a{
    white-space:normal!important;
    text-align:center;
  }
}

@media (max-width:700px){
  .shell,.product-v2-shell,.product-v2-content,.portal-shell{
    box-sizing:border-box!important;
    max-width:calc(100% - 20px)!important;
    margin-inline:auto!important;
  }

  /* Home: allow complete copy instead of compact cards clipping it. */
  #ambientes .scenes,#tecnologias .tech-grid{
    grid-template-columns:minmax(0,1fr)!important;
  }
  #ambientes .scene{min-height:290px!important}
  #ambientes .scene p,
  #tecnologias .tech-card.tech-card-detailed>p,
  .warranty-copy p,.footer-promo p,.footer-brand-content .footer-brand-note{
    display:block!important;
    min-height:0!important;
    overflow:visible!important;
    -webkit-line-clamp:unset!important;
  }
  #tecnologias .tech-card.tech-card-detailed>p{font-size:.72rem!important}
  #tecnologias .tech-points .pill:nth-child(n),
  #tecnologias .tech-detail-item:nth-child(n){display:flex!important}
  #tecnologias .tech-details-grid{grid-template-rows:none!important}
  .about-copy-v14,.about-copy-v14 h2,.about-copy-v14 p{max-width:100%!important}
  .about-values-v14,.warranty-benefits,.portal-benefits{
    grid-template-columns:minmax(0,1fr)!important;
  }

  /* Product hero and technical cards. */
  .product-v2-copy,.product-v2-heading,.product-v2-heading>*,
  .product-v2-feature-panel,.product-v2-spec-panel,.product-v2-use-panel,
  .product-v2-ca-overview,.product-v2-ca-record{width:100%;max-width:100%}
  .product-v2-copy h1,.product-v2-heading h2{hyphens:auto}
  .product-v2-specs{max-width:100%;flex-wrap:wrap}
  .product-v2-actions{grid-template-columns:minmax(0,1fr)!important}
  .product-v2-actions a{width:100%!important}
  .product-v2-related-grid{margin-inline:0!important;padding-right:0!important}
  .product-v2-related-card{flex-basis:calc(100vw - 36px)!important;max-width:calc(100vw - 36px)!important}
  .product-v2-related-copy p{overflow:visible!important}
  .product-v2-heading-clean h2,.product-v2-heading-clean p{white-space:normal!important}
  .product-v2-proof-card,.product-v2-ca-facts>div,
  .product-v2-approved-list>div,.product-v2-declared li{max-width:100%;overflow:visible}
  .product-v2-ca-facts dd,.product-v2-approved-list span,
  .product-v2-declared li{overflow-wrap:anywhere}
  .product-v2-doc-actions,.product-v2-document-actions>div{
    grid-template-columns:minmax(0,1fr)!important;
  }

  /* CA center: full cards instead of a rail that looks cropped. */
  .ca-center-head{padding-inline:14px!important}
  .ca-document-grid{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    overflow:visible!important;
    padding:0 14px 7px!important;
  }
  .ca-document-card{width:100%!important;max-width:100%!important}
  .ca-document-actions{grid-template-columns:minmax(0,1fr)!important}
  .ca-mte-link{width:100%;justify-content:flex-start;margin-left:0}
  .ca-mte-link span{text-align:left}

  /* Footer and dialogs must grow with their text. */
  .footer-promo-actions,.footer-contact-meta{
    grid-template-columns:minmax(0,1fr)!important;
  }
  .footer-v5 .footer-contact-meta .footer-contact-line{display:grid!important;grid-template-columns:1fr!important}
  .footer-v5 .footer-contact-meta .footer-contact-line a,
  .footer-v5 .footer-hours{grid-column:1!important;grid-row:auto!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important}
  .footer-v5 .footer-brand-header .footer-address{
    display:block!important;
    overflow:visible!important;
    white-space:normal!important;
    text-overflow:clip!important;
    -webkit-line-clamp:unset!important;
  }
  .footer-v5 .footer-bottom-v5{
    height:auto!important;
    min-height:42px!important;
    flex-wrap:wrap!important;
  }
  .privacy-banner,.privacy-dialog,.portal-modal-layout,.portal-modal-main,
  .portal-modal-aside,.acc-box{max-width:calc(100vw - 16px)!important}
  .privacy-option{grid-template-columns:minmax(0,1fr) auto}
}

@media (max-width:480px){
  .hero-v2-restored .hero-product-label{
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-areas:"name" "meta" "action"!important;
  }
  .hero-v2-restored .hero-product-label strong,
  .hero-v2-restored .hero-product-label>span,
  .hero-product-label #heroSpec .hero-material{white-space:normal!important}
  .hero-v2-restored .hero-product-label .hero-proof-link{width:100%;justify-content:center}
  .catalog-card-v7{width:calc(100vw - 36px)!important;min-width:calc(100vw - 36px)!important;max-width:calc(100vw - 36px)!important;flex-basis:calc(100vw - 36px)!important}
  .mobile-catalog-nav{grid-template-columns:minmax(0,1fr) auto!important}
  .mobile-catalog-hint{white-space:normal!important}
  .mobile-catalog-count{display:none}
  .footer-brand-content .footer-social-links{grid-template-columns:repeat(5,minmax(0,1fr))!important}
}
