/* ============================================================
   card-produto.css — Santour
   Estilos do componente de card de produto compartilhado.
   Usado em: tickets.php, souvenirs.php, emporio.php, transfers.php
   ============================================================ */

/* ── Grid de produtos ─────────────────────────────────────── */
.pc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
@media (max-width: 680px) {
  .pc-grid { grid-template-columns: 1fr; gap: 1rem; }
}

/* ── Card ─────────────────────────────────────────────────── */
.pc-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .25s, box-shadow .25s;
}
.pc-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,.14);
}

/* ── Imagem ───────────────────────────────────────────────── */
.pc-img-wrap { position: relative; }
.pc-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: #e8f0f8;
}
.pc-img-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #e8f0f8, #d0e4f5);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Quando imagem falha ao carregar, o wrapper vira placeholder */
.pc-img-wrap.pc-img-placeholder-active {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #e8f0f8, #d0e4f5);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pc-img-wrap.pc-img-placeholder-active::after {
  content: '';
  display: block;
  width: 48px;
  height: 48px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' fill='none' stroke='%23aaa' stroke-width='1.5' viewBox='0 0 24 24'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2z'/%3E%3Cpolyline points='9 22 9 12 15 12 15 22'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ── Badge ────────────────────────────────────────────────── */
.pc-badge {
  position: absolute;
  top: 10px; left: 10px;
  background: #0d9488;
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: .25rem .65rem;
  border-radius: 50px;
  letter-spacing: .05em;
}
.pc-badge--esgotado { background: #e74c3c; }

/* ── Corpo ────────────────────────────────────────────────── */
.pc-body {
  padding: 1rem 1.1rem 1.1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.pc-categoria {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #0d9488;
  font-weight: 700;
  margin-bottom: .2rem;
}
.pc-nome {
  font-size: 1.05rem;
  font-weight: 800;
  color: #2C3E50;
  margin-bottom: .35rem;
  line-height: 1.3;
}
.pc-desc {
  font-size: .84rem;
  color: #7F8C8D;
  line-height: 1.55;
  flex: 1;
  margin-bottom: .9rem;
}

/* ── Bloco de preço ───────────────────────────────────────── */
.pc-preco-wrap {
  margin-bottom: .75rem;
}
.pc-parcelado-label {
  font-size: .75rem;
  color: #7F8C8D;
  display: block;
  margin-bottom: .1rem;
}
.pc-parcelado-valor {
  display: flex;
  align-items: baseline;
  gap: .25rem;
  line-height: 1;
  margin-bottom: .35rem;
}
.pc-parcelas {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2C3E50;
}
.pc-valor-parcela {
  font-size: 1rem;
  color: #2C3E50;
}
.pc-valor-parcela strong {
  font-size: 2rem;
  font-weight: 900;
  color: #2C3E50;
  line-height: 1;
}
.pc-pix-desc {
  font-size: .8rem;
  color: #7F8C8D;
  display: flex;
  align-items: center;
  gap: .3rem;
}
.pc-pix-txt {
  color: #0d9488;
  font-weight: 600;
}
.pc-sob-consulta {
  font-size: .95rem;
  color: #7F8C8D;
  font-style: italic;
  margin: 0;
}

/* ── Botões de ação ───────────────────────────────────────── */
.pc-acoes {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  margin-bottom: .6rem;
}
.pc-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  width: 100%;
  padding: .7rem 1rem;
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: filter .2s, transform .15s;
  text-align: center;
}
.pc-btn:hover { filter: brightness(.93); transform: translateY(-1px); }
.pc-btn--comprar {
  background: #F5C518;
  color: #1a1a1a;
}
.pc-btn--wpp {
  background: #25D366;
  color: #fff;
}
.pc-btn--disabled {
  background: #ccc;
  color: #888;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Rodapé total ─────────────────────────────────────────── */
.pc-total {
  font-size: .78rem;
  color: #7F8C8D;
  text-align: center;
  padding-top: .5rem;
  border-top: 1px solid #f0f0f0;
}
.pc-total strong { color: #2C3E50; }

/* ── Estados de carregamento / vazio ──────────────────────── */
.pc-loading {
  text-align: center;
  padding: 3rem;
  color: #7F8C8D;
  font-size: .95rem;
  grid-column: 1 / -1;
}
.pc-vazio {
  text-align: center;
  padding: 3rem;
  grid-column: 1 / -1;
}
.pc-vazio h3 { font-size: 1.2rem; color: #7F8C8D; margin-bottom: .5rem; }
.pc-vazio p  { font-size: .9rem; color: #aaa; }

@keyframes pc-spin { to { transform: rotate(360deg); } }
.pc-spinner {
  animation: pc-spin 1s linear infinite;
  display: inline-block;
  margin-bottom: 8px;
}
