/* Cores vêm do config.js (aplicadas pelo app.js) */
:root {
  --primaria: #b76e79;
  --fundo: #faf6f2;
  --texto: #3d2c2e;
  --suave: #efe3d8;
  --raio: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--fundo);
  color: var(--texto);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

/* ---------- Topo ---------- */
.topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 16px 12px;
  max-width: 1100px;
  margin: 0 auto;
}
.marca { display: flex; align-items: center; gap: 12px; }
.logo {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--primaria); color: #fff;
  display: grid; place-items: center;
  font-family: "Playfair Display", serif; font-size: 22px;
  overflow: hidden; flex-shrink: 0;
}
.logo img { width: 100%; height: 100%; object-fit: cover; }
h1 { font-family: "Playfair Display", serif; font-size: 24px; line-height: 1.1; }
.slogan { font-size: 13px; opacity: .75; }

.links-topo { display: flex; gap: 8px; }
.btn-icone {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--suave); font-size: 12px; font-weight: 600;
}
.btn-icone.whats { background: #25d366; color: #fff; }

/* ---------- Filtros ---------- */
.barra-filtros {
  position: sticky; top: 0; z-index: 5;
  background: var(--fundo);
  padding: 8px 16px 12px;
  max-width: 1100px; margin: 0 auto;
}
#busca {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--suave); border-radius: 999px;
  background: #fff; font: inherit; color: inherit;
  margin-bottom: 10px;
}
#busca:focus { outline: 2px solid var(--primaria); border-color: transparent; }

.categorias {
  display: flex; gap: 8px;
  overflow-x: auto; scrollbar-width: none;
  margin: 0 -16px; padding: 0 16px;
}
.categorias::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  padding: 7px 16px; border-radius: 999px;
  border: 1px solid var(--primaria);
  background: transparent; color: var(--primaria);
  font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
}
.chip.ativo { background: var(--primaria); color: #fff; }

/* ---------- Grade de produtos ---------- */
main { max-width: 1100px; margin: 0 auto; padding: 4px 16px 32px; }
.grade {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (min-width: 640px) { .grade { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .grade { grid-template-columns: repeat(4, 1fr); gap: 20px; } }

.card {
  background: #fff; border-radius: var(--raio);
  overflow: hidden; cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  transition: transform .15s;
  text-align: left; border: 0; font: inherit; color: inherit;
}
.card:active { transform: scale(.98); }
.card-foto { position: relative; aspect-ratio: 3 / 4; background: var(--suave); }
.card-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-info { padding: 10px 12px 12px; }
.card-nome { font-size: 14px; font-weight: 500; }
.preco { color: var(--primaria); font-weight: 600; }
.card .preco { font-size: 15px; }

.selo-esgotado {
  position: absolute; top: 8px; left: 8px;
  background: rgba(0,0,0,.7); color: #fff;
  font-size: 11px; font-weight: 600; letter-spacing: .03em;
  padding: 3px 8px; border-radius: 999px;
}
.card.esgotado .card-foto img { opacity: .5; }

.aviso { text-align: center; padding: 32px 0; opacity: .7; }

/* ---------- Rodapé ---------- */
.rodape {
  background: var(--suave);
  padding: 32px 16px 40px;
  text-align: center;
}
.rodape h2 { font-family: "Playfair Display", serif; margin-bottom: 8px; }
.rodape > p { max-width: 520px; margin: 0 auto 12px; }
.sobre-info { list-style: none; font-size: 14px; opacity: .85; margin-bottom: 20px; }
.sobre-info li:empty { display: none; }

.btn-principal {
  display: inline-block; width: 100%; max-width: 360px;
  padding: 14px 20px; border-radius: 999px;
  background: #25d366; color: #fff;
  font-weight: 600; text-align: center; cursor: pointer;
}
.btn-principal.desativado { background: #bbb; pointer-events: none; }

/* ---------- Modal do produto ---------- */
.modal { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.modal[hidden] { display: none; }
.modal-fundo { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.modal-caixa {
  position: relative; background: #fff;
  width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto;
  border-radius: 20px 20px 0 0;
  animation: subir .2s ease-out;
}
@media (min-width: 640px) {
  .modal { align-items: center; }
  .modal-caixa { border-radius: 20px; }
}
@keyframes subir { from { transform: translateY(40px); opacity: 0; } }

.modal-fechar {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.9); font-size: 24px; line-height: 1; cursor: pointer;
}
#m-foto { width: 100%; aspect-ratio: 3 / 4; max-height: 55vh; object-fit: cover; display: block; background: var(--suave); }
.modal-info { padding: 16px 20px 24px; }
.modal-info h2 { font-family: "Playfair Display", serif; font-size: 22px; }
.modal-info .preco { font-size: 20px; margin-bottom: 8px; }
.descricao { font-size: 14px; opacity: .85; margin-bottom: 16px; }
.rotulo { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.tamanhos { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tam {
  min-width: 44px; padding: 8px 12px; border-radius: 10px;
  border: 1px solid var(--suave); background: #fff;
  font: inherit; font-weight: 500; cursor: pointer;
}
.tam.ativo { border-color: var(--primaria); background: var(--primaria); color: #fff; }
.aviso-tamanho { color: #c0392b; font-size: 13px; margin: -8px 0 12px; }

/* ---------- Site suspenso ---------- */
.suspenso {
  position: fixed; inset: 0; z-index: 50;
  background: #f4f4f4; color: #555;
  display: grid; place-items: center; text-align: center; padding: 24px;
}
.suspenso[hidden] { display: none; }
