/* ==========================================================================
   Tema "moderno" — componentes extras e acabamento
   (acesso rápido, barra inferior, toasts, esqueletos, animações)
   ========================================================================== */

/* ---------- Títulos de seção mais marcantes ---------- */
.tm-eyebrow {
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--tm-primary-50);
    letter-spacing: .06em;
    font-size: 12px;
}

.tm-section__head .tm-section__titulo::after {
    content: "";
    display: block;
    width: 48px;
    height: 4px;
    margin-top: 14px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--tm-primary), color-mix(in srgb, var(--tm-primary) 40%, #fff));
}

.tm-section__head:not(.tm-section__head--left):not(.tm-section__head--row) .tm-section__titulo::after {
    margin-inline: auto;
}

/* Botão primário com leve brilho */
.tm-btn--primary {
    background-image: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0));
}

/* ---------- Hero ---------- */
.tm-hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 90px;
    background: linear-gradient(0deg, rgba(2, 6, 23, .35), rgba(2, 6, 23, 0));
    pointer-events: none;
    z-index: 4;
}


/* ---------- Acesso rápido (cartões; colunas = quantidade de itens, definida no Blade) ---------- */
.tm-atalhos {
    position: relative;
    z-index: 6;
    padding-top: 28px;
}

.tm-atalhos__grid {
    display: grid;
    grid-template-columns: repeat(var(--tm-atalhos-cols, 4), minmax(0, 1fr));
    gap: 14px;
}

.tm-atalho {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    height: 100%;
    padding: 22px 14px 20px;
    border: 1px solid var(--tm-line);
    border-radius: var(--tm-radius-lg);
    background: #fff;
    color: inherit;
    text-align: center;
    text-decoration: none !important;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.tm-atalho:hover {
    border-color: color-mix(in srgb, var(--tm-primary) 35%, var(--tm-line));
    box-shadow: var(--tm-shadow);
    transform: translateY(-3px);
}

.tm-atalho__icone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--tm-primary-50);
    color: var(--tm-primary);
    font-size: 21px;
    transition: background-color .2s, color .2s, transform .2s;
}

.tm-atalho:hover .tm-atalho__icone {
    background: var(--tm-primary);
    color: #fff;
    transform: scale(1.06);
}

.tm-atalho__texto {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    line-height: 1.3;
}

.tm-atalho__texto strong {
    color: var(--tm-ink);
    font-size: 15px;
    font-weight: 700;
}

.tm-atalho__texto small {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--tm-muted);
    font-size: 13px;
}

/* tablet: no máximo 4 por linha */
@media (max-width: 991px) {
    .tm-atalhos__grid {
        grid-template-columns: repeat(var(--tm-atalhos-cols-tablet, 3), minmax(0, 1fr));
    }
}

/* celular: grade de ícones no estilo de app (3 por linha), só título */
@media (max-width: 767px) {
    .tm-atalhos {
        padding-top: 18px;
    }

    .tm-atalhos__grid {
        grid-template-columns: repeat(var(--tm-atalhos-cols-celular, 3), minmax(0, 1fr));
        gap: 10px;
    }

    .tm-atalho {
        gap: 8px;
        padding: 16px 8px 14px;
        border-radius: var(--tm-radius);
    }

    .tm-atalho__icone {
        width: 46px;
        height: 46px;
        border-radius: 14px;
        font-size: 19px;
    }

    .tm-atalho__texto strong {
        font-size: 13px;
    }

    .tm-atalho__texto small {
        display: none;
    }
}

/* ---------- Rodapé: links ---------- */
.tm-footer__links {
    gap: 8px;
}

.tm-footer__links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color .2s, transform .2s;
}

.tm-footer__links a:hover {
    transform: translateX(3px);
}

/* ---------- Toasts ---------- */
.tm-toasts {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 2000;
    display: grid;
    gap: 10px;
    width: min(380px, calc(100vw - 32px));
    pointer-events: none;
}

.tm-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--tm-radius);
    background: var(--tm-ink);
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: var(--tm-shadow-lg);
    pointer-events: auto;
    opacity: 0;
    transform: translateY(8px) scale(.98);
    transition: opacity .25s, transform .25s var(--tm-ease);
}

