@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800;900&family=Montserrat:wght@300;400;500;600;700;800&display=swap');

:root {
  --gold: #BE9547;
  --gold-light: #D9B96C;
  --gold-dark: #6E521E;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #000;
  color: #fff;
  font-family: 'Montserrat', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- Página inicial (lista de catálogos) ---------- */
.topo-inicial {
  text-align: center;
  padding: 60px 20px 40px;
  border-bottom: 1.5px solid var(--gold);
}

.topo-inicial h1 {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 38px;
  margin: 6px 0;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold-light);
  font-weight: 700;
}

.topo-inicial p {
  color: #ccc;
  font-size: 14px;
  font-weight: 300;
}

.grid-catalogos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  padding: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.card-catalogo {
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 30px 20px;
  text-align: center;
  transition: transform 0.2s ease, background-color 0.2s ease;
  background-color: rgba(10, 10, 10, 0.8);
}

.card-catalogo:hover {
  transform: translateY(-4px);
  background-color: rgba(190, 149, 71, 0.05);
}

.card-catalogo h2 {
  font-family: 'Cinzel', Georgia, serif;
  color: var(--gold-light);
  font-size: 24px;
  margin: 10px 0 6px;
  font-weight: 600;
  letter-spacing: 1px;
}

.card-catalogo p {
  color: #aaa;
  font-size: 13px;
  font-weight: 300;
}

/* ---------- Página do catálogo (réplica exata da arte) ---------- */
#arte {
  width: 100%;
  max-width: 1024px;
  margin: 0 auto;
  background: #000;
  color: #fff;
  padding: 50px 30px 40px;
  position: relative;
}

@media(min-width: 700px) {
  #arte {
    padding: 50px 60px 40px;
  }
}

#logo-area {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

#logo-circulo {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#logo-circulo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#logo-circulo svg.main-badge-logo {
  width: 100%;
  height: 100%;
  fill: var(--gold);
}

#titulo-area {
  text-align: center;
  margin-bottom: 24px;
}

#eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--gold-light);
  letter-spacing: 7px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
}

#eyebrow hr {
  flex: 1;
  max-width: 150px;
  border: none;
  border-top: 1px solid var(--gold);
}

#nome-colecao {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 46px;
  font-weight: 900;
  letter-spacing: 4px;
  background: linear-gradient(180deg, #F9D995, var(--gold) 60%, var(--gold-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0;
  text-transform: uppercase;
}

@media(min-width: 700px) {
  #nome-colecao {
    font-size: 66px;
  }
}

#subtitulo-colecao {
  color: #ccc;
  font-size: 13px;
  margin-top: 8px;
  font-weight: 300;
  letter-spacing: 0.5px;
}

#resumo {
  display: flex;
  flex-wrap: wrap;
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  padding: 16px 0;
  margin-bottom: 28px;
}

.resumo-item {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 20px;
  border-right: 1px solid rgba(190, 149, 71, 0.3);
}

.resumo-item:last-child {
  border-right: none;
}

@media(max-width: 767px) {
  .resumo-item {
    border-right: none;
    border-bottom: 1px dashed rgba(190, 149, 71, 0.2);
  }
  .resumo-item:last-child {
    border-bottom: none;
  }
}

