/* Cabeçalho da loja no formato da Printi (printi.com.br), usado em todas as
   páginas públicas. Faixa vermelha fina (3px), linha principal 88px (busca e ícones 48px),
   categorias 54px, conteúdo 1360px. Fica fixo no topo ao rolar, com fundo de vidro.
   Os !important vencem as regras por ID de storefront.css/home-bevel.css/styles.css. */
@font-face{font-family:AlphaHeaderInter;src:url('../assets/storefront/fonts/Inter-SemiBold.woff2') format('woff2');font-weight:600;font-style:normal;font-display:swap}

body .ph-header{
  --ph-ink:#1a1a1a;--ph-muted:#4d4d4d;--ph-line:#e6e6e6;--ph-accent:#c12623;
  position:sticky;top:0;z-index:1000;background:rgba(255,255,255,.62);
  -webkit-backdrop-filter:blur(18px) saturate(1.5);backdrop-filter:blur(18px) saturate(1.5);
  font-family:-apple-system,BlinkMacSystemFont,AlphaHeaderInter,Inter,'Segoe UI',Arial,sans-serif;
}
body .ph-shell{width:min(1360px,calc(100% - 32px));margin-inline:auto}

/* Faixa preta */
/* Faixa vermelha fina no topo, só decorativa (os links que ficavam nela estão no rodapé). */
body .ph-topbar{height:3px;background:var(--ph-accent)}

/* Linha principal */
body .ph-main{display:flex;align-items:center;gap:16px;height:88px}
body .ph-logo{flex:0 0 auto;display:block;margin-right:40px}
body .ph-logo img{display:block;height:30px;width:auto}

