/* =========================================================
   Ateliê d'Dama — estilo do catálogo
   Paleta e tipografia seguem o catálogo em PDF.
   ========================================================= */

:root {
  --creme: #f5f0e8;
  --creme-2: #ede5d8;
  --linha: #ddd2bf;
  --tinta: #1f1a17;
  --tinta-suave: #5c534b;
  --dourado: #b08d57;
  --dourado-claro: #d4b483;
  --bordo: #6e1f2a;
  --bordo-escuro: #551620;
  --noite: #120d0c;
  --noite-2: #1c1715;
  --whats: #1f8f4e;

  --serif-titulo: "Playfair Display", Georgia, "Times New Roman", serif;
  --serif-texto: "EB Garamond", Georgia, "Times New Roman", serif;
  --rotulo: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;

  --raio: 6px;
  --sombra: 0 6px 24px rgba(31, 26, 23, 0.08);
  --transicao: 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--creme);
  color: var(--tinta);
  font-family: var(--serif-texto);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
svg { fill: currentColor; }

.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 2px solid var(--dourado); outline-offset: 3px; }

.rotulo {
  margin: 0 0 0.75rem;
  font-family: var(--rotulo);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--dourado);
}

.filete {
  display: block;
  width: 56px;
  height: 1px;
  margin: 1.5rem auto;
  background: var(--dourado);
}
.filete--esq { margin-left: 0; }

/* ---------- Botões ---------- */
.botao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 52px;
  padding: 0.85rem 1.75rem;
  border: 1px solid var(--bordo);
  border-radius: 999px;
  background: var(--bordo);
  color: #fff;
  font-family: var(--rotulo);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transicao), transform var(--transicao);
}
.botao:hover { background: var(--bordo-escuro); }
.botao:active { transform: scale(0.98); }
.botao[aria-disabled="true"] {
  background: var(--linha);
  border-color: var(--linha);
  color: var(--tinta-suave);
  pointer-events: none;
}
.botao--claro {
  background: transparent;
  border-color: var(--dourado-claro);
  color: var(--creme);
}
.botao--claro:hover { background: var(--dourado-claro); color: var(--noite); }

/* ---------- Topo ---------- */
.topo {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4.25rem 1.25rem 3rem;
  background:
    /* brilho bordô atrás do brasão */
    radial-gradient(ellipse at 50% 40%, rgba(110, 31, 42, 0.32), transparent 65%),
    /* centro liso: esconde o damasco atrás do brasão e do título */
    radial-gradient(ellipse 46% 85% at 50% 45%, var(--noite) 45%, rgba(18, 13, 12, 0) 100%),
    /* damasco dourado bem sutil nas laterais */
    url("../imagens/damasco-escuro.svg") center top / 140px 180px repeat,
    var(--noite);
  color: var(--creme);
  text-align: center;
}
/* Moldura dourada dupla, como a das peças */
.topo::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(176, 141, 87, 0.75);
  outline: 1px solid rgba(176, 141, 87, 0.35);
  outline-offset: -7px;
  pointer-events: none;
}
.topo__canto {
  position: absolute;
  width: 64px;
  height: 64px;
  background: url("../imagens/canto.svg") no-repeat center / contain;
  pointer-events: none;
}
.topo__canto--se { top: 3px; left: 3px; }
.topo__canto--sd { top: 3px; right: 3px; transform: scaleX(-1); }
.topo__canto--ie { bottom: 3px; left: 3px; transform: scaleY(-1); }
.topo__canto--id { bottom: 3px; right: 3px; transform: scale(-1, -1); }

