:root,
:root[data-tema="escuro"] {
  color-scheme: dark;
  --fundo: #0a0f16;
  --fundo-superior: #0b1118;
  --fundo-inferior: #080c12;
  --painel: #121a25;
  --painel-claro: #182331;
  --linha: rgba(255, 255, 255, 0.09);
  --texto: #f7f8fa;
  --suave: #9ba9b8;
  --texto-controle: #dce3ea;
  --texto-plataforma: #cbd5df;
  --destaque: #e96e28;
  --destaque-forte: #ff7d33;
  --verde: #31c978;
  --topo-fundo: rgba(10, 15, 22, 0.88);
  --rodape-fundo: #080c12;
  --modelo-fundo: rgba(49, 201, 120, 0.12);
  --modelo-texto: #6ee7a3;
  --filtro-ativo-texto: #ffffff;
  --botao-indisponivel-fundo: #273342;
  --botao-indisponivel-texto: #8997a7;
  --halo-fundo: rgba(233, 110, 40, 0.12);
  --halo-brilho: rgba(255, 255, 255, 0.12);
  --sombra: 0 24px 70px rgba(0, 0, 0, 0.34);
  --sombra-cartao: 0 14px 38px rgba(0, 0, 0, 0.15);
}

:root[data-tema="claro"] {
  color-scheme: light;
  --fundo: #f1f4f7;
  --fundo-superior: #fbfcfd;
  --fundo-inferior: #e8edf2;
  --painel: #ffffff;
  --painel-claro: #f8fafc;
  --linha: rgba(24, 38, 52, 0.12);
  --texto: #17212b;
  --suave: #667587;
  --texto-controle: #334155;
  --texto-plataforma: #526173;
  --destaque: #e96e28;
  --destaque-forte: #cf5818;
  --verde: #14945a;
  --topo-fundo: rgba(255, 255, 255, 0.9);
  --rodape-fundo: #e6ebf0;
  --modelo-fundo: rgba(20, 148, 90, 0.12);
  --modelo-texto: #0f7a49;
  --filtro-ativo-texto: #9b3f0d;
  --botao-indisponivel-fundo: #dce3e9;
  --botao-indisponivel-texto: #738194;
  --halo-fundo: rgba(233, 110, 40, 0.1);
  --halo-brilho: rgba(255, 255, 255, 0.72);
  --sombra: 0 24px 70px rgba(32, 47, 61, 0.15);
  --sombra-cartao: 0 14px 38px rgba(32, 47, 61, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 280px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 84% 8%, rgba(233, 110, 40, 0.15), transparent 28%),
    linear-gradient(180deg, var(--fundo-superior) 0%, var(--fundo) 44%, var(--fundo-inferior) 100%);
  color: var(--texto);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }

.topo-site {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px clamp(20px, 5vw, 74px);
  background: var(--topo-fundo);
  border-bottom: 1px solid var(--linha);
  backdrop-filter: blur(18px);
}

.marca-site,
.marca-rodape {
  display: flex;
  align-items: center;
  gap: 11px;
}

.marca-site img,
.marca-rodape img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
}

