/* ============================================================
   SHOP-STYLE.CSS
   Design tokens inspirados no shop nativo da GameJolt:
   topo com saldo, cards com categoria + nome + preço,
   botão de compra em pílula, banner de voltar pra loja.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg:        #e7e7e7;
  --text:      #777777;
  --muted:     #585654;
  --card-bg:   #000000;
  --image-bg:  #403B39;
  --header-bg: #faf7f5;
  --pill-bg:   #111111;
  --pill-text: #000000;
  --pill-bg-disabled: #cfcfd4;
  --pill-text-disabled: #8b8b90;
  --accent:    #000000;
  --divider:   rgba(0,0,0,0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #312B27;
    --text:      #ffffff;
    --muted:     #585654;
    --card-bg:   #000000;
    --image-bg:  #403b39;
    --header-bg: #211c19;
    --pill-bg:   #ffffff;
    --pill-text: #111111;
    --pill-bg-disabled: #55493f;
    --pill-text-disabled: #9c8f80;
    --accent:    #ffffff;
    --divider:   rgba(255,255,255,0.08);
  }

}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  transition: background-color 0.3s, color 0.3s;
}

a { color: inherit; }

.wrapper-jogo {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.godot-scroll-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y !important;
}
.godot-scroll-container::-webkit-scrollbar { width: 6px; }
.godot-scroll-container::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.2);
  border-radius: 4px;
}

/* ── TOPO: seta, título, saldo ── */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 0 16px;
  flex-shrink: 0;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.topbar-left h3 {
  margin: 0;
  font-weight: 800;
  font-size: 17px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.balance-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 800;
  background: var(--header-bg);
  padding: 6px 12px;
  border-radius: 999px;
  flex-shrink: 0;
}
.balance-chip img { width: 18px; height: 18px; object-fit: contain; }

/* ── Banner "voltar pra loja" (estilo @Fulano's Shop · Open) ── */
.shop-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--header-bg);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 20px;
  text-decoration: none;
  color: inherit;
}
.shop-banner span { font-weight: 700; font-size: 14px; }
.shop-banner .open-tag {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--text);
  opacity: 0.8;
}

/* ── Banner "get stardust" (agora é o mesmo componente .btn-info) ── */
.earn-banner { margin-bottom: 22px; }

/* ── Rótulo de seção estilo "BOOSTS" / "TRENDING" ── */
.section-label {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text);
  margin: 0 0 10px 2px;
}

/* ── Grid de produtos ── */
.grid-produtos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
@media (min-width: 768px) {
  .grid-produtos { grid-template-columns: repeat(4, 1fr); gap: 16px; }
}

.item-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--card-bg);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.1s, opacity 0.15s;
}
.item-card:active { transform: scale(0.97); opacity: 0.9; }

.item-card__img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--image-bg);
  overflow: hidden;
}
.item-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.item-card__info { padding: 10px 12px 12px; }
.item-card__category {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin-bottom: 3px;
}
.item-card__name {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 8px;
}
.item-card__price {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font-size: 13px;
  font-weight: 800;
}
.item-card__price img { width: 16px; height: 16px; object-fit: contain; }

.item-card__price.is-courtesy {
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 11px;
  color: var(--accent);
}

/* ── Seções de coleção (blocos nomeados tipo "TRENDING") ── */
.collection-section { margin-bottom: 4px; }

footer.shop-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 8px;
  padding-bottom: 40px;
}
footer.shop-footer img { max-width: 260px; width: 100%; height: auto; }

/* ── Página de item (buy.html) ── */
.item-hero-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--image-bg);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
}
.item-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* ── Preview de avatar frame / tema (boneco + frame, e header + frame) ── */
.frame-showcase {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--image-bg);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.frame-showcase__avatar {
  position: relative;
  width: 62%;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
}
.frame-showcase__mascot {
  position: absolute;
  inset: 12%;
  width: 76%;
  height: 76%;
  border-radius: 50%;
  object-fit: cover;
  pointer-events: none;
}
.frame-showcase__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

/* Tema: mostra o fundo (header) por trás, com o avatar+frame
   sobrepondo a costura de baixo, tipo capa de perfil. */