.tm-toast.is-in {
    opacity: 1;
    transform: none;
}

.tm-toast>i {
    font-size: 18px;
}

.tm-toast--sucesso>i {
    color: #4ade80;
}

.tm-toast--erro>i {
    color: #f87171;
}

.tm-toast--info>i {
    color: #93c5fd;
}

.tm-toast span {
    flex: 1;
}

.tm-toast button {
    border: 0;
    background: transparent;
    color: #fff;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

/* ---------- Esqueletos de carregamento ---------- */
.tm-skeleton-card {
    display: grid;
    gap: 10px;
    padding-bottom: 14px;
    border: 1px solid var(--tm-line);
    border-radius: var(--tm-radius);
    overflow: hidden;
}

.tm-skeleton {
    background: linear-gradient(90deg, #eef2f7 25%, #f8fafc 37%, #eef2f7 63%);
    background-size: 400% 100%;
    animation: tmShimmer 1.3s ease infinite;
    border-radius: 6px;
}

.tm-skeleton--img {
    aspect-ratio: 1 / 1;
    border-radius: 0;
}

.tm-skeleton--linha {
    height: 12px;
    margin: 0 16px;
}

.tm-skeleton--linha.curta {
    width: 45%;
}

@keyframes tmShimmer {
    0% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0 50%;
    }
}

/* ---------- Animação ao rolar ---------- */
.tm-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s var(--tm-ease), transform .6s var(--tm-ease);
}

.tm-reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* ---------- Celular: header tradicional ----------
   hambúrguer à esquerda (abre o menu lateral), logo e, à direita, busca, conta e carrinho */
@media (max-width: 767px) {
    .tm-header__inner {
        gap: 4px;
    }

    .tm-burger {
        order: -1;
        margin-left: -6px;
    }

    .tm-logo {
        margin-right: auto;
    }

    .tm-header__acoes {
        gap: 2px;
    }

    /* botões flutuantes um pouco menores */
    .tm-whats {
        right: 16px;
        bottom: calc(76px + env(safe-area-inset-bottom));
        width: 52px;
        height: 52px;
        font-size: 26px;
    }

    .tm-to-top {
        right: 21px;
        bottom: calc(20px + env(safe-area-inset-bottom));
        width: 42px;
        height: 42px;
    }

    .tm-toasts {
        top: auto;
        bottom: calc(16px + env(safe-area-inset-bottom));
        left: 16px;
        right: 16px;
        width: auto;
    }
}


/* ==========================================================================
   Carrossel de banners (modo único)
   - cada imagem define sua propria altura, sem cortes nem proporcao compartilhada
   - Slick adapta suavemente a altura ao banner selecionado
   - banners com texto do painel: texto por cima da imagem
   Estas regras substituem as alturas fixas antigas do hero (tema.css).
   ========================================================================== */
.tm-hero.tm-hero {
    padding-top: clamp(12px, 2vw, 24px);
    background: transparent;
}

.tm-hero.tm-hero::after {
    display: none;
}

.tm-hero .tm-hero__slides {
    border-radius: var(--tm-radius-lg);
    overflow: hidden;
    background: var(--tm-bg-alt);
    box-shadow: var(--tm-shadow);
}

.tm-hero .tm-hero__slide {
    height: auto;
    aspect-ratio: auto;
    max-height: none;
    min-height: 0;
}

.tm-hero picture {
    display: block;
    height: auto;
}

.tm-hero__img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* antes do slick iniciar, mostra só o primeiro banner */
.tm-hero .tm-hero__slides:not(.slick-initialized) .tm-hero__slide+.tm-hero__slide {
    display: none !important;
}

/* texto do painel por cima da imagem */
.tm-hero .tm-hero__overlay {
    z-index: 1;
}

.tm-hero .tm-hero__conteudo {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 12px;
    padding: clamp(18px, 4vw, 48px);
    height: auto;
}

/* com as setas visíveis (desktop), o texto começa depois da seta da esquerda e não encosta na da direita */
@media (min-width: 992px) {
    .tm-hero .tm-hero__conteudo {
        padding-inline: clamp(80px, 7vw, 104px);
    }
}

.tm-hero .tm-hero__titulo {
    font-size: clamp(22px, 3.4vw, 44px);
}

