/* ============================================================
   Melist v2 – estilos (UI Kit do Figma)
   ============================================================ */
:root {
  --branco: #FFFFFF;
  --fundo: #F8F8F8;
  --roxo: #573BA0;
  --roxo-claro: #988AB6;
  --coral: #FA6A6A;
  --tinta: #2F2E41;
  --cinza: #999999;
  --cinza-claro: #A7A6B6;
  --borda: #E6E6E6;
  --verde: #23C799;
  --amarelo: #F5C55A;

  --fonte: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Roboto, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --raio: 10px;
  --raio-folha: 26px;
  --lado: 20px;
  --topo: env(safe-area-inset-top, 0px);
  --base: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--fonte);
  font-size: 16px;
  line-height: 1.35;
  color: var(--tinta);
  background: var(--branco);
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}
body.travado { overflow: hidden; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--roxo); outline-offset: 2px; }
.folha:focus, .rolagem:focus { outline: none; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ícone de uma cor (SVG usado como máscara, pinta com currentColor) */
.ico {
  display: inline-block; flex: none;
  width: 22px; height: 22px;
  background-color: currentColor;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}

/* ---------------------------------------------------------------- telas */
.app { min-height: 100vh; min-height: 100dvh; }
.tela {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  padding: calc(var(--topo) + 28px) var(--lado) calc(var(--base) + 24px);
  background: var(--fundo);
}
.tela--branca { background: var(--branco); }
.coluna { width: 100%; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; flex: 1; }
.empurra { margin-top: auto; }

.cab { display: flex; align-items: center; gap: 12px; min-height: 44px; margin-bottom: 18px; }
.titulo { font-size: 22px; font-weight: 700; line-height: 1.2; color: var(--roxo); }
.btn-redondo {
  width: 44px; height: 44px; margin: -7px -7px -7px -7px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%; background: transparent; color: var(--roxo); cursor: pointer;
}
.btn-redondo .ico { width: 30px; height: 30px; }
.instrucao { font-size: 16px; margin-bottom: 12px; }
.ajuda { font-size: 12px; color: var(--cinza); margin-top: 10px; }
.ajuda.erro { color: var(--coral); }

/* ---------------------------------------------------------------- campos */
.campos { background: var(--branco); border: 1px solid var(--borda); border-radius: var(--raio); }
.campo { position: relative; height: 64px; border-top: 1px solid var(--borda); }
.campo:first-child { border-top: 0; border-radius: var(--raio) var(--raio) 0 0; }
.campo:last-child { border-radius: 0 0 var(--raio) var(--raio); }
.campo:only-child { border-radius: var(--raio); }
.campo input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; border-radius: inherit; background: transparent; outline: none;
  padding: 26px 20px 8px;
  font: inherit; font-size: 16px; color: var(--tinta);
}
.campo label {
  position: absolute; left: 20px; right: 20px; top: 50%; transform: translateY(-50%);
  font-size: 16px; color: var(--cinza); pointer-events: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: top .15s, font-size .15s, transform .15s;
}
.campo input:focus + label,
.campo input:not(:placeholder-shown) + label { top: 11px; transform: none; font-size: 14px; }
.campo input::placeholder { color: transparent; }
.campo input:focus::placeholder { color: var(--cinza-claro); }
.campo--simples input { padding: 0 20px; }
.campo--simples input::placeholder { color: var(--cinza-claro); }
.campo:focus-within { box-shadow: inset 0 0 0 2px var(--roxo-claro); }
.campo.erro label, .campo.erro input { color: var(--coral); }

/* checkbox do aceite */
.aceite { display: flex; align-items: center; gap: 14px; margin-top: 26px; font-size: 16px; }
.caixa-check { position: relative; flex: none; width: 32px; height: 32px; }
.caixa-check input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.caixa-check span {
  position: absolute; inset: 0; border: 1px solid var(--borda); border-radius: 8px; background: var(--branco);
  pointer-events: none;
}
.caixa-check input:checked + span { background: var(--verde); border-color: var(--verde); }
.caixa-check input:checked + span::after {
  content: ""; position: absolute; left: 11px; top: 7px; width: 7px; height: 13px;
  border: solid var(--branco); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.caixa-check input:focus-visible + span { outline: 2px solid var(--roxo); outline-offset: 2px; }

/* ---------------------------------------------------------------- botões e links */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 54px; padding: 0 24px;
  border: 1px solid transparent; border-radius: 27px;
  font-size: 16px; font-weight: 700; cursor: pointer;
  transition: background-color .15s, color .15s;
}
.btn-primario { background: var(--verde); color: var(--branco); }
.btn-primario:disabled { background: transparent; border-color: var(--borda); color: var(--cinza-claro); cursor: default; }
.btn-primario.ocupado { opacity: .75; cursor: progress; }
.acoes { margin-top: 26px; }
.link {
  background: none; border: 0; padding: 10px 4px; cursor: pointer;
  color: var(--coral); font-size: 16px; text-decoration: underline; text-underline-offset: 3px;
}
.link--inline { padding: 0; }
.centro { text-align: center; }