.marca-site span {
  font-size: 18px;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.acoes-topo-site {
  display: flex;
  align-items: center;
  gap: 9px;
}

.botao-tema-site {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--linha);
  border-radius: 10px;
  background: var(--painel);
  color: var(--texto-controle);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.botao-tema-site:hover {
  border-color: rgba(233, 110, 40, 0.58);
  background: rgba(233, 110, 40, 0.08);
}

.botao-tema-site:active {
  transform: scale(0.96);
}

.botao-tema-site:focus-visible {
  outline: 2px solid var(--destaque);
  outline-offset: 2px;
}

.icone-tema {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icone-tema-sol,
:root[data-tema="escuro"] .icone-tema-sol {
  display: block;
}

.icone-tema-lua,
:root[data-tema="escuro"] .icone-tema-lua {
  display: none;
}

:root[data-tema="claro"] .icone-tema-sol {
  display: none;
}

:root[data-tema="claro"] .icone-tema-lua {
  display: block;
}

.atalho-catalogo {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 17px;
  border: 1px solid var(--linha);
  border-radius: 10px;
  color: var(--texto-controle);
  font-weight: 750;
  transition: border-color 160ms ease, background 160ms ease;
}

.atalho-catalogo:hover {
  border-color: rgba(233, 110, 40, 0.58);
  background: rgba(233, 110, 40, 0.08);
}

.destaque-site {
  min-height: min(690px, calc(100vh - 70px));
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
  align-items: center;
  gap: clamp(40px, 7vw, 110px);
  padding: clamp(68px, 9vw, 124px) clamp(24px, 8vw, 126px);
  border-bottom: 1px solid var(--linha);
  overflow: hidden;
}

.destaque-conteudo { max-width: 760px; }
.rotulo {
  color: var(--destaque-forte);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.destaque-site h1 {
  max-width: 800px;
  margin: 15px 0 22px;
  font-size: clamp(44px, 6.4vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.058em;
}

.destaque-site p {
  max-width: 660px;
  margin: 0;
  color: var(--suave);
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: 1.67;
}

.botao-destaque {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 32px;
  padding: 0 24px;
  border-radius: 11px;
  background: linear-gradient(135deg, #d86022, #f47c36);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(233, 110, 40, 0.25);
}

.imagem-destaque {
  position: relative;
  min-height: 390px;
  display: grid;
  place-items: center;
}

.halo-destaque {
  position: absolute;
  width: min(440px, 92%);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, var(--halo-brilho), transparent 28%),
    var(--halo-fundo);
  filter: blur(8px);
}

.imagem-destaque img {
  position: relative;
  width: min(430px, 92%);
  max-height: 480px;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 28px;
  filter: drop-shadow(0 28px 58px rgba(0, 0, 0, 0.34));
}

.secao-aplicativos {
  max-width: 1480px;
  margin: 0 auto;
  padding: clamp(64px, 8vw, 108px) clamp(24px, 5vw, 74px) 112px;
}

.cabecalho-secao {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 28px;
}

.cabecalho-secao h2 {
  margin: 8px 0 8px;
  font-size: clamp(32px, 4vw, 50px);
  letter-spacing: -0.04em;
}

.cabecalho-secao p {
  margin: 0;
  color: var(--suave);
  line-height: 1.55;
}

.descricao-catalogo {
  max-width: 680px;
  margin-top: 7px !important;
}

.campo-busca {
  width: min(370px, 100%);
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  border: 1px solid var(--linha);
  border-radius: 11px;
  background: var(--painel);
  color: var(--suave);
}

.campo-busca:focus-within { border-color: rgba(233, 110, 40, 0.62); }
.campo-busca input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--texto);
}

.filtros-categorias {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
}

.filtro-categoria {
  min-height: 37px;
  padding: 0 15px;
  border: 1px solid var(--linha);
  border-radius: 999px;
  background: transparent;
  color: var(--suave);
  cursor: pointer;
}

.filtro-categoria:hover,
.filtro-categoria.ativo {
  border-color: rgba(233, 110, 40, 0.5);
  background: rgba(233, 110, 40, 0.12);
  color: var(--filtro-ativo-texto);
}

.grade-aplicativos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 21px;
}

.cartao-aplicativo {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--linha);
  border-radius: 18px;
  background: linear-gradient(155deg, var(--painel-claro), var(--painel));
  box-shadow: var(--sombra-cartao);
}

.topo-aplicativo {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.icone-aplicativo {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}

.modelo-aplicativo {
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--modelo-fundo);
  color: var(--modelo-texto);
  font-size: 11px;
  font-weight: 800;
}

.cartao-aplicativo h3 {
  margin: 22px 0 6px;
  font-size: 22px;
  letter-spacing: -0.025em;
}

.categoria-aplicativo {
  color: var(--destaque-forte);
  font-size: 12px;
  font-weight: 750;
}

