:root {
  --preto: #0b0b0a;
  --preto-cartao: #161412;
  --dourado: #cda256;
  --dourado-claro: #e8c877;
  --dourado-escuro: #8a6d34;
  --texto: #ece4d6;
  --texto-suave: #b8ac97;
  --verde-whats: #25d366;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--preto);
  color: var(--texto);
}

.topo {
  text-align: center;
  padding: 48px 16px 24px;
}

.topo__logo-img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  border-radius: 50%;
  border: 2px solid var(--dourado);
  padding: 8px;
  background: #000;
}

.topo__slogan {
  margin: 16px 0 0;
  color: var(--texto-suave);
  font-family: Georgia, 'Times New Roman', serif;
  letter-spacing: 0.5px;
}

.filtros {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 0 16px 32px;
}

.filtros a {
  text-decoration: none;
  color: var(--dourado-claro);
  border: 1px solid var(--dourado-escuro);
  padding: 6px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  transition: background 0.2s, color 0.2s;
}

.filtros a:hover,
.filtros a.ativo {
  background: var(--dourado);
  color: #100c04;
  border-color: var(--dourado);
}

.grade-produtos {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px 64px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 24px;
}

.vazio {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--texto-suave);
  padding: 48px 0;
}

.card-produto {
  background: var(--preto-cartao);
  border: 1px solid #2a2620;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s;
}

.card-produto:hover {
  border-color: var(--dourado-escuro);
}

.card-produto__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

/* --- carrossel de fotos (vitrine e detalhe) --- */
.carrossel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.carrossel__trilho {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease;
}

.carrossel__trilho img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carrossel__seta {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--dourado-escuro);
  background: rgba(11, 11, 10, 0.6);
  color: var(--dourado-claro);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  cursor: pointer;
  z-index: 2;
}

.carrossel__seta:hover {
  background: rgba(11, 11, 10, 0.85);
  border-color: var(--dourado);
}

.carrossel__seta--prev {
  left: 8px;
}

.carrossel__seta--next {
  right: 8px;
}

.carrossel__pontos {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 2;
}

.carrossel__ponto {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(236, 228, 214, 0.4);
  cursor: pointer;
}

.carrossel__ponto.ativo {
  background: var(--dourado);
}

.card-produto__foto {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #000;
}

.card-produto.esgotado .carrossel__trilho img {
  filter: grayscale(0.7);
  opacity: 0.5;
}

.selo-esgotado {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #8a1f1f;
  color: #fff;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 999px;
}

.card-produto__info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-produto__marca {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  color: var(--dourado);
}

.card-produto__nome {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.2rem;
  color: var(--texto);
}

.card-produto__volume {
  font-size: 0.8rem;
  color: var(--texto-suave);
}

.card-produto__preco {
  font-weight: bold;
  font-size: 1.15rem;
  margin: 8px 0 4px;
  color: var(--dourado-claro);
}

.card-produto__acao {
  padding: 0 16px 16px;
}

.btn-whatsapp {
  display: block;
  text-align: center;
  background: var(--verde-whats);
  color: #06210f;
  border: none;
  padding: 10px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  cursor: pointer;
}

.btn-whatsapp[disabled] {
  background: #444;
  color: #999;
  cursor: not-allowed;
}

.btn-ver-detalhes {
  display: block;
  text-align: center;
  background: transparent;
  color: var(--dourado-claro);
  border: 1px solid var(--dourado-escuro);
  padding: 10px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-ver-detalhes:hover {
  background: var(--dourado);
  color: #100c04;
  border-color: var(--dourado);
}

.rodape {
  text-align: center;
  padding: 24px;
  color: var(--texto-suave);
  font-size: 0.85rem;
}

/* --- página de detalhe do produto --- */
.pagina-produto {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 16px 64px;
}

.pagina-produto::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: min(800px, 90%);
  height: 320px;
  background: radial-gradient(ellipse at 50% 45%, rgba(205, 162, 86, 0.16), transparent 72%);
  pointer-events: none;
}

.voltar {
  display: inline-block;
  color: var(--dourado-claro);
  text-decoration: none;
  margin-bottom: 24px;
  font-size: 0.9rem;
}

.voltar:hover {
  text-decoration: underline;
}

.moldura {
  position: relative;
  background: var(--preto-cartao);
  border: 1px solid var(--dourado-escuro);
  outline: 1px solid #2a2620;
  outline-offset: -8px;
  border-radius: 4px;
  padding: 48px 40px 40px;
}

.canto {
  position: absolute;
  width: 34px;
  height: 34px;
  border: 2px solid var(--dourado);
  pointer-events: none;
}

.canto::after {
  content: '';
  position: absolute;
  width: 7px;
  height: 7px;
  background: var(--dourado);
  transform: rotate(45deg);
}

.canto--tl {
  top: 12px;
  left: 12px;
  border-right: none;
  border-bottom: none;
}

.canto--tl::after {
  top: -4.5px;
  left: -4.5px;
}

.canto--tr {
  top: 12px;
  right: 12px;
  border-left: none;
  border-bottom: none;
}

.canto--tr::after {
  top: -4.5px;
  right: -4.5px;
}

.canto--bl {
  bottom: 12px;
  left: 12px;
  border-right: none;
  border-top: none;
}

.canto--bl::after {
  bottom: -4.5px;
  left: -4.5px;
}

.canto--br {
  bottom: 12px;
  right: 12px;
  border-left: none;
  border-top: none;
}

.canto--br::after {
  bottom: -4.5px;
  right: -4.5px;
}

