/* EMPORIO PORTUGAL — ARTIGOS PT V3
   Correção page-scoped.
   Objetivo: hero sem crop e sem overflow em desktop intermediário,
   incluindo a largura real ~1236px observada pelo proprietário. */

html:has(body.ep-art-artigos),
html[lang="pt-BR"]:has(body.ep-art-artigos) {
  overflow-x: clip !important;
}

html[lang="pt-BR"] body.ep-art-artigos {
  overflow-x: clip !important;
  max-width: 100% !important;
}

html[lang="pt-BR"] body.ep-art-artigos .ep-artigos-hero,
html[lang="pt-BR"] body.ep-art-artigos .ep-artigos-hero .page-hero__inner,
html[lang="pt-BR"] body.ep-art-artigos .ep-artigos-hero .page-hero__grid,
html[lang="pt-BR"] body.ep-art-artigos .ep-artigos-hero .ep-artigos-hero__copy {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

html[lang="pt-BR"] body.ep-art-artigos .ep-artigos-hero .page-hero__inner {
  width: min(1240px, calc(100% - 32px)) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

html[lang="pt-BR"] body.ep-art-artigos .ep-artigos-hero .page-hero__grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr) !important;
  gap: clamp(1rem, 2vw, 1.6rem) !important;
  align-items: center !important;
  width: 100% !important;
}

html[lang="pt-BR"] body.ep-art-artigos .ep-artigos-hero .page-hero__grid > img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: 16 / 9 !important;
  object-fit: cover !important;
  object-position: center center !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  transform: none !important;
  box-sizing: border-box !important;
}

/* Desktop intermediário / notebook:
   abaixo de 1240px a hero passa para uma coluna.
   Isso elimina o "buraco" entre 820 e 1366 visto no teste real. */
@media (max-width: 1240px) {
  html[lang="pt-BR"] body.ep-art-artigos .ep-artigos-hero .page-hero__grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 1rem !important;
    align-items: start !important;
  }

  html[lang="pt-BR"] body.ep-art-artigos .ep-artigos-hero .ep-artigos-hero__copy {
    width: 100% !important;
    max-width: 760px !important;
  }

  html[lang="pt-BR"] body.ep-art-artigos .ep-artigos-hero .page-hero__grid > img {
    width: min(100%, 760px) !important;
    justify-self: center !important;
  }
}

/* Celular/tablet: ocupa toda a largura útil, sem overflow. */
@media (max-width: 820px) {
  html[lang="pt-BR"] body.ep-art-artigos .ep-artigos-hero .page-hero__inner {
    width: min(100% - 24px, 760px) !important;
  }

  html[lang="pt-BR"] body.ep-art-artigos .ep-artigos-hero .page-hero__grid > img {
    width: 100% !important;
    max-width: 100% !important;
  }
}