.descricao-aplicativo {
  margin: 14px 0 18px;
  color: var(--suave);
  line-height: 1.62;
}

.plataformas-aplicativo {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.plataformas-aplicativo span {
  padding: 5px 8px;
  border: 1px solid var(--linha);
  border-radius: 7px;
  color: var(--texto-plataforma);
  font-size: 11px;
}

.rodape-aplicativo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--linha);
}

.versao-aplicativo {
  color: var(--suave);
  font-size: 12px;
}

.botao-aplicativo {
  min-height: 39px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border-radius: 9px;
  background: var(--destaque);
  color: #fff;
  font-weight: 800;
}

.botao-aplicativo.indisponivel {
  background: var(--botao-indisponivel-fundo);
  color: var(--botao-indisponivel-texto);
  pointer-events: none;
}

.estado-vazio {
  grid-column: 1 / -1;
  min-height: 260px;
  display: grid;
  place-items: center;
  padding: 42px;
  border: 1px dashed var(--linha);
  border-radius: 18px;
  color: var(--suave);
  text-align: center;
}

.estado-vazio strong {
  display: block;
  margin-bottom: 7px;
  color: var(--texto);
  font-size: 18px;
}

.rodape-site {
  min-height: 124px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px clamp(24px, 5vw, 74px);
  border-top: 1px solid var(--linha);
  background: var(--rodape-fundo);
  color: var(--suave);
  font-size: 13px;
}

.marca-rodape div { display: grid; gap: 3px; }
.marca-rodape strong { color: var(--texto); }

@media (max-width: 980px) {
  .destaque-site {
    min-height: 0;
    grid-template-columns: 1fr;
    padding-top: 76px;
  }
  .imagem-destaque {
    min-height: 280px;
  }
  .imagem-destaque img {
    width: min(340px, 78%);
    max-height: 340px;
  }
}

@media (max-width: 820px) {
  .cabecalho-secao { align-items: stretch; flex-direction: column; }
  .campo-busca { width: 100%; }
  .rodape-site { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 520px) {
  .topo-site { min-height: 60px; }
  .acoes-topo-site {
  display: flex;
  align-items: center;
  gap: 9px;
}

.botao-tema-site {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--linha);
  border-radius: 10px;
  background: var(--painel);
  color: var(--texto-controle);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.botao-tema-site:hover {
  border-color: rgba(233, 110, 40, 0.58);
  background: rgba(233, 110, 40, 0.08);
}

.botao-tema-site:active {
  transform: scale(0.96);
}

.botao-tema-site:focus-visible {
  outline: 2px solid var(--destaque);
  outline-offset: 2px;
}

.icone-tema {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icone-tema-sol,
:root[data-tema="escuro"] .icone-tema-sol {
  display: block;
}

.icone-tema-lua,
:root[data-tema="escuro"] .icone-tema-lua {
  display: none;
}

:root[data-tema="claro"] .icone-tema-sol {
  display: none;
}

:root[data-tema="claro"] .icone-tema-lua {
  display: block;
}

.atalho-catalogo { display: none; }
  .destaque-site { padding: 56px 20px 64px; }
  .destaque-site h1 { font-size: 44px; }
  .imagem-destaque { display: none; }
  .secao-aplicativos { padding-inline: 20px; }
  .grade-aplicativos { grid-template-columns: 1fr; }
}

.preco-aplicativo {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px 8px;
  margin: 2px 0 17px;
  padding: 12px 13px;
  border: 1px solid color-mix(in srgb, var(--destaque) 28%, var(--linha));
  border-radius: 12px;
  background: color-mix(in srgb, var(--destaque) 7%, var(--painel-claro));
}

.preco-aplicativo small {
  color: var(--suave);
  text-decoration: line-through;
}

.preco-aplicativo strong {
  color: var(--texto);
  font-size: 20px;
}

.preco-aplicativo span {
  color: var(--suave);
  font-size: 11px;
}

.botao-aplicativo.indisponivel.monetizado {
  opacity: 1;
  color: var(--destaque);
  border-color: color-mix(in srgb, var(--destaque) 35%, var(--linha));
  background: color-mix(in srgb, var(--destaque) 9%, transparent);
}

/* Checkout Mercado Pago */
.oculto { display: none !important; }
body.checkout-aberto { overflow: hidden; }
button, textarea { font: inherit; }

.botao-aplicativo.botao-comprar {
  border: 0;
  cursor: pointer;
}

.botao-aplicativo.botao-comprar:hover,
.botao-principal-checkout:hover {
  filter: brightness(1.06);
}

.sobreposicao-checkout {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(2, 7, 13, 0.78);
  backdrop-filter: blur(12px);
}

.painel-checkout {
  width: min(720px, 100%);
  max-height: min(920px, calc(100vh - 36px));
  overflow: auto;
  border: 1px solid var(--linha);
  border-radius: 22px;
  background: var(--painel);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.48);
}

.cabecalho-checkout {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--linha);
  background: color-mix(in srgb, var(--painel) 94%, transparent);
  backdrop-filter: blur(16px);
}

