/* Loja 100% para celular (carrega por último em todas as páginas).
   - toque: todo botão/link com área de pelo menos 44px (recomendação Apple/Google);
   - leitura: nenhum texto abaixo de 11px no celular;
   - iPhone: campos com 16px (senão o Safari dá zoom sozinho ao tocar);
   - toque rápido, sem "flash" cinza e sem efeito de mouse preso depois do toque. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
a,button,label,summary,[role=button],input,select,textarea{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
button:active,.btn:active,a.btn:active,.category-card:active,.chat-fab:active,.bottom-nav>*:active{filter:brightness(.96)}

/* Com uma janela aberta (produto, carrinho, categorias, contato), a página de trás não rola junto */
html:has(dialog[open]){overflow:hidden}
dialog{overscroll-behavior:contain}
@media (max-width:760px){html:has(body.chat-aberto){overflow:hidden}}

/* Área de toque invisível maior, sem mudar o desenho (bolinhas do banner, cores, coração) */
.pp-toque,.banner-dots button,[data-studio-color],.favorite-button{position:relative}
.banner-dots button::after,[data-studio-color]::after{content:'';position:absolute;inset:-11px -10px}

@media (max-width:760px){
 /* ---------- iPhone não dá zoom ao tocar no campo ---------- */
 input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea{font-size:16px!important}

 /* ---------- Textos legíveis ---------- */
 body .eyebrow,body .banner-copy .eyebrow{font-size:11px!important;letter-spacing:1.2px}
 body .banner-caption{font-size:12px!important}
 body .banner-image-note{font-size:10px!important}
 body .topline,body .topline b,body #topline-text{font-size:12px!important}
 body .promises b{font-size:13.5px!important}
 body .promises small{font-size:12px!important;line-height:1.35}
 body .format-tag{font-size:11px!important;padding:3px 8px!important}
 body .product-content small{font-size:11.5px!important}
 body .product-content p{font-size:13.5px!important;line-height:1.45}
 body .product-content .card-add,body .card-add{font-size:14px!important;min-height:44px}
 body .studio-categories button,body .studio-preview p{font-size:13px!important}
 body .studio-preview small,body .studio-preview-tag,body .creative-studio button small{font-size:12px!important}
 body .creative-studio button,body .search button{min-height:44px;min-width:44px}
 body .filters-panel fieldset label,body .favorite-filter,body .results-toolbar label{font-size:14px!important}
 body .illustration-note{font-size:12px!important}
 body .bottom-nav>* span:not([data-icon]){font-size:11px!important}
 body .footer-main p,body .footer-bottom,body footer small{font-size:12.5px!important}

 /* ---------- Toque: 44px ---------- */
 body .search button[type=submit],body .search button:not(.search-clear){min-width:44px;min-height:44px}
 body .banner-controls button{width:44px!important;height:44px!important}
 body .favorite-button{width:44px!important;height:44px!important}
 body .section-title>a{display:inline-flex;align-items:center;min-height:44px;padding:0 4px}
 body .studio-categories button{min-height:44px}
 body [data-studio-color]{min-width:36px;min-height:36px}
 body #clear-filters,body .filter-heading button{min-height:44px;padding:0 12px}
 body .product-content .product-title{min-height:44px;display:flex;align-items:center;text-align:left}
 body .payments-links a{display:inline-flex;align-items:center;min-height:44px}
 body .category-nav a,body .category-nav button,body .header-nav a,body .store-nav a,body nav a[href="#como-funciona"]{display:inline-flex;align-items:center;min-height:44px}
 body .footer-main a,body .footer-main button{display:flex;align-items:center;min-height:44px;padding:0!important}
 body .page-footer a{display:inline-block;padding:12px 6px;min-height:44px;box-sizing:border-box}
 body .faq summary{min-height:52px;display:flex;align-items:center}
 body .chat-fab{min-width:56px;min-height:56px}

 /* ---------- Menu azul do topo: tudo visível (nada escondido numa faixa que rola) ----------
    No celular ficam 3 botões inteiros; "Categorias" abre a lista completa (formatos + todas as categorias). */
 body .store-nav .wrap{display:grid!important;grid-template-columns:1.3fr 1fr 1fr;gap:6px;overflow:visible!important;padding:7px 0!important;width:calc(100% - 24px)!important}
 body .store-nav .wrap>*:not(.departments):not([data-format]){display:none!important}
 body .store-nav .wrap>button{display:flex!important;align-items:center;justify-content:center;min-height:40px;padding:0 6px!important;margin:0!important;border-radius:11px;
  background:#ffffff1f!important;border:1px solid #ffffff33!important;color:#fff;font-size:0!important;white-space:nowrap}
 body .store-nav .wrap>button::before{font:700 13.5px/1 'DM Sans',sans-serif;letter-spacing:.1px}
 body .store-nav .departments::before{content:'☰  Categorias'}
 body .store-nav [data-format=digital]::before{content:'Digitais'}
 body .store-nav [data-format=impresso]::before{content:'Impressos'}
 body .store-nav .wrap>button[aria-pressed=true],body .store-nav .wrap>button.active{background:#fff!important;color:#1747c8!important}
 body .store-nav .wrap>button::after{display:none!important}

 /* ---------- Categorias: grade com todas visíveis (sem barra de rolagem, sem cartão cortado) ---------- */
 body .category-grid{display:grid!important;grid-auto-flow:row!important;grid-auto-columns:auto!important;grid-template-columns:repeat(auto-fill,minmax(76px,1fr))!important;
  overflow:visible!important;margin:0!important;padding:6px 2px 10px!important;gap:12px 10px!important}
 body .category-card{padding:10px 4px 9px!important;gap:6px!important;min-width:0!important;transform:none!important;border-radius:16px!important}
 body .category-card .category-thumb{width:46px!important;height:46px!important}
 body .category-card .category-thumb svg{width:42px!important;height:42px!important}
 body .category-card b{font-size:12px!important;line-height:1.2;font-weight:700}
 body .category-card::after{display:none!important}

 /* Faixas que ainda rolam para o lado (campanha, fotos do produto): sem barra feia, parando no cartão certo */
 .dc-row,.gallery-thumbs,.studio-categories{scrollbar-width:none;scroll-snap-type:x mandatory}
 .dc-row::-webkit-scrollbar,.gallery-thumbs::-webkit-scrollbar,.studio-categories::-webkit-scrollbar{display:none}
 .dc-row>*,.gallery-thumbs>*{scroll-snap-align:start}

 /* Conteúdo nunca fica escondido atrás da "barrinha" do iPhone */
 .page,.page-footer{padding-bottom:max(24px,env(safe-area-inset-bottom))}

 /* Imagens e tabelas nunca passam da tela */
 img,video,svg{max-width:100%}
 table{display:block;max-width:100%;overflow-x:auto}
}

/* ---------- Tablet (761 a 1180px): menu numa linha só (itens mais justos; se ainda faltar espaço, desliza para o lado) ---------- */
@media (min-width:761px) and (max-width:1180px){
 body .store-nav .wrap{flex-wrap:nowrap!important;justify-content:safe center;overflow-x:auto!important;overflow-y:hidden!important;column-gap:2px!important;row-gap:0!important;scrollbar-width:none}
 body .store-nav .wrap::-webkit-scrollbar{display:none}
 body .store-nav .wrap>*{flex:none;padding-left:5px!important;padding-right:5px!important}
 body .store-nav .wrap>a[href="#como-funciona"]{display:none!important}
 body .store-nav .nav-help{display:none!important}
}

/* ---------- Crédito de quem desenvolveu o site (rodapé) ---------- */
.credito-dev{display:inline-block;padding:8px 2px;color:inherit!important;font-weight:700;text-decoration:underline;text-underline-offset:3px}
.credito-dev:hover{color:#1747c8!important}
.page-footer .credito{display:block;margin-top:2px;font-size:12.5px;opacity:.85}
@media (max-width:760px){.footer-bottom{flex-direction:column;align-items:flex-start;gap:2px}.credito-dev{padding:12px 2px}}
/* No computador o botão "Atendimento" fica fixo no canto de baixo: o fim do rodapé ganha espaço para nada ficar atrás dele */
@media (min-width:761px){body .footer-bottom{padding-bottom:96px!important}}

/* ---------- Convite "tenha a loja no celular" (assets/js/pwa.js) ---------- */
.app-convite{position:fixed;left:12px;right:12px;bottom:calc(76px + env(safe-area-inset-bottom));z-index:47;display:flex;align-items:center;gap:12px;padding:12px 12px 12px 14px;
 background:#fffdf8;border:1px solid #ebe4d6;border-radius:18px;box-shadow:0 14px 34px #10204a33;color:#172C50;font:14px/1.4 'DM Sans',system-ui,sans-serif;
 transform:translateY(130%);opacity:0;transition:transform .35s cubic-bezier(.2,.8,.2,1),opacity .3s}
.app-convite.aberto{transform:none;opacity:1}
.app-convite img{flex:none;border-radius:12px;box-shadow:0 2px 6px #0000001f}
.app-convite div{flex:1;min-width:0}
.app-convite b{display:block;font-size:14.5px}
.app-convite span{font-size:13px;color:#55637e}
.app-convite span b{display:inline;font-size:13px;color:#172C50}
.app-sim{flex:none;min-height:44px;padding:0 16px;border:0;border-radius:12px;background:#f0087a;color:#fff;font:700 14px 'DM Sans',sans-serif;box-shadow:0 3px 0 #b00058}
.app-x{flex:none;width:44px;height:44px;border:0;background:none;color:#6a7891;font-size:24px;line-height:1}
.modo-app .chat-fab{bottom:calc(76px + env(safe-area-inset-bottom))}
@media (prefers-reduced-motion:reduce){.app-convite{transition:none}}

/* Celular/tablet (sem mouse): efeitos de "passar o mouse" não ficam presos depois do toque */
@media (hover:none){
 article.product:hover,.category-card:hover,.how-grid article:hover,.faq details:hover,.ct2-assunto:hover,.ct2-exclusiva:hover,.ct2-solta:hover,.toc a:hover,.saved-orders button:hover,.choice:hover{transform:none!important}
 .category-card:nth-child(odd):hover{transform:rotate(-1.2deg)!important}
 .category-card:nth-child(even):hover{transform:rotate(1deg)!important}
 main .btn:hover,.ct2-enviar:hover,.ct2-btn:hover{transform:none}
}
@media (hover:none) and (max-width:760px){
 .category-card:nth-child(odd):hover,.category-card:nth-child(even):hover{transform:none!important}
}

/* ---------- Contadores do topo (favoritos/carrinho) somem quando estão em zero ---------- */
.header-action b[hidden]{display:none!important}

/* ---------- Celular: banner mais baixo e controles longe do botão de Atendimento ---------- */
@media (max-width:760px){
 body .banner-photo{height:200px!important}
 body .banner-copy p{margin:14px 0 16px!important}
 body .banner-navigation{position:static!important;display:flex!important;justify-content:flex-start!important;gap:12px;margin:12px 0 0;padding:0 64px 0 4px;width:auto!important}
 body .banner-image-note{bottom:12px!important;left:12px!important;right:auto!important}
}