.topo__ornamento {
  width: 200px;
  height: 20px;
  margin-top: 0.75rem;
  color: var(--dourado);
}
.topo__redes {
  position: absolute;
  top: 22px;
  right: 64px; /* fora do ornamento de canto */
  display: flex;
  gap: 0.25rem;
  z-index: 1;
}
.topo__rede {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem;
  font-family: var(--rotulo);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--dourado-claro);
  transition: color var(--transicao);
}
.topo__rede:hover { color: var(--creme); }
.topo__rede svg { width: 22px; height: 22px; }
.topo__rede span { display: none; }
.topo__brasao {
  width: min(78vw, 400px);
  aspect-ratio: 1;
  mix-blend-mode: lighten; /* o fundo preto da arte some sobre o topo escuro */
  animation: surgir 1.2s ease both;
}
.topo__titulo {
  margin: 0.5rem 0 0;
  font-family: var(--serif-titulo);
  font-weight: 400;
  font-size: clamp(2.4rem, 9vw, 3.4rem);
  line-height: 1.1;
}
.topo__frase {
  margin: 0.5rem 0 0;
  font-style: italic;
  font-size: 1.25rem;
  color: var(--dourado-claro);
  line-height: 1.35;
  max-width: 17em;      /* no celular quebra em 2 linhas, longe da moldura */
  text-wrap: balance;
}
@media (min-width: 640px) {
  .topo__frase { max-width: 30em; }
}
.topo__linha {
  margin: 1.25rem 0 0;
  font-family: var(--rotulo);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dourado);
}
.topo__grupo { display: block; white-space: nowrap; line-height: 2; }
.topo__ponto { margin: 0 0.35em; }
.topo__ponto--meio { display: none; margin: 0 0.7em; }
@media (min-width: 640px) {
  .topo__grupo { display: inline; }
  .topo__ponto--meio { display: inline; }
}
.topo__seta {
  margin-top: 1.5rem;
  padding: 0.5rem;
  color: var(--dourado);
  animation: flutuar 2.4s ease-in-out infinite;
}
.topo__seta svg { width: 28px; height: 28px; }

@keyframes surgir { from { opacity: 0; transform: scale(0.96); } }
@keyframes flutuar { 50% { transform: translateY(6px); } }

/* ---------- Moldura dourada + damasco (telas largas) ----------
   Filete dourado duplo em volta da apresentação e das peças, com
   ornamentos nos cantos, como a moldura da capa do catálogo.
   Do lado de fora do quadro, estampa de damasco tom sobre tom.
   No celular e em telas menores, o fundo continua creme liso. */
.moldura__canto { display: none; }

@media (min-width: 1200px) {
  body {
    background: var(--creme-2) url("../imagens/damasco.svg") center top / 140px 180px repeat;
  }
  .moldura {
    position: relative;
    width: min(1320px, calc(100% - 6rem));
    margin: 4rem auto 5rem;
    background: var(--creme);
    border: 1px solid var(--dourado);
    /* segundo filete, por dentro */
    box-shadow:
      inset 0 0 0 7px var(--creme),
      inset 0 0 0 8px rgba(176, 141, 87, 0.55),
      0 10px 40px rgba(31, 26, 23, 0.06);
  }
  .moldura__canto {
    display: block;
    position: absolute;
    width: 96px;
    height: 96px;
    background: url("../imagens/canto.svg") no-repeat center / contain;
    pointer-events: none;
  }
  .moldura__canto--se { top: -14px; left: -14px; }
  .moldura__canto--sd { top: -14px; right: -14px; transform: scaleX(-1); }
  .moldura__canto--ie { bottom: -14px; left: -14px; transform: scaleY(-1); }
  .moldura__canto--id { bottom: -14px; right: -14px; transform: scale(-1, -1); }
}

/* ---------- A casa ---------- */
.casa {
  max-width: 36rem;
  margin: 0 auto;
  padding: 4rem 1.5rem 1rem;
  text-align: center;
}
.casa__titulo {
  margin: 0;
  font-family: var(--serif-titulo);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.6rem, 6vw, 2.2rem);
  line-height: 1.25;
}
.casa p:not(.rotulo) { margin: 0 0 1rem; color: var(--tinta-suave); }
.casa strong { font-weight: 500; color: var(--tinta); }

/* ---------- Catálogo ---------- */
.catalogo {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1rem 4rem;
  text-align: center;
}
.catalogo__titulo {
  margin: 0 0 1.75rem;
  font-family: var(--serif-titulo);
  font-weight: 400;
  font-size: clamp(2rem, 7vw, 2.6rem);
}

.ferramentas {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}
.busca {
  position: relative;
  width: 100%;
  max-width: 420px;
}
.busca svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: var(--dourado);
  pointer-events: none;
}
.busca input {
  width: 100%;
  min-height: 48px;
  padding: 0.6rem 1rem 0.6rem 2.75rem;
  border: 1px solid var(--linha);
  border-radius: 999px;
  background: #fffdf9;
  color: var(--tinta);
  font-family: var(--serif-texto);
  font-size: 1.05rem; /* >= 16px evita zoom no iPhone */
  -webkit-appearance: none;
  appearance: none;
}
.busca input::placeholder { color: #9c9187; font-style: italic; }
.busca input:focus { outline: none; border-color: var(--dourado); box-shadow: 0 0 0 3px rgba(176, 141, 87, 0.18); }

.filtros {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}
.filtro {
  min-height: 44px;
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--linha);
  border-radius: 999px;
  background: transparent;
  font-family: var(--rotulo);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tinta-suave);
  cursor: pointer;
  transition: all var(--transicao);
}
.filtro:hover { border-color: var(--dourado); color: var(--tinta); }
.filtro[aria-pressed="true"] {
  background: var(--tinta);
  border-color: var(--tinta);
  color: var(--creme);
}