.produto-checkout-resumo {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 15px;
}

.produto-checkout-resumo img {
  width: 62px;
  height: 62px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 9px 24px rgba(0, 0, 0, 0.22);
}

.produto-checkout-resumo div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.produto-checkout-resumo span {
  color: var(--destaque-forte);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.produto-checkout-resumo h2 {
  max-width: 470px;
  overflow: hidden;
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.produto-checkout-resumo strong {
  color: var(--texto);
  font-size: 17px;
}

.botao-fechar-checkout {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--linha);
  border-radius: 10px;
  background: transparent;
  color: var(--suave);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.botao-fechar-checkout:hover {
  border-color: rgba(233, 110, 40, 0.5);
  color: var(--texto);
}

.etapa-checkout {
  padding: 26px 24px 28px;
}

.texto-checkout {
  max-width: 620px;
  margin: 0 0 22px;
  color: var(--suave);
  line-height: 1.6;
}

.formulario-comprador {
  display: grid;
  gap: 16px;
}

.formulario-comprador label {
  display: grid;
  gap: 8px;
}

.formulario-comprador label > span {
  color: var(--texto-controle);
  font-size: 13px;
  font-weight: 750;
}

.formulario-comprador input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--linha);
  border-radius: 11px;
  outline: 0;
  background: var(--painel-claro);
  color: var(--texto);
}

.formulario-comprador input:focus {
  border-color: rgba(233, 110, 40, 0.68);
  box-shadow: 0 0 0 3px rgba(233, 110, 40, 0.1);
}

.botao-principal-checkout,
.botao-secundario-checkout {
  min-height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 800;
}

.botao-principal-checkout {
  border: 0;
  background: var(--destaque);
  color: #fff;
}

.formulario-comprador .botao-principal-checkout {
  justify-self: end;
  min-width: 220px;
  margin-top: 3px;
}

.botao-secundario-checkout {
  border: 1px solid var(--linha);
  background: var(--painel-claro);
  color: var(--texto-controle);
}

.botao-principal-checkout:disabled,
.botao-secundario-checkout:disabled {
  cursor: wait;
  opacity: 0.62;
}

.mensagem-checkout {
  margin: 0;
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
}

.mensagem-checkout.erro {
  border: 1px solid rgba(239, 68, 68, 0.28);
  background: rgba(239, 68, 68, 0.09);
  color: #ef8d8d;
}

:root[data-tema="claro"] .mensagem-checkout.erro {
  color: #a82929;
}

.linha-seguranca-checkout {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(49, 201, 120, 0.2);
  border-radius: 11px;
  background: rgba(49, 201, 120, 0.07);
}

.linha-seguranca-checkout > span {
  color: var(--verde);
  font-size: 12px;
}

.linha-seguranca-checkout p {
  margin: 0;
  color: var(--suave);
  font-size: 12px;
  line-height: 1.45;
}

.carregando-checkout {
  min-height: 180px;
  display: grid;
  place-items: center;
  color: var(--suave);
  text-align: center;
}

