/* Cabeçalho especial das páginas de catálogo e lançamentos.
   Dependências opcionais de apresentação: Font Awesome 6.4 (ícones),
   Google Fonts Cinzel/Montserrat e flagcdn.com (bandeiras). Todos os links
   e rótulos permanecem legíveis se os serviços externos falharem. */
@media screen {
  /* Os controladores antigos continuam no DOM; a impressão mantém o cabeçalho original. */
  body header.pce-legacy { display: none !important; }
  body .pce-header, body .pce-header *, body .pce-header *::before, body .pce-header *::after { box-sizing: border-box; }
  body .pce-header {
    position: sticky; top: 0; z-index: 9;
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: 70px 50px; gap: 0 16px;
    min-height: 120px; padding: 0 clamp(18px, 2vw, 32px);
    border-bottom: 1px solid rgba(202, 166, 105, .38);
    background: rgba(5, 4, 4, .97); color: #ead7ba;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .22);
    backdrop-filter: blur(14px);
    font-family: Arial, sans-serif;
  }
  body .pce-header a { color: inherit; text-decoration: none; }
  body .pce-header a:hover { color: #fff1d7; }
  body .pce-header :is(a, button, summary):focus-visible { outline: 2px solid #f2d49d; outline-offset: 3px; }
  body .pce-brand { grid-column: 1; grid-row: 1; display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
  body .pce-brand img { display: block; width: 48px; height: 48px; border: 1px solid rgba(202,166,105,.38); border-radius: 50%; object-fit: cover; }
  body .pce-brand span { color: #dfbf82; font: 700 .64rem/1 Cinzel, Georgia, serif; letter-spacing: .18em; }
  body .pce-desktop-nav { grid-column: 2; grid-row: 1; justify-self: center; min-width: 0; }
  body .pce-desktop-nav ul { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0; padding: 0; list-style: none; }
  body .pce-desktop-nav a { display: inline-flex; align-items: center; min-height: 44px; color: #e2cfaa; border-bottom: 1px solid transparent; font: 600 .61rem/1.2 Montserrat, Arial, sans-serif; letter-spacing: .13em; text-transform: uppercase; white-space: nowrap; }
  body .pce-desktop-nav a:hover, body .pce-desktop-nav a[aria-current="page"] { color: #f0d5a6; border-bottom-color: #b49650; }
  body .pce-right { grid-column: 3; grid-row: 1; display: flex; align-items: center; gap: 8px; }
  body .pce-listen { position: relative; color: #ead7ba; font-family: Arial, sans-serif; }
  body .pce-listen > summary { display: inline-flex; align-items: center; gap: .3rem; min-height: 44px; padding: .35rem .45rem; color: #ead7ba; cursor: pointer; font: 700 .72rem/1 Arial, sans-serif; letter-spacing: .05em; list-style: none; white-space: nowrap; }
  body .pce-listen > summary::-webkit-details-marker { display: none; }
  body .pce-listen > summary::after { content: '▾'; font-size: .7em; }
  body .pce-listen[open] > summary::after { content: '▴'; }
  body .pce-listen-links { position: absolute; z-index: 2; top: 100%; right: 0; display: flex; min-width: 11.5rem; flex-direction: column; padding: .35rem .7rem; border: 1px solid #8d7251; background: #17110e; box-shadow: 0 .5rem 1.5rem #0009; }
  body .pce-listen-links a { display: flex; align-items: center; min-height: 40px; padding: .25rem .4rem; color: #ead7ba; font: 600 .78rem/1.35 Arial, sans-serif; }
  body .pce-languages { display: flex; align-items: center; gap: 6px; }
  body .pce-languages button { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; gap: 5px; padding: 4px; border: 1px solid transparent; border-radius: 0; background: none; color: #bcb3a3; font: 600 .7rem/1 Montserrat, Arial, sans-serif; cursor: pointer; }
  body .pce-languages button[aria-pressed="true"], body .pce-languages button:hover { color: #f0d5a6; border-color: rgba(202,166,105,.38); }
  body .pce-languages img { width: 20px; height: 14px; border-radius: 2px; object-fit: cover; }
  body .pce-platforms { grid-column: 1 / -1; grid-row: 2; display: flex; align-items: center; justify-self: center; gap: 6px; max-width: 100%; }
  body .pce-platforms a { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; gap: 7px; padding: 4px 9px; color: #ead7ba; text-align: center; }
  body .pce-platforms i { font-size: 18px; line-height: 1; }
  body .pce-platforms span { font: 600 .8125rem/1.2 Arial, sans-serif; white-space: nowrap; }
  body .pce-mobile-menu, body .pce-mobile-brand, body .pce-mobile-icon { display: none; }
  /* Anchor targets remain visible beneath the sticky header. */
  body .pce-header ~ main [id] { scroll-margin-top: 132px; }

  @media (max-width: 1240px) {
    body .pce-header { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; grid-template-rows: 68px; gap: 0; min-height: 68px; padding: 0 18px; }
    body .pce-brand, body .pce-desktop-nav, body .pce-right, body .pce-platforms { display: none; }
    body .pce-mobile-brand { grid-column: 2; grid-row: 1; display: block; overflow: hidden; color: #d8bd88; font: 700 .95rem/1 Cinzel, Georgia, serif; letter-spacing: .18em; text-align: center; white-space: nowrap; }
    body .pce-mobile-icon { grid-column: 3; grid-row: 1; display: flex; align-items: center; justify-content: flex-end; }
    body .pce-mobile-icon img { display: block; width: 40px; height: 40px; border: 1px solid rgba(202,166,105,.38); border-radius: 50%; object-fit: cover; }
    body .pce-mobile-menu { grid-column: 1; grid-row: 1; display: block; }
    body .pce-mobile-menu > summary { display: flex; width: 44px; height: 44px; flex-direction: column; justify-content: center; gap: 5px; padding: 9px; border: 0; background: transparent; cursor: pointer; list-style: none; }
    body .pce-mobile-menu > summary::-webkit-details-marker { display: none; }
    body .pce-mobile-menu > summary .pce-bar { display: block; width: 25px; height: 2px; background: #dcc393; }
    body .pce-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
    body .pce-panel { position: absolute; top: 100%; right: 0; left: 0; height: calc(100vh - 68px); height: calc(100dvh - 68px); overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; padding: 20px 20px 32px; border-top: 1px solid rgba(202,166,105,.38); background: #0c0808; text-align: center; }
    body .pce-panel-logo { display: block; width: 58px; height: 58px; margin: 0 auto 12px; border: 1px solid rgba(202,166,105,.38); border-radius: 50%; object-fit: cover; }
    body .pce-mobile-nav ul { margin: 0; padding: 0; list-style: none; }
    body .pce-mobile-nav a { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 5px 12px; color: #e8e1d4; font: 600 clamp(.95rem, 3vw, 1.25rem)/1.3 Cinzel, Georgia, serif; letter-spacing: .12em; text-transform: uppercase; }
    body .pce-mobile-platforms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; width: min(100%, 440px); margin: .75rem auto; }
    body .pce-mobile-platforms a { display: inline-flex; min-width: 0; min-height: 44px; align-items: center; justify-content: center; gap: 7px; padding: 6px; border: 1px solid rgba(202,166,105,.38); color: #ead7ba; font: 600 .875rem/1.2 Arial, sans-serif; }
    body .pce-mobile-platforms i { font-size: 1.2em; }
    body .pce-mobile-platforms a:hover { background: rgba(128,32,24,.22); }
    body .pce-mobile-listen { width: min(100%, 440px); margin: 0 auto; }
    body .pce-mobile-listen > summary { justify-content: center; }
    body .pce-mobile-listen .pce-listen-links { position: static; min-width: 0; box-shadow: none; }
    body .pce-mobile-listen .pce-listen-links a { justify-content: center; }
    body .pce-panel .pce-languages { justify-content: center; margin-top: 15px; }
    body .pce-header ~ main [id] { scroll-margin-top: 80px; }
  }
  @media (max-width: 360px) { body .pce-mobile-brand { font-size: .75rem; letter-spacing: .1em; } }
  @media (max-width: 300px) { body .pce-mobile-platforms { grid-template-columns: minmax(0, 1fr); } }
}
@media print { body .pce-header { display: none !important; } }

/* Mesma identidade do cabeçalho clássico; os controladores permanecem intactos. */
@media screen and (min-width: 1241px) {
  body .pce-header {
    grid-template-columns: minmax(0, 1fr) 224px minmax(0, 1fr);
    grid-template-rows: 86px 52px; gap: 0; min-height: 138px; height: 138px;
    padding: 0 clamp(18px, 2vw, 32px);
    border-bottom: 1px solid rgba(190, 151, 91, .52);
    background: linear-gradient(to bottom, transparent 85px, rgba(190,151,91,.28) 85px, rgba(190,151,91,.28) 86px, transparent 86px), linear-gradient(110deg, #0d0a09, #191715 50%, #0d0909);
  }
  body .pce-desktop-nav { grid-column: 1 / -1; grid-row: 1; justify-self: stretch; min-width: 0; }
  body .pce-desktop-nav ul {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) 224px repeat(4, minmax(0, 1fr));
    align-items: center; gap: 0; width: 100%; margin: 0; padding: 0; list-style: none;
  }
  body .pce-desktop-nav li:nth-child(5) { grid-column: 6; }
  body .pce-desktop-nav li:nth-child(6) { grid-column: 7; }
  body .pce-desktop-nav li:nth-child(7) { grid-column: 8; }
  body .pce-desktop-nav li:nth-child(8) { grid-column: 9; }
  body .pce-desktop-nav a {
    display: flex; min-height: 44px; align-items: center; justify-content: center;
    padding: 4px; color: #e2cfaa; font: 600 .7rem/1.25 Montserrat, Arial, sans-serif;
    letter-spacing: .08em; text-align: center; text-transform: uppercase; white-space: normal;
  }
  body .pce-brand {
    grid-column: 2; grid-row: 1; justify-self: center; z-index: 1;
    display: flex; width: 210px; height: 80px; align-items: center; justify-content: center;
  }
  body .pce-brand img { display: block; width: 100%; height: auto; max-height: 80px; border: 0; border-radius: 0; object-fit: contain; }
  body .pce-right { grid-column: 3; grid-row: 2; justify-self: end; z-index: 2; }
  body .pce-platforms { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  body .pce-desktop-nav, body .pce-brand, body .pce-right { align-self: center; }
  body .pce-header ~ main [id] { scroll-margin-top: 150px; }
}
@media screen and (max-width: 1240px) {
  body .pce-header {
    border-bottom: 1px solid rgba(190, 151, 91, .52);
    background: linear-gradient(110deg, #0d0a09, #191715 50%, #0d0909);
  }
  body .pce-mobile-brand {
    display: flex; width: min(100%, 172px); height: 62px; align-items: center;
    justify-content: center; justify-self: center; overflow: visible;
  }
  body .pce-mobile-brand img { display: block; width: 100%; height: auto; max-height: 62px; object-fit: contain; }
  body .pce-mobile-menu, body .pce-mobile-brand { align-self: center; }
  body .pce-panel-logo { width: min(190px, 70vw); height: auto; max-height: 68px; object-fit: contain; border: 0; border-radius: 0; }
}