.vazio {
  max-width: 26rem;
  margin: 2rem auto;
  font-style: italic;
  color: var(--tinta-suave);
}

/* ---------- Grade de peças ---------- */
.grade {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
}
.card {
  animation: aparecer 0.5s ease both;
}
.card__botao {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: inherit;
  cursor: pointer;
}
/* Moldura vintage das fotos:
   borda dourada grossa + filete fino por dentro + cantos ornamentados
   (imagens/canto-foto-*.svg) sobrepostos nos quatro cantos. */
.card__foto {
  --canto: 54px;
  position: relative;
  padding: 4px;
  border: 3px solid var(--dourado);
  background: #fffcf6;
  box-shadow: 0 8px 24px rgba(31, 26, 23, 0.12);
  transition: box-shadow var(--transicao), border-color var(--transicao), transform var(--transicao);
}
.card__foto::before {
  content: "";
  position: absolute;
  inset: -8px;
  z-index: 2;
  pointer-events: none;
  background:
    url("../imagens/canto-foto-se.svg") left top / var(--canto) var(--canto) no-repeat,
    url("../imagens/canto-foto-sd.svg") right top / var(--canto) var(--canto) no-repeat,
    url("../imagens/canto-foto-ie.svg") left bottom / var(--canto) var(--canto) no-repeat,
    url("../imagens/canto-foto-id.svg") right bottom / var(--canto) var(--canto) no-repeat;
}
.card__quadro {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--creme-2);
  outline: 1px solid rgba(176, 141, 87, 0.8);
}
@media (min-width: 640px) {
  .card__foto { --canto: 92px; padding: 5px; }
  .card__foto::before { inset: -13px; }
}
.card__quadro img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.card__botao:hover .card__foto {
  border-color: var(--dourado-claro);
  box-shadow: 0 14px 34px rgba(31, 26, 23, 0.16);
  transform: translateY(-3px);
}
.card__botao:hover .card__quadro img { transform: scale(1.04); }

/* ---------- Efeitos das fotos (escolhidos por ?efeito= ou CONFIG.efeitoFotos) ---------- */

/* 1. Brilho: reflexo de luz dourada atravessa a foto quando ela entra na tela,
      de tempos em tempos numa foto visível, e ao passar o mouse (computador) */
.efeito-brilho .card__quadro::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(115deg,
    transparent 35%, rgba(255, 228, 170, 0.28) 46%, rgba(255, 245, 220, 0.55) 50%,
    rgba(255, 228, 170, 0.28) 54%, transparent 65%);
  transform: translateX(-140%);
}
.efeito-brilho .card.brilhar .card__quadro::after { animation: brilhar 1.4s ease both; }
.efeito-brilho .card__botao:hover .card__quadro::after { animation: brilhar-de-novo 1.1s ease both; }
@keyframes brilhar { from { transform: translateX(-140%); } to { transform: translateX(140%); } }
@keyframes brilhar-de-novo { from { transform: translateX(-140%); } to { transform: translateX(140%); } }

/* 2. Surgir: os cards aparecem suavemente ao rolar a página */
.efeito-surgir .card {
  animation: none;
  opacity: 0;
  transform: translateY(36px) scale(0.98);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.efeito-surgir .card.visivel { opacity: 1; transform: none; }

/* 3. Alternativa: ao passar o mouse, a foto troca pela 2ª foto da peça */
.card__alt {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.card__botao:hover .card__alt { opacity: 1; }

/* 4. Vinheta: bordas escurecidas como retrato antigo; clareia ao passar o mouse */
.efeito-vinheta .card__quadro::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse 75% 70% at 50% 45%, transparent 45%, rgba(18, 10, 8, 0.55) 100%);
  transition: opacity 0.6s ease;
}
.efeito-vinheta .card__quadro img { filter: sepia(0.12) saturate(1.05); transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.6s; }
.efeito-vinheta .card__botao:hover .card__quadro::before { opacity: 0.25; }
.efeito-vinheta .card__botao:hover .card__quadro img { filter: none; }
.card__info { padding: 0.75rem 0.15rem 0; }
.card__nome {
  margin: 0;
  font-family: var(--serif-titulo);
  font-weight: 400;
  font-size: 1.1rem;
  line-height: 1.25;
}
.card__subtitulo {
  margin: 0.15rem 0 0;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--bordo);
}
.card__preco {
  margin: 0.35rem 0 0;
  font-family: var(--rotulo);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tinta-suave);
}
.card--esgotado .card__foto img { filter: grayscale(0.7) opacity(0.75); }