#paymentBrick_container {
  min-height: 1px;
  border-radius: 14px;
  overflow: hidden;
}

#checkout-resultado {
  text-align: center;
}

.icone-resultado-checkout {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  margin: 4px auto 15px;
  border-radius: 50%;
  background: rgba(49, 201, 120, 0.13);
  color: var(--verde);
  font-size: 34px;
  font-weight: 900;
}

.icone-resultado-checkout[data-tipo="pendente"] {
  background: rgba(233, 110, 40, 0.12);
  color: var(--destaque-forte);
}

.icone-resultado-checkout[data-tipo="erro"] {
  background: rgba(239, 68, 68, 0.1);
  color: #ef6d6d;
}

#checkout-resultado h3 {
  margin: 0 0 8px;
  font-size: 25px;
}

#texto-resultado-checkout {
  max-width: 570px;
  margin: 0 auto;
  color: var(--suave);
  line-height: 1.58;
}

.pix-checkout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--linha);
  border-radius: 16px;
  background: var(--painel-claro);
  text-align: left;
}

.pix-checkout img {
  width: 190px;
  height: 190px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
}

.pix-checkout strong {
  font-size: 18px;
}

.pix-checkout p {
  margin: 5px 0 12px;
  color: var(--suave);
  font-size: 13px;
  line-height: 1.45;
}

.pix-checkout textarea {
  width: 100%;
  min-height: 82px;
  resize: vertical;
  padding: 10px 11px;
  border: 1px solid var(--linha);
  border-radius: 9px;
  outline: 0;
  background: var(--painel);
  color: var(--texto);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
}

.pix-checkout .botao-secundario-checkout {
  min-height: 39px;
  margin-top: 9px;
}