.tm-hero .tm-hero__descricao {
    font-size: clamp(14px, 1.4vw, 18px);
}

.tm-hero.tm-hero .tm-hero__dots {
    bottom: 14px;
}

.tm-hero .tm-hero__dots button {
    box-shadow: 0 0 0 1px rgba(2, 6, 23, .15);
}

.tm-hero .tm-hero__arrow--prev {
    left: 14px;
}

.tm-hero .tm-hero__arrow--next {
    right: 14px;
}

.tm-hero+.tm-atalhos {
    margin-top: 0;
    padding-top: clamp(16px, 2.5vw, 28px);
}

@media (max-width: 767px) {

    /* no celular a arte ocupa a largura toda */
    .tm-hero.tm-hero {
        padding-top: 0;
    }

    .tm-hero .tm-hero__moldura {
        padding-inline: 0;
    }

    .tm-hero .tm-hero__slides {
        border-radius: 0;
        box-shadow: none;
    }

    /* Mantem a imagem inteira e coloca o texto do painel abaixo dela no celular. */
    .tm-hero .tm-hero__overlay {
        display: none;
    }

    .tm-hero .tm-hero__conteudo {
        position: relative;
        inset: auto;
        justify-content: flex-start;
        gap: 10px;
        padding: 16px 18px 34px;
        background: var(--tm-dark);
    }

    .tm-hero .tm-hero__conteudo .tm-btn {
        min-height: 42px;
        padding: 0 18px;
        font-size: 14px;
    }

    .tm-hero.tm-hero .tm-hero__dots {
        bottom: 8px;
    }

    .tm-hero .tm-hero__dots button {
        width: 8px;
        height: 8px;
    }

    .tm-hero .tm-hero__dots .slick-active button {
        width: 20px;
    }
}

/* ---------- Faixa de chamada (antes do rodapé) ---------- */
.tm-chamada {
    position: relative;
    margin-top: clamp(40px, 6vw, 80px);
    padding: clamp(36px, 5vw, 56px) 0;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 85% 20%, rgba(255, 255, 255, .16), transparent 45%),
        linear-gradient(135deg, var(--tm-primary), color-mix(in srgb, var(--tm-primary) 62%, #0b1020));
}

.tm-chamada ~ .tm-footer {
    margin-top: 0;
}

.tm-chamada__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px 48px;
}

.tm-chamada__texto {
    max-width: 620px;
}

.tm-body .tm-chamada__titulo {
    margin: 0 0 8px;
    color: #fff;
    font-family: var(--tm-font-display);
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 800;
    line-height: 1.2;
}

.tm-chamada__texto p {
    margin: 0;
    color: rgba(255, 255, 255, .85);
    font-size: 16px;
    line-height: 1.6;
}

.tm-chamada__texto .tm-chamada__horario {
    margin-top: 10px;
    color: rgba(255, 255, 255, .75);
    font-size: 14px;
}

.tm-chamada__acoes {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    flex-shrink: 0;
    min-width: 260px;
}

.tm-chamada__principal {
    --_bg: #fff;
    --_fg: var(--tm-ink);
    box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .45);
}

.tm-chamada__principal i {
    color: #1fa855;
    font-size: 20px;
}

.tm-chamada__principal:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px -14px rgba(0, 0, 0, .5);
}

.tm-chamada__secundario {
    --_bg: rgba(255, 255, 255, .12);
    --_fg: #fff;
    border-color: rgba(255, 255, 255, .3);
}

.tm-chamada__secundario:hover {
    --_bg: rgba(255, 255, 255, .22);
}

@media (max-width: 767px) {
    .tm-chamada__inner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .tm-chamada__texto {
        max-width: none;
    }

    .tm-chamada__acoes {
        min-width: 0;
    }
}


/* ---------- Formulário de contato em modal ---------- */
.tm-contato-modal .tm-modal__head h2 {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tm-contato-modal__icone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--tm-primary-50);
    color: var(--tm-primary);
    font-size: 17px;
}

.tm-contato-modal .tm-modal__texto {
    margin: -6px 0 16px;
}

.tm-contato-modal .tm-recaptcha {
    margin-top: 16px;
}

