/* ── Reset & Variables ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0a0a0a;
  --card-bg: #111111;
  --fg: #f2ede6;
  --muted: #8e939d;
  --line: rgba(255, 255, 255, 0.08);
  --line-subtle: rgba(255, 255, 255, 0.05);
  --accent: #f2ede6;
  --pill-bg: #f2ede6;
  --pill-fg: #0a0a0a;
}

html, body {
  width: 100%;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
input, select { font-family: inherit; }

/* ── Custom Language Selector (PT-BR ∨) ────────────────────────── */
.lang-wrap {
  position: relative;
  display: inline-block;
}

.lang-select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: var(--fg);
  border: none;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 12px;
  outline: none;
  text-transform: uppercase;
}

.lang-select option {
  background: #0a0a0a;
  color: #fff;
}

/* ══════════════════════════════════════════════════════════════════
   VIEW 1: TELA DE INÍCIO (HOME) — Referência 2
══════════════════════════════════════════════════════════════════ */
.view-home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 28px 36px 42px;
  position: relative;
  border: 1px solid var(--line-subtle);
  margin: 0 auto;
  max-width: 1400px;
}

.home-topbar {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.home-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: auto 0;
  padding: 60px 20px;
}

.home-logo-3d-wrap {
  width: 85vw;
  max-width: 540px;
  height: 150px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  overflow: visible;
}

.home-logo-3d-wrap canvas {
  width: 100% !important;
  height: 100% !important;
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: auto;
  touch-action: none;
  filter: drop-shadow(0 0 28px rgba(255, 255, 255, 0.08));
}

.home-logo-3d-wrap .home-logo {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 0;
  filter: drop-shadow(0 0 24px rgba(255, 255, 255, 0.05));
  pointer-events: none;
}

@media (max-width: 480px) {
  .home-logo-3d-wrap {
    height: 110px;
  }
}

.home-subtitle {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--fg);
  margin-bottom: 48px;
}

.btn-shop-pill {
  background: var(--pill-bg);
  color: var(--pill-fg);
  border: none;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 14px 52px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(242, 237, 230, 0.12);
}

.btn-shop-pill:hover {
  background: #ffffff;
  transform: scale(1.03);
  box-shadow: 0 6px 28px rgba(255, 255, 255, 0.2);
}

.home-footer {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.footer-links, .cat-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-links a, .cat-links a {
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}

.footer-links a:hover, .cat-links a:hover {
  color: #fff;
}

.sep {
  margin: 0 2px;
  color: var(--muted);
  opacity: 0.5;
}

.footer-copy, .cat-copy {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
  opacity: 0.85;
}

/* ══════════════════════════════════════════════════════════════════
   VIEW 2: CATÁLOGO (CATALOG) — Espaçamento Generoso & Fixo
══════════════════════════════════════════════════════════════════ */
.view-catalog {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  max-width: 1400px;
  margin: 0 auto;
}

/* Header Hero Bem Espaçado */
.catalog-sticky-hero {
  position: relative;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding-top: 90px;
  padding-bottom: 120px;
  padding-left: 36px;
  padding-right: 36px;
}

.catalog-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

/* Search Box Pill */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: min(280px, 60vw);
}

.search-box input {
  width: 100%;
  height: 38px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9999px;
  padding: 0 38px 0 16px;
  color: #fff;
  font-size: 12px;
  outline: none;
  transition: border-color 0.2s;
}

.search-box input:focus {
  border-color: rgba(255, 255, 255, 0.4);
}

.search-icon {
  position: absolute;
  right: 14px;
  display: flex;
  align-items: center;
  pointer-events: none;
  color: var(--muted);
}

/* Catalog Hero Center — Muito mais espaçado e elegante */
.catalog-hero-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 0 6px;
}

.cat-logo {
  max-width: 360px;
  width: 70vw;
  height: auto;
  margin-bottom: 16px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.cat-logo:hover {
  opacity: 0.88;
}

.cat-subtitle {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 18px;
  letter-spacing: 0.04em;
}

.cat-links {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 10px;
}

/* Barra Unificada de Filtros e Título (Sticky fixa ao scrollar os produtos) */
.catalog-filter-bar {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 10, 10, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.cat-bar-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.cat-title-tag {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--fg);
  text-transform: uppercase;
}

/* Filter Pills Row */
.catalog-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-chip:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.filter-chip.is-active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

/* Count Indicator */
.catalog-count {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  white-space: nowrap;
}

/* 2-Column Product Grid */
.catalog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
}

@media (max-width: 768px) {
  .catalog-grid {
    grid-template-columns: 1fr;
  }
}

.product-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  transition: background 0.15s;
}

.product-card:nth-child(2n) {
  border-right: none;
}

.product-card:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* Product Glyph Badge */
.product-glyph {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  display: grid;
  place-items: center;
}

