/* Achadinhos · estilo copiado da prévia aprovada (02 Material/Prévia das telas/v2.html) */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #fff; color: #222;
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(70px + env(safe-area-inset-bottom));
}
body.sem-abas { padding-bottom: env(safe-area-inset-bottom); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
[hidden] { display: none !important; }
.conteudo { max-width: 640px; margin: 0 auto; }

/* Topo */
.top { padding: calc(env(safe-area-inset-top) + 14px) 18px 10px; background: #ee4d2d; color: #fff; }
.top h1 { margin: 0; font-size: 22px; }
.top small { opacity: .9; font-size: 14px; }

/* Busca, categorias e desconto */
.busca {
  display: block; width: calc(100% - 24px); margin: 10px 12px 0; background: #f3f3f3; border: 0; border-radius: 10px;
  padding: 10px 12px; color: #222; font-size: 16px; /* 16px: o iPhone não dá zoom ao tocar */
  -webkit-appearance: none; appearance: none;
}
.busca::placeholder { color: #888; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 10px 12px 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip { border: 1px solid #ccc; border-radius: 16px; padding: 5px 11px; font-size: 13px; white-space: nowrap; color: #444; flex: none; }
.chip.on { background: #ee4d2d; color: #fff; border-color: #ee4d2d; }
.desc { padding: 4px 12px 8px; font-size: 13px; color: #555; }
.desc button { color: #555; padding: 4px 2px; }
.desc button.on { color: #ee4d2d; font-weight: 700; }
.desc .sep { margin: 0 8px; color: #bbb; }
.ocultas { padding: 0 12px 6px; font-size: 12px; color: #2e7d32; }
.ocultas button { color: #2e7d32; text-decoration: underline; font-size: 12px; }

/* Lista de ofertas */
.lista { padding: 0 12px; }
.card { display: flex; gap: 10px; border-bottom: 1px solid #eee; padding: 9px 0; cursor: pointer; -webkit-tap-highlight-color: rgba(238, 77, 45, .08); }
.card img { width: 88px; height: 88px; object-fit: cover; border-radius: 10px; background: #f2f2f2; flex: none; }
.card .info { min-width: 0; }
.card.mandada { opacity: .55; }
.nome {
  font-size: 14px; color: #222; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.de { font-size: 12px; color: #999; text-decoration: line-through; margin-top: 3px; }
.por { font-size: 17px; font-weight: 700; color: #ee4d2d; }
.off { font-size: 12px; background: #fde8e3; color: #d73211; padding: 1px 5px; border-radius: 5px; font-weight: 600; }
.meta { font-size: 12px; color: #666; margin-top: 2px; }
.selo, .ja { display: inline-block; margin-top: 3px; margin-right: 4px; font-size: 11px; padding: 2px 6px; border-radius: 6px; }
.selo { background: #e8f5e9; color: #2e7d32; }
.ja { background: #eee; color: #555; }
.vazio { padding: 40px 24px; text-align: center; color: #777; font-size: 15px; line-height: 1.4; }
#sentinela { height: 1px; }

/* Abas embaixo */
.abas {
  position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: #fff; border-top: 1px solid #ddd;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); z-index: 5;
}
.aba { flex: 1; text-align: center; font-size: 12px; color: #888; }
.aba.on { color: #ee4d2d; font-weight: 700; }
.aba div { font-size: 22px; }

/* Avisos de tela inteira (sem link, sem internet) */
.aviso-tela { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.aviso-tela .icone { font-size: 52px; }
.aviso-tela h2 { margin: 12px 0 8px; font-size: 21px; }
.aviso-tela p { margin: 0 0 18px; color: #666; font-size: 15px; line-height: 1.4; }
.aviso-tela .bt { display: inline-block; width: auto; padding: 12px 22px; }

/* Botões */
.bt { display: block; width: calc(100% - 28px); margin: 6px 14px; padding: 13px; border-radius: 12px; text-align: center; font-weight: 700; font-size: 16px; }
.verde { background: #25d366; color: #fff; }
.cinza { background: #f1f1f1; color: #333; font-weight: 600; font-size: 14px; }

/* Topo amarelo do Mercado Livre */
.mltop { background: #ffe600; color: #333; }

/* Oferta aberta */
body.travado { overflow: hidden; }
.oferta-aberta {
  position: fixed; inset: 0; z-index: 10; background: #fff; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}
.voltar { display: block; padding: calc(env(safe-area-inset-top) + 14px) 16px 8px; font-size: 15px; color: #ee4d2d; }
.big { display: block; width: 100%; height: 300px; object-fit: contain; background: #fff; }
.msg { margin: 10px 14px; background: #dcf8c6; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; white-space: pre-wrap; line-height: 1.35; color: #222; overflow-wrap: anywhere; }
.bt:disabled { opacity: .6; cursor: default; }
.dica { font-size: 12px; color: #777; text-align: center; margin: 2px 18px; }
.dica-verde { color: #2e7d32; }
.fila-bt { display: flex; gap: 8px; margin: 10px 14px 6px; }
.fila-bt .bt { flex: 1; width: auto; margin: 0; }
.aviso-preco { font-size: 11.5px; color: #999; text-align: center; margin: 12px 18px 0; }

/* Recado rápido ("✓ Texto copiado") */
.recado {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 20;
  background: #333; color: #fff; padding: 10px 16px; border-radius: 20px; font-size: 14px; max-width: 90vw; text-align: center;
}

/* Colar link do Mercado Livre */
.campo {
  display: block; width: calc(100% - 28px); margin: 18px 14px 8px; border: 2px dashed #3483fa; border-radius: 12px;
  padding: 14px; color: #222; font: inherit; font-size: 16px; resize: none; background: #fff; -webkit-appearance: none; appearance: none;
}
.campo::placeholder { color: #3483fa; opacity: 1; }
.campo:focus { outline: none; border-style: solid; }
.dica.erro-txt { color: #c62828; }
.prev { display: flex; gap: 10px; margin: 8px 14px; padding: 10px; border: 1px solid #eee; border-radius: 12px; }
.prev .info { min-width: 0; }
.ph { width: 88px; height: 88px; border-radius: 10px; background: #ddd; display: flex; align-items: center; justify-content: center; color: #888; font-size: 11px; text-align: center; flex: none; object-fit: cover; }
img.ph { background: #f2f2f2; }
.por-ml { color: #3483fa; }
.form-ml { margin: 10px 14px; padding: 12px; border: 1px solid #f3d27a; background: #fffbea; border-radius: 12px; }
.form-titulo { font-weight: 700; font-size: 15px; margin-bottom: 8px; color: #333; }
.form-ml label { display: block; font-size: 13px; color: #555; margin-top: 10px; }
.form-ml input[type="text"] {
  display: block; width: 100%; margin-top: 4px; padding: 10px; border: 1px solid #ccc; border-radius: 8px; font: inherit; font-size: 16px;
  background: #fff; -webkit-appearance: none; appearance: none;
}
.form-ml input[type="file"] { display: block; margin-top: 6px; font-size: 14px; }
.form-ml .bt { width: 100%; margin: 14px 0 0; }
.azul { background: #3483fa; color: #fff; }
.erro { margin-top: 10px; color: #c62828; font-size: 13px; }
.bt-link { display: block; margin: 14px auto 0; color: #3483fa; font-size: 14px; text-decoration: underline; }
