/* Loja NCK — botao Comprar no estoque, checkout e pagina do pedido */
:root { --lj-azul: #0064ff; --lj-azul-esc: #0040a0; --lj-verde: #10b981; --lj-borda: rgba(255,255,255,.12);
  --lj-card: #141821; --lj-fundo: #0a0a0a; --lj-texto: #e5e7eb; --lj-mudo: #9ca3af; --lj-erro: #f87171; }

.loja-proto { background: #f59e0b; color: #1a1200; text-align: center; font: 600 .85rem/1.3 system-ui, sans-serif;
  padding: .45rem 1rem; position: relative; z-index: 2000; }

/* botao Comprar no card do estoque: escondido ate o api/estoque.php dizer que a loja esta ativa (body.loja-on) */
.btn-comprar { display: none !important; }
body.loja-on .product-actions { flex-direction: column; flex-wrap: nowrap; }
body.loja-on .product-actions .btn, body.loja-on .product-actions .btn-comprar { flex: 0 0 auto !important; width: 100%; height: auto; }
body.loja-on .product-actions .btn-comprar { display: flex !important; align-items: center; justify-content: center; gap: .5rem;
  background: var(--lj-azul); color: #fff; border: 0; cursor: pointer; border-radius: 6px; font-weight: 700; padding: .7rem; font-size: .95rem; }
body.loja-on .product-actions .btn-comprar:hover { background: var(--lj-azul-esc); }
/* Comprar em destaque; WhatsApp vira opcao secundaria, menor */
body.loja-on .product-actions .btn-comprar { padding: 1rem .7rem; font-size: 1.15rem; letter-spacing: .03em;
  box-shadow: 0 6px 18px rgba(0,100,255,.45); }
/* azul claro meio transparente, texto claro (contraste alto no fundo escuro) */
body.loja-on .product-actions .btn-whatsapp { background: rgba(30,120,255,.38) !important; border: 1px solid rgba(90,160,255,.85) !important;
  color: #d6e6ff !important; box-shadow: none !important; padding: .5rem .6rem !important; min-height: 0 !important;
  font-size: .8rem !important; font-weight: 700 !important; letter-spacing: 0 !important; text-transform: none !important; line-height: 1.3 !important; }
body.loja-on .product-actions .btn-whatsapp:hover { background: rgba(30,120,255,.55) !important; }
body.loja-on .product-actions .btn-comprar[disabled] { background: #374151; cursor: not-allowed; }
.lj-carrinho-flut { position: fixed; left: 16px; bottom: 16px; z-index: 1500; display: flex; align-items: center; gap: .5rem;
  background: var(--lj-azul); color: #fff !important; text-decoration: none; font: 700 .95rem/1 system-ui, sans-serif;
  padding: .8rem 1rem; border-radius: 999px; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.lj-carrinho-flut { padding: .7rem 1.2rem .7rem 1rem; gap: .7rem; border-radius: 14px; left: auto; bottom: auto; right: 16px; top: 88px; }
.lj-carrinho-flut i { font-size: 1.3rem; }
.lj-carrinho-flut .txt { display: flex; flex-direction: column; gap: .2rem; text-align: left; }
.lj-carrinho-flut .txt small { font-weight: 400; font-size: .78rem; opacity: .9; }
.lj-carrinho-flut .txt b { font-size: 1rem; }

/* ===== paginas da loja ===== */
body.lj { margin: 0; background: var(--lj-fundo); color: var(--lj-texto); font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
.lj a { color: #60a5fa; }
.lj-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 16px;
  border-bottom: 1px solid var(--lj-borda); max-width: 1100px; margin: 0 auto; }
.lj-top .marca { color: #fff; font-weight: 800; text-decoration: none; font-size: 1.15rem; }
.lj-top .marca span { color: var(--lj-azul); }
.lj-top nav { display: flex; gap: 1rem; font-size: .92rem; }
.lj-wrap { max-width: 1100px; margin: 0 auto; padding: 1.5rem 16px 4rem; display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 1.5rem; }
@media (max-width: 860px) { .lj-wrap { grid-template-columns: minmax(0,1fr); } .lj-resumo { order: -1; } }

.lj-passos { display: flex; gap: .4rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.lj-passos span { font-size: .82rem; padding: .35rem .7rem; border-radius: 999px; border: 1px solid var(--lj-borda); color: var(--lj-mudo); }
.lj-passos span.on { background: var(--lj-azul); border-color: var(--lj-azul); color: #fff; }
.lj-passos span.ok { border-color: var(--lj-verde); color: var(--lj-verde); }

.lj-card { background: var(--lj-card); border: 1px solid var(--lj-borda); border-radius: 10px; padding: 1.25rem; margin-bottom: 1rem; }
.lj-card h2 { margin: 0 0 1rem; font-size: 1.15rem; }
.lj-card h2 small { font-weight: 400; color: var(--lj-mudo); font-size: .85rem; }
.lj-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .8rem; }
.lj-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .lj-grid { grid-template-columns: minmax(0,1fr); } }
.lj label { display: block; font-size: .82rem; color: var(--lj-mudo); margin-bottom: .3rem; }
.lj input, .lj select { width: 100%; box-sizing: border-box; background: #0d1117; border: 1px solid var(--lj-borda); color: #fff;
  border-radius: 6px; padding: .7rem .75rem; font-size: 1rem; }
.lj input:focus { outline: 2px solid var(--lj-azul); border-color: transparent; }
.lj .erro { color: var(--lj-erro); font-size: .82rem; min-height: 1em; margin-top: .25rem; }
.lj-btn { background: var(--lj-azul); color: #fff; border: 0; border-radius: 8px; padding: .85rem 1.2rem; font-weight: 700;
  font-size: 1rem; cursor: pointer; width: 100%; }
.lj-btn:hover { background: var(--lj-azul-esc); }
.lj-btn.sec { background: transparent; border: 1px solid var(--lj-borda); color: var(--lj-texto); }
.lj-btn[disabled] { opacity: .5; cursor: not-allowed; }
.lj-abas { display: flex; gap: .5rem; margin-bottom: 1rem; }
.lj-abas button { flex: 1; background: transparent; border: 1px solid var(--lj-borda); color: var(--lj-mudo); padding: .6rem; border-radius: 6px; cursor: pointer; }
.lj-abas button.on { border-color: var(--lj-azul); color: #fff; background: rgba(0,100,255,.15); }

.lj .lj-opcao { display: flex; font-size: 1rem; color: var(--lj-texto); margin-bottom: .6rem; }
.lj-opcao { display: flex; align-items: center; gap: .8rem; border: 1px solid var(--lj-borda); border-radius: 8px; padding: .85rem; margin-bottom: .6rem; cursor: pointer; }
.lj-opcao:has(input:checked) { border-color: var(--lj-azul); background: rgba(0,100,255,.1); }
.lj-opcao input { width: auto; accent-color: var(--lj-azul); }
.lj-opcao .info { flex: 1; min-width: 0; }
.lj-opcao .info b { display: block; }
.lj-opcao .info small { color: var(--lj-mudo); }
.lj-opcao .valor { font-weight: 800; white-space: nowrap; }

.lj-resumo .item { display: flex; gap: .8rem; align-items: center; }
.lj-resumo .item img { width: 72px; height: 54px; object-fit: contain; background: #fff; border-radius: 6px; }
.lj-resumo .linha { display: flex; justify-content: space-between; padding: .45rem 0; border-top: 1px solid var(--lj-borda); font-size: .95rem; }
.lj-resumo .linha.total { font-size: 1.15rem; font-weight: 800; }
.lj-qtd { display: flex; align-items: center; gap: .5rem; margin: .8rem 0; }
.lj-qtd button { width: 34px; height: 34px; border-radius: 6px; border: 1px solid var(--lj-borda); background: transparent; color: #fff; font-size: 1.1rem; cursor: pointer; }
.lj-qtd input { width: 64px; text-align: center; }

.lj-pix { text-align: center; }
.lj-pix .qr { width: 200px; height: 200px; margin: .5rem auto 1rem; background: #fff; border-radius: 8px; display: grid; place-items: center; color: #111; font-size: .8rem; }
.lj-pix code { display: block; word-break: break-all; background: #0d1117; padding: .6rem; border-radius: 6px; font-size: .75rem; margin-bottom: .8rem; }
.lj-ok { text-align: center; padding: 2rem 1rem; }
.lj-ok .ico { font-size: 3rem; color: var(--lj-verde); }
.lj-tabela { width: 100%; border-collapse: collapse; font-size: .92rem; }
.lj-tabela th, .lj-tabela td { text-align: left; padding: .6rem .4rem; border-bottom: 1px solid var(--lj-borda); }
.lj-badge { display: inline-block; padding: .15rem .5rem; border-radius: 999px; font-size: .78rem; background: rgba(16,185,129,.15); color: var(--lj-verde); }
.lj-badge.pend { background: rgba(245,158,11,.15); color: #f59e0b; }
.lj-mp { display: flex; align-items: center; gap: .5rem; color: var(--lj-mudo); font-size: .8rem; margin-top: .8rem; justify-content: center; }

.lj [hidden] { display: none !important; }

.lj-item { display: grid; grid-template-columns: 72px minmax(0,1fr) auto; gap: .8rem; align-items: center; padding: .7rem 0; border-top: 1px solid var(--lj-borda); }
.lj-item:first-of-type { border-top: 0; }
.lj-item img { width: 72px; height: 54px; object-fit: contain; background: #fff; border-radius: 6px; }
.lj-item .nome { font-weight: 600; overflow-wrap: anywhere; }
.lj-item .lj-qtd { margin: .4rem 0 0; }
.lj-item .rm { background: none; border: 0; color: var(--lj-mudo); cursor: pointer; font-size: 1.1rem; padding: .4rem .6rem; margin-left: .3rem; border-radius: 6px; }
.lj-item .rm:hover { color: var(--lj-erro); background: rgba(248,113,113,.12); }
.lj-aviso { background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.4); color: #fcd34d; border-radius: 8px; padding: .8rem 1rem; margin-bottom: 1rem; }
.lj-aviso.erro { background: rgba(248,113,113,.1); border-color: rgba(248,113,113,.4); color: var(--lj-erro); }
@media (max-width: 560px) { .lj-item { grid-template-columns: 56px minmax(0,1fr); } .lj-item img { width: 56px; height: 42px; } .lj-item .preco { grid-column: 2; } }
body.loja-on .product-actions .lj-linha { display: flex; gap: .5rem; width: 100%; }
body.loja-on .product-actions .lj-linha .btn-comprar { flex: 1 1 auto !important; width: auto; min-width: 0; }
.btn-add { flex: 0 0 auto; width: 3.6rem; border: 2px solid var(--lj-azul); background: transparent; color: #fff; border-radius: 6px;
  cursor: pointer; font-size: 1.25rem; }
.btn-add:hover { background: rgba(0,100,255,.18); }
.btn-add.ok { background: var(--lj-verde); border-color: var(--lj-verde); }
.lj-carrinho-flut.pulo { animation: lj-pulo .5s; }
@keyframes lj-pulo { 40% { transform: scale(1.18); } }
@media (max-width: 480px) { body.loja-on .product-actions .btn-comprar { font-size: 1rem; padding: .85rem .5rem; } }

/* Pix na pagina do pedido */
.lj-pix { max-width: 340px; margin: 1rem auto; display: flex; flex-direction: column; gap: .6rem; align-items: stretch; }
.lj-pix img { width: 230px; max-width: 100%; align-self: center; background: #fff; padding: 8px; border-radius: 8px; }
.lj-pix textarea { width: 100%; box-sizing: border-box; font: .78rem/1.3 monospace; background: var(--lj-fundo); color: var(--lj-texto);
  border: 1px solid var(--lj-borda); border-radius: 6px; padding: .5rem; resize: none; word-break: break-all; }
.lj-pix small { color: var(--lj-mudo); }
/* o estoque.html carrega so um recorte do Font Awesome: icones usados pela loja */
.fa-cart-shopping::before { content: "\f07a"; } .fa-cart-plus::before { content: "\f217"; } .fa-check::before { content: "\f00c"; }
@media (max-width: 480px) {
  body.loja-on .product-actions .lj-linha { flex-direction: column; }
  body.loja-on .product-actions .lj-linha .btn-comprar { width: 100%; font-size: .95rem; }
  .btn-add { width: 100%; height: 2.4rem; font-size: 1.05rem; }
  .lj-carrinho-flut { top: 80px; right: 12px; padding: .55rem .9rem; }
}

/* forma de pagamento no checkout */
.lj-formas { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .8rem; }
.lj-card .lj-forma { position: relative; display: flex; margin: 0; font-weight: 400; color: var(--lj-texto); flex-direction: column; align-items: center; text-align: center; gap: .3rem; cursor: pointer;
  border: 2px solid var(--lj-borda); border-radius: 10px; padding: 1.1rem .8rem; }
.lj-card .lj-forma input { position: absolute; top: .7rem; left: .7rem; width: auto; margin: 0; padding: 0; accent-color: var(--lj-azul); }
.lj-forma i { font-size: 1.8rem; color: var(--lj-mudo); }
.lj-forma b { font-size: 1.05rem; }
.lj-forma small { color: var(--lj-mudo); font-size: .8rem; }
.lj-forma:has(input:checked) { border-color: var(--lj-azul); background: rgba(0,100,255,.1); }
.lj-forma:has(input:checked) i { color: #fff; }
.lj-forma:has(input[value=pix]:checked) i { color: #32bcad; }
@media (max-width: 420px) { .lj-formas { grid-template-columns: minmax(0,1fr); } }

/* ===== pagina de produto (/loja/<id>.html) ===== */
.lj-pwrap { max-width: 1100px; margin: 0 auto; padding: 1rem 16px 4rem; }
.lj-trilha { font-size: .85rem; color: var(--lj-mudo); margin-bottom: 1rem; overflow-wrap: anywhere; }
.lj-pgrid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 2rem; align-items: start; margin-bottom: 1.5rem; }
@media (max-width: 760px) { .lj-pgrid { grid-template-columns: minmax(0,1fr); gap: 1.2rem; } }
.lj-pimg { background: #fff; border-radius: 12px; padding: 1rem; display: flex; align-items: center; justify-content: center; }
.lj-pimg img { max-width: 100%; height: auto; max-height: 420px; object-fit: contain; }
.lj-pinfo h1 { font-size: 1.5rem; line-height: 1.25; margin: 0 0 .8rem; }
.lj-preco { font-size: 2rem; font-weight: 800; color: #4d94ff; }
.lj-parc { color: var(--lj-mudo); font-size: .9rem; margin-bottom: 1rem; }
.lj-est { color: var(--lj-verde); border: 1px solid rgba(16,185,129,.35); background: rgba(16,185,129,.08); border-radius: 8px;
  padding: .6rem .8rem; margin-bottom: 1rem; font-size: .92rem; }
.lj-prod .product-actions { display: flex; flex-direction: column; gap: .6rem; }
.lj-prod .btn-whatsapp { display: flex; align-items: center; justify-content: center; gap: .5rem; text-decoration: none; border-radius: 6px;
  background: rgba(30,120,255,.38); border: 1px solid rgba(90,160,255,.85); color: #d6e6ff; font-weight: 700; font-size: .85rem; padding: .6rem; }
.lj-garantias { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: .55rem; font-size: .9rem; color: var(--lj-texto); }
.lj-garantias i { color: #4d94ff; width: 1.3rem; }
.lj-desc p { line-height: 1.6; color: var(--lj-texto); }
.lj-cod { color: var(--lj-mudo); font-size: .85rem; }
.lj-prod .lj-carrinho-flut { top: 64px; }
.product-item h3 a { color: inherit; text-decoration: none; } .product-item h3 a:hover { text-decoration: underline; }
.lj-prod .product-actions .btn, .lj-prod .product-actions .btn-whatsapp { box-sizing: border-box; width: 100%; }
@media (max-width: 760px) {
  .lj-top .marca { font-size: 1rem; } .lj-top nav a { white-space: nowrap; }
  .lj-prod .lj-carrinho-flut, .lj .lj-carrinho-flut { top: auto; bottom: 16px; right: 16px; }
}