.tm-contato-modal__erro {
    margin: 16px 0 0;
    padding: 10px 14px;
    border-radius: 12px;
    background: #fef2f2;
    color: var(--tm-danger, #dc2626);
    font-size: 14px;
    font-weight: 600;
}

.tm-contato-modal [type=submit].is-carregando {
    opacity: .7;
    pointer-events: none;
}

.tm-contato-modal [type=submit].is-carregando i {
    animation: tmPulso 1s infinite;
}

@keyframes tmPulso {
    50% {
        opacity: .2;
    }
}

.tm-contato-modal__sucesso {
    padding: 12px 0 4px;
    text-align: center;
}

.tm-contato-modal__ok {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 14px;
    border-radius: 999px;
    background: #dcfce7;
    color: #16a34a;
    font-size: 28px;
}

.tm-contato-modal__sucesso h3 {
    margin: 0 0 6px;
    font-size: 21px;
}

.tm-contato-modal__sucesso p {
    margin: 0 0 20px;
    color: var(--tm-muted);
}

@media (max-width: 575px) {
    .tm-contato-modal .tm-col-6 {
        grid-column: span 12;
    }

    .tm-contato-modal .tm-modal__acoes {
        flex-direction: column-reverse;
    }

    .tm-contato-modal .tm-modal__acoes .tm-btn {
        width: 100%;
    }
}

/* com modal ou menu aberto, os botões flutuantes (WhatsApp, chat, topo) não cobrem os botões do modal */
body.tm-lock .tm-whats,
body.tm-lock .tm-to-top,
body.tm-lock #meu-whatsapp-chat {
    display: none !important;
}

/* ---------- Cards da home (depoimentos/blog): colunas calculadas pela quantidade ---------- */
.tm-posts.tm-posts--colunas {
    grid-template-columns: repeat(var(--tm-posts-cols, 3), minmax(0, 1fr));
}

.tm-posts--poucos {
    max-width: 800px;
    margin-inline: auto;
}