.icone-circulo {
  width: 48px;
  height: 48px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icone-circulo svg {
  width: 24px;
  height: 24px;
}

.resumo-texto .label {
  font-size: 10px;
  color: #aaa;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.resumo-texto .valor {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

/* ---------- Tabela de peças ---------- */
.tabela-pecas {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 30px;
  border: 1px solid rgba(190, 149, 71, 0.4);
}

.tabela-pecas thead th {
  background: var(--gold);
  color: #000;
  padding: 10px 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(190, 149, 71, 0.4);
}

.tabela-pecas thead th span.sub-header {
  display: block;
  font-size: 9px;
  text-transform: none;
  font-weight: 400;
  margin-top: 3px;
  color: #222;
  letter-spacing: 0;
}

.tabela-pecas tbody tr {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.tabela-pecas tbody tr:hover {
  background-color: rgba(190, 149, 71, 0.08);
}

.tabela-pecas tbody td {
  padding: 12px 8px;
  border: 1px solid rgba(190, 149, 71, 0.3);
  font-size: 13.5px;
  text-align: center;
  color: #fff;
}

.tabela-pecas td.codigo {
  color: var(--gold-light);
  font-weight: 700;
}

/* Stylings for sold / reserved rows on the table */
.tabela-pecas tbody tr.status-vendida td {
  color: #666;
}
.tabela-pecas tbody tr.status-vendida td.codigo {
  text-decoration: line-through;
  color: #444;
}
.tabela-pecas tbody tr.status-reservada td {
  color: #999;
}
.tabela-pecas tbody tr.status-reservada td.codigo {
  color: #a38c52;
}

.tabela-pecas tfoot td {
  padding: 12px 8px;
  font-weight: 700;
  font-size: 13.5px;
  background: #000;
  border: 1px solid rgba(190, 149, 71, 0.4);
  text-align: center;
  color: #fff;
}

.tabela-pecas tfoot td.total-label {
  text-align: left;
  padding-left: 20px;
  color: #fff;
}

#total-caixa {
  display: inline-block;
  border: 1px solid var(--gold);
  border-radius: 2px;
  padding: 6px 16px;
  font-size: 18px;
  white-space: nowrap;
  color: var(--gold-light);
  font-weight: 800;
  background-color: #000;
}

/* ---------- Blocos de Reserva & Pagamento ---------- */
#blocos {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 30px;
}

.bloco {
  flex: 1;
  min-width: 300px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 24px;
  background: #000;
}

.bloco-flex {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.bloco-shield-icon {
  flex-shrink: 0;
  width: 50px;
  height: 60px;
  color: var(--gold);
}

.bloco-conteudo {
  flex-grow: 1;
}

.bloco h3 {
  color: var(--gold-light);
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 2px 0;
  letter-spacing: 0.5px;
}

.bloco .sub {
  font-size: 9.5px;
  letter-spacing: 2px;
  color: #aaa;
  margin-bottom: 16px;
  text-transform: uppercase;
  font-weight: 500;
}

.item-condicao {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 12px;
  line-height: 1.5;
  color: #ddd;
  align-items: flex-start;
}

.item-condicao:last-child {
  margin-bottom: 0;
}

.item-condicao .ic {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--gold-light);
  margin-top: 1px;
}

.item-condicao .ic svg {
  width: 10px;
  height: 10px;
}

.item-condicao b, .item-condicao .amarelo {
  color: var(--gold-light);
  font-weight: 600;
}

/* Pagamento */
.pagamento-lista {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.pagamento-item {
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1.5px solid rgba(190, 149, 71, 0.15);
  padding-bottom: 14px;
}

.pagamento-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.pix-icone {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.pix-wordmark {
  font-family: 'Montserrat', sans-serif;
  font-size: 24px;
  font-weight: 400;
  color: #fff;
  letter-spacing: -0.5px;
  margin-right: 6px;
}

.pagamento-texto-inline {
  font-size: 12px;
  line-height: 1.4;
  color: #ddd;
}

.cartao-icone {
  width: 36px;
  height: 26px;
  flex-shrink: 0;
  color: var(--gold);
}

.pagamento-texto .principal {
  font-size: 13px;
  color: var(--gold-light);
  font-weight: 700;
  margin-bottom: 2px;
}

.pagamento-texto .secundaria {
  font-size: 11px;
  color: #aaa;
}

/* Rodapé */
#rodape {
  text-align: center;
  border-top: 1px solid var(--gold);
  padding-top: 20px;
  margin-top: 20px;
}

#rodape svg.rodape-logo {
  width: 22px;
  height: 22px;
  fill: var(--gold);
  margin-bottom: 4px;
}

#rodape .nome-marca {
  color: var(--gold-light);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

#rodape .slogan {
  font-size: 11px;
  color: #aaa;
  margin-top: 4px;
  font-weight: 300;
}

