:root {
  --fundo: #F6F1EA;
  --claro: #FBF8F3;
  --texto: #2E241D;
  --texto-suave: #8A7B6E;
  --linha: #E6DDD1;
  --fundo-foto: #EDE5DA;
  --cafe: #2E241D;
  --azul: #8AA8C8;
  --serifa: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sem-serifa: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --suave: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  background: var(--fundo);
  color: var(--texto);
  font-family: var(--sem-serifa);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }
img { display: block; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

em {
  font-style: italic;
}

.pagina {
  max-width: 440px;
  margin: 0 auto;
  padding: 16px 16px 40px;
  padding-top: max(16px, env(safe-area-inset-top));
}

/* ---------- topo ---------- */
.hero-foto {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 28px;
  overflow: hidden;
  background: var(--fundo-foto);
}
.hero-foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-foto img.sem-imagem { visibility: hidden; }

/* degradê escuro suave embaixo, para o texto ler bem */
.hero-foto::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(46, 36, 29, 0) 45%, rgba(46, 36, 29, 0.25) 70%, rgba(46, 36, 29, 0.62) 100%);
  pointer-events: none;
}

.selo-vidro {
  position: absolute;
  z-index: 1;
  top: 16px;
  left: 16px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(46, 36, 29, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  color: #fff;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background 0.2s ease;
}
.selo-vidro:hover { background: rgba(46, 36, 29, 0.42); }

.hero-texto {
  position: absolute;
  z-index: 1;
  left: 22px;
  right: 22px;
  bottom: 22px;
  color: #fff;
}

.nome {
  font-family: var(--serifa);
  font-weight: 400;
  font-size: 64px;
  line-height: 0.95;
  letter-spacing: -0.015em;
}

.frase {
  margin-top: 10px;
  max-width: 260px;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.9);
}

.redes {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}
.redes a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--claro);
  border: 1px solid var(--linha);
  color: var(--texto);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.redes a:hover { border-color: var(--texto-suave); }
.redes svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.redes .ponto { fill: currentColor; stroke: none; }

/* ---------- meu ritual ---------- */
.ritual {
  position: relative;
  margin-top: 28px;
  padding: 26px 22px 22px;
  border-radius: 24px;
  background: var(--cafe);
  color: var(--fundo);
  overflow: hidden;
  isolation: isolate;
}
/* brilho azul desfocado no canto */
.ritual::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -70px;
  right: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--azul);
  opacity: 0.38;
  filter: blur(50px);
}

.rotulo {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(246, 241, 234, 0.6);
}

.ritual-titulo {
  margin-top: 10px;
  max-width: 300px;
  font-family: var(--serifa);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.ritual-texto {
  margin-top: 12px;
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.55;
  color: rgba(246, 241, 234, 0.78);
}

/* logo da prócapz (quando a lista RITUAL está vazia) */
.ritual-marca {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  padding: 26px 20px;
  border-radius: 18px;
  background: rgba(246, 241, 234, 0.06);
  border: 1px solid rgba(246, 241, 234, 0.1);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.ritual-marca:hover { background: rgba(246, 241, 234, 0.1); border-color: rgba(246, 241, 234, 0.2); }
.ritual-marca img {
  width: 62%;
  max-width: 230px;
  height: auto;
  filter: brightness(0) invert(0.95) sepia(0.15);   /* logo em creme */
}

/* mini cards: rolam na horizontal no celular */
.ritual-produtos {
  display: flex;
  gap: 10px;
  margin: 20px -22px 0;
  padding: 0 22px 4px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 22px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.ritual-produtos::-webkit-scrollbar { display: none; }

.ritual-item {
  flex: 0 0 128px;
  display: flex;
  flex-direction: column;
  padding: 8px 8px 12px;
  border-radius: 18px;
  background: rgba(246, 241, 234, 0.06);
  border: 1px solid rgba(246, 241, 234, 0.1);
  scroll-snap-align: start;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.ritual-item:hover { background: rgba(246, 241, 234, 0.1); border-color: rgba(246, 241, 234, 0.2); }

.ritual-foto {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--claro);
}
.ritual-foto img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--suave);
}
.ritual-foto img.sem-imagem { display: none; }
.ritual-item:hover .ritual-foto img { transform: scale(1.04); }

.ritual-nome {
  margin-top: 10px;
  padding: 0 2px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}
.ritual-momento {
  margin-top: 2px;
  padding: 0 2px;
  font-family: var(--serifa);
  font-style: italic;
  font-size: 15px;
  line-height: 1.2;
  color: rgba(246, 241, 234, 0.62);
}

.selo-cupom {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 22px;
  padding: 14px 16px;
  border: 1px dashed rgba(246, 241, 234, 0.45);
  border-radius: 16px;
  background: rgba(246, 241, 234, 0.04);
  color: var(--fundo);
  cursor: copy;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.selo-cupom:hover { background: rgba(246, 241, 234, 0.08); border-color: rgba(246, 241, 234, 0.7); }
.selo-cupom:active { transform: scale(0.985); }

.selo-codigo {
  font-family: var(--serifa);
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0.38em;
  margin-right: -0.38em;          /* compensa o espaço depois da última letra */
}
.selo-acao {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(246, 241, 234, 0.6);
}

.botao-cupom {
  display: block;
  margin-top: 10px;
  padding: 15px 16px;
  border-radius: 16px;
  background: var(--claro);
  color: var(--texto);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  transition: background 0.2s ease, transform 0.15s ease;
}
.botao-cupom:hover { background: #fff; }
.botao-cupom:active { transform: scale(0.985); }
.botao-cupom span { display: inline-block; margin-left: 4px; transition: transform 0.2s ease; }
.botao-cupom:hover span { transform: translateX(3px); }

/* ---------- achadinhos ---------- */
.achados { margin-top: 48px; }

.achados-topo {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.titulo-secao {
  font-family: var(--serifa);
  font-weight: 400;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.01em;
}
.titulo-secao em { white-space: nowrap; }

.achados-nota {
  flex: none;
  font-size: 12px;
  color: var(--texto-suave);
}

/* controle segmentado (rola na horizontal se houver muitas categorias) */
.filtro {
  position: relative;
  display: flex;
  margin-top: 18px;
  padding: 4px;
  border: 1px solid var(--linha);
  border-radius: 999px;
  background: var(--claro);
  overflow-x: auto;
  scrollbar-width: none;
}
.filtro::-webkit-scrollbar { display: none; }

.filtro-pilula {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: var(--largura, 0px);
  border-radius: 999px;
  background: var(--cafe);
  transform: translateX(var(--x, 4px));
}
.filtro.pronto .filtro-pilula {
  transition: transform 0.35s var(--suave), width 0.35s var(--suave);
}

.filtro-opcao {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  min-width: 72px;
  padding: 9px 14px;
  border: 0;
  background: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--texto-suave);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.25s ease;
}
.filtro-opcao[aria-pressed="true"] { color: var(--fundo); }

.lista-produtos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
  transition: opacity 0.2s ease;
}
.lista-produtos.trocando { opacity: 0; }

.produto {
  display: flex;
  flex-direction: column;
}

.produto-foto {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  overflow: hidden;
  background: var(--fundo-foto);
  transition: box-shadow 0.35s var(--suave);
}
.produto-foto img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--suave);
}
.produto-foto img.sem-imagem { display: none; }
.produto:hover .produto-foto img { transform: scale(1.04); }