.moldura__logo {
  display: block;
  margin: 0 auto 32px;
  width: 110px;
  height: 110px;
  object-fit: contain;
  border-radius: 50%;
  border: 2px solid var(--dourado);
  padding: 6px;
  background: #000;
}

.moldura__conteudo {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.3fr);
  gap: 40px;
  align-items: start;
}

.moldura__foto {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 50px rgba(205, 162, 86, 0.18), 0 10px 30px rgba(0, 0, 0, 0.6);
}

.moldura__foto.esgotado .carrossel__trilho img {
  filter: grayscale(0.7);
  opacity: 0.55;
}

.selo-volume {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 2px solid var(--dourado);
  background: rgba(11, 11, 10, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--dourado-claro);
}

.selo-volume__num {
  font-family: Georgia, serif;
  font-size: 1.1rem;
  font-weight: bold;
}

.selo-volume__label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--texto-suave);
}

.moldura__marca {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.85rem;
  color: var(--dourado);
}

.moldura__nome {
  margin: 4px 0 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 2.4rem;
  line-height: 1.1;
  color: var(--dourado-claro);
  background: linear-gradient(180deg, #f6e6b8 0%, #cda256 55%, #93712f 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.moldura__marca-tipo {
  margin: 8px 0 0;
  color: var(--texto-suave);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.moldura__subtitulo {
  margin-top: 20px;
  display: inline-block;
  border: 1px solid var(--dourado-escuro);
  border-radius: 6px;
  padding: 10px 16px;
  font-family: Georgia, serif;
  font-size: 1.05rem;
  color: var(--texto);
}

.moldura__divisor {
  margin: 24px 0;
  color: var(--dourado);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.moldura__divisor::before,
.moldura__divisor::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--dourado-escuro));
}

.moldura__divisor::after {
  background: linear-gradient(90deg, var(--dourado-escuro), transparent);
}

.moldura__descricao {
  color: var(--texto);
  line-height: 1.6;
  font-size: 0.95rem;
}

.moldura__descricao2 {
  margin-top: 20px;
  border: 1px solid var(--dourado-escuro);
  border-radius: 8px;
  padding: 16px;
  color: var(--texto-suave);
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-line;
}

.moldura__rodape {
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.moldura__preco {
  font-family: Georgia, serif;
  font-size: 1.5rem;
  color: var(--dourado-claro);
  font-weight: bold;
}

.moldura__rodape .btn-whatsapp {
  flex: 1;
  max-width: 260px;
}

@media (max-width: 640px) {
  .moldura {
    padding: 40px 20px 28px;
  }

  .moldura__conteudo {
    grid-template-columns: 1fr;
  }

  .moldura__nome {
    font-size: 1.8rem;
  }

  .moldura__rodape {
    flex-direction: column;
    align-items: stretch;
  }

  .moldura__rodape .btn-whatsapp {
    max-width: none;
  }
}

/* --- admin --- */
.admin-shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 16px 64px;
}

.admin-shell h1 {
  font-family: Georgia, serif;
  color: var(--dourado-claro);
}

.admin-login {
  max-width: 360px;
  margin: 60px auto;
  padding: 32px;
  background: var(--preto-cartao);
  border: 1px solid #2a2620;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.admin-login__logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 50%;
  border: 2px solid var(--dourado);
  padding: 6px;
  background: #000;
  margin-bottom: 8px;
}

.admin-login h1 {
  font-family: Georgia, serif;
  text-align: center;
  color: var(--dourado-claro);
  margin-top: 8px;
}

.campo {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.campo label {
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--texto-suave);
}

.campo input,
.campo textarea,
.campo select {
  padding: 8px;
  border: 1px solid #3a352c;
  border-radius: 6px;
  font-size: 1rem;
  background: #0f0d0b;
  color: var(--texto);
}

.campo input:focus,
.campo textarea:focus,
.campo select:focus {
  outline: none;
  border-color: var(--dourado);
}

.campo small {
  color: var(--texto-suave);
  font-size: 0.78rem;
}

.miniaturas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.miniatura {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--texto-suave);
}

.miniatura img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #3a352c;
}

.miniatura span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.miniatura input[type='checkbox'] {
  width: auto;
}

.btn {
  display: inline-block;
  background: var(--dourado-escuro);
  color: #0b0b0a;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  text-decoration: none;
}

.btn:hover {
  background: var(--dourado);
}

.btn.secundario {
  background: #2a2620;
  color: var(--texto);
}

.btn.secundario:hover {
  background: #3a352c;
}

.btn.perigo {
  background: #8a1f1f;
  color: #fff;
}

.btn.perigo:hover {
  background: #a52a2a;
}

.erro {
  background: #3a1414;
  color: #f4c7c7;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.sucesso {
  background: #143a1e;
  color: #c7f4d3;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.tabela-admin {
  width: 100%;
  border-collapse: collapse;
  background: var(--preto-cartao);
  border: 1px solid #2a2620;
  border-radius: 12px;
  overflow: hidden;
}

.tabela-admin th {
  color: var(--dourado);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.tabela-admin th,
.tabela-admin td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #2a2620;
  font-size: 0.9rem;
}

.tabela-admin img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
}

.acoes {
  display: flex;
  gap: 8px;
}

.estoque-controle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-estoque {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--dourado-escuro);
  background: transparent;
  color: var(--dourado-claro);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-estoque:hover {
  background: var(--dourado-escuro);
  color: #0b0b0a;
}

.btn-estoque:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.estoque-numero {
  min-width: 24px;
  text-align: center;
  font-weight: bold;
}

.estoque-numero--baixo {
  color: #e0a545;
}

.estoque-numero--zero {
  color: #d16a64;
}

.acoes form {
  display: inline;
}