.frame-showcase--theme {
  align-items: flex-start;
  justify-content: flex-start;
}
.frame-showcase__banner {
  width: 100%;
  height: 60%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.frame-showcase--theme .frame-showcase__avatar {
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -42%);
  width: 46%;
}

/* ── Banner "Get Stardust" + banner de item de cortesia ──
   Um componente só, do zero, pros dois combinarem. Cor fixa
   (não usa var(--...) do tema) de propósito: assim o texto
   nunca some, seja no tema claro ou no escuro. ── */
.btn-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  text-decoration: none;
  margin: 8px 0;
  background: #e0e0e0;
  transition: opacity 0.15s, transform 0.1s;
}
.btn-info:active { transform: scale(0.98); opacity: 0.88; }

.btn-info__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.btn-info__title {
  font-size: 12.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #000000;
}
.btn-info__sub {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: #000000;
}
.btn-info__icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(0,0,0,0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.btn-info__icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.btn-info__icon--thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-category {
  text-align: center;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 2px;
}
.item-name {
  text-align: center;
  font-size: 20px;
  font-weight: 900;
  margin: 0 0 18px;
}

.section-title {
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin: 0 0 12px;
}

.btn-comprar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  background: var(--pill-bg);
  color: var(--pill-text);
  transition: background-color 0.2s, color 0.2s, opacity 0.2s, transform 0.1s;
}
.btn-comprar:active { transform: scale(0.98); }
.btn-comprar img { width: 20px; height: 20px; object-fit: contain; }

.btn-comprar.bloqueado {
  pointer-events: none;
  cursor: not-allowed;
  background: var(--pill-bg-disabled);
  color: var(--pill-text-disabled);
}

.caption {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin: 14px 0 4px;
}
.caption-link {
  display: block;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 18px;
}
.item-description {
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
  padding: 0 4px;
}

/* ── Página de confirmação (get.html) ── */
.hero {
  text-align: center;
  padding: 28px 16px 20px;
  border-radius: 16px;
  background: var(--card-bg);
  margin-bottom: 24px;
}
.checkmark {
  font-size: 48px;
  display: block;
  animation: pop 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
  margin-bottom: 8px;
}
@keyframes pop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.hero-title {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.hero-sub { font-size: 13px; color: var(--muted); }

.item-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted);
  margin-bottom: 10px;
}
.img-card {
  background: var(--image-bg);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 16px;
}
.img-card__label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  padding: 10px 12px 4px;
}
.preview-img { width: 100%; height: auto; display: block; }

.btn-comprar.is-free {
  background: var(--accent);
  color: #ffffff;
}

.btn-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  margin-bottom: 12px;
  background: var(--pill-bg);
  color: var(--pill-text);
  transition: opacity 0.15s, transform 0.1s;
}
.btn-download:active { transform: scale(0.97); opacity: 0.85; }

.footer-note {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 20px;
  padding-bottom: 12px;
  line-height: 1.6;
}
.footer-note a { font-weight: 700; color: var(--accent); text-decoration: none; }
@media (prefers-color-scheme: dark) {
  .btn-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  text-decoration: none;
  margin: 8px 0;
  background: #403B39;
  transition: opacity 0.15s, transform 0.1s;
}
.btn-info:active { transform: scale(0.98); opacity: 0.88; }

.btn-info__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.btn-info__title {
  font-size: 12.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #ffffff;
}
.btn-info__sub {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: #ffffff;
}
  .btn-comprar.is-free {
  background: var(--accent);
  color: #000000;
}

}
@media (min-width: 768px) {
  #conteudo-item {
    max-width: 340px;
    margin: 0 auto;
  }
}
/* ── Encolhe só o bloco do item no desktop ── */
@media (min-width: 768px) {
  #conteudo-item {
    max-width: 340px;
    margin: 0 auto;
  }
}

/* ── Grade horizontal de stickers do pack ── */
.sticker-grid {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  margin-top: 16px;
  -webkit-overflow-scrolling: touch;
}
.sticker-grid::-webkit-scrollbar { height: 4px; }
.sticker-grid::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.2);
  border-radius: 4px;
}
.sticker-grid__item {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  object-fit: contain;
}
.reaction-img{
    width:50px;
    height:50px;
    display:block;
    margin:10px auto;
    object-fit:contain;
}
