/* [Claude - 2026-11-10] Vitrine "expositor" (totem.php): para totem digital, TV e celular. A foto GRANDE do produto ocupa quase toda a tela e só as informações essenciais ficam ao lado
   (tela deitada: TV e totem na bancada) ou embaixo (tela em pé: celular e totem de corredor). Usa o tema do site (Bootstrap + main.css) e, do assets/css/nova-vitrine.css, o
   carrossel de categorias (nv-atalhos) e os botões de controle (nv-ctrl). Tamanhos de texto pelo menor lado da tela (vmin), para valer igual no celular e na TV. */
body.tt {
    --nv-vinho: #8F1736; --nv-escuro: var(--bs-dark, #212529); --nv-grafite: var(--bs-secondary, #6c757d); --nv-preco: var(--bs-danger, #dc3545);
    --nv-texto: var(--bs-body-color, #212529); --nv-borda: var(--bs-border-color, #dee2e6); --nv-fundo: #fff; --nv-fundo-suave: var(--bs-tertiary-bg, #f8f9fa);
    --nv-desabilitado: var(--bs-secondary-bg, #e9ecef); --nv-foco: var(--bs-focus-border-color, rgba(222, 49, 99, .5)); --nv-gutter: 16px;
    --tt-topo: 90px; --tt-palco: 600px; background: #fff; -webkit-tap-highlight-color: transparent;
}
@media (min-width: 768px) { body.tt { --nv-gutter: 24px; } }
body.tt.tt--loja { overflow: hidden; height: 100vh; height: 100dvh; user-select: none; -webkit-user-select: none; }

/* Totem da loja / TV: o topo mostra só a logo (sem menu, sacola, conta nem busca) */
body.tt--loja #header .d-flex.justify-content-center, body.tt--loja #header .navbar-toggler, body.tt--loja #header .offcanvas, body.tt--loja .offcanvas, body.tt--loja .modal { display: none !important; }

/* Categorias logo abaixo do topo fixo (o JS grava --tt-topo com a altura real do topo) */
.tt-nav-topo { padding-top: var(--tt-topo); background: #fff; }
.tt-progresso { height: 3px; background: var(--nv-borda); overflow: hidden; }
.tt-progresso i { display: block; height: 100%; width: 0; background: var(--nv-vinho); }
.tt-progresso i.rodando { animation: tt-barra var(--tt-intervalo, 12s) linear forwards; }
.tt-progresso i.pausada { animation-play-state: paused; }
@keyframes tt-barra { from { width: 0; } to { width: 100%; } }

/* ---- palco: um produto por vez, com entrada suave ---- */
.tt-palco { position: relative; }
.tt-slide { display: none; }
.tt-slide.is-ativo { display: block; animation: tt-entra .6s ease; }
@keyframes tt-entra { from { opacity: 0; } to { opacity: 1; } }
.tt-cena { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(14px, 3vmin, 56px); align-items: center; padding: clamp(8px, 1.6vmin, 24px) clamp(14px, 3vmin, 56px); }
.tt-col-fotos, .tt-col-info { min-width: 0; min-height: 0; }
.tt-fotos .carousel-item img { background: #fff; }
.tt-fotos .tt-sem-foto { display: none; }
.tt-fotos .tt-sem-foto.active { display: flex; align-items: center; justify-content: center; min-height: 320px; background: #f8f9fa; font-size: 5rem; color: var(--nv-borda); }

/* ---- informações essenciais ---- */
.tt-info { display: flex; flex-direction: column; gap: clamp(8px, 1.7vmin, 24px); align-items: flex-start; }
.tt-destaques { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--nv-preco); font-size: clamp(.9rem, 2vmin, 1.5rem); font-weight: 400; }
.tt-cat { margin: 0; color: var(--nv-vinho); font-size: clamp(.85rem, 1.9vmin, 1.4rem); font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.tt-nome { margin: 0; font-size: clamp(1.5rem, 4vmin, 3.6rem); font-weight: 400; line-height: 1.12; color: var(--nv-escuro); }
.tt-preco { margin: 0; color: var(--nv-preco); font-size: clamp(2rem, 6.4vmin, 5.2rem); font-weight: 500; line-height: 1; }
.tt-carac { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tt-carac li { padding: 3px 14px; border: 1px solid var(--nv-borda); border-radius: 999px; color: var(--nv-grafite); font-size: clamp(.85rem, 1.9vmin, 1.4rem); font-weight: 400; }
.tt-rotulo { display: block; margin-bottom: 6px; color: var(--nv-grafite); font-size: clamp(.8rem, 1.7vmin, 1.2rem); letter-spacing: .08em; text-transform: uppercase; }
.tt-tamanhos ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tt-tamanhos li { min-width: clamp(44px, 7vmin, 90px); padding: clamp(6px, 1.2vmin, 16px) clamp(10px, 2vmin, 24px); border: 1px solid var(--nv-escuro); text-align: center; font-size: clamp(1.05rem, 2.8vmin, 2.2rem); font-weight: 400; }
.tt-botao { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 clamp(20px, 3.4vmin, 44px); background: var(--nv-escuro); color: #fff !important; font-size: clamp(1rem, 2.4vmin, 1.8rem); font-weight: 400; text-decoration: none; }
.tt-botao:active { background: #000; }

/* ---- QR code (modo loja) ---- */
.tt-qr { display: flex; align-items: center; gap: clamp(12px, 2vmin, 28px); }
.tt-qr__img { flex: 0 0 auto; width: clamp(104px, 17vmin, 250px); height: clamp(104px, 17vmin, 250px); padding: 6px; background: #fff; border: 1px solid var(--nv-borda); display: flex; align-items: center; justify-content: center; }
.tt-qr__img svg, .tt-qr__img img { display: block; width: 100%; height: 100%; }
.tt-qr__img:empty::after { content: '\F6AE'; font-family: 'bootstrap-icons'; font-size: 3rem; color: var(--nv-borda); } /* ícone qr-code, aparece enquanto o código não é desenhado */
.tt-qr__txt { margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: clamp(.95rem, 2.1vmin, 1.7rem); }
.tt-qr__txt strong { font-weight: 500; font-size: 1.15em; color: var(--nv-vinho); }
.tt-qr__txt small { font-size: .85em; color: var(--nv-grafite); word-break: break-all; }

/* ---- controles (anterior, pausa, próximo, tela cheia) ---- */
.tt-ctrls { position: fixed; right: 12px; bottom: 12px; z-index: 1030; display: inline-flex; gap: 6px; padding: 4px; background: rgba(255,255,255,.92); border: 1px solid var(--nv-borda); transition: opacity .4s ease; }
.tt-ctrls .nv-ctrl { min-width: 40px; height: 40px; padding: 0; }
body.tt--loja .tt-ctrls { top: calc(var(--tt-topo) / 2 - 24px); bottom: auto; right: var(--nv-gutter); } /* no topo vazio, ao lado da logo */
body.tt--loja.tt--quieto .tt-ctrls { opacity: 0; pointer-events: none; } /* na TV/totem os botões somem sozinhos quando ninguém mexe */
body.tt--loja.tt--quieto { cursor: none; }

/* ---- TOTEM / TV (modo loja): a foto usa a altura que sobra na tela, sem rolagem ---- */
body.tt--loja .tt-palco { height: var(--tt-palco); overflow: hidden; }
body.tt--loja .tt-slide { height: var(--tt-palco); }
body.tt--loja .tt-cena { height: 100%; padding-top: 10px; padding-bottom: 12px; }
body.tt--loja .tt-col-fotos { height: 100%; display: flex; align-items: center; justify-content: center; }
body.tt--loja .tt-fotos { width: 100%; }
body.tt--loja .tt-fotos .carousel-item img { width: auto; max-width: 100%; max-height: calc(var(--tt-palco) - 22px); margin: 0 auto; object-fit: contain; }
body.tt--loja .tt-col-info { height: 100%; display: flex; align-items: center; overflow: hidden; }
/* tela em pé (retrato): foto em cima e informações embaixo */
@media (orientation: portrait) {
    body.tt--loja .tt-cena { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 64%) minmax(0, 1fr); align-items: stretch; gap: 8px; }
    body.tt--loja .tt-fotos .carousel-item img { max-height: calc(var(--tt-palco) * .64 - 14px); }
    body.tt--loja .tt-col-info { align-items: flex-start; }
    body.tt--loja .tt-info { gap: clamp(6px, 1.2vmin, 14px); }
}

/* ---- CELULAR / navegador comum (sem modo=loja): a página rola; a foto ocupa a largura toda ---- */
body.tt:not(.tt--loja) .tt-fotos .carousel-item img { width: 100%; max-height: 72vh; object-fit: contain; }
@media (max-width: 767.98px) {
    .tt-cena { grid-template-columns: minmax(0, 1fr); padding-left: 14px; padding-right: 14px; }
    .tt-nome { font-size: 1.6rem; } .tt-preco { font-size: 2.2rem; }
}
.tt-vazio { padding: 60px 0; }
@media (prefers-reduced-motion: reduce) { .tt-slide.is-ativo { animation: none; } .tt-ctrls { transition: none; } }
