/* Identidade da Titi Beauty (mesma do site titibeautybr.com): rosa-claro, cereja, Inter e botões em pílula.
   O resumo do pedido continua sendo a peça de destaque (comanda com picote). */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --tinta: #8a1d45;      /* cereja da marca */
  --tinta-2: #6e1636;    /* cereja mais escuro (hover) */
  --papel: #fff2f4;      /* rosa-claro do fundo do site */
  --folha: #ffffff;
  --texto: #4a3a3f;      /* vinho acinzentado do texto do site */
  --suave: #7d6a70;
  --linha: #efd9de;
  --marca: #f4b6c6;      /* rosa do gloss, para foco e realces */
  --ok: #2f7a4f;
  --ok-fundo: #e5f3ea;
  --perigo: #a51111;
  --perigo-fundo: #fde8e8;
  --raio-botao: 50px;
  --raio-campo: 12px;
  --raio-folha: 18px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--papel);
  color: var(--texto);
  font: 16px/1.55 Inter, system-ui, sans-serif;
}
h1, h2, h3 { font-family: Inter, system-ui, sans-serif; line-height: 1.2; margin: 0 0 .4em; color: var(--texto); }
h1 { font-size: 1.85rem; font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: 1.25rem; font-weight: 600; letter-spacing: -.01em; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--tinta-2); }

.pagina { max-width: 560px; margin: 0 auto; padding: 20px 16px 120px; }
.topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0 18px; }
.topo .marca { display: flex; align-items: center; gap: 10px; color: var(--tinta); font-weight: 600; text-decoration: none; }
.topo .marca img { height: 46px; width: auto; display: block; }
.topo button { font-size: .9rem; }

.folha { background: var(--folha); border-radius: var(--raio-folha); padding: 22px 20px; margin-bottom: 16px; }
.sutil { color: var(--suave); font-size: .95rem; }
.destaque { background: linear-gradient(transparent 58%, var(--marca) 58%, var(--marca) 90%, transparent 90%); padding: 0 2px; }

/* Formulários */
label { display: block; font-weight: 700; font-size: .95rem; margin: 14px 0 6px; }
input, select {
  width: 100%; font: inherit; color: var(--texto);
  padding: 12px 14px; border: 1.5px solid var(--linha); border-radius: var(--raio-campo); background: #fff;
}
input:focus, select:focus { outline: 3px solid var(--marca); border-color: var(--tinta); }
.linha-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.linha-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 0 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { width: 22px; height: 22px; margin-top: 2px; flex: none; }

/* Botões */
button, .botao {
  font: 600 1rem Inter, sans-serif; cursor: pointer;
  border: 0; border-radius: var(--raio-botao); padding: 15px 18px; text-decoration: none; display: inline-block; text-align: center;
}
.primario { background: var(--tinta); color: #fff; width: 100%; }
.primario:hover { background: var(--tinta-2); }
.secundario { background: transparent; color: var(--tinta); border: 1.5px solid var(--linha); }
.texto-botao { background: none; color: var(--tinta-2); padding: 6px 4px; text-decoration: underline; }
button:disabled { opacity: .55; cursor: wait; }
button:focus-visible, .botao:focus-visible, a:focus-visible { outline: 3px solid var(--marca); outline-offset: 2px; }

.aviso { border-radius: var(--raio-campo); padding: 12px 14px; margin: 12px 0; font-size: .95rem; }
.aviso.erro { background: var(--perigo-fundo); color: var(--perigo); }
.aviso.ok { background: var(--ok-fundo); color: var(--ok); }
.oculto { display: none !important; }

/* Catálogo */
.produto { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--linha); }
.produto:last-child { border-bottom: 0; }
.produto img, .produto .sem-foto { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; background: var(--papel); }
.produto .nome { font-weight: 700; line-height: 1.3; }
.produto.esgotado { opacity: .5; }
.qtd { display: flex; align-items: center; gap: 6px; }
.qtd button { width: 40px; height: 40px; padding: 0; border-radius: 50%; background: var(--papel); color: var(--tinta); font-size: 1.25rem; border: 1.5px solid var(--linha); }
.qtd span { min-width: 22px; text-align: center; font-weight: 700; }

