:root {
  --cor: #b5485d;
  --cor-clara: #f6e6e9;
  --fundo: #faf6f1;
  --papel: #ffffff;
  --texto: #2d2421;
  --suave: #7a6c66;
  --linha: #ece3da;
  --ok: #2f7d4f;
  --erro: #b3261e;
  --raio: 16px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sombra: 0 1px 2px rgba(45, 36, 33, .06), 0 6px 24px rgba(45, 36, 33, .06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fundo); color: var(--texto); font: 16px/1.5 var(--sans); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--cor); }
.oculto { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- estados ---------- */
.estado { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 32px; color: var(--suave); }
.estado h1 { font-family: var(--serif); color: var(--texto); font-weight: 600; }
.carregando::after { content: ""; display: block; width: 28px; height: 28px; margin: 12px auto 0; border-radius: 50%;
  border: 3px solid var(--linha); border-top-color: var(--cor); animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

/* ---------- topo ---------- */
.capa { height: 168px; background: linear-gradient(170deg, var(--cor-clara) 0%, var(--fundo) 100%); background-size: cover; background-position: center; position: relative; }
.capa img { width: 100%; height: 100%; object-fit: cover; }
.cabecalho { max-width: 1080px; margin: -56px auto 0; padding: 0 20px; position: relative; }
.identidade { display: flex; gap: 16px; align-items: flex-end; }
.logo { width: 104px; height: 104px; border-radius: 50%; border: 4px solid var(--fundo); background: var(--papel); box-shadow: var(--sombra);
  object-fit: cover; flex: none; display: grid; place-items: center; font: 600 40px var(--serif); color: var(--cor); overflow: hidden; }
.cabecalho h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(26px, 5vw, 36px); line-height: 1.1; margin: 0 0 6px; }
.cabecalho .descricao { color: var(--suave); margin: 12px 0 0; max-width: 62ch; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.chips li { font-size: 13.5px; background: var(--papel); border: 1px solid var(--linha); border-radius: 999px; padding: 5px 12px; color: var(--texto); }
.chips a { color: var(--cor); text-decoration: none; font-weight: 600; }
.chips li:has(a):hover { border-color: var(--cor); }
.faixa-aviso { max-width: 1080px; margin: 16px auto 0; padding: 10px 20px; }
.faixa-aviso p { margin: 0; background: var(--cor-clara); color: var(--texto); border-radius: 12px; padding: 10px 14px; font-size: 14.5px; }

/* ---------- navegação de categorias ---------- */
.barra { position: sticky; top: 0; z-index: 5; background: rgba(250, 246, 241, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--linha); margin-top: 18px; }
.barra-in { max-width: 1080px; margin: 0 auto; padding: 10px 20px; display: flex; gap: 12px; align-items: center; }
.abas { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.abas::-webkit-scrollbar { display: none; }
.abas button { white-space: nowrap; border: 0; background: transparent; padding: 8px 14px; border-radius: 999px; color: var(--suave); font-size: 14.5px; }
.abas button.ativa { background: var(--texto); color: #fff; }
.busca { width: 120px; transition: width .2s ease; border: 1px solid var(--linha); background: var(--papel); border-radius: 999px; padding: 8px 14px; font-size: 14.5px; }
.busca:focus, .busca:not(:placeholder-shown) { width: 46vw; max-width: 240px; }
@media (min-width: 720px) { .busca { width: 220px; } }
.busca:focus { outline: 2px solid var(--cor-clara); border-color: var(--cor); }

/* ---------- catálogo ---------- */
main { max-width: 1080px; margin: 0 auto; padding: 8px 20px 140px; }
.secao h2 { font-family: var(--serif); font-weight: 600; font-size: 22px; margin: 28px 0 14px; scroll-margin-top: 70px; }
.grade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 720px) { .grade { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } .capa { height: 220px; } }
@media (min-width: 1000px) { .grade { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { background: var(--papel); border-radius: var(--raio); overflow: hidden; box-shadow: var(--sombra); border: 0; padding: 0; text-align: left;
  display: flex; flex-direction: column; transition: transform .15s ease; }
.card:hover { transform: translateY(-2px); }
.card:focus-visible { outline: 3px solid var(--cor); outline-offset: 2px; }
.card .foto { aspect-ratio: 1; background: #f4ebe3; position: relative; }
.card .foto img { width: 100%; height: 100%; object-fit: cover; }
.selo { position: absolute; top: 10px; left: 10px; background: var(--cor); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.card .info { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card h3 { font-size: 15.5px; font-weight: 600; margin: 0; line-height: 1.3; }
.card p { margin: 0; font-size: 13.5px; color: var(--suave); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.preco { margin-top: auto; padding-top: 6px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.preco strong { font-size: 16px; color: var(--texto); }
.preco s { color: var(--suave); font-size: 13px; }
.preco small { color: var(--suave); font-size: 12.5px; }
.vazio { color: var(--suave); text-align: center; padding: 40px 0; }

/* ---------- barra do carrinho ---------- */
.barra-carrinho { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(560px, calc(100% - 24px)); z-index: 10;
  background: var(--cor); color: #fff; border: 0; border-radius: 999px; padding: 14px 22px; display: flex; justify-content: space-between; align-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .2); font-weight: 600; font-size: 15.5px; }
.barra-carrinho .qtd { background: rgba(255, 255, 255, .22); border-radius: 999px; padding: 2px 10px; margin-right: 10px; font-size: 14px; }

/* ---------- janelas (bottom sheet no celular) ---------- */
.fundo-janela { position: fixed; inset: 0; background: rgba(30, 22, 20, .45); z-index: 20; display: flex; align-items: flex-end; justify-content: center; animation: aparece .15s ease; }
@keyframes aparece { from { opacity: 0; } }
.janela { background: var(--papel); width: 100%; max-width: 560px; max-height: 92vh; border-radius: 22px 22px 0 0; display: flex; flex-direction: column; animation: sobe .2s ease; }
@keyframes sobe { from { transform: translateY(40px); } }
@media (min-width: 720px) { .fundo-janela { align-items: center; } .janela { border-radius: 22px; max-height: 88vh; } }
.janela-topo { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--linha); }
.janela-topo h2 { margin: 0; font: 600 20px var(--serif); }
.fechar { border: 0; background: var(--fundo); width: 36px; height: 36px; border-radius: 50%; font-size: 20px; line-height: 1; }
.janela-corpo { overflow-y: auto; padding: 0 20px 20px; -webkit-overflow-scrolling: touch; }
.janela-rodape { padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--linha); display: flex; gap: 12px; align-items: center; }
.produto-foto { margin: 0 -20px; aspect-ratio: 4 / 3; background: #f4ebe3; }
.produto-foto img { width: 100%; height: 100%; object-fit: cover; }
.produto-titulo { font: 600 24px/1.2 var(--serif); margin: 18px 0 6px; }
.produto-desc { color: var(--suave); white-space: pre-line; margin: 0 0 8px; }
.grupo { margin-top: 20px; border: 0; padding: 0; }
.grupo legend { width: 100%; display: flex; justify-content: space-between; align-items: center; background: var(--fundo); margin: 0 -20px; padding: 10px 20px; width: calc(100% + 40px); }
.grupo legend b { font-weight: 600; }
.grupo legend small { display: block; color: var(--suave); font-size: 13px; }
.etiqueta { font-size: 11.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: var(--texto); color: #fff; }
.etiqueta.ok { background: var(--ok); }
.opcao { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--linha); cursor: pointer; }
.opcao:last-child { border-bottom: 0; }
.opcao span { flex: 1; }
.opcao em { font-style: normal; color: var(--suave); font-size: 14px; }
.opcao input { width: 20px; height: 20px; accent-color: var(--cor); }
.opcao.desabilitada { opacity: .45; }
.campo { display: block; margin-top: 16px; }
.campo > span { display: block; font-weight: 600; font-size: 14.5px; margin-bottom: 6px; }
.campo > span small { font-weight: 400; color: var(--suave); }
.campo input, .campo select, .campo textarea { width: 100%; border: 1px solid var(--linha); border-radius: 12px; padding: 11px 13px; background: #fff; font-size: 16px; }
.campo textarea { resize: vertical; min-height: 76px; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: 2px solid var(--cor-clara); border-color: var(--cor); }
.campo.invalido input, .campo.invalido select, .campo.invalido textarea { border-color: var(--erro); }
.escolha { display: flex; gap: 8px; }
.escolha label { flex: 1; text-align: center; border: 1px solid var(--linha); border-radius: 12px; padding: 11px 8px; cursor: pointer; }
.escolha input { position: absolute; opacity: 0; pointer-events: none; }
.escolha label:has(input:checked) { border-color: var(--cor); background: var(--cor-clara); font-weight: 600; }
.qtd-ctrl { display: flex; align-items: center; border: 1px solid var(--linha); border-radius: 999px; flex: none; }
.qtd-ctrl button { border: 0; background: none; width: 40px; height: 44px; font-size: 20px; color: var(--cor); }
.qtd-ctrl button:disabled { color: var(--linha); }
.qtd-ctrl output { min-width: 22px; text-align: center; font-weight: 600; }
.botao { border: 0; background: var(--cor); color: #fff; border-radius: 999px; padding: 13px 20px; font-weight: 600; font-size: 15.5px; flex: 1;
  display: flex; justify-content: space-between; align-items: center; gap: 10px; text-decoration: none; }
.botao.centro { justify-content: center; }
.botao:disabled { opacity: .5; cursor: not-allowed; }
.botao.secundario { background: var(--fundo); color: var(--texto); }
.botao.whats { background: #1f9d55; }

/* ---------- carrinho ---------- */
.item { display: flex; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--linha); }
.item .mini { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: #f4ebe3; flex: none; }
.item .meio { flex: 1; min-width: 0; }
.item h3 { font-size: 15px; margin: 0 0 2px; }
.item ul { margin: 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--suave); }
.item .linha2 { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 8px; }
.item .qtd-ctrl button { width: 34px; height: 34px; font-size: 18px; }
.remover { border: 0; background: none; color: var(--suave); font-size: 13px; text-decoration: underline; padding: 0; }
.resumo { margin-top: 14px; }
.resumo div { display: flex; justify-content: space-between; padding: 4px 0; color: var(--suave); }
.resumo .total { color: var(--texto); font-weight: 700; font-size: 18px; border-top: 1px solid var(--linha); margin-top: 6px; padding-top: 10px; }
.alerta { background: #fff4e5; color: #7a4b00; border-radius: 12px; padding: 10px 14px; font-size: 14px; margin-top: 14px; }
.alerta.erro { background: #fdecea; color: var(--erro); }
.sucesso { text-align: center; padding: 26px 0 8px; }
.sucesso .icone { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; background: #e6f4ec; color: var(--ok); display: grid; place-items: center; font-size: 32px; }
.sucesso h3 { font: 600 22px var(--serif); margin: 0 0 6px; }
.sucesso p { color: var(--suave); margin: 0 0 18px; }

/* ---------- rodapé ---------- */
.rodape { text-align: center; color: var(--suave); font-size: 13px; padding: 30px 20px 120px; }
.rodape a { color: var(--suave); }

.toast { position: fixed; left: 50%; top: 16px; transform: translate(-50%, -150%); background: var(--texto); color: #fff; padding: 11px 18px; border-radius: 12px; z-index: 50;
  font-size: 14.5px; transition: transform .25s ease; max-width: calc(100% - 32px); text-align: center; }
.toast.mostrar { transform: translate(-50%, 0); }
.toast.erro { background: var(--erro); }