body .ph-header .ph-search{display:flex!important;align-items:center;flex:1 1 auto;min-width:0;max-width:none!important;width:auto!important;height:48px!important;margin:0!important;padding:0 4px 0 18px!important;border:1px solid rgba(0,0,0,.12)!important;border-radius:999px!important;background:rgba(255,255,255,.55)!important;box-shadow:none!important;overflow:hidden}
body .ph-header .ph-search input{flex:1 1 auto;min-width:0;width:auto!important;height:100%!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;outline:0;color:var(--ph-ink)!important;font-size:15px!important}
body .ph-header .ph-search input::placeholder{color:#6b6b6b;opacity:1}
body .ph-header .ph-search:focus-within{border-color:#8c8c8c!important}
body .ph-header .ph-search button{flex:0 0 32px!important;width:32px!important;min-width:32px!important;height:32px!important;padding:0!important;border:0!important;border-radius:50%!important;background:var(--ph-accent)!important;color:#fff!important;font-size:13px!important;display:grid;place-items:center;cursor:pointer}

body .ph-actions{display:flex;align-items:center;gap:16px;flex:0 0 auto}
body .ph-header .ph-icon{position:relative;display:grid!important;place-items:center;width:48px!important;height:48px!important;padding:0!important;border:1px solid rgba(0,0,0,.12)!important;border-radius:50%!important;background:rgba(255,255,255,.55)!important;color:var(--ph-ink)!important;font-size:17px!important;line-height:1!important;text-decoration:none}
body .ph-header #open-login-modal i{display:inline-block!important}
body .ph-header .ph-icon:hover{border-color:#8c8c8c!important}
body .ph-header .ph-cart{display:none!important}
body .ph-header.alpha-header--has-cart .ph-cart{display:grid!important}
/* Qualquer pessoa com item no carrinho vê o ícone (cart.js marca --cart-filled). */
body .ph-header.alpha-header--cart-filled .ph-cart{display:grid!important}
body .ph-badge{position:absolute;top:-4px;right:-4px;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--ph-accent);color:#fff;font-size:11px;font-weight:700;line-height:18px;text-align:center}
body .ph-header .nav-user-menu.is-visible{display:flex!important;align-items:center;gap:12px!important;flex-wrap:nowrap}
body .ph-header .nav-user-menu :is(a,button){color:var(--ph-ink)!important;font-size:13px!important;background:none!important;border:0;white-space:nowrap;cursor:pointer}

/* Linha de categorias */
body .ph-cats{position:relative;border-bottom:1px solid rgba(0,0,0,.08)}
body .ph-cats-inner{display:flex;align-items:stretch;justify-content:space-between;height:54px}
body .ph-cats-inner>a,body .ph-header .ph-all-btn{display:flex!important;align-items:center;justify-content:center;padding:0 12px!important;color:var(--ph-muted)!important;font-size:14px!important;font-weight:400!important;line-height:1.25!important;text-align:center;text-decoration:none;white-space:nowrap}
body .ph-cats-inner>a:hover{color:var(--ph-ink)!important}
body .ph-header .dropdown-container{position:static!important;display:flex!important;width:auto!important;margin:0!important}
body .ph-header #all-products-btn{width:auto!important;min-height:0!important;height:100%!important;padding-left:16px!important;border:0!important;border-radius:0!important;background:none!important;color:var(--ph-ink)!important;font-weight:700!important;cursor:pointer}
body .ph-cats-inner>a.ph-cats-highlight{background:var(--ph-accent);color:#fff!important;font-weight:600!important;padding:0 16px!important}
body .ph-header #mega-menu{top:100%!important;left:max(16px,calc((100% - 1360px) / 2))!important;right:auto!important;transform:none!important;margin-top:0!important;border-radius:0 0 18px 18px!important}

/* Páginas com o cabeçalho flutuante antigo reservavam espaço no topo; o novo ocupa o fluxo. */
body.alpha-storefront:has(> .ph-header){padding-top:0!important}

@media (max-width:1100px){
  body .ph-logo{margin-right:16px}
  body .ph-cats-inner{justify-content:flex-start;overflow-x:auto;scrollbar-width:none}
  body .ph-cats-inner::-webkit-scrollbar{display:none}
}

@media (max-width:768px){
  body .ph-topbar{display:none}
  body .ph-main{flex-wrap:wrap;height:auto;padding:12px 0;gap:12px}
  body .ph-logo{margin-right:auto}
  body .ph-logo img{height:26px}
  body .ph-header .ph-search{order:3;flex:1 0 100%;height:44px!important}
  body .ph-header .ph-icon{width:40px!important;height:40px!important;font-size:15px!important}
  body .ph-actions{gap:10px}
  body .ph-header .nav-user-menu.is-visible{gap:6px!important}
  body .ph-header .nav-user-menu .nav-admin-btn{display:none!important}
  body .ph-cats-inner{height:46px}
  body .ph-header #mega-menu{left:0!important;width:100%!important;max-height:70dvh!important;border-radius:0 0 16px 16px!important}
}

/* Algumas páginas estilizam esses IDs com outra cara (botão preto, fonte da página):
   o cabeçalho fica igual em todas. */
body .ph-header :is(input,button,a){font-family:inherit!important}
body .ph-header #open-login-modal.ph-icon{background:rgba(255,255,255,.55)!important;color:var(--ph-ink)!important;border:1px solid rgba(0,0,0,.12)!important;border-radius:50%!important;padding:0!important;line-height:1!important}
body .ph-header #open-login-modal.ph-icon:hover{border-color:#8c8c8c!important}
body .ph-header #all-products-btn{font-size:16px!important;letter-spacing:0!important}
body .ph-header .ph-cats-inner>a{letter-spacing:0!important}

/* Logado: some o ícone de entrar e o menu do usuário entra no estilo do cabeçalho
   (login-modal.css pintava o nome de branco, que sumia no fundo claro). */
body .ph-header:is(.alpha-header--admin,.alpha-header--student,.alpha-header--customer) #open-login-modal{display:none!important}
body .ph-header .nav-user-menu.is-visible{gap:16px!important}
body .ph-header .nav-user-greeting{display:inline-flex!important;align-items:center;gap:6px;padding:0!important;color:var(--ph-ink)!important;font-size:14px!important}
body .ph-header .nav-user-greeting :is(i,strong){color:var(--ph-ink)!important;opacity:1}
body .ph-header .nav-user-greeting strong{font-weight:600}
body .ph-header .nav-admin-btn.is-visible{display:inline-flex!important;align-items:center;gap:6px;height:40px;padding:0 16px!important;border:1px solid rgba(0,0,0,.12)!important;border-radius:999px!important;background:rgba(255,255,255,.55)!important;box-shadow:none!important;color:var(--ph-ink)!important;font-size:13px!important;font-weight:600!important;transform:none!important}
body .ph-header .nav-admin-btn.is-visible:hover{border-color:#8c8c8c!important;filter:none}
body .ph-header .nav-logout-btn{display:inline-flex!important;align-items:center;gap:6px;padding:0!important;color:var(--ph-muted)!important;font-size:13px!important}
body .ph-header .nav-logout-btn:hover{color:var(--ph-ink)!important}
/* theme-graphite.css pinta esses IDs (Sair preto, ícones brancos): por ID para vencer. */
body .ph-header #nav-logout-btn{background:none!important;border:0!important;box-shadow:none!important;color:var(--ph-muted)!important;padding:0!important;border-radius:0!important}
body .ph-header #nav-logout-btn:hover{background:none!important;color:var(--ph-ink)!important}
body .ph-header :is(#nav-logout-btn,#nav-admin-btn,#nav-user-account-link) i{display:inline-block!important;color:inherit!important;opacity:1!important}
body .ph-header #nav-admin-btn.is-visible{background:rgba(255,255,255,.55)!important;background-image:none!important;color:var(--ph-ink)!important;border:1px solid rgba(0,0,0,.12)!important}

/* Foco em toda a loja sem o contorno azul (storefront.css usava #4667ac e o navegador
   o padrão dele). Fica um anel cinza suave; quem navega pelo teclado continua vendo o foco. */
body :is(a,button,input,select,textarea,summary,[tabindex]):focus{outline:none!important}
body :is(a,button,summary,[tabindex]):focus-visible{outline:2px solid rgba(20,24,32,.28)!important;outline-offset:2px!important}
body :is(input:not([type=checkbox]):not([type=radio]),select,textarea):not(:is(.ph-search,.cg-search) *):focus{
  border-color:rgba(20,24,32,.3)!important;box-shadow:0 0 0 4px rgba(20,24,32,.06)!important}
body input:is([type=checkbox],[type=radio]):focus-visible{outline:2px solid rgba(20,24,32,.28)!important;outline-offset:2px!important}

/* Menu no formato da Printi (js/site-menu.js): painel sob a barra de categorias,
   página escurecida atrás, traço preto sob o item aberto. */
body .ph-header .ph-cats-inner>[data-pm]{position:relative}
body .ph-header .ph-cats-inner>[data-pm].is-active{color:var(--ph-ink)!important}
body .ph-header .ph-cats-inner>[data-pm].is-active::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:3px;background:var(--ph-ink)}
.pm-overlay{position:fixed;inset:0;z-index:999;background:rgba(20,20,22,.42);animation:pm-fade .2s ease}
.pm-overlay[hidden]{display:none}
.pm-panel{position:absolute;left:0;right:0;top:100%;z-index:5;width:min(1360px,calc(100% - 32px));margin:0 auto;animation:pm-drop .2s ease}
.pm-panel[hidden]{display:none}
.pm-inner{display:inline-block;max-width:100%;background:#fff;border-radius:0 0 18px 18px;box-shadow:0 24px 48px -20px rgba(0,0,0,.35);vertical-align:top;overflow:hidden}
.pm-inner--all{display:grid;grid-template-columns:260px auto;width:max-content;max-width:100%}
.pm-side{padding:20px 12px 24px 16px;border-right:1px solid #eee;background:#fafafa}
.pm-side ul{display:grid;gap:2px;margin:0;padding:0;list-style:none}
.pm-cat{display:flex;align-items:center;gap:12px;min-height:48px;padding:0 12px 0 8px;border-radius:12px;color:#1a1a1a!important;font-size:15px;text-decoration:none;transition:background .15s}
.pm-cat:hover,.pm-cat.is-on{background:#fff}
.pm-cat.is-on{font-weight:600;box-shadow:0 1px 3px rgba(0,0,0,.06)}
.pm-cat-ico{display:grid;flex:0 0 32px;place-items:center;width:32px;height:32px;border:1px solid #ececec;border-radius:9px;background:#fff;color:#4d4d4d;font-size:13px;transition:background .15s,color .15s,border-color .15s}
.pm-cat.is-on .pm-cat-ico{border-color:#c12623;background:#c12623;color:#fff}
.pm-cat-label{flex:1;min-width:0}
.pm-cat-arrow{font-size:12px;opacity:0;transition:opacity .15s,transform .15s}
.pm-cat.is-on .pm-cat-arrow,.pm-cat:hover .pm-cat-arrow{opacity:1}
.pm-cat:hover .pm-cat-arrow{transform:translateX(2px)}
.pm-side .pm-all-link{margin-left:8px}
.pm-all-link,.pm-more{display:inline-block;margin-top:14px;color:#1a1a1a!important;font-size:16px;text-decoration:underline;text-underline-offset:4px}
.pm-all-link:hover,.pm-more:hover{color:#c12623!important}
/* Conteúdo da categoria: título, lista com miniatura (e preço quando à venda) e link para todos. */
.pm-cols{padding:22px 24px 24px}
.pm-main{min-width:260px}
.pm-title{margin:0 0 10px 8px;font-size:17px;font-weight:600;letter-spacing:-.01em;line-height:1.3;color:#1a1a1a}
.pm-list{display:grid;grid-template-columns:minmax(0,270px);gap:2px 8px;margin:0;padding:0;list-style:none}
.pm-list--2{grid-template-columns:repeat(2,minmax(0,250px))}
.pm-item{display:flex;align-items:center;gap:12px;padding:6px 8px;border-radius:10px;color:#1a1a1a!important;text-decoration:none;transition:background .15s}
.pm-item:hover,.pm-item:focus-visible{background:#f4f4f5}
.pm-thumb{flex:0 0 40px;width:40px;height:40px;border-radius:8px;overflow:hidden;background:#f1f2f4}
.pm-thumb img{display:block;width:100%;height:100%;object-fit:cover}
.pm-item-text{display:flex;flex:1;flex-direction:column;min-width:0}
.pm-item-name{display:-webkit-box;overflow:hidden;font-size:14px;font-weight:500;line-height:1.3;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.pm-item-name::first-letter{text-transform:uppercase}
.pm-item-sub{margin-top:2px;font-size:12px;color:#6b6b6b}
.pm-item .pm-badge{padding:3px 7px;font-size:11px}
.pm-link{display:inline-flex;align-items:center;gap:6px;margin:12px 0 0 8px;color:#1a1a1a!important;font-size:14px;font-weight:600;text-decoration:none}
.pm-link:hover{color:#c12623!important}
.pm-link i{font-size:11px;transition:transform .15s}
.pm-link:hover i{transform:translateX(3px)}
.pm-badge{flex:0 0 auto;padding:4px 8px;border-radius:4px;font-style:normal;font-size:13px;font-weight:500;color:#9b1c1a;background:rgba(193,38,35,.1)}
.pm-empty{padding:12px 4px;min-width:260px}
.pm-empty strong{font-size:17px;font-weight:500;color:#1a1a1a}
.pm-empty p,.pm-note{margin:10px 0 0;font-size:15px;color:#6b6b6b}
@keyframes pm-fade{from{opacity:0}to{opacity:1}}
@keyframes pm-drop{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
@media (max-width:768px){
  .pm-panel{width:100%}
  .pm-inner,.pm-inner--all{display:block;width:100%;max-height:72vh;overflow-y:auto}
  .pm-side{padding:12px 16px;border-right:0;border-bottom:1px solid #eee}
  .pm-cols{padding:12px 16px 20px}
  .pm-main{min-width:0}
  .pm-list,.pm-list--2{grid-template-columns:minmax(0,1fr)}
  .pm-inner{border-radius:0}
}
@media (prefers-reduced-motion:reduce){.pm-overlay,.pm-panel{animation:none}}
body .ph-header.pm-open{background:#fff}
.pm-all-link,.pm-more{text-decoration:underline!important;text-decoration-thickness:1px!important}

/* ===== Responsivo (07/10): celular e tablet. Desktop (>1100px) não muda. ===== */
body .ph-header .ph-acct-btn{display:none!important}
/* Linha de categorias rolável: esmaecido indicando continuidade */
body .ph-cats-inner.has-more-right{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 40px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 40px),transparent)}
body .ph-cats-inner.has-more-left.has-more-right{-webkit-mask-image:linear-gradient(90deg,transparent,#000 32px,#000 calc(100% - 40px),transparent);mask-image:linear-gradient(90deg,transparent,#000 32px,#000 calc(100% - 40px),transparent)}
body .ph-cats-inner.has-more-left:not(.has-more-right){-webkit-mask-image:linear-gradient(90deg,transparent,#000 32px);mask-image:linear-gradient(90deg,transparent,#000 32px)}

/* Tablet (769–1100): busca flexível, conta logada compacta */
@media (max-width:1100px) and (min-width:769px){
  body .ph-main{gap:14px}
  body .ph-logo{margin-right:8px}
  body .ph-header .nav-user-menu.is-visible .nav-admin-btn.is-visible span,
  body .ph-header .nav-user-menu.is-visible .nav-admin-btn.is-visible{padding:0 12px!important}
  body .ph-header .nav-user-greeting{max-width:150px}
  body .ph-header .nav-user-greeting strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:90px;display:inline-block;vertical-align:bottom}
  body .ph-cats-inner>a,body .ph-header .ph-all-btn{padding:0 14px!important}
}

/* Celular e tablet estreito (≤768) */
@media (max-width:768px){
  body .ph-main{display:grid;grid-template-columns:1fr auto;align-items:center;gap:10px 12px;height:auto;padding:10px 0 12px}
  body .ph-logo{margin:0}
  body .ph-logo img{height:24px}
  body .ph-header .ph-search{grid-column:1 / -1;order:0;height:44px!important}
  body .ph-header .ph-search input{font-size:16px!important}
  body .ph-header .ph-search button{flex-basis:34px!important;width:34px!important;height:34px!important}
  body .ph-actions{position:relative;gap:8px}
  body .ph-header .ph-icon{width:44px!important;height:44px!important;font-size:16px!important}
  /* Conta logada: ícone + painel */
  body .ph-header:is(.alpha-header--admin,.alpha-header--student,.alpha-header--customer) .ph-acct-btn{display:grid!important}
  body .ph-header .nav-user-menu.is-visible{display:none!important}
  body .ph-header.acct-open .nav-user-menu.is-visible{display:flex!important;position:absolute;z-index:20;top:calc(100% + 8px);right:0;flex-direction:column;align-items:stretch;gap:2px!important;
    width:min(260px,calc(100vw - 32px));padding:8px;border-radius:16px;background:rgba(255,255,255,.96);border:1px solid rgba(20,24,32,.08);
    box-shadow:0 24px 48px -18px rgba(20,24,32,.4);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px)}
  body .ph-header.acct-open .nav-user-menu.is-visible>*{display:flex!important;align-items:center;gap:10px!important;min-height:44px;padding:0 12px!important;border-radius:10px;font-size:15px!important;width:100%;text-align:left;justify-content:flex-start}
  body .ph-header.acct-open .nav-user-menu.is-visible>*:hover{background:rgba(20,24,32,.05)!important}
  body .ph-header.acct-open .nav-user-menu .nav-admin-btn:not(.is-visible){display:none!important}
  body .ph-header.acct-open .nav-user-menu .nav-admin-btn.is-visible{height:auto;border:0!important;background:none!important;box-shadow:none!important}
  body .ph-header.acct-open .nav-user-greeting strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  /* Categorias: espaçamento uniforme, rolagem só aqui */
  body .ph-cats-inner{height:48px;gap:4px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;justify-content:flex-start}
  body .ph-cats-inner::-webkit-scrollbar{display:none}
  body .ph-cats-inner>a,body .ph-header .ph-all-btn{flex:0 0 auto;padding:0 12px!important;font-size:15px!important}
  body .ph-header .ph-all-btn{padding-left:0!important}
  body .ph-cats-inner>a.ph-cats-highlight{padding:0 14px!important}
}
@media (max-width:768px){
  body .ph-logo{grid-column:1;grid-row:1}
  body .ph-actions{grid-column:2;grid-row:1}
  body .ph-header .ph-search{grid-row:2}
}
@media (max-width:768px){
  /* storefront.css limita .nav-user-menu a 120px e o vira grid em ≤700px */
  body .ph-header.acct-open .nav-user-menu.is-visible{max-width:none!important;grid-template-columns:none!important}
  body .ph-header.acct-open .nav-user-menu.is-visible>*{white-space:nowrap!important;grid-column:auto!important;line-height:1.2!important;min-width:0}
  body .ph-header.acct-open .nav-user-greeting{overflow:hidden}
}
@media (max-width:768px){
  body .ph-header.acct-open :is(#nav-user-account-link,#nav-admin-btn.is-visible,#nav-logout-btn){min-height:44px!important;height:auto!important;padding:0 12px!important;border:0!important;border-radius:10px!important;
    background:none!important;box-shadow:none!important;font-size:15px!important;font-weight:500!important;color:#1a1a1a!important}
  body .ph-header.acct-open :is(#nav-user-account-link,#nav-admin-btn.is-visible,#nav-logout-btn):hover{background:rgba(20,24,32,.05)!important}
  body .ph-header.acct-open #nav-user-account-link{font-weight:600!important;border-bottom:1px solid rgba(20,24,32,.08)!important;border-radius:10px 10px 0 0!important;margin-bottom:4px}
  body .ph-header.acct-open #nav-logout-btn{color:#6b6f76!important}
}

/* Tablet (769–1100): conta logada também vira ícone + painel (o menu em linha espremia a busca) */
@media (max-width:1100px) and (min-width:769px){
  body .ph-actions{position:relative}
  body .ph-header:is(.alpha-header--admin,.alpha-header--student,.alpha-header--customer) .ph-acct-btn{display:grid!important}
  body .ph-header .nav-user-menu.is-visible{display:none!important}
  body .ph-header.acct-open .nav-user-menu.is-visible{display:flex!important;position:absolute;z-index:20;top:calc(100% + 8px);right:0;flex-direction:column;align-items:stretch;gap:2px!important;
    width:260px;max-width:none!important;padding:8px;border-radius:16px;background:rgba(255,255,255,.96);border:1px solid rgba(20,24,32,.08);box-shadow:0 24px 48px -18px rgba(20,24,32,.4)}
  body .ph-header.acct-open .nav-user-menu .nav-admin-btn:not(.is-visible){display:none!important}
  body .ph-header.acct-open :is(#nav-user-account-link,#nav-admin-btn.is-visible,#nav-logout-btn){display:flex!important;align-items:center;gap:10px!important;width:100%;min-height:44px!important;height:auto!important;padding:0 12px!important;
    border:0!important;border-radius:10px!important;background:none!important;box-shadow:none!important;font-size:15px!important;font-weight:500!important;color:#1a1a1a!important;white-space:nowrap!important;max-width:none}
  body .ph-header.acct-open :is(#nav-user-account-link,#nav-admin-btn.is-visible,#nav-logout-btn):hover{background:rgba(20,24,32,.05)!important}
  body .ph-header.acct-open #nav-user-account-link{font-weight:600!important;border-bottom:1px solid rgba(20,24,32,.08)!important;margin-bottom:4px}
  body .ph-header.acct-open #nav-user-account-link strong{max-width:none}
  body .ph-header.acct-open #nav-logout-btn{color:#6b6f76!important}
}
/* Painel "⋯" do cabeçalho antigo (mobile-overflow-menu.js): sem botão no cabeçalho novo,
   ficava fechado fora da tela à direita e alargava a página. */
#mob-overflow-overlay:not(.is-open){display:none!important}