.acoes-resultado-checkout {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.identificador-pagamento {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  margin-top: 15px;
  color: var(--suave);
  font-size: 10px;
}

@media (max-width: 620px) {
  .sobreposicao-checkout {
    align-items: end;
    padding: 0;
  }

  .painel-checkout {
    width: 100%;
    max-height: 96vh;
    border-radius: 20px 20px 0 0;
  }

  .cabecalho-checkout,
  .etapa-checkout {
    padding-inline: 18px;
  }

  .produto-checkout-resumo img {
    width: 52px;
    height: 52px;
  }

  .produto-checkout-resumo h2 {
    max-width: 210px;
    font-size: 18px;
  }

  .formulario-comprador .botao-principal-checkout {
    width: 100%;
    justify-self: stretch;
  }

  .pix-checkout {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .pix-checkout img {
    justify-self: center;
    width: min(210px, 100%);
    height: auto;
    aspect-ratio: 1;
  }
}

/* Instalação da Loja DaLvz como PWA */
.botao-instalar-loja {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid rgba(233, 110, 40, 0.42);
  border-radius: 10px;
  background: rgba(233, 110, 40, 0.1);
  color: var(--destaque-forte);
  font-weight: 800;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.botao-instalar-loja:hover {
  border-color: rgba(233, 110, 40, 0.72);
  background: rgba(233, 110, 40, 0.17);
}

.botao-instalar-loja:active {
  transform: scale(0.98);
}

.botao-instalar-loja:focus-visible {
  outline: 2px solid var(--destaque);
  outline-offset: 2px;
}

.botao-instalar-loja:disabled {
  border-color: var(--linha);
  background: var(--painel);
  color: var(--suave);
  cursor: default;
  opacity: 0.8;
}

.botao-instalar-loja svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.painel-instalacao-pwa {
  position: fixed;
  top: 82px;
  right: clamp(18px, 4vw, 58px);
  z-index: 70;
  width: min(390px, calc(100vw - 32px));
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 17px 18px;
  border: 1px solid var(--linha);
  border-radius: 14px;
  background: color-mix(in srgb, var(--painel) 96%, transparent);
  box-shadow: var(--sombra);
  backdrop-filter: blur(18px);
}

.painel-instalacao-pwa > div {
  min-width: 0;
  flex: 1;
}

.painel-instalacao-pwa strong {
  display: block;
  margin-bottom: 5px;
  color: var(--texto);
  font-size: 14px;
}

.painel-instalacao-pwa p {
  margin: 0;
  color: var(--suave);
  font-size: 12px;
  line-height: 1.55;
}

.painel-instalacao-pwa button {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--linha);
  border-radius: 8px;
  background: transparent;
  color: var(--suave);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.painel-instalacao-pwa button:hover {
  border-color: rgba(233, 110, 40, 0.5);
  color: var(--texto);
}

@media (max-width: 680px) {
  .botao-instalar-loja {
    width: 40px;
    padding: 0;
  }

  .botao-instalar-loja span {
    display: none;
  }

  .painel-instalacao-pwa {
    top: 72px;
    right: 16px;
  }
}

/* Atendimento WebRTC da Loja DaLvz */
.botao-atendimento-loja {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 45;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 17px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: linear-gradient(135deg, #d86022, #f47c36);
  color: #fff;
  font-weight: 820;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.botao-atendimento-loja:hover { transform: translateY(-2px); }
.botao-atendimento-loja:active { transform: translateY(0) scale(0.98); }
.botao-atendimento-loja.tem-mensagem { animation: pulso-atendimento 1.4s ease-in-out infinite; }

.icone-atendimento-loja {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.presenca-atendimento-loja {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b8c1ca;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.13);
}

.presenca-atendimento-loja[data-estado="online"] { background: #5bea9e; }
.presenca-atendimento-loja[data-estado="aguardando"] { background: #ffd36b; }
.presenca-atendimento-loja[data-estado="erro"],
.presenca-atendimento-loja[data-estado="offline"] { background: #ff8e8e; }

.painel-atendimento-loja {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: calc(max(18px, env(safe-area-inset-bottom)) + 62px);
  z-index: 46;
  width: min(390px, calc(100vw - 28px));
  max-height: min(680px, calc(100vh - 100px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--linha);
  border-radius: 18px;
  background: var(--painel);
  color: var(--texto);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transform-origin: bottom right;
  transition: opacity 180ms ease, transform 180ms ease;
}

.painel-atendimento-loja.aberto {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.cabecalho-atendimento-loja {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--linha);
  background: color-mix(in srgb, var(--painel-claro) 70%, var(--painel));
}

.cabecalho-atendimento-loja > div {
  display: grid;
  gap: 3px;
}

.cabecalho-atendimento-loja span {
  color: var(--destaque-forte);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.13em;
}

.cabecalho-atendimento-loja strong { font-size: 17px; }

.cabecalho-atendimento-loja button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--linha);
  border-radius: 10px;
  background: transparent;
  color: var(--texto);
  cursor: pointer;
}

.estado-atendimento-loja {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 9px 15px;
  border-bottom: 1px solid var(--linha);
  background: color-mix(in srgb, var(--painel-claro) 45%, var(--painel));
}

.estado-atendimento-loja i {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: #98a4b0;
  box-shadow: 0 0 0 4px rgba(152, 164, 176, 0.11);
}

.estado-atendimento-loja p {
  margin: 0;
  color: var(--suave);
  font-size: 11px;
  line-height: 1.4;
}

.estado-atendimento-loja[data-estado="online"] i {
  background: var(--verde);
  box-shadow: 0 0 0 4px rgba(49, 201, 120, 0.13);
}

.estado-atendimento-loja[data-estado="aguardando"] i {
  background: #e8b94a;
  box-shadow: 0 0 0 4px rgba(232, 185, 74, 0.13);
}

.estado-atendimento-loja[data-estado="offline"] i,
.estado-atendimento-loja[data-estado="erro"] i {
  background: #e76868;
  box-shadow: 0 0 0 4px rgba(231, 104, 104, 0.13);
}

.etapa-atendimento-loja {
  min-height: 0;
  overflow-y: auto;
  padding: 17px;
}

.etapa-atendimento-loja > p {
  margin: 0 0 15px;
  color: var(--suave);
  font-size: 12px;
  line-height: 1.55;
}

.formulario-atendimento-loja {
  display: grid;
  gap: 12px;
}

.formulario-atendimento-loja label {
  display: grid;
  gap: 6px;
}

.formulario-atendimento-loja label > span {
  color: var(--texto-controle);
  font-size: 11px;
  font-weight: 750;
}

.formulario-atendimento-loja label small {
  color: var(--suave);
  font-weight: 500;
}

.formulario-atendimento-loja input,
.enviar-atendimento-loja textarea {
  width: 100%;
  border: 1px solid var(--linha);
  border-radius: 10px;
  background: var(--painel-claro);
  color: var(--texto);
  outline: 0;
}

.formulario-atendimento-loja input {
  min-height: 43px;
  padding: 0 12px;
}

.formulario-atendimento-loja input:focus,
.enviar-atendimento-loja textarea:focus {
  border-color: rgba(233, 110, 40, 0.62);
}

.formulario-atendimento-loja button,
.botao-secundario-atendimento {
  min-height: 43px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #d86022, #f47c36);
  color: #fff;
  font-weight: 820;
  cursor: pointer;
}

.formulario-atendimento-loja button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.erro-atendimento-loja {
  margin: 0;
  padding: 9px 11px;
  border: 1px solid rgba(231, 104, 104, 0.28);
  border-radius: 9px;
  background: rgba(231, 104, 104, 0.08);
  color: #e76868;
  font-size: 11px;
}

#espera-atendimento-loja {
  place-items: center;
  align-content: center;
  gap: 10px;
  min-height: 260px;
  text-align: center;
}

#espera-atendimento-loja:not(.oculto) { display: grid; }

#espera-atendimento-loja strong { font-size: 17px; }
#espera-atendimento-loja p { max-width: 280px; margin: 0; }

.animacao-espera-atendimento {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}

.animacao-espera-atendimento span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--destaque);
  animation: ponto-espera 1s ease-in-out infinite;
}

.animacao-espera-atendimento span:nth-child(2) { animation-delay: 120ms; }
.animacao-espera-atendimento span:nth-child(3) { animation-delay: 240ms; }

.botao-secundario-atendimento {
  min-height: 39px;
  padding: 0 15px;
  border: 1px solid var(--linha);
  background: transparent;
  color: var(--texto-controle);
}

.conversa-atendimento-loja {
  min-height: 390px;
  height: min(510px, calc(100vh - 235px));
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
}

.mensagens-atendimento-loja {
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 15px;
  background:
    radial-gradient(circle at 90% 7%, rgba(233, 110, 40, 0.07), transparent 28%),
    var(--painel);
}

.mensagem-loja {
  max-width: 82%;
  padding: 9px 11px 6px;
  border: 1px solid var(--linha);
  border-radius: 12px;
  background: var(--painel-claro);
}

.mensagem-loja.propria {
  align-self: flex-end;
  border-color: rgba(233, 110, 40, 0.24);
  background: rgba(233, 110, 40, 0.13);
  border-bottom-right-radius: 4px;
}

.mensagem-loja.recebida {
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.mensagem-loja p {
  margin: 0;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.mensagem-loja time {
  display: block;
  margin-top: 4px;
  color: var(--suave);
  font-size: 9px;
  text-align: right;
}

.mensagem-sistema-loja {
  align-self: center;
  max-width: 90%;
  color: var(--suave);
  font-size: 10px;
  text-align: center;
}

.mensagem-sistema-loja span {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--painel-claro);
}

.enviar-atendimento-loja {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: end;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--linha);
  background: var(--painel-claro);
}

.enviar-atendimento-loja textarea {
  min-height: 42px;
  max-height: 120px;
  resize: none;
  padding: 10px 11px;
}

.enviar-atendimento-loja button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: var(--destaque);
  color: #fff;
  cursor: pointer;
}

.enviar-atendimento-loja button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.encerrar-atendimento-loja {
  min-height: 34px;
  border: 0;
  border-top: 1px solid var(--linha);
  background: transparent;
  color: #e76868;
  cursor: pointer;
  font-size: 11px;
}

@keyframes ponto-espera {
  0%, 70%, 100% { transform: translateY(0); opacity: 0.48; }
  35% { transform: translateY(-5px); opacity: 1; }
}

@keyframes pulso-atendimento {
  0%, 100% { box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28); }
  50% { box-shadow: 0 16px 48px rgba(233, 110, 40, 0.55); }
}

@media (max-width: 620px) {
  .botao-atendimento-loja {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    min-width: 48px;
    padding: 0 13px;
  }

  .botao-atendimento-loja > span:nth-child(2) { display: none; }

  .painel-atendimento-loja {
    right: 8px;
    bottom: calc(70px + env(safe-area-inset-bottom));
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 86px - env(safe-area-inset-bottom));
    border-radius: 15px;
  }

  .conversa-atendimento-loja {
    height: min(520px, calc(100dvh - 220px));
  }
}

/* Perfil persistente e avaliação do atendimento */
.perfil-salvo-atendimento-loja {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--linha);
  border-radius: 12px;
  background: var(--painel-claro);
}