/* Selos centralizados, entre os ornamentos dos cantos */
.selo {
  position: absolute;
  z-index: 3;
  top: 0.9rem;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-family: var(--rotulo);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: rgba(18, 13, 12, 0.82);
  color: var(--creme);
}
.selo--destaque { background: var(--bordo); }
.selo--cores {
  top: auto;
  bottom: 0.9rem;
  background: rgba(245, 240, 232, 0.92);
  color: var(--tinta);
}

@keyframes aparecer { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Encomendas ---------- */
.encomendas {
  padding: 4.5rem 1.5rem;
  background: var(--noite-2);
  color: var(--creme);
  text-align: center;
}
.encomendas__titulo {
  margin: 0;
  font-family: var(--serif-titulo);
  font-weight: 400;
  font-size: clamp(2rem, 8vw, 2.8rem);
  line-height: 1.15;
}
.encomendas__texto {
  max-width: 24rem;
  margin: 0 auto 2rem;
  font-style: italic;
  color: #cfc5b6;
}

/* ---------- Rodapé ---------- */
.rodape {
  padding: 2.5rem 1.5rem calc(6rem + env(safe-area-inset-bottom));
  background: var(--noite);
  color: var(--creme);
  text-align: center;
}
.rodape__contatos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem 2.5rem;
  margin-bottom: 2rem;
}
.rodape__contatos a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
/* Ícone da rede num círculo dourado */
.rodape__icone {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(176, 141, 87, 0.6);
  border-radius: 50%;
  color: var(--dourado-claro);
  transition: background var(--transicao), color var(--transicao), border-color var(--transicao);
}
.rodape__icone svg { width: 22px; height: 22px; }
.rodape__contatos a:hover .rodape__icone {
  background: var(--dourado);
  border-color: var(--dourado);
  color: var(--noite);
}
.rodape__nome {
  font-family: var(--rotulo);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #cfc5b6;
}
.rodape__nota {
  max-width: 30rem;
  margin: 0 auto;
  font-size: 0.85rem;
  font-style: italic;
  color: #8d8377;
}

.rodape__credito {
  margin: 1.25rem 0 0;
  font-family: var(--rotulo);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #6f665c;
}

/* ---------- WhatsApp flutuante ---------- */
.whats-flutuante {
  position: fixed;
  right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  z-index: 20;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--whats);
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
  transition: transform var(--transicao);
}
.whats-flutuante:hover { transform: scale(1.06); }
.whats-flutuante svg { width: 30px; height: 30px; }

/* ---------- Janela de detalhe ---------- */
.detalhe {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--creme);
  color: var(--tinta);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.detalhe[open] { animation: abrir 0.35s ease both; }
.detalhe::backdrop { background: rgba(18, 13, 12, 0.72); }
@keyframes abrir { from { opacity: 0; transform: translateY(16px); } }

body.travado { overflow: hidden; }

.detalhe__fechar {
  position: fixed;
  top: calc(0.75rem + env(safe-area-inset-top));
  right: 0.75rem;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(245, 240, 232, 0.92);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}
.detalhe__fechar svg { width: 22px; height: 22px; }

