/* BENNET HEADLESS V080 — parity PDP Shopify V88 + header flutuante.
 * Última folha carregada; escopada para não alterar home, checkout, coleções. */

/* O header da PDP não é transparente como o hero da HOME. O V079 deixou
 * texto branco sobre fundo branco até o primeiro scroll. */
body.template-product.header-overlay #site-top-bar .site-header,
body.template-product.header-overlay #site-top-bar:not(.is-scrolled) .site-header {
  background: #fff !important;
  border-bottom: 1px solid var(--color-border) !important;
}
body.template-product.header-overlay #site-top-bar .header-logo,
body.template-product.header-overlay #site-top-bar .header-nav__link,
body.template-product.header-overlay #site-top-bar .logo-stack__main,
body.template-product.header-overlay #site-top-bar .logo-stack__sub {color: #1a1a1a !important;filter: none !important;text-shadow:none !important}
body.template-product.header-overlay #site-top-bar .header-icon-btn svg {stroke:#1a1a1a !important}

/* V88 real: o announcement-bar (36px) mora DENTRO do #site-top-bar; o
 * sticky top:-36px do tema engole o announcement no scroll e o .site-header
 * fica colado em top=0 (logo BENNET permanece visível, medição y=20..40).
 * No headless o announcement é irmão ANTERIOR do bar, então top:-36px cortava
 * o TOPO DO PRÓPRIO HEADER — a logo saía da tela (medição y=-22..-2).
 * top:0 reproduz o comportamento real em todas as páginas: o announcement
 * sai pelo scroll normal e o header cola no topo com a logo enquadrada. */
#site-top-bar {top:0 !important}

/* Marcação do V88 exige duas linhas na marca; tema original oculta JEANS
 * no scroll e o header flutuante pode cortar BENNET após a animação. */
#site-top-bar.is-scrolled .header-logo {
  display:flex !important; align-items:center !important; justify-content:center !important;
  min-width:0; min-height:0; overflow:visible; position:relative; z-index:3;
  padding:0 8px; white-space:nowrap;
}
#site-top-bar.is-scrolled .header-logo .logo-stack {
  display:inline-flex; flex-direction:column; align-items:center; justify-content:center;
  overflow:visible; transform:none !important;filter:none !important;
}
#site-top-bar.is-scrolled .header-logo .logo-stack__main {
  display:block; font-size:1.22rem !important;line-height:1.05;
  opacity:1 !important; visibility:visible !important; transform:none !important;
  animation:none !important; filter:none !important; transition:none !important;
}
#site-top-bar.is-scrolled .header-logo .logo-stack__sub {
  display:block; font-size:.43rem !important;line-height:1.15;
  letter-spacing:.56em !important; margin:2px -.56em 0 0 !important;
  max-height:14px !important; opacity:1 !important;visibility:visible !important;
  transform:none !important; filter:none !important;
  pointer-events:auto !important; transition:none !important;
}
#site-top-bar.is-scrolled .site-header__inner {align-items:center; min-width:0}
@media(min-width:1024px){
  #site-top-bar.is-scrolled .site-header__inner {padding-top:7px !important; padding-bottom:0 !important}
  #site-top-bar.is-scrolled .site-header__inner>.header-nav {padding:6px 0 8px !important}
}
@media(max-width:1023px){
  #site-top-bar.is-scrolled .site-header {height:var(--header-height) !important;max-height:none !important;min-height:var(--header-height) !important}
  #site-top-bar.is-scrolled .site-header__inner {height:100%;padding-top:0 !important;padding-bottom:0 !important;grid-template-columns:minmax(0,1fr) minmax(76px,auto) minmax(0,1fr)}
  #site-top-bar.is-scrolled .header-logo {padding-inline:2px}
  #site-top-bar.is-scrolled .header-logo .logo-stack__main {font-size:1.12rem !important}
  #site-top-bar.is-scrolled .header-logo .logo-stack__sub {font-size:.4rem !important}
}

/* Layout igual ao V88: infos e accordions na mesma coluna;
 * avaliações e relacionados são seções independentes após o grid. */
body.template-product .product-page {align-items:start}
body.template-product .product-info {min-width:0}
body.template-product .product-info>.product-accordion {width:100%;margin-top:18px}
body.template-product .product-info>.product-accordion .accordion-content {width:100%}
body.template-product .product-info>.product-accordion .accordion-content__inner {min-width:0; padding:15px 16px !important;}
body.template-product .product-info>.product-accordion .accordion-content__inner p + p {margin-top:12px}
body.template-product .product-info>.product-accordion .faq-q {font-weight:650;margin-top:12px}
body.template-product .product-info>.product-accordion .faq-a {margin-top:5px}

/* Imagem: desktop 5:8 como o V88 v64c; mobile 9:16 como a PDP V88.
 * Nunca recortar modelos: object-fit contain no carrossel inteiro. */
body.template-product .product-gallery__main {scrollbar-width:none; -ms-overflow-style:none}
body.template-product .product-gallery__main::-webkit-scrollbar {display:none}
body.template-product .product-gallery__main [data-gallery-slide] {min-width:0;overflow:hidden;display:flex;align-items:center;justify-content:center;background:var(--color-bg-card)}
body.template-product .product-gallery__main [data-gallery-slide]>img {display:block;width:100%;height:100%;max-width:100%;object-fit:contain !important;object-position:center center !important}
@media(min-width:1024px){
  body.template-product .product-gallery__main {aspect-ratio:5 / 8 !important;max-height:none !important;height:auto !important}
}
@media(max-width:1023px){
  /* V88 real (medição 390px): galeria mobile uniforme em 650px @390 = 3:5,
   * proporção da foto principal do catálogo (900x1501). O site real usa fill e
   * distorce fotos de outras proporções; aqui contain mantém TODAS as peças
   * inteiras (missão: nunca recortar modelos), altura idêntica à do V88. */
  body.template-product .product-gallery__main {aspect-ratio:3 / 5 !important;height:auto !important;max-height:none !important}
  body.template-product .product-info {padding:22px clamp(17px,4.5vw,24px) 30px !important}
}

/* Hierarquia e espaçamentos da ficha V88; sem interferir nas regras de preço. */
body.template-product .product-info__title {font-size:clamp(.9rem,2.79vw,1.2rem);line-height:1.35;margin:7px 0 12px}
body.template-product .product-info__reviews {margin-bottom:12px}
body.template-product .product-info__price-block {margin-bottom:4px;row-gap:3px}
body.template-product .product-info__installments {margin:6px 0 8px}
body.template-product .payment-methods-btn {display:inline-flex;justify-content:center;align-items:center;gap:7px;margin:2px auto 12px;font-size:.78rem}
body.template-product .product-info__sizes {margin:0 0 16px}
body.template-product .product-info__sizes-header {margin:14px 0 10px}
body.template-product .product-info__sizes .size-grid {justify-content:center;gap:10px 9px;margin:0 auto 18px}
body.template-product .product-info__sizes .btn--atc {margin-top:4px}
body.template-product .product-info__sizes .secure-badge {margin:12px 0}
body.template-product .product-info__sizes .bj-progressivo {margin:16px 0 18px}
body.template-product .bj-shipping-estimate {margin:14px auto 0}
@media(prefers-reduced-motion:reduce){
  #site-top-bar .header-logo .logo-stack__main,#site-top-bar .header-logo .logo-stack__sub{animation:none !important;transition:none !important}
}