/* sacolinha quando não há imagem */
.produto-sacola {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 30%;
  height: 30%;
  fill: none;
  stroke: #BFAF9D;
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.produto-etiquetas {
  position: absolute;
  z-index: 1;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.produto-etiqueta {
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(251, 248, 243, 0.88);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--texto);
}
.produto-etiqueta.favorito {
  background: rgba(46, 36, 29, 0.82);
  color: var(--fundo);
}

.produto-nome {
  margin-top: 10px;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.produto-ver {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--texto-suave);
  transition: color 0.2s ease;
}
.produto:hover .produto-ver { color: var(--texto); }

.aviso {
  grid-column: 1 / -1;
  padding: 36px 0;
  text-align: center;
  font-size: 14px;
  color: var(--texto-suave);
}

/* ---------- rodapé ---------- */
.rodape {
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--linha);
  text-align: center;
}
.rodape-assinatura {
  font-family: var(--serifa);
  font-size: 22px;
  line-height: 1.2;
}
.rodape-nota {
  margin-top: 6px;
  font-size: 12px;
  color: var(--texto-suave);
}

/* ---------- aviso flutuante ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 50;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--cafe);
  color: var(--fundo);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 10px 30px -10px rgba(46, 36, 29, 0.5);
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.3s var(--suave);
}
.toast.visivel { opacity: 1; transform: translate(-50%, 0); }

/* ---------- entrada suave, um após o outro ---------- */
@keyframes surgir {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.surgir {
  animation: surgir 0.7s var(--suave) backwards;
  animation-delay: calc(var(--i, 0) * 110ms + 60ms);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--azul);
  outline-offset: 3px;
}

/* telas bem estreitas */
@media (max-width: 350px) {
  .nome { font-size: 54px; }
  .titulo-secao { font-size: 30px; }
}

/* ---------- computador: duas colunas ---------- */
@media (min-width: 900px) {
  .pagina {
    display: grid;
    grid-template-columns: 400px minmax(0, 1fr);
    column-gap: 48px;
    align-items: start;
    max-width: 1120px;
    padding: 32px 32px 48px;
  }

  /* fica fixa enquanto rola; o script ajusta o "top" se ela for mais alta que a tela */
  .coluna-fixa {
    position: sticky;
    top: var(--topo, 32px);
  }

  .ritual-produtos {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 20px 0 0;
    padding: 0;
    overflow: visible;
  }

  .achados { margin-top: 6px; }
  .titulo-secao { font-size: 44px; }

  .filtro { max-width: 420px; }

  .lista-produtos {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 18px;
    row-gap: 28px;
    margin-top: 24px;
  }
}

/* leve elevação dos cards no computador */
@media (min-width: 900px) and (hover: hover) {
  .produto { transition: transform 0.35s var(--suave); }
  .produto:hover { transform: translateY(-4px); }
  .produto:hover .produto-foto { box-shadow: 0 18px 32px -18px rgba(46, 36, 29, 0.45); }
}

/* menos movimento para quem prefere */
@media (prefers-reduced-motion: reduce) {
  .surgir { animation: none; }
  *, *::before, *::after { transition: none !important; }
  .produto:hover { transform: none; }
}