.galeria {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--noite);
}
.galeria__trilho { flex: 1 1 auto; min-height: 0; }
.galeria__trilho {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.galeria__trilho::-webkit-scrollbar { display: none; }
.galeria__item {
  position: relative;
  flex: 0 0 100%;
  margin: 0;
  scroll-snap-align: center;
  aspect-ratio: 3 / 4;
  max-height: 78vh;
}
.galeria__item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.galeria__legenda {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(245, 240, 232, 0.92);
  font-family: var(--rotulo);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
}
.galeria__seta {
  position: absolute;
  top: calc(50% - 44px); /* centro da foto, descontando a faixa de miniaturas */
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(245, 240, 232, 0.88);
  transform: translateY(-50%);
  cursor: pointer;
  transition: opacity var(--transicao);
}
.galeria__seta svg { width: 24px; height: 24px; }
.galeria__seta--ant { left: 0.75rem; }
.galeria__seta--prox { right: 0.75rem; }
.galeria__seta:disabled { opacity: 0; pointer-events: none; }
.galeria--varias .galeria__seta { display: grid; }

/* Faixa de miniaturas das fotos */
.galeria__miniaturas {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--noite);
  border-top: 1px solid rgba(176, 141, 87, 0.35);
}
.galeria__miniaturas::-webkit-scrollbar { display: none; }
.galeria__mini {
  flex: 0 0 auto;
  width: 48px;
  height: 64px;
  padding: 0;
  border: 1px solid rgba(176, 141, 87, 0.35);
  background: none;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity var(--transicao), border-color var(--transicao), transform var(--transicao);
}
.galeria__mini img { width: 100%; height: 100%; object-fit: cover; }
.galeria__mini:hover { opacity: 0.85; }
.galeria__mini[aria-current="true"] {
  opacity: 1;
  border-color: var(--dourado-claro);
  box-shadow: 0 0 0 1px var(--dourado-claro);
  transform: translateY(-2px);
}

/* Painel de informações: damasco bem claro, moldura dourada interna
   com cantos ornamentados, como o resto do site */
.detalhe__info {
  position: relative;
  padding: 2.75rem 2rem calc(3rem + env(safe-area-inset-bottom));
  background:
    linear-gradient(rgba(245, 240, 232, 0.86), rgba(245, 240, 232, 0.86)),
    url("../imagens/damasco.svg") center top / 140px 180px repeat,
    var(--creme);
}
.detalhe__info::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(176, 141, 87, 0.6);
  outline: 1px solid rgba(176, 141, 87, 0.3);
  outline-offset: -6px;
  pointer-events: none;
}
.detalhe__info::after {
  content: "";
  position: absolute;
  inset: 2px;
  pointer-events: none;
  background:
    url("../imagens/canto.svg") left top / 56px 56px no-repeat,
    url("../imagens/canto-sd.svg") right top / 56px 56px no-repeat,
    url("../imagens/canto-ie.svg") left bottom / 56px 56px no-repeat,
    url("../imagens/canto-id.svg") right bottom / 56px 56px no-repeat;
}
.detalhe__ornamento {
  display: block;
  width: 200px;
  height: 20px;
  margin: 1.25rem 0 1.5rem;
  color: var(--dourado);
}

/* Entrada suave do conteúdo ao abrir a peça */
.detalhe[open] .detalhe__info > * { animation: entrar 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.detalhe[open] .detalhe__info > :nth-child(2) { animation-delay: 0.05s; }
.detalhe[open] .detalhe__info > :nth-child(3) { animation-delay: 0.1s; }
.detalhe[open] .detalhe__info > :nth-child(4) { animation-delay: 0.15s; }
.detalhe[open] .detalhe__info > :nth-child(5) { animation-delay: 0.2s; }
.detalhe[open] .detalhe__info > :nth-child(n+6) { animation-delay: 0.25s; }
@keyframes entrar { from { opacity: 0; transform: translateY(12px); } }

/* Foto da galeria aparece com um leve zoom */
.galeria__item img { animation: revelar 0.8s ease both; }
@keyframes revelar { from { opacity: 0; transform: scale(1.03); } }

/* Botão "Quero esta peça": ícone do WhatsApp e reflexo dourado ao passar o mouse */
.botao svg { width: 20px; height: 20px; flex: none; }
.botao--brilho { position: relative; overflow: hidden; }
.botao--brilho::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 226, 170, 0.45), transparent);
  transform: skewX(-20deg);
  transition: left 0.8s ease;
  pointer-events: none;
}
.botao--brilho:hover::after { left: 130%; }
.detalhe__nome {
  margin: 0;
  font-family: var(--serif-titulo);
  font-weight: 400;
  font-size: clamp(2rem, 8vw, 2.6rem);
  line-height: 1.1;
}
.detalhe__subtitulo {
  margin: 0.4rem 0 0;
  font-style: italic;
  font-size: 1.2rem;
  color: var(--bordo);
}
.detalhe__subtitulo:empty { display: none; }
.detalhe__descricao { margin: 0 0 1rem; }
.detalhe__observacao {
  margin: 0 0 1rem;
  font-style: italic;
  color: var(--tinta-suave);
}
.detalhe__observacao:empty { display: none; }