/* ---------------------------------------------------------------- introdução (01) */
.intro { background: var(--branco); text-align: center; overflow: hidden; }
.intro-logo { width: 104px; margin: 6px auto 0; }
.carrossel { position: relative; margin: 28px calc(-1 * var(--lado)) 0; }
.carrossel::before {
  content: ""; position: absolute; left: -35%; right: -35%; top: 6px; height: 320px;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: linear-gradient(#F4F4F4, rgba(248, 248, 248, 0) 85%);
}
.slides {
  position: relative; display: flex; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
.slides::-webkit-scrollbar { display: none; }
.slide {
  flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always;
  display: flex; flex-direction: column; align-items: center;
  padding: 30px var(--lado) 0;
}
.slide img { width: 238px; height: auto; aspect-ratio: 714 / 465; }
.slide h2 { margin-top: 22px; max-width: 270px; font-size: 22px; font-weight: 700; line-height: 1.25; color: var(--roxo); }
.slide p { margin-top: 14px; max-width: 290px; color: var(--cinza); }
.pontos { display: flex; justify-content: center; gap: 2px; margin-top: 30px; }
.ponto { position: relative; width: 22px; height: 22px; border: 0; padding: 0; background: none; cursor: pointer; }
.ponto::after {
  content: ""; position: absolute; top: 7px; left: 7px; width: 8px; height: 8px; border-radius: 4px;
  background: var(--roxo-claro); transition: width .2s, left .2s;
}
.ponto[aria-current="true"]::after { left: 2px; width: 18px; background: var(--roxo); }
.intro-rodape { margin-top: auto; padding-top: 32px; }
.intro-rodape > p:first-child { margin-bottom: 14px; }
.intro-entrar { margin-top: 18px; }

/* ---------------------------------------------------------------- código SMS (04/06) */
.codigo { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.digito {
  height: 64px; display: grid; place-items: center;
  background: var(--branco); border: 1px solid var(--borda); border-radius: var(--raio);
  font-size: 26px; font-weight: 700; color: var(--tinta);
}
.codigo.foco .digito.atual { border-color: var(--roxo); box-shadow: inset 0 0 0 1px var(--roxo); }
.codigo input {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0;
  background: transparent; color: transparent; caret-color: transparent;
  font-size: 16px; letter-spacing: 1em; outline: none;
}
.codigo input::selection { background: transparent; }
.aviso-teste {
  margin-top: 16px; padding: 12px 14px; border: 1px solid var(--amarelo); border-radius: var(--raio);
  background: #FEF7E6; font-size: 14px;
}
.aviso-teste strong { letter-spacing: .12em; }
.reenvio { min-height: 44px; display: grid; place-items: center; margin-top: 40px; }
.reenvio p { color: var(--cinza); font-size: 16px; }

/* ---------------------------------------------------------------- início (10) */
.inicio { min-height: 100vh; min-height: 100dvh; background: var(--fundo); padding-bottom: calc(var(--base) + 110px); }
.inicio-topo {
  position: relative; overflow: hidden; text-align: center;
  padding: calc(var(--topo) + 50px) var(--lado) 23px;
  background: var(--branco); border-bottom: 1px solid #EFEFEF;
}
.inicio-topo::before {
  content: ""; position: absolute; left: 50%; top: calc(var(--topo) - 200px);
  width: 250px; height: 250px; transform: translateX(-50%); border-radius: 50%; background: #F6F6F6;
}
.inicio-vetores { position: absolute; left: 50%; top: calc(var(--topo) + 22px); width: 355px; max-width: none; transform: translateX(-50%); }
.inicio-logo { position: relative; width: 146px; margin: 0 auto 50px; }
.busca {
  position: relative; display: flex; align-items: center;
  width: 100%; max-width: 640px; height: 58px; margin: 0 auto;
  background: var(--branco); border: 1px solid var(--borda); border-radius: 29px;
  box-shadow: 0 3px 8px rgba(47, 46, 65, .06);
}
.busca-abrir {
  flex: 1; height: 100%; display: flex; align-items: center; gap: 12px;
  padding: 0 0 0 22px; border: 0; border-radius: 29px 0 0 29px; background: none; cursor: text; text-align: left;
  font-size: 16px; color: var(--tinta);
}
.busca-abrir .ico { width: 24px; height: 24px; color: var(--cinza-claro); }
.busca-codigo { width: 58px; height: 100%; border: 0; border-radius: 0 29px 29px 0; background: none; color: var(--coral); cursor: pointer; display: grid; place-items: center; }
.busca-codigo .ico { width: 24px; height: 24px; }
.conteudo { width: 100%; max-width: 1024px; margin: 0 auto; padding: 0 var(--lado); }
.vazio { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 72px 0 24px; }
.vazio img { width: 104px; height: auto; }
.vazio h2 { margin-top: 22px; font-size: 16px; font-weight: 700; }
.vazio p { margin-top: 14px; max-width: 290px; color: var(--cinza); }
.vazio .link { margin-top: 26px; }

/* barra de navegação */
.nav {
  position: fixed; left: 50%; bottom: calc(var(--base) + 16px); transform: translateX(-50%); z-index: 40;
  display: flex; gap: 2px; padding: 6px;
  background: var(--roxo); border-radius: 31px; box-shadow: 0 8px 20px rgba(87, 59, 160, .28);
}
.nav button {
  width: 58px; height: 46px; display: grid; place-items: center;
  border: 0; border-radius: 23px; background: transparent; color: var(--branco); cursor: pointer;
}
.nav button[aria-current="page"] { background: rgba(255, 255, 255, .18); }
.nav .ico { width: 22px; height: 22px; }
.nav button:focus-visible { outline-color: var(--branco); outline-offset: -4px; }

/* ---------------------------------------------------------------- perfil (27) */
.perfil { background: var(--fundo); padding-bottom: calc(var(--base) + 110px); }
.perfil .coluna { max-width: 640px; }
.cartoes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cartao {
  display: flex; flex-direction: column; align-items: flex-start; text-align: left;
  min-height: 166px; padding: 20px 16px 20px 20px; border: 1px solid var(--borda); border-radius: var(--raio);
  background: var(--branco); cursor: pointer;
}
.cartao img { height: 64px; width: auto; max-width: 100%; object-fit: contain; object-position: left center; }
.cartao img.ilustra-dados { margin-left: -12px; }
.cartao strong { margin-top: 26px; font-size: 16px; }
.cartao span { margin-top: 4px; font-size: 14px; color: var(--cinza); }
.menu { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
.menu + .menu { margin-top: 32px; }
.item {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 58px; padding: 10px 20px;
  border: 1px solid var(--borda); border-radius: var(--raio); background: var(--branco);
  font-size: 16px; text-align: left; cursor: pointer;
}
.item > .ico { color: var(--coral); }
.item .texto { flex: 1; }
.item .seta { width: 8px; height: 13px; color: var(--cinza-claro); }
.item-desc { display: block; margin-top: 3px; font-size: 12px; color: var(--cinza); line-height: 1.35; }
.chave { position: relative; flex: none; width: 46px; height: 28px; }
.chave input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.chave span { position: absolute; inset: 0; border-radius: 14px; background: var(--borda); transition: background-color .15s; pointer-events: none; }
.chave span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--branco); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .15s;
}
.chave input:checked + span { background: var(--verde); }
.chave input:checked + span::after { transform: translateX(18px); }
.chave input:focus-visible + span { outline: 2px solid var(--roxo); outline-offset: 2px; }

/* ---------------------------------------------------------------- camadas (bottom sheets) */
.camada { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.veu { position: absolute; inset: 0; background: rgba(47, 46, 65, .45); animation: aparecer .2s ease-out; }
.folha {
  position: relative; width: 100%;
  max-height: calc(100dvh - var(--topo) - 24px); overflow-y: auto; overscroll-behavior: contain;
  padding: 24px var(--lado) calc(var(--base) + 26px);
  background: var(--fundo); border-radius: var(--raio-folha) var(--raio-folha) 0 0;
  animation: subir .24s cubic-bezier(.2, .8, .2, 1);
}
.folha.saindo { transform: translateY(100%); transition: transform .2s ease-in; }
.camada.saindo .veu { opacity: 0; transition: opacity .2s; }
.folha-cab { display: flex; align-items: center; gap: 12px; min-height: 44px; margin-bottom: 18px; touch-action: none; }
.folha-cab .titulo { flex: 1; }
.opcoes { display: flex; flex-direction: column; gap: 8px; }
.opcoes + .centro { margin-top: 18px; }
.alerta { text-align: center; padding: 22px 6px 6px; }
.alerta img { width: 92px; height: auto; margin: 0 auto 26px; }
.alerta h2 { font-size: 16px; font-weight: 700; max-width: 300px; margin: 0 auto; }
.alerta p { margin: 18px auto 0; max-width: 300px; color: var(--cinza); }
.alerta .link { margin-top: 28px; }

/* política (20) */
.folha--politica { display: flex; flex-direction: column; height: calc(100dvh - var(--topo) - 24px); overflow: hidden; padding-bottom: 0; }
.rolagem { flex: 1; overflow-y: auto; overscroll-behavior: contain; margin: 0 calc(-1 * var(--lado)); padding: 0 var(--lado) 16px; }
.politica-texto { font-size: 16px; line-height: 1.45; }
.politica-texto p { margin: 0 0 14px; }
.politica-texto h2, .politica-texto h3, .politica-texto h4 { margin: 22px 0 8px; font-size: 16px; font-weight: 700; }
.politica-texto ul, .politica-texto ol { margin: 0 0 14px; padding-left: 22px; }
.politica-texto li { margin-bottom: 6px; }
.politica-texto a { color: var(--coral); }
.politica-aviso { margin-bottom: 16px; padding: 12px 14px; border-radius: var(--raio); background: var(--branco); border: 1px solid var(--borda); font-size: 14px; }
.folha-rodape { padding: 14px 0 calc(var(--base) + 22px); border-top: 1px solid var(--borda); }
.carregando { padding: 40px 0; text-align: center; color: var(--cinza); }

/* ---------------------------------------------------------------- avisos rápidos (toasts) */
.toasts {
  position: fixed; left: 50%; top: calc(var(--topo) + 12px); transform: translateX(-50%); z-index: 90;
  display: flex; flex-direction: column; gap: 8px; width: min(92vw, 400px); pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: var(--raio);
  background: var(--coral); color: var(--branco); font-size: 14px; line-height: 1.3;
  box-shadow: 0 6px 16px rgba(47, 46, 65, .18); animation: descer .2s ease-out; pointer-events: auto;
}
.toast.ok { background: var(--verde); }
.toast.info { background: var(--tinta); }
.toast .ico { width: 20px; height: 20px; }
.toast.saindo { opacity: 0; transform: translateY(-8px); transition: opacity .2s, transform .2s; }


/* ================================================================ ENTREGA 2: listas, busca e produto */
.btn-coral { color: var(--coral); }
.btn-coral .ico { width: 28px; height: 28px; }
.btn-opcoes { width: 44px; height: 36px; display: grid; place-items: center; border: 0; background: none; color: var(--coral); cursor: pointer; border-radius: 8px; }
.btn-opcoes .ico { width: 18px; height: 5px; }
.circulo { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 1px solid var(--borda); border-radius: 50%; background: var(--branco); color: var(--coral); cursor: pointer; }
.circulo .ico { width: 16px; height: 18px; }
.carregando { padding: 40px 0; text-align: center; color: var(--cinza); }

/* avatares de quem participa */
.avatares { display: inline-flex; flex-direction: row-reverse; align-items: center; }
.av {
  width: 36px; height: 36px; margin-left: -10px; display: grid; place-items: center;
  border: 2px solid var(--branco); border-radius: 50%; font-size: 14px; font-weight: 700; color: var(--branco); background: var(--cinza-claro);
}
.av:last-child { margin-left: 0; }
.av-1 { background: var(--roxo); }
.av-2 { background: var(--roxo-claro); }
.av-mais { background: var(--cinza-claro); font-size: 13px; }

/* Início com listas (12) */
.listas-cab { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 14px; }
.listas { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.lista-card { position: relative; background: var(--branco); border: 1px solid var(--borda); border-radius: var(--raio); }
.lista-abrir { display: flex; flex-direction: column; width: 100%; padding: 22px 64px 22px 20px; border: 0; background: none; text-align: left; cursor: pointer; border-radius: var(--raio); }
.lista-abrir strong { font-size: 17px; }
.lista-info { margin-top: 4px; font-size: 15px; color: var(--cinza); }
.miniaturas { display: flex; gap: 6px; margin-top: 14px; }
.mini { width: 50px; height: 50px; flex: none; padding: 4px; border: 1px solid var(--borda); border-radius: 8px; background: var(--branco); }
.mini img, img.mini { width: 100%; height: 100%; object-fit: contain; }
.lista-opcoes { position: absolute; top: 10px; right: 8px; }
.avatares--card { position: absolute; right: 20px; bottom: 22px; pointer-events: none; }
.lista-card:has(.avatares--card) .lista-abrir { min-height: 118px; }

/* tela da busca (13/14/15) */
.busca-tela { min-height: 100vh; min-height: 100dvh; background: var(--fundo); }
.busca-topo { position: sticky; top: 0; z-index: 5; padding: calc(var(--topo) + 36px) var(--lado) 18px; background: var(--branco); border-bottom: 1px solid #EFEFEF; }
.busca-campo {
  display: flex; align-items: center; gap: 4px; width: 100%; max-width: 640px; height: 58px; margin: 0 auto; padding: 0 4px 0 14px;
  background: var(--branco); border: 1px solid var(--borda); border-radius: 29px; box-shadow: 0 3px 8px rgba(47, 46, 65, .06);
}
.busca-campo:focus-within { border-color: var(--roxo-claro); }
.busca-campo .btn-redondo { margin: 0; }
.busca-campo input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none; font: inherit; font-size: 16px; color: var(--tinta); padding: 0 6px; }
.busca-campo input::-webkit-search-cancel-button { display: none; }
.busca-campo input::placeholder { color: var(--cinza); }
.busca-acao { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--cinza-claro); cursor: pointer; }
.busca-acao.coral { color: var(--coral); }
.busca-acao .ico { width: 22px; height: 22px; }
.busca-corpo { padding-top: 22px; padding-bottom: calc(var(--base) + 40px); }
.busca-titulo { font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.busca-nada { margin: 0 0 18px; color: var(--cinza); max-width: 520px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--lado)) 18px; padding: 0 var(--lado) 2px; }
.chips::-webkit-scrollbar { display: none; }
.chips--quebra { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.chip {
  flex: none; height: 44px; padding: 0 20px; border: 2px solid var(--borda); border-radius: 22px; background: var(--branco);
  font-size: 15px; color: var(--cinza); cursor: pointer; white-space: nowrap;
}
.chip[aria-pressed="true"] { background: var(--roxo); border-color: var(--roxo); color: var(--branco); }
.grade { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 10px; }
.produto { position: relative; container-type: inline-size; }
.produto-abrir { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.produto-foto {
  display: grid; place-items: center; aspect-ratio: 1; padding: 8px; overflow: hidden;
  background: var(--branco); border: 1px solid var(--borda); border-radius: var(--raio);
}
.produto-foto img { width: 100%; height: 100%; object-fit: contain; }
.produto-foto--generico { color: var(--coral); }
.produto-foto--generico .ico { width: 18px; height: 18px; }
.produto-nome {
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
  margin-top: 8px; padding: 0 2px; font-size: 15px; line-height: 1.3; color: var(--tinta);
}
.produto-mais {
  position: absolute; right: 6px; top: calc(100cqw - 48px); width: 42px; height: 42px;
  display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--branco); color: var(--coral);
  box-shadow: 0 2px 8px rgba(47, 46, 65, .14); cursor: pointer;
}
.produto-mais .ico { width: 14px; height: 14px; }

/* detalhe (17) */
.folha--detalhe { background: var(--branco); }   /* fundo branco, igual ao das fotos dos produtos */
.detalhe { display: flex; flex-direction: column; align-items: center; text-align: center; }
.detalhe-foto { width: min(300px, 80vw); height: min(300px, 80vw); object-fit: contain; }
.detalhe-nome { margin-top: 26px; max-width: 340px; font-size: 16px; }

/* por na lista (18/19) */
.destinos { display: flex; flex-direction: column; gap: 8px; }
.destinos + .centro { margin-top: 14px; }
.destinos-vazio { color: var(--cinza); }
.destino {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 76px; padding: 14px 14px 14px 20px;
  border: 1px solid var(--borda); border-radius: var(--raio); background: var(--branco); text-align: left; cursor: pointer; overflow: hidden;
}
.destino-texto { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.destino-texto strong { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.destino-texto span { margin-top: 3px; font-size: 14px; color: var(--cinza); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.destino-minis { display: flex; gap: 6px; flex: none; margin-right: -24px; }
.destino-minis .mini { width: 46px; height: 46px; }
.destino.adicionado { cursor: default; }
.destino-ok { color: var(--verde); display: grid; }
.destino-ok .ico { width: 22px; height: 22px; }

/* quantidade − N + */
.passo { display: inline-flex; align-items: center; flex: none; height: 44px; border: 1px solid var(--borda); border-radius: 22px; background: var(--branco); }
.passo button { width: 40px; height: 42px; display: grid; place-items: center; border: 0; background: none; cursor: pointer; border-radius: 21px; }
.passo .menos { color: var(--cinza-claro); }
.passo .mais { color: var(--coral); }
.passo .ico { width: 12px; height: 12px; }
.passo .menos .ico { height: 2px; }
.passo-n { min-width: 18px; text-align: center; font-size: 17px; font-weight: 700; }

/* tela da lista (21/22) */
.lista-tela { min-height: 100vh; min-height: 100dvh; background: var(--fundo); }
.lista-topo { position: sticky; top: 0; z-index: 5; padding: calc(var(--topo) + 22px) var(--lado) 0; background: var(--branco); border-bottom: 1px solid var(--borda); }
.lista-barra { display: flex; align-items: center; gap: 10px; min-height: 44px; padding-bottom: 12px; }
.lista-nome { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lista-barra .avatares { margin-left: -4px; }
.abas { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--lado)); padding: 0 var(--lado); }
.abas::-webkit-scrollbar { display: none; }
.aba {
  flex: none; padding: 10px 0 11px; border: 0; border-bottom: 2px solid transparent; background: none;
  font-size: 16px; color: var(--cinza-claro); white-space: nowrap; cursor: pointer;
}
.aba[aria-current="true"] { color: var(--coral); border-bottom-color: var(--coral); }
.lista-corpo { width: 100%; max-width: 1024px; margin: 0 auto; padding: 4px var(--lado) calc(var(--base) + 110px); }
.secao h2 { display: flex; align-items: center; gap: 10px; margin: 24px 0 6px; font-size: 18px; font-weight: 700; }
.secao-ico { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #ECECEC; }
.itens { list-style: none; margin: 0; padding: 0; }
.item-lista { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--borda); }
.item-lista:last-child { border-bottom: 0; }
.item-foto { width: 72px; height: 72px; flex: none; padding: 5px; border: 1px solid var(--borda); border-radius: var(--raio); background: var(--branco); cursor: pointer; }
.item-foto img { width: 100%; height: 100%; object-fit: contain; }
.item-nome { flex: 1; min-width: 0; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; font-size: 15px; line-height: 1.3; }
.fab {
  position: fixed; z-index: 30; right: max(var(--lado), calc((100vw - 1024px) / 2 + var(--lado))); bottom: calc(var(--base) + 24px);
  width: 58px; height: 58px; display: grid; place-items: center; border: 0; border-radius: 50%;
  background: var(--verde); color: var(--branco); box-shadow: 0 6px 16px rgba(35, 199, 153, .35); cursor: pointer;
}
.fab .ico { width: 18px; height: 18px; }

/* aviso com ação (Desfazer) */
.toast-texto { flex: 1; }
.toast-acao { margin: -6px -6px -6px 6px; padding: 6px 10px; border: 0; border-radius: 6px; background: rgba(255, 255, 255, .16); color: var(--branco); font-weight: 700; font-size: 14px; cursor: pointer; }

/* cobertura "Lendo o código de barras…" */
.cobertura { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; background: rgba(248, 248, 248, .9); text-align: center; color: var(--tinta); }
.cobertura p { margin-top: 14px; }
.girando { display: inline-block; width: 34px; height: 34px; border: 3px solid var(--borda); border-top-color: var(--roxo); border-radius: 50%; animation: girar .8s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }


/* ================================================================ ENTREGA 3: compartilhamento */
.av-3 { background: var(--cinza-claro); }
.av-4 { background: #D6D6DC; }
.av-g { width: 50px; height: 50px; margin: 0; border: 0; font-size: 18px; flex: none; }
.avatares-botao { display: inline-flex; padding: 4px; margin: -4px; border: 0; background: none; cursor: pointer; border-radius: 22px; }
.convide { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 18px 0 6px; }
.convide img { width: 96px; height: auto; }
.convide p { margin-top: 22px; max-width: 300px; color: var(--cinza); }
.pessoas { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.pessoa { display: flex; align-items: center; gap: 14px; }
.pessoa-texto { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pessoa-texto strong { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pessoa-texto span { margin-top: 2px; font-size: 15px; color: var(--cinza); }
.pessoa-remover { margin: 0 -8px 0 0; }
.pessoa-remover .ico { width: 24px; height: 26px; }
.copiar { margin-top: 16px; }
.copiar input { font-size: 14px !important; }
.convite-texto { font-size: 16px; margin-bottom: 16px; }
.convite-card .lista-abrir { cursor: default; }
.acoes + .centro { margin-top: 12px; }


/* ================================================================ ENTREGA 4: perfil e conta */
.campos { overflow: hidden; }
.campos--sep { margin-top: 8px; }
.instrucao--sep { margin-top: 26px; }
.campo--fixo input { color: var(--tinta); cursor: default; }
.campo--fixo:focus-within { box-shadow: none; }
.campo-ok { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); color: var(--verde); display: grid; }
.campo-ok .ico { width: 24px; height: 24px; }
.campo--escolha { display: block; width: 100%; border: 0; background: none; text-align: left; cursor: pointer; padding: 0; }
.campo-rotulo { position: absolute; left: 20px; top: 11px; font-size: 14px; color: var(--cinza); }
.campo-valor { position: absolute; left: 20px; right: 50px; bottom: 9px; font-size: 16px; color: var(--tinta); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seta-baixo { position: absolute; right: 22px; top: 50%; width: 8px; height: 13px; transform: translateY(-50%) rotate(90deg); color: var(--cinza-claro); }
.item--compacto { margin-top: 8px; min-height: 54px; }
.opcoes-radio { border: 0; margin: 4px 0 18px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.radio { position: relative; display: flex; align-items: center; gap: 14px; min-height: 48px; font-size: 16px; cursor: pointer; }
.radio input { position: absolute; opacity: 0; width: 32px; height: 32px; margin: 0; cursor: pointer; }
.radio-marca { width: 32px; height: 32px; flex: none; border: 1px solid var(--borda); border-radius: 50%; background: var(--branco); position: relative; }
.radio input:checked + .radio-marca { border: 2px solid var(--verde); }
.radio input:checked + .radio-marca::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--verde); }
.radio input:focus-visible + .radio-marca { outline: 2px solid var(--roxo); outline-offset: 2px; }
.campo-par { display: grid; border-top: 1px solid var(--borda); }
.par-num { grid-template-columns: 2fr 3fr; }
.par-bairro { grid-template-columns: 2fr 1fr; }
.campo-par .campo { border-top: 0; border-radius: 0; }
.campo-par .campo + .campo { border-left: 1px solid var(--borda); }
.excluida-topo { display: flex; flex-direction: column; align-items: center; padding-top: 64px; }
.excluida-topo img { width: 132px; height: auto; }
.excluida-topo h1 { margin-top: 30px; font-size: 16px; font-weight: 700; }
.excluida-topo p { margin-top: 18px; max-width: 290px; color: var(--cinza); }
.excluida-topo .aviso-teste { color: var(--tinta); max-width: 360px; }

/* telas largas com mouse: realce ao passar o cursor */
@media (hover: hover) and (pointer: fine) {
  .item:hover, .cartao:hover, .lista-card:hover, button.destino:hover, .produto-abrir:hover .produto-foto, .item-foto:hover, .campo--escolha:hover { border-color: var(--roxo-claro); }
  .lista-card:hover .lista-abrir, .item:hover { background-color: #FDFDFF; }
  .chip:not([aria-pressed="true"]):hover { border-color: var(--roxo-claro); color: var(--tinta); }
  .btn-primario:not(:disabled):hover, .fab:hover { filter: brightness(.95); }
  .link:hover { text-decoration-thickness: 2px; }
  .aba:not([aria-current="true"]):hover, .busca-acao:hover { color: var(--tinta); }
  .produto-mais:hover, .passo button:hover, .btn-opcoes:hover, .circulo:hover { background-color: #F3F1FA; }
  .nav button:not([aria-current="page"]):hover { background: rgba(255, 255, 255, .1); }
}


/* ================================================================ ENTREGA 5: gesto de deslizar e carrinho */
.linha { position: relative; overflow: hidden; margin: 0 calc(-1 * var(--lado)); touch-action: pan-y; list-style: none; }
.linha-conteudo {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 14px;
  padding: 12px var(--lado); background: var(--fundo); transition: transform .2s ease;
}
.linha-conteudo::after { content: ""; position: absolute; left: var(--lado); right: var(--lado); bottom: 0; height: 1px; background: var(--borda); }
.linha:last-child .linha-conteudo::after { display: none; }
.acao {
  position: absolute; top: 12px; bottom: 12px; z-index: 0; width: 120px; visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border: 0; padding: 0 8px; color: var(--branco); font-size: 14px; line-height: 1.2; cursor: pointer; text-align: center;
}
.acao .ico { width: 22px; height: 22px; }
.acao-carrinho { left: 0; background: var(--roxo); clip-path: polygon(0 0, calc(100% - 5px) 0, 100% 100%, 0 100%); }
.acao-excluir { right: 0; background: var(--coral); clip-path: polygon(5px 0, 100% 0, 100% 100%, 0 100%); }
.linha.mostra-carrinho .acao-carrinho, .linha.mostra-excluir .acao-excluir { visibility: visible; }
.linha-conteudo.espiar { animation: espiar 1.3s ease-in-out; }
@keyframes espiar { 0%, 100% { transform: none; } 30%, 65% { transform: translateX(76px); } }
.linha.espiando .acao-carrinho { width: 76px !important; }
.linha.espiando .acao-carrinho span { display: none; }

/* ações sem gesto: invisíveis no toque (mas lidas por leitores de tela), visíveis com mouse */
.rapida {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; overflow: hidden; border: 0;
  clip-path: inset(50%); white-space: nowrap;
}
.rapida:focus-visible { position: static; width: 34px; height: 34px; clip-path: none; flex: none; display: grid; place-items: center; border-radius: 50%; color: var(--branco); background: var(--roxo); }
.rapida-excluir:focus-visible { background: var(--coral); }
@media (hover: hover) and (pointer: fine) {
  .rapida {
    position: static; width: 34px; height: 34px; clip-path: none; flex: none; display: grid; place-items: center;
    border-radius: 50%; color: var(--branco); background: var(--roxo); opacity: 0; transition: opacity .15s; cursor: pointer;
  }
  .rapida-excluir { background: var(--coral); }
  .rapida .ico { width: 16px; height: 16px; }
  .linha:hover .rapida, .linha:focus-within .rapida { opacity: 1; }
  .rapida:hover { filter: brightness(.95); }
}

/* botão do carrinho com selo (US-40) */
.fab-carrinho {
  left: max(var(--lado), calc((100vw - 1024px) / 2 + var(--lado))); right: auto;
  width: 70px; height: 56px; border-radius: 28px; background: var(--roxo); box-shadow: 0 6px 16px rgba(87, 59, 160, .32);
}
.fab-carrinho .ico { width: 24px; height: 24px; }
.selo {
  position: absolute; top: -8px; right: -8px; min-width: 24px; padding: 3px 7px; border-radius: 12px; text-align: center;
  background: var(--coral); color: var(--branco); font-size: 12px; font-weight: 700; line-height: 1.2; white-space: nowrap;
  border: 2px solid var(--fundo);
}
.fab-carrinho.pulsar .selo { animation: pulsar .45s ease-out; }
@keyframes pulsar { 40% { transform: scale(1.25); } }

/* modal "Itens no carrinho" (34) */
.folha--carrinho { display: flex; flex-direction: column; height: calc(100dvh - var(--topo) - 40px); overflow: hidden; padding-bottom: 0; }
.folha-cab .btn-opcoes[aria-disabled="true"] { cursor: default; }
.carrinho-itens { margin: 0; padding: 0; }
.carrinho-item { list-style: none; }
.carrinho-foto { position: relative; flex: none; padding-left: 23px; }
.retornar {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%); z-index: 1;
  width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 50%;
  background: var(--coral); color: var(--branco); cursor: pointer;
}
.retornar::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; }   /* área de toque maior que o círculo */
.retornar .ico { width: 12px; height: 12px; }
.carrinho-foto .item-foto { display: block; cursor: default; }
.carrinho-vazio { list-style: none; padding: 48px 12px; text-align: center; color: var(--cinza); }

/* código do cliente (US-39) */
.codigo-cliente {
  display: flex; flex-direction: column; align-items: center; gap: 16px; margin: 6px 0 12px; padding: 22px 18px;
  background: var(--branco); border: 1px solid var(--borda); border-radius: var(--raio);
}
.codigo-qr { width: 200px; height: 200px; }
.codigo-qr svg { width: 100%; height: 100%; display: block; }
.codigo-barras { width: 100%; max-width: 300px; height: 70px; }
.codigo-numeros { font-size: 20px; font-weight: 700; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.folha--codigo .aviso-teste { margin-top: 12px; }

@keyframes aparecer { from { opacity: 0; } }
@keyframes subir { from { transform: translateY(100%); } }
@keyframes descer { from { opacity: 0; transform: translateY(-8px); } }
@keyframes surgir { from { opacity: 0; transform: scale(.97); } }

/* ---------------------------------------------------------------- telas largas (tablet e desktop, até 1024 px) */
@media (min-width: 768px) {
  body { background: var(--fundo); }
  .app { max-width: 1024px; margin: 0 auto; background: var(--fundo); }
  .tela { padding-top: calc(var(--topo) + 56px); }
  .intro { background: var(--branco); }
  .carrossel { margin-left: 0; margin-right: 0; }
  .carrossel::before { left: calc(50% - 512px); right: calc(50% - 512px); height: 300px; border-radius: 50% 50% 0 0 / 70% 70% 0 0; }
  .camada { align-items: center; padding: 24px; }
  .folha { max-width: 480px; border-radius: var(--raio-folha); max-height: calc(100dvh - 48px); padding-bottom: 26px; animation: surgir .18s ease-out; }
  .folha.saindo { transform: scale(.97); opacity: 0; transition: transform .15s, opacity .15s; }
  .folha--politica { height: min(760px, calc(100dvh - 48px)); max-width: 640px; }
  .folha-rodape { padding-bottom: 22px; }
  .inicio-topo { padding-top: calc(var(--topo) + 53px); }
  .inicio-topo::before { width: 300px; height: 300px; top: calc(var(--topo) - 245px); }
  .inicio-vetores { top: calc(var(--topo) + 23px); width: 420px; }
  .cartao { min-height: 180px; }
  .listas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grade { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 22px 14px; }
  .busca-topo, .lista-topo { padding-top: calc(var(--topo) + 40px); }
  .lista-topo > * { max-width: calc(1024px - 2 * var(--lado)); margin-left: auto; margin-right: auto; }
  .abas { margin-left: auto; margin-right: auto; padding: 0; }
  .folha--destinos { max-width: 520px; }
  .folha--carrinho { height: min(760px, calc(100dvh - 48px)); max-width: 560px; padding-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