/* Barra fixa do carrinho */
.barra {
  position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--folha); box-shadow: 0 -1px 0 var(--linha);
}
.barra .dentro { max-width: 560px; margin: 0 auto; display: flex; gap: 14px; align-items: center; }
.barra .total { font-weight: 800; font-size: 1.3rem; white-space: nowrap; color: var(--tinta); }

/* A peça memorável: comanda com picote */
.comanda {
  background: var(--folha); padding: 24px 20px 20px; margin: 8px 0 18px; position: relative;
  border-radius: var(--raio-folha) var(--raio-folha) 0 0;
}
.comanda::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -12px; height: 12px;
  background: radial-gradient(circle at 10px -2px, transparent 9px, var(--folha) 10px) 0 0 / 20px 12px repeat-x;
}
.comanda .item { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--linha); }
.comanda .soma { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; }
.comanda .soma strong { font-size: 2.2rem; font-weight: 800; letter-spacing: -.02em; color: var(--tinta); }

.opcoes { display: grid; gap: 10px; }
.opcao { display: flex; gap: 12px; align-items: flex-start; border: 1.5px solid var(--linha); border-radius: var(--raio-campo); padding: 14px; font-weight: 400; margin: 0; cursor: pointer; background: #fff; }
.opcao input { width: 22px; height: 22px; flex: none; margin: 2px 0 0; }
.opcao:has(input:checked) { border-color: var(--tinta); box-shadow: inset 0 0 0 1px var(--tinta); }
.opcao b { display: block; }

.selo { display: inline-block; font-size: .8rem; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: var(--papel); color: var(--tinta); }
.selo.pago { background: var(--ok-fundo); color: var(--ok); }
.selo.erro { background: var(--perigo-fundo); color: var(--perigo); }

.lista { list-style: none; padding: 0; margin: 0; }
.lista li { padding: 12px 0; border-bottom: 1px solid var(--linha); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.lista .selo { flex: none; white-space: nowrap; }
.lista li:last-child { border-bottom: 0; }

.estado-vazio { text-align: center; padding: 40px 10px; }
.estado-vazio h1 { color: var(--tinta); }
.produto .preco { color: var(--tinta); font-weight: 600; }

@media (prefers-reduced-motion: no-preference) {
  .comanda { animation: sobe .45s cubic-bezier(.2,.8,.2,1); }
  @keyframes sobe { from { transform: translateY(16px); opacity: 0; } }
}
@media (max-width: 380px) {
  .linha-2 { grid-template-columns: 1fr; }
  h1 { font-size: 1.7rem; }
}

input[type=radio], input[type=checkbox] { accent-color: var(--tinta); }
.logo-texto { font-style: italic; font-weight: 800; font-size: 2rem; letter-spacing: -.03em; color: var(--tinta); line-height: 1; }

/* Faixa do convite, discreta, acima do produto */
.convite-faixa { margin: -6px 0 14px; font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--tinta); }

/* Página do produto (no estilo da página do site) */
.foto-produto { background: var(--folha); border-radius: var(--raio-folha); overflow: hidden; aspect-ratio: 1; margin-bottom: 20px; }
.foto-produto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto-produto .sem-foto { width: 100%; height: 100%; border-radius: 0; background: var(--folha); }
.nome-produto { font-size: 1.45rem; font-weight: 600; letter-spacing: -.01em; margin-bottom: .5em; text-wrap: balance; }
.ficha { font-size: .88rem; color: var(--suave); margin-bottom: 14px; }
.preco-produto { font-size: 1.75rem; font-weight: 700; color: var(--texto); margin-bottom: 18px; }
.comprar-linha { display: flex; gap: 12px; align-items: center; margin-bottom: 24px; }
.comprar-linha .qtd { flex: none; background: var(--folha); border: 1.5px solid var(--linha); border-radius: 999px; padding: 4px; gap: 2px; }
.comprar-linha .qtd button { border: 0; background: transparent; width: 40px; height: 40px; }
.comprar-linha .qtd button:disabled { opacity: .35; cursor: default; }
.comprar-linha .primario { flex: 1; }

.descricao { border-top: 1px solid var(--linha); border-bottom: 1px solid var(--linha); }
.descricao summary {
  list-style: none; cursor: pointer; padding: 16px 2px; font-weight: 600; color: var(--texto);
  display: flex; justify-content: space-between; align-items: center;
}
.descricao summary::-webkit-details-marker { display: none; }
.descricao summary::after {
  content: ''; width: 9px; height: 9px; border-right: 2px solid var(--tinta); border-bottom: 2px solid var(--tinta);
  transform: rotate(45deg) translateY(-3px); transition: transform .2s;
}
.descricao[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.descricao-texto { padding: 0 2px 18px; color: var(--texto); font-size: .97rem; }
.descricao-texto p { margin: 0 0 .8em; }
.descricao-texto ul, .descricao-texto ol { margin: 0 0 .8em; padding-left: 1.2em; }
.descricao-texto li { margin-bottom: .25em; }

/* Lista (quando houver mais de um produto) */
#lista .produto { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--linha); border-radius: 0; text-align: left; font: inherit; color: inherit; grid-template-columns: 72px 1fr; padding: 14px 0; }
#lista .produto:last-child { border-bottom: 0; }

/* Quantidade + total, e escolha do pagamento na própria página do produto */
.comprar-linha { justify-content: space-between; margin-bottom: 18px; }
.total-linha { margin: 0; color: var(--suave); font-size: .95rem; text-align: right; }
.total-linha strong { display: block; color: var(--tinta); font-size: 1.3rem; font-weight: 800; }
.pagamento { border: 0; padding: 0; margin: 0 0 14px; }
.pagamento legend { font-weight: 600; margin-bottom: 10px; padding: 0; }
.opcoes-pagamento { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opcoes-pagamento .opcao { flex-direction: column; gap: 6px; padding: 12px; }
.opcoes-pagamento .opcao input { margin: 0; }
.opcoes-pagamento .opcao .sutil { display: block; font-size: .82rem; line-height: 1.35; }
@media (max-width: 340px) { .opcoes-pagamento { grid-template-columns: 1fr; } }

/* Cartão e Pix */
.dados h2, .cartao h2, .pix h2, .nota h2 { font-size: 1.1rem; margin-bottom: 2px; }
.seguro { font-size: .82rem; margin: 12px 0 0; }
#finalizar .check { margin: 4px 0 14px; }
#comprar { margin-bottom: 24px; }
.esperando { display: flex; gap: 10px; align-items: center; margin: 14px 0 0; color: var(--suave); font-size: .92rem; }
.girando { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--linha); border-top-color: var(--tinta); }
@media (prefers-reduced-motion: no-preference) { .girando { animation: girar .9s linear infinite; } @keyframes girar { to { transform: rotate(360deg); } } }
.nota .sutil { margin-bottom: 14px; }
a.botao-link { display: block; text-align: center; text-decoration: none; font: 600 1rem Inter, sans-serif; border-radius: var(--raio-botao); padding: 15px 18px; }
select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238a1d45' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center; padding-right: 38px; }
.pix-qr { width: min(240px, 70vw); margin: 4px auto 0; background: #fff; }
.pix-qr svg { width: 100%; height: auto; display: block; }
textarea { width: 100%; font: .85rem/1.4 ui-monospace, monospace; color: var(--texto); padding: 10px 12px; border: 1.5px solid var(--linha); border-radius: var(--raio-campo); resize: none; background: var(--papel); overflow-wrap: anywhere; }