.detalhe__tamanhos { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.detalhe__tamanhos:empty { display: none; }
.tamanho {
  min-width: 40px;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--linha);
  border-radius: var(--raio);
  font-family: var(--rotulo);
  font-size: 0.75rem;
  text-align: center;
}

.detalhe__selos {
  margin: 0 0 1.75rem;
  padding: 1rem 0;
  border-top: 1px solid var(--linha);
  border-bottom: 1px solid var(--linha);
  list-style: none;
}
.detalhe__selos li { position: relative; padding-left: 1.1rem; font-size: 1.02rem; }
.detalhe__selos li::before {
  content: "◆";
  position: absolute;
  left: 0;
  top: 0.45em;
  font-size: 0.5rem;
  color: var(--dourado);
}

.detalhe__preco {
  margin: -0.4rem 0 1.5rem;
  font-family: var(--serif-titulo);
  font-style: italic;
  font-size: 1.9rem;
}
.detalhe__preco--esgotado { font-style: normal; font-size: 1.3rem; color: var(--bordo); }

.detalhe .botao { width: 100%; }

.detalhe__copiar {
  display: block;
  margin: 1rem auto 0;
  padding: 0.6rem;
  border: 0;
  background: none;
  font-family: var(--rotulo);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tinta-suave);
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

/* =========================================================
   Telas maiores
   ========================================================= */
@media (min-width: 640px) {
  .topo__rede span { display: inline; }
  .topo__redes { gap: 1rem; }
  .grade { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 1.5rem; }
  .card__nome { font-size: 1.3rem; }
}

@media (min-width: 1024px) {
  .topo { padding: 5rem 2rem 3.5rem; }
  .topo::before { inset: 20px; outline-offset: -9px; }
  .topo__canto { width: 96px; height: 96px; }
  .topo__canto--se { top: 6px; left: 6px; }
  .topo__canto--sd { top: 6px; right: 6px; }
  .topo__canto--ie { bottom: 6px; left: 6px; }
  .topo__canto--id { bottom: 6px; right: 6px; }
  .topo__redes { top: 34px; right: 112px; }
  .topo__brasao { width: 440px; }
  .topo__ornamento { width: 240px; height: 24px; }

  .grade { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .catalogo { padding-inline: 2rem; }

  .detalhe {
    /* altura da janela; a coluna da foto é calculada a partir dela */
    --alto: min(94vh, 980px);
    --faixa: 97px; /* altura da faixa de miniaturas */
    width: min(1320px, 95vw);
    /* altura fixa: com "auto" o navegador estica a janela até a tela toda */
    height: var(--alto);
    max-height: none;
    margin: auto;
    border-radius: 10px;
    overflow: hidden;
  }
  .detalhe__corpo {
    display: grid;
    /* coluna da foto na proporção 3:4 das fotos: sem faixas pretas */
    grid-template-columns: calc((var(--alto) - var(--faixa)) * 0.75) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    height: 100%;
  }
  .galeria { min-height: 0; overflow: hidden; }
  .galeria { height: 100%; }
  .galeria__item { aspect-ratio: auto; height: 100%; max-height: none; }
  /* a foto preenche o quadro (sem faixas); o corte, quando há, é mínimo */
  .galeria__item img { object-fit: cover; object-position: center 30%; }
  .galeria__mini { width: 54px; height: 72px; }
  .galeria__seta { top: calc(50% - 48px); }
  .detalhe__info {
    overflow-y: auto;
    padding: 3.75rem 3.25rem;
    /* conteúdo centralizado na vertical, sem cortar quando é longo */
    display: flex;
    flex-direction: column;
    justify-content: safe center;
  }
  /* bloco de texto com largura confortável, centralizado no painel */
  .detalhe__info { padding-inline: max(3.25rem, calc((100% - 34rem) / 2)); }
  .detalhe__info > * { flex-shrink: 0; }
  .detalhe__info::before { inset: 16px; }
  .detalhe__info::after { inset: 6px; background-size: 72px 72px; }
  /* no computador o "fechar" fica sobre a foto, longe dos ornamentos do painel */
  .detalhe__fechar { position: absolute; top: 1rem; left: 1rem; right: auto; }
}

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