.product-glyph pre {
  margin: 0;
  font-size: 11px;
  color: var(--fg);
}

/* Product Info */
.product-info {
  flex: 1;
  min-width: 0;
}

.product-name {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-stock-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.stock-dot {
  width: 5px;
  height: 5px;
  border-radius: 9999px;
  background: #fff;
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

.stock-dot.low {
  background: var(--muted);
  box-shadow: none;
}

.product-price-line {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: 0.04em;
}

/* ══════════════════════════════════════════════════════════════════
   MODALS & CHECKOUT
══════════════════════════════════════════════════════════════════ */
.scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  display: none;
  z-index: 50;
}

.scrim.is-open { display: block; }

.modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  z-index: 51;
  padding: 16px;
  overflow-y: auto;
}

.modal.is-open { display: grid; }

.sheet {
  width: min(520px, 94vw);
  background: #111111;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
  box-sizing: border-box;
}

.sheet__head {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sheet__title {
  font-size: 11px;
  letter-spacing: 0.20em;
  font-weight: 700;
  color: var(--fg);
  text-transform: uppercase;
}

.sheet__x {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 12px;
  transition: all 0.15s;
}

.sheet__x:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
}

.sheet__body {
  padding: 20px;
  box-sizing: border-box;
}

.sheet__foot {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* Modal Product Card */
.modal-product-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.modal-product-glyph {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  place-items: center;
}

.modal-product-glyph pre {
  margin: 0;
  font-size: 11px;
}

.modal-product-name {
  font-size: 12px;
  letter-spacing: 0.12em;
  font-weight: 700;
  text-transform: uppercase;
}

.modal-product-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

/* Live Balance Bar */
.user-balance-bar {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 11.5px;
}

.balance-label {
  color: var(--muted);
  letter-spacing: 0.10em;
}

.balance-val {
  color: #fff;
  font-weight: 700;
}

/* Input Fields */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.field label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: #161616;
  color: var(--fg);
  font-size: 12.5px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.input:focus {
  border-color: rgba(255, 255, 255, 0.28);
}

/* Billing Grid (CPF e Telefone lado a lado sem sobreposição) */
.billing-section {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 8px;
}

.brazil-notice {
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border-left: 2px solid rgba(255, 255, 255, 0.2);
  padding: 8px 12px;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

.row .field {
  margin-bottom: 0;
}

/* Codebox Summary */
.codebox {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: #161616;
  font-size: 11.5px;
  color: var(--fg);
  line-height: 1.6;
}

/* Action Buttons */
.btn {
  height: 42px;
  padding: 0 24px;
  border-radius: 9999px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s;
}

.btn--ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--fg);
}

.btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.04);
}

.btn--primary {
  background: var(--pill-bg);
  color: var(--pill-fg);
  border: none;
}

.btn--primary:hover {
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.18);
}

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

/* Method Toggle Row (Pix vs CryptoBot) */
.method-toggle-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.method-tab {
  flex: 1;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.10em;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  padding: 0 14px;
}

.method-tab:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.method-tab.is-active {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.method-tab-logo {
  display: block;
  object-fit: contain;
}

.method-tab-logo--pix {
  height: 22px;
  max-width: 80px;
}

.method-tab-logo--crypto {
  height: 22px;
  width: 22px;
  border-radius: 5px;
}

/* ══════════════════════════════════════════════════════════════════
   RECARGA DO COFRE (R$ 25, R$ 50, R$ 100) NO MODAL DE PAGAMENTO
══════════════════════════════════════════════════════════════════ */
.recharge-presets {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0;
}

.recharge-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: all 0.15s;
}

.recharge-card:hover {
  border-color: var(--fg);
  background: rgba(255, 255, 255, 0.06);
}

.recharge-card.is-selected {
  border-color: var(--fg);
  background: rgba(242, 237, 230, 0.08);
}

.recharge-card.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.05);
}

.recharge-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.recharge-amount {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.recharge-fee {
  font-size: 10.5px;
  color: var(--muted);
}

.recharge-btn-pill {
  font-size: 11px;
  letter-spacing: 0.10em;
  padding: 6px 14px;
  border-radius: 9999px;
  background: var(--fg);
  color: var(--bg);
  font-weight: 700;
}

/* QR Code Display */
.qrbox {
  display: grid;
  place-items: center;
  padding: 18px;
  border-radius: 12px;
  background: #ffffff;
  margin-top: 14px;
}

.qrbox img {
  width: 220px;
  height: 220px;
}

.pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px;
  letter-spacing: 0.10em;
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

.notice {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

.delivered {
  padding: 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
}

.delivered pre {
  margin-top: 10px;
  white-space: pre-wrap;
  word-break: break-all;
  font-family: inherit;
  color: #fff;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #f2ede6;
  color: #0a0a0a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 10px 24px;
  border-radius: 9999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 99;
}

.toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