/* ---------- Modal Nativo (<dialog>) ---------- */
dialog {
  background: rgba(10, 10, 10, 0.95);
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 30px;
  max-width: 680px;
  width: 90%;
  color: #fff;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
  outline: none;
  overflow: hidden;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease, display 0.3s allow-discrete, overlay 0.3s allow-discrete;
  transition-behavior: allow-discrete;
}

dialog[open] {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

@starting-style {
  dialog[open] {
    transform: translate(-50%, -50%) scale(0.92);
    opacity: 0;
  }
}

dialog::backdrop {
  background-color: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  transition: background-color 0.3s ease, backdrop-filter 0.3s ease, display 0.3s allow-discrete, overlay 0.3s allow-discrete;
  transition-behavior: allow-discrete;
}

dialog[open]::backdrop {
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
}

@starting-style {
  dialog[open]::backdrop {
    background-color: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
  }
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(190, 149, 71, 0.25);
  padding-bottom: 14px;
  margin-bottom: 20px;
}

.dialog-header h2 {
  font-family: 'Cinzel', serif;
  color: var(--gold-light);
  font-size: 20px;
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.dialog-close-btn {
  background: none;
  border: none;
  color: #999;
  font-size: 22px;
  cursor: pointer;
  transition: color 0.2s ease;
  padding: 0;
  line-height: 1;
}

.dialog-close-btn:hover {
  color: var(--gold-light);
}

.dialog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}

@media (max-width: 640px) {
  .dialog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  dialog {
    padding: 20px;
  }
}

.dialog-foto-container {
  position: relative;
  border: 1px solid rgba(190, 149, 71, 0.4);
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1;
  background: #0d0d0d;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dialog-foto {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dialog-foto-placeholder {
  font-size: 40px;
  color: var(--gold-dark);
}

.dialog-vendida-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dialog-vendida-x {
  font-size: 130px;
  font-weight: 300;
  color: var(--gold);
  opacity: 0.85;
  line-height: 1;
  font-family: 'Cinzel', serif;
}

.dialog-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.dialog-specs {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 14px;
  font-size: 12.5px;
  margin-bottom: 20px;
  align-items: center;
}

.dialog-specs .label {
  color: #999;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.5px;
}

.dialog-specs .value {
  color: #fff;
  font-weight: 500;
}

.dialog-specs .value.gold {
  color: var(--gold-light);
  font-weight: 700;
}

.dialog-actions {
  margin-top: auto;
}

.dialog-btn-reservar {
  width: 100%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #000;
  font-weight: 700;
  border: none;
  border-radius: 6px;
  padding: 11px 20px;
  cursor: pointer;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: filter 0.2s ease;
}

.dialog-btn-reservar:hover {
  filter: brightness(1.1);
}

.dialog-btn-reservar:disabled {
  background: #2b2b2b;
  color: #666;
  cursor: not-allowed;
}

/* Formulário de reserva dentro do dialog */
.dialog-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dialog-form label {
  font-size: 10.5px;
  color: #aaa;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: -4px;
}

.dialog-form input {
  background: #141414;
  border: 1px solid rgba(190, 149, 71, 0.3);
  color: #fff;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13.5px;
  outline: none;
  font-family: 'Montserrat', sans-serif;
}

.dialog-form input:focus {
  border-color: var(--gold-light);
}

.dialog-qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.dialog-qr-code {
  background: #fff;
  padding: 8px;
  border-radius: 8px;
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dialog-qr-code img {
  width: 100%;
  height: 100%;
}

.dialog-copia-cola {
  font-size: 9.5px;
  word-break: break-all;
  background: #141414;
  padding: 8px;
  border-radius: 6px;
  color: #aaa;
  width: 100%;
  border: 1px dashed rgba(190, 149, 71, 0.3);
  cursor: pointer;
  text-align: left;
}

.dialog-copia-cola:active {
  background: #1f1f1f;
}

.dialog-status-msg {
  font-weight: 600;
  font-size: 12.5px;
  color: var(--gold-light);
  animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

@media (prefers-reduced-motion: reduce) {
  dialog {
    transform: translate(-50%, -50%) none !important;
    transition-duration: 0.1s !important;
  }
  @starting-style {
    dialog[open] {
      transform: translate(-50%, -50%) none !important;
    }
  }
}