.perfil-salvo-atendimento-loja > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.perfil-salvo-atendimento-loja span {
  color: var(--suave);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.perfil-salvo-atendimento-loja strong,
.perfil-salvo-atendimento-loja small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.perfil-salvo-atendimento-loja small { color: var(--suave); }

.perfil-salvo-atendimento-loja > button,
.acoes-avaliacao-atendimento button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--linha);
  border-radius: 10px;
  background: transparent;
  color: var(--texto-controle);
  font-weight: 780;
  cursor: pointer;
}

.perfil-salvo-atendimento-loja .botao-iniciar-perfil-atendimento {
  grid-column: 1 / -1;
  border-color: transparent;
  background: linear-gradient(135deg, #d86022, #f47c36);
  color: #fff;
}

.perfil-salvo-atendimento-loja .botao-iniciar-perfil-atendimento:disabled,
.acoes-avaliacao-atendimento button:disabled {
  opacity: .48;
  cursor: not-allowed;
}

.acoes-edicao-perfil-atendimento,
.acoes-avaliacao-atendimento {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
}

.avaliacao-atendimento-loja {
  display: grid;
  gap: 11px;
  padding: 16px;
  border-top: 1px solid var(--linha);
  background: var(--painel-claro);
}

.avaliacao-atendimento-loja > span {
  color: var(--destaque);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .12em;
}

.avaliacao-atendimento-loja > strong { font-size: 16px; }
.avaliacao-atendimento-loja > p { margin: 0; color: var(--suave); font-size: 11px; line-height: 1.45; }

.estrelas-atendimento-loja {
  display: flex;
  gap: 5px;
}

.estrelas-atendimento-loja button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--linha);
  border-radius: 10px;
  background: var(--painel);
  color: color-mix(in srgb, var(--suave) 48%, transparent);
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

.estrelas-atendimento-loja button.ativa {
  border-color: rgba(233, 110, 40, .32);
  background: rgba(233, 110, 40, .1);
  color: #ee7a31;
}

.permissao-novidades-atendimento {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--texto-controle);
  font-size: 11px;
  font-weight: 700;
}

.permissao-novidades-atendimento input { accent-color: var(--destaque); }

.acoes-avaliacao-atendimento button:last-child {
  border-color: transparent;
  background: linear-gradient(135deg, #d86022, #f47c36);
  color: #fff;
}

@media (max-width: 440px) {
  .perfil-salvo-atendimento-loja,
  .acoes-edicao-perfil-atendimento,
  .acoes-avaliacao-atendimento {
    grid-template-columns: 1fr;
  }

  .perfil-salvo-atendimento-loja > button { grid-column: auto; }
  .estrelas-atendimento-loja { justify-content: space-between; }
  .estrelas-atendimento-loja button { width: min(42px, 17vw); }
}