@media (max-width: 991px) {
    .tm-posts.tm-posts--colunas {
        grid-template-columns: repeat(var(--tm-posts-cols-tablet, 2), minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .tm-posts.tm-posts--colunas {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ---------- Textos do painel: links soltos viram botões ---------- */
.tm-rich .tm-rich__acao {
    margin: 18px 0;
}

.tm-rich a.tm-rich__botao {
    min-height: 48px;
    padding: 12px 26px;
    white-space: normal;
    line-height: 1.3;
    text-align: center;
    text-decoration: none !important;
    box-shadow: 0 10px 24px -14px var(--tm-primary);
}

.tm-rich a.tm-rich__botao:hover {
    transform: translateY(-1px);
}

.tm-rich a.tm-rich__botao::after {
    content: "\2192";
    margin-left: 4px;
    transition: transform .2s;
}

.tm-rich a.tm-rich__botao:hover::after {
    transform: translateX(3px);
}

/* ---------- Aviso (título + botão) na home ---------- */
.tm-aviso {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 24px;
    border: 1px solid color-mix(in srgb, var(--tm-primary) 22%, #fff);
    border-left: 5px solid var(--tm-primary);
    border-radius: var(--tm-radius-lg);
    background: linear-gradient(90deg, var(--tm-primary-50), #fff 70%);
    box-shadow: var(--tm-shadow-sm);
}

.tm-aviso__icone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--tm-primary);
    color: #fff;
    font-size: 20px;
}

.tm-aviso__texto {
    flex: 1;
    min-width: 0;
}

.tm-aviso__rotulo {
    display: inline-block;
    margin-bottom: 2px;
    color: var(--tm-primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.tm-body .tm-aviso__titulo {
    margin: 0;
    color: var(--tm-ink);
    font-size: clamp(16px, 1.6vw, 19px);
    font-weight: 700;
    line-height: 1.35;
}

.tm-aviso__acao.tm-rich .tm-rich__acao {
    margin: 0;
}

.tm-aviso__acao a.tm-rich__botao {
    min-height: 44px;
    padding: 10px 20px;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .tm-aviso {
        flex-wrap: wrap;
        padding: 18px;
    }

    .tm-aviso__acao,
    .tm-aviso__acao a.tm-rich__botao {
        width: 100%;
    }

    .tm-aviso__acao a.tm-rich__botao {
        white-space: normal;
    }
}

/* ---------- Banner: texto do painel sem "caixas" atrás das letras ---------- */
.tm-hero .tm-hero__titulo,
.tm-hero .tm-hero__descricao {
    text-shadow: 0 2px 14px rgba(2, 6, 23, .55);
}

.tm-hero .tm-hero__titulo [style*="background"],
.tm-hero .tm-hero__descricao [style*="background"] {
    padding: 0;
    background: none !important;
    color: inherit !important;
}

/* celular: banner com altura mínima legível, recortando um pouco as laterais e não o centro */
@media (max-width: 767px) {
    .tm-hero .tm-hero__img {
        min-height: 170px;
        object-fit: cover;
        object-position: center;
    }
}


/* ---------- Botão "Área do cliente" (item externo de login do menu do ERP) ---------- */
.tm-acesso-btn {
    min-height: 40px;
    margin-right: 6px;
    padding: 0 16px;
    font-size: 14px;
    border-color: color-mix(in srgb, var(--tm-primary) 35%, var(--tm-line));
    --_fg: var(--tm-primary);
}

.tm-acesso-btn:hover {
    --_bg: var(--tm-primary);
    --_fg: #fff;
    border-color: var(--tm-primary);
}

.tm-acesso-btn i {
    font-size: 13px;
}

/* tablet/celular: o botão vai para o menu lateral */
@media (max-width: 991px) {
    .tm-acesso-btn {
        display: none;
    }
}

.tm-drawer__acesso {
    padding: 0 20px 16px;
    border-bottom: 1px solid var(--tm-line);
}

.tm-drawer__acesso .tm-btn {
    --_fg: var(--tm-primary);
    border-color: color-mix(in srgb, var(--tm-primary) 35%, var(--tm-line));
}

.tm-drawer__acesso .tm-ext {
    font-size: 11px;
    opacity: .6;
}

/* "Entrar" da barra superior com cara de botão */
.tm-topbar__conta a.tm-topbar__entrar {
    padding: 3px 14px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px;
}

.tm-topbar__conta a.tm-topbar__entrar:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, .1);
    color: #fff;
}


/* ---------- Selos oficiais do aplicativo (Google Play / App Store) ----------
   Mesma altura visível (--tm-selo-h). O PNG do Google tem margem transparente própria
   (192 de 250px são o selo): a imagem fica maior e a margem negativa compensa. */
.tm-apps {
    --tm-selo-h: 46px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.tm-apps__titulo {
    margin: 0;
    color: var(--tm-muted);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.tm-apps__selos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.tm-app-selo {
    display: inline-flex;
    line-height: 0;
    border-radius: 8px;
    transition: transform .15s, opacity .2s;
}

.tm-app-selo:hover {
    transform: translateY(-2px);
    opacity: .9;
}

.tm-app-selo img {
    display: block;
    width: auto;
    max-width: none;
}

.tm-app-selo--apple img {
    height: var(--tm-selo-h);
}

.tm-app-selo--google img {
    height: calc(var(--tm-selo-h) * 250 / 192);
    margin: calc(var(--tm-selo-h) * -29 / 192) 0;
}

.tm-apps__marcas {
    max-width: 560px;
    margin: 4px 0 0;
    color: var(--tm-muted);
    font-size: 11px;
    line-height: 1.5;
    opacity: .75;
}

.tm-apps-secao ~ .tm-chamada {
    margin-top: clamp(28px, 4vw, 48px);
}

.tm-apps--compacto {
    --tm-selo-h: 40px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--tm-line);
}

/* ---------- Páginas do menu (page?sub= / /p/{id}) ---------- */
/* desktop: a imagem começa no topo do bloco e acompanha o texto enquanto ele rola */
@media (min-width: 992px) {
    .tm-blocos--pagina .tm-bloco--com-imagem {
        align-items: start;
    }

    .tm-blocos--pagina .tm-bloco__imagem {
        position: sticky;
        top: calc(var(--tm-header-h) + 24px);
    }
}

/* blocos só com texto: largura de leitura confortável */
.tm-blocos--pagina .tm-bloco--so-texto .tm-bloco__texto {
    max-width: 820px;
}

.tm-blocos--pagina .tm-rich table {
    max-width: 100%;
}
