/* Estilos gerais e imagem de fundo */
:root {
  --overlay-color: rgba(0, 0, 0, 0.35);
  --text-color: #f5f5f5;
  /* Deslocamento padrão da imagem (um pouco à direita e abaixo) */
  --img-offset-x: 24px;
  --img-offset-y: 18px;
  /* Escala da imagem enviada (0.3 = reduzir 70%) */
  --img-scale: 1; /* manter tamanho natural; limite via max 200x200 */
  /* Deslocamento dinâmico via arrasto */
  --drag-x: 0px;
  --drag-y: 0px;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  /* Altere o caminho abaixo para o seu arquivo */
  background-image: url("assets/fundo.jpg");
  background-size: cover; /* cobre toda a tela (padrão) */
  background-position: center; /* centraliza a imagem */
  background-repeat: no-repeat; /* evita repetição */
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  padding-top: 64px; /* espaço para header fixo */
}

/* Em telas muito largas, priorize não cortar o logotipo: mostre a imagem inteira */
@media (min-aspect-ratio: 16/9) and (min-width: 1400px) {
  body {
    background-size: contain; /* exibe a imagem inteira */
    background-position: top center; /* foca no topo para preservar o logo */
    background-color: #e5e7eb; /* cor de fundo para áreas vazias nas laterais */
  }
}

/* utilitário para esconder visualmente, mas manter acessível ao leitor de tela */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden;
}

/* Botão de upload estilo do anexo */
.upload-btn {
  position: fixed;
  top: 128px; /* 28px + 100px */
  left: 178px; /* 228px - 50px */
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px; /* leve aumento */
  min-width: 173px;   /* 138px → 173px */
  min-height: 48px;   /* 38px  → 48px  */
  border-radius: 14px;/* 11px  → 14px */
  gap: 10px;
  border: 3px solid #dbeafe; /* azul claro */
  background: linear-gradient(135deg, #93c5fd, #3b82f6); /* azul */
  color: #fff;
  font-weight: 500;
  line-height: 1.05;
  text-align: center;
  box-shadow: 0 10px 22px rgba(0,0,0,.22), 0 3px 8px rgba(0,0,0,.12), inset 0 0 0 2px rgba(255,255,255,.55);
  filter: drop-shadow(0 8px 14px rgba(0,0,0,.18));
  animation: breathe 3.2s ease-in-out infinite, glowPulse 3.6s ease-in-out infinite;
  cursor: pointer;
  user-select: none;
  overflow: hidden; /* para ripple */
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

/* Barra lateral esquerda com ações rápidas */
.side-actions {
  position: fixed;
  left: 16px;
  top: 120px;
  display: grid;
  gap: 12px;
  width: 208px;
  z-index: 24;
}

.side-actions .upload-btn {
  position: relative;
  top: auto; left: auto;
  width: 60%;
  min-width: 0;
}

.quick-categories { display: grid; gap: 8px; }
.category-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  text-decoration: none;
  border: 1px solid #e5e7eb;
  box-shadow: 0 6px 14px rgba(0,0,0,.12);
  width: 40%; /* reduzir largura em 40% (desktop) */
  justify-self: start;
}
.category-btn:hover { background: #f8fafc; }
.category-btn:active { transform: translateY(1px); }
.category-btn:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }

@media (max-width: 768px) {
  .side-actions { left: 8px; top: 96px; width: 180px; }
  .category-btn { width: 30%; }
}

/* Modal básico para seleção de modelos */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  display: grid;
  place-items: center;
  z-index: 50;
}
.modal-card {
  width: min(920px, 92vw);
  max-height: 92vh;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  border: 1px solid #e5e7eb;
}
/* Designer X */
.x-designer-card { width: min(980px, 94vw); max-height: 86vh; overflow-y: auto; overflow-x: hidden; }
.x-designer { display: grid; grid-template-columns: 1fr; gap: 16px; padding: 16px; }
@media (min-width: 769px) { .x-designer { grid-template-columns: 1.2fr 0.8fr; } }
.x-preview { display: grid; place-items: center; }
.x-card { width: 540px; max-width: 80vw; border-radius: 24px; border: 1px solid #cbd5e1; box-shadow: 0 4px 12px rgba(0,0,0,.06); padding: 14px 16px; background: #fff; color: #111827; font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; --indent-left: calc(48px + 10px); }
.x-row { display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; align-items: center; }
.x-avatar { width: 48px; height: 48px; border-radius: 999px; background: #6d28d9; color: #fff; display:grid; place-items:center; font-weight:700; font-size:12px; overflow:hidden; position: relative; top: 20px; }
.x-avatar img { width: 100%; height: 100%; object-fit: cover; }
.x-user { font-weight: 600; font-size: clamp(15px, 3.6vw, 16px); }
.x-meta { color: #6b7280; font-size: clamp(14px, 3.3vw, 16px); }
.x-userline { display:flex; align-items:center; gap:10px; position: static; }
.x-message { margin: 10px 0 8px; font-size: 16px; position: static; margin-left: var(--indent-left); }
.x-stats { display: inline-flex; gap: 16px; align-items:center; color:#374151; font-size: clamp(12px, 3vw, 13px); position: static; margin-left: var(--indent-left); }
.x-stat { display:inline-flex; gap:6px; align-items:center; }
@media (max-width: 768px) { .x-card { width: 100%; max-width: 92vw; } .x-form .row { grid-template-columns: 1fr; } }
.image-wrap[data-type="x"] .btn-bg,
.image-wrap[data-type="x"] .btn-ct { display: none; }
.image-wrap[data-type="x"] .user-image { filter: none !important; box-shadow: none !important; background: #f7f5f5; border-radius: 12px; width: auto; height: auto; max-width: 92vw; max-height: 60vh; }
.image-wrap[data-type="ig"] .user-image { display: block !important; filter: none !important; box-shadow: none !important; background: transparent; border-radius: 0; width: auto; height: auto; max-width: 92vw; max-height: 60vh; opacity: 1; visibility: visible; }
.x-form { display: grid; gap: 10px; max-height: 60vh; overflow-y: auto; }
.x-form .row { display:grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.x-form input[type="text"], .x-form input[type="number"], .x-form textarea { border:1px solid #cbd5e1; border-radius:10px; padding:8px 10px; font-size:14px; }
.x-actions { display:flex; gap:10px; justify-content:flex-end; padding: 12px 16px; }
.btn { border:0; border-radius:12px; padding:10px 16px; font-weight:500; cursor:pointer; }
.btn-primary { background:#111827; color:#fff; }
.btn-light { background:#ffffff; color:#111; border:1px solid #e5e7eb; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #e5e7eb; }
.modal-title { font-size: 18px; margin: 0; }
.modal-close { background: transparent; border: none; font-size: 24px; line-height: 1; cursor: pointer; color: #334155; }
.modal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; padding: 14px; }
.option-card { border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.option-card img { width: 100%; height: 84px; object-fit: contain; background: #fff; padding: 6px; border-radius: 10px; border: 1px solid #e5e7eb; }
.option-card .option-title { display: none; }
.option-card .option-body { padding: 6px; display: grid; gap: 6px; }
.option-select { padding: 6px 8px; border-radius: 8px; border: 1px solid #e5e7eb; background: #f8fafc; cursor: pointer; font-size: 12px; }
.option-select:hover { background: #eef2ff; }
.visually-hidden { position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

.upload-btn .btn-text { display: grid; gap: 2px; font-size: calc(18px * .85); font-weight: 700; }
.upload-btn .btn-text strong { font-weight: inherit; }

/* Ícone decorativo antes do texto */
.upload-btn::before { content: none; }

/* Efeito brilho passando por cima */
.upload-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255,255,255,0.0) 30%, rgba(255,255,255,0.35) 50%, rgba(255,255,255,0.0) 70%);
  transform: translateX(-120%);
}

.upload-btn:hover {
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 18px 34px rgba(0,0,0,.30), 0 8px 14px rgba(0,0,0,.20), inset 0 0 0 2px rgba(255,255,255,.65);
  filter: drop-shadow(0 14px 24px rgba(0,0,0,.28)) brightness(1.06);
}

.upload-btn:hover::after {
  animation: shimmer 1200ms linear;
}

.upload-btn:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 6px 14px rgba(0,0,0,.18);
}

/* Ícone dentro do botão de upload */
.upload-btn .icon { width: 24px; height: 24px; color: #fff; }

@keyframes shimmer {
  from { transform: translateX(-120%); }
  to   { transform: translateX(120%); }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 10px 22px rgba(0,0,0,.22), 0 3px 8px rgba(0,0,0,.12), inset 0 0 0 2px rgba(255,255,255,.55); }
  50% { box-shadow: 0 16px 36px rgba(0,0,0,.34), 0 8px 14px rgba(0,0,0,.20), inset 0 0 0 2px rgba(255,255,255,.75); }
}

/* Botão de adicionar ao carrinho (flutuante, similar ao upload) */
.cart-btn {
  position: fixed;
  top: 190px; /* abaixo do upload */
  left: 178px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  min-width: 173px;
  min-height: 48px;
  border-radius: 14px;
  border: 3px solid #e5f3e9;
  background: #2f3a3d; /* escuro para diferenciar */
  color: #fff;
  font-weight: 500;
  line-height: 1.05;
  text-align: center;
  box-shadow: 0 10px 22px rgba(0,0,0,.22), 0 3px 8px rgba(0,0,0,.12);
  cursor: pointer;
  user-select: none;
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.cart-btn .btn-text { display: grid; gap: 2px; font-size: 16px; }
.cart-btn .btn-text strong { font-weight: 500; }

.cart-btn:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 16px 30px rgba(0,0,0,.28), 0 6px 12px rgba(0,0,0,.16);
}

.cart-btn:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 6px 14px rgba(0,0,0,.18);
}

/* Efeito ripple */
.ripple {
  position: absolute;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.2);
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: ripple 600ms ease-out forwards;
}

@keyframes ripple {
  from { width: 0; height: 0; opacity: 0.35; }
  to { width: 600px; height: 600px; opacity: 0; }
}

/* animação de respiração da sombra */
@keyframes breathe {
  0%, 100% { filter: drop-shadow(0 8px 14px rgba(0,0,0,.18)); }
  50%      { filter: drop-shadow(0 16px 28px rgba(0,0,0,.30)); }
}

/* respeita usuários com redução de movimento */
@media (prefers-reduced-motion: reduce) {
  .upload-btn { animation: none; }
}

/* Palco e imagem centralizada */
.stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.gallery {
  position: relative;
  min-height: 100vh;
  width: 100%;
  display: block;
}

.image-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(calc(-50% + var(--img-offset-x) + var(--drag-x)),
                       calc(-50% + var(--img-offset-y) + var(--drag-y)))
             scale(var(--scale, var(--img-scale)));
  transform-origin: center center;
  transition: transform 200ms ease;
  cursor: grab;
  touch-action: none; /* necessário para arrastar em touch sem rolar a página */
}

.image-wrap.dragging {
  cursor: grabbing;
  transition: none; /* evitar lag durante o arrasto */
}

/* Botão de fechar em cada imagem */
.image-wrap .close-btn {
  position: absolute;
  /* Mantém o offset visual constante, independente da escala da imagem */
  top: calc(-10px / (var(--scale, var(--img-scale))));
  right: calc(-10px / (var(--scale, var(--img-scale))));
  width: 20px; height: 20px; /* tamanho solicitado */
  border-radius: 999px;
  border: 2px solid #fff;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: 14px; /* proporcional ao novo tamanho */
  font-weight: 500;
  line-height: 0; /* evita deslocamento vertical do glifo */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0;
  cursor: pointer;
  z-index: 2;
  transition: transform .12s ease, background .12s ease;
  /* Anula a escala do .image-wrap para o botão manter tamanho fixo na tela */
  --cb-scale: calc(1 / (var(--scale, var(--img-scale))));
  transform: scale(var(--cb-scale));
}

.image-wrap .close-btn:hover { transform: scale(calc(var(--cb-scale) * 1.06)); background: rgba(0,0,0,.75); }
.image-wrap .close-btn:active { transform: scale(calc(var(--cb-scale) * 0.98)); }

/* Barra de controles por imagem */
.image-wrap .controls {
  position: absolute;
  bottom: calc(-12px / (var(--scale, var(--img-scale))));
  left: calc(-12px / (var(--scale, var(--img-scale))));
  display: inline-flex;
  gap: 6px;
  transform: scale(calc(1 / (var(--scale, var(--img-scale)))));
  z-index: 2;
}

.image-wrap .ctrl-btn {
  height: 22px;
  width: auto;
  min-width: 22px;
  border-radius: 999px;
  border: 2px solid #fff;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0 8px;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease;
}
.image-wrap .btn-zoom-in,
.image-wrap .btn-zoom-out {
  width: 22px;
  padding: 0;
}
.image-wrap .ctrl-btn:hover { transform: scale(1.06); background: rgba(0,0,0,.75); }
.image-wrap .ctrl-btn:active { transform: scale(0.98); }

/* Toast base (posicionamento e visual definidos no final do arquivo) */
.toast { opacity: 0; pointer-events: none; }
.toast.show { opacity: 1; }

.user-image {
  display: none;
  max-width: 200px; /* limite solicitado */
  max-height: 200px; /* limite solicitado */
  object-fit: contain;
  border-radius: 12px;
  /* sombra de profundidade uniforme para todos os tipos */
  filter: drop-shadow(0 10px 24px rgba(0,0,0,.35));
  animation: fadeIn 220ms ease-out;
}

/* Imagens processadas já têm contorno no PNG; evite borda retangular extra */
.user-image.processed {
  border: none;
  box-shadow: none; /* evita sombra retangular */
  /* sombra segue a silhueta (sem contorno branco por padrão) */
  filter: drop-shadow(0 10px 24px rgba(0,0,0,.35));
}

/* CT ligado sem silhueta: usar borda retangular centralizada com espessura fixa */
.image-wrap[data-ct="on"] .user-image:not(.processed) {
  border: calc((var(--outline-px) * 3) / (var(--scale, var(--img-scale)))) solid #ffffff;
  /* mantém apenas a sombra de profundidade */
  filter: drop-shadow(0 10px 24px rgba(0,0,0,.35));
}

.user-image.visible { display: block; }

/* Quando o fundo não está removido e o usuário desativa o contorno */
.image-wrap[data-bg="off"][data-ct="off"] .user-image:not(.processed) {
  border: none;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(.98); }
  to   { opacity: 1; transform: scale(1); }
}

/* Réguas de medição */
.image-wrap .ruler-h,
.image-wrap .ruler-v {
  position: absolute;
  pointer-events: none;
  opacity: 0.15;
  z-index: 1;
}

.image-wrap .ruler-h {
  top: -15px;
  left: 0;
  right: 0;
  height: 10px;
  background: linear-gradient(to right, 
    transparent 0%, 
    rgba(0,0,0,0.3) 2%, 
    rgba(0,0,0,0.3) 98%, 
    transparent 100%);
  background-size: 10px 100%;
  background-repeat: repeat-x;
}

.image-wrap .ruler-v {
  left: -15px;
  top: 0;
  bottom: 0;
  width: 10px;
  background: linear-gradient(to bottom, 
    transparent 0%, 
    rgba(0,0,0,0.3) 2%, 
    rgba(0,0,0,0.3) 98%, 
    transparent 100%);
  background-size: 100% 10px;
  background-repeat: repeat-y;
}

/* Barra de indicadores (tamanho + preço lado a lado) */
.image-wrap .indicator-bar {
  position: absolute;
  top: -35px;
  left: 50%;
  transform: translateX(-50%) scale(calc(1 / (var(--scale, var(--img-scale)))));
  display: inline-flex;
  gap: 6px;
  align-items: center;
  pointer-events: none;
  z-index: 3;
}

.image-wrap .indicator-bar .size-indicator,
.image-wrap .indicator-bar .price-indicator {
  position: static;
  transform: none;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-family: monospace;
  white-space: nowrap;
  color: #fff;
}

.image-wrap .indicator-bar .size-indicator {
  background: rgba(0,0,0,0.7);
}

.image-wrap .indicator-bar .price-indicator {
  background: #10b981; /* verde */
}

/* Botão de Preview (FAB central) */
.preview-btn {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  width: 120px;
  height: 50px;
  border-radius: 999px;
  border: 0;
  background: radial-gradient(120px 120px at 50% 50%, #34d399, #10b981 60%, #059669 100%);
  color: #fff;
  box-shadow: 0 18px 30px rgba(0,0,0,.30), 0 6px 10px rgba(0,0,0,.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
  letter-spacing: .3px;
  cursor: pointer;
  z-index: 24;
  user-select: none;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  overflow: hidden;
}
.preview-btn::before{
  content: '';
  position: absolute; inset: -40%;
  background: conic-gradient(from 0deg, rgba(255,255,255,.25), rgba(255,255,255,0));
  filter: blur(10px);
  animation: spin 3.8s linear infinite;
}
.preview-btn .preview-label{ position: relative; z-index: 1; text-shadow: 0 2px 6px rgba(0,0,0,.35); }
.preview-btn .icon{ position: relative; z-index: 1; width: 40px; height: 40px; }
.preview-btn:hover{ transform: translateX(-50%) scale(1.04); box-shadow: 0 22px 40px rgba(0,0,0,.36), 0 8px 16px rgba(0,0,0,.22); filter: brightness(1.06); }
.preview-btn:active{ transform: translateX(-50%) scale(0.98); box-shadow: 0 10px 18px rgba(0,0,0,.22); filter: brightness(0.96); }

@keyframes spin { to { transform: rotate(1turn); } }

/* Modal de pré-visualização */
.preview-overlay{
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  display: grid; place-items: center; z-index: 40;
}
.preview-modal{ max-width: 90vw; max-height: 88vh; background: #111; border-radius: 16px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.5); display: grid; grid-template-rows: 1fr auto; }
.preview-image{ display:block; max-width:90vw; max-height:70vh; object-fit: contain; background:#222; }
.preview-actions{ display:flex; gap:12px; justify-content:center; align-items:center; padding:14px; background:#0f1115; }
.preview-actions .btn{ border:0; border-radius:12px; padding:10px 16px; font-weight:800; cursor:pointer; }
.preview-actions .btn-back{ background:#ffffff; color:#111; }
.preview-actions .btn-approve{ background:#10b981; color:#fff; }
.preview-actions .btn:hover{ filter: brightness(1.06); }
.preview-actions .btn:active{ transform: translateY(1px); }

/* Modo preview: esconde controles e reforça sombra das imagens */
body.previewing .site-header,
body.previewing .upload-btn,
body.previewing .cart-btn,
body.previewing .preview-btn,
body.previewing .image-wrap .controls,
body.previewing .image-wrap .close-btn,
body.previewing .image-wrap .indicator-bar{ display: none !important; }
body.previewing .image-wrap .user-image{ display:block !important; opacity:1 !important; visibility:visible !important; }

/* Modo preview: esconder banner e balão para não distrair */
body.previewing .mural-banner,
body.previewing .mural-hearts,
body.previewing .promo-bubble { display: none !important; }

/* Modo preview: imagens mantêm aparência original */



.preview-actions .total {
  margin-right: auto;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  padding: 8px 12px;
  border-radius: 10px;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.2);
}
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: calc(64px + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  z-index: 20;
}

/* Botão CTA para link do Mural no cabeçalho */
.nav .cta-mural {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(59,130,246,0.28);
  border: 1px solid rgba(59,130,246,0.4);
}
.nav .cta-mural:hover { filter: brightness(1.05); }
.nav .cta-mural[aria-current="page"] {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 8px 18px rgba(29,78,216,0.30);
}

/* Banner Mural fixo no rodapé (100px da borda direita) */
.mural-banner {
  position: fixed;
  top: 12px;
  right: 150px;
  bottom: auto;
  z-index: 1002;
}
.mural-banner-link { display: inline-block; }
.mural-banner-img {
  display: block;
  width: 270px;
  height: 270px;
  object-fit: contain;
  transform: rotate(3deg) scale(0.7);
  transform-origin: center;
}

/* Corações de likes saindo do banner */
.mural-hearts {
  position: absolute;
  bottom: 10px; /* origem próxima da base da imagem */
  left: 50%;
  transform: translateX(-50%);
  width: 200px; /* área para espalhar corações */
  height: 160px; /* área vertical da animação */
  pointer-events: none; /* não bloquear clique no link */
  overflow: visible;
}
.mural-hearts .heart {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 20px;
  height: 20px;
  opacity: 0.95;
  animation: likeRise 1800ms ease-out forwards;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.25));
}

@keyframes likeRise {
  0% { transform: translateY(0) scale(1); opacity: .95; }
  60% { opacity: .7; }
  100% { transform: translateY(-120px) scale(.85); opacity: 0; }
}

.site-header .header-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
@media (max-width: 768px) {
  .site-header .header-inner { padding: 0 12px; gap: 8px; flex-wrap: wrap; }
  .site-header .brand .logo { height: 32px; }
  .site-header .actions { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; width: 100%; }
  .site-header .actions .nav { order: 1; width: 100%; }
  .site-header .actions .cta-group { order: 2; justify-content: end; gap: 6px; }
  .nav-link { padding: 6px 8px; }
}

.site-header .actions {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.site-header .brand {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.site-header .brand .logo {
  height: 42px;
  width: auto;
  display: block;
}

.nav { display: inline-flex; gap: 18px; align-items: center; overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; cursor: grab; }
.nav::-webkit-scrollbar { display: none; }
.nav-link {
  color: #2f3a3d;
  text-decoration: none;
  font-weight: 400;
  padding: 8px 10px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  scroll-snap-align: start;
}
@media (max-width: 768px) {
  .nav { gap: 12px; }
  .nav-link { font-size: 0.95rem; }
}
.nav-link:hover { background: rgba(0,0,0,.06); }
.nav-link:active { transform: translateY(1px); }
.nav:active { cursor: grabbing; }

/* Avatar do usuário no cabeçalho */
.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(255,255,255,.9), 0 2px 6px rgba(0,0,0,.20);
}

/* Menu de conta no cabeçalho */
.account-trigger { position: relative; }
.account-trigger .chev { width: 16px; height: 16px; opacity: .7; }
.account-dropdown { position: absolute; top: calc(100% + 8px); right: 0; width: 280px; max-width: min(92vw, 320px); background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; box-shadow: 0 10px 24px rgba(0,0,0,.12); padding: 8px; display: none; z-index: 50; }
.account-dropdown.open { display: block; }
.account-header { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-bottom: 1px solid #f1f5f9; margin-bottom: 6px; }
.account-meta .account-name { font-weight: 600; color: #111827; }
.account-meta .account-email { font-size: .85rem; color: #6b7280; }
.account-item { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; background: transparent; color: #111827; text-decoration: none; cursor: pointer; border: none; }
.account-item:hover { background: #f9fafb; }
.account-item:active { background: #eef2f7; }
.account-item:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }

@media (max-width: 480px) {
  .account-dropdown { width: calc(100vw - 16px); right: 8px; }
}

/* Página de modelos */
.models-page {
  min-height: 100vh;
  background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(248,249,250,0.95) 100%);
  padding: 80px 0 40px;
}

/* Página em branco (empresa.html) */
.blank-page {
  min-height: 100vh;
  background: #ffffff;
}

/* Página Empresa */
.empresa-page {
  min-height: 100vh;
  background: #ffffff;
  padding: 80px 0 40px;
}
.empresa-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 24px;
}
.empresa-hero .hero-content h2 { font-size: 2rem; margin: 0 0 10px; }
.empresa-hero .hero-content p { font-size: 1.05rem; color: #374151; margin: 0 0 16px; }
.empresa-hero .actions { display: inline-flex; gap: 12px; }
.empresa-hero .hero-media img { width: 100%; max-width: 520px; display: block; border-radius: 12px; box-shadow: 0 10px 24px rgba(0,0,0,.10); }

@media (max-width: 780px) {
  .empresa-hero { grid-template-columns: 1fr; }
  .empresa-hero .hero-media { order: -1; }
}

/* Página Threads com fundo personalizado */
.threads-page {
  min-height: 100vh;
  background: url('assets/fundo.jpg') center / cover fixed no-repeat;
  padding: 80px 0 40px;
}

/* Página Checkout em branco */
.checkout-page {
  min-height: 100vh;
  background: #ffffff;
  padding: 80px 0 40px;
}

.threads-editor {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.editor-actions { display: flex; justify-content: center; margin-top: 16px; }

@media (max-width: 414px) {
  .threads-svg-wrap { width: 92vw; }
}

/* Contêiner do SVG */
.threads-svg-wrap {
  position: relative;
  width: auto;
  max-width: 92vw;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  border: 0;
  overflow: visible;
  display: inline-block;
}

.threads-svg-wrap svg { display: block; }

/* Editor inline sobre o texto do SVG */
.inline-text-editor {
  position: absolute;
  background: transparent;
  color: inherit;
  border: none;
  outline: none;
  padding: 0;
  margin: 0;
  line-height: 1;
  white-space: pre;
  min-width: 10px;
}

/* Erro amigável ao carregar SVG */
.svg-error {
  background: rgba(255,255,255,0.95);
  color: #111827;
  border: 1px solid #ef4444;
  border-radius: 16px;
  padding: 12px;
  text-align: center;
  font-size: 0.95rem;
}

/* Barra de edição */
.text-edit-bar {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.text-edit-input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}

.text-edit-done {
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  cursor: pointer;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-header {
  text-align: center;
  margin-bottom: 48px;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 500;
  color: #1f1f1f;
  margin: 0 0 12px;
}

/* Título como imagem na página de modelos */
.page-title-image {
  display: block;
  margin: 0 auto 12px;
  width: 100%;
  max-width: 720px;
  height: auto;
}

/* Diminuir imagem de título dos exemplos para 300px */
.models-page .page-title-image {
  width: 300px;
  max-width: 300px;
}

.page-subtitle {
  font-size: 1.1rem;
  color: #6c757d;
  margin: 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Filtros */
.filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 20px;
  border: 2px solid #dee2e6;
  background: #fff;
  color: #495057;
  border-radius: 25px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: #007bff;
  color: #007bff;
}

.filter-btn.active {
  background: #007bff;
  border-color: #007bff;
  color: #fff;
}

/* Grid de modelos */
.models-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.model-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  border: 1px solid rgba(0,0,0,0.06);
}

.model-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.model-image {
  padding: 20px;
  background: #f8f9fa;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 160px;
}

.model-image svg {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Imagens dentro dos cards de modelos */
.model-image img {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  max-width: 100%;
  height: auto;
  display: block;
}

.model-info {
  padding: 20px;
}

.model-info h3 {
  font-size: 1.2rem;
  font-weight: 500;
  color: #1f1f1f;
  margin: 0 0 8px;
}

.model-info p {
  color: #6c757d;
  margin: 0 0 16px;
  font-size: 0.95rem;
}

.model-actions {
  display: flex;
  gap: 8px;
}

.btn-preview,
.btn-customize {
  flex: 1;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 400;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-preview {
  background: #f8f9fa;
  color: #495057;
  border: 1px solid #dee2e6;
}

.btn-preview:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

.btn-customize {
  background: #007bff;
  color: #fff;
}

.btn-customize:hover {
  background: #0056b3;
}

/* ---- Mural de clientes ---- */
.mural-grid { margin: 16px 0 24px; }
.mural-cards {
  display: flex;
  gap: 10px; /* diminuir espaçamento entre os cards */
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  cursor: grab;
  user-select: none;
}
.mural-cards:active { cursor: grabbing; }
.mural-cards.dragging { cursor: grabbing; }
.mural-cards::-webkit-scrollbar { height: 8px; }
.mural-cards .model-card {
  flex: 0 0 28vw; /* um pouco mais largo para comportar coluna da foto */
  width: 28vw;
  margin-right: 0; /* usar apenas o gap para espaçamento entre cards */
  scroll-snap-align: start;
  position: relative;
  border-radius: 18px;
  background: linear-gradient(135deg, #a78bfa 0%, #60a5fa 50%, #34d399 100%);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
  padding: 14px 14px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}
/* Avatar circular inspirado na referência */
.mural-avatar {
  width: clamp(64px, 7vw, 120px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid rgba(255,255,255,0.85);
  box-shadow: 0 10px 18px rgba(0,0,0,0.18);
  background: rgba(255,255,255,0.5);
  transform: translateY(-2px);
}
.mural-avatar img {
  width: 100%; height: 100%; object-fit: cover;
}

/* Painel branco com conteúdo (título, estrelas, texto e rodapé) */
.mural-panel {
  width: 96%; /* ocupa melhor o espaço disponível */
  margin-top: 8px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.14);
  padding: 12px 14px;
  display: grid; /* espaçamento mais consistente entre elementos */
  gap: 8px;
}
.mural-panel .mural-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 6px;
  color: #1f2937;
}
.mural-panel .mural-stars { display: inline-flex; gap: 6px; margin-bottom: 6px; }
.mural-panel .mural-text { font-size: 0.92rem; color: #374151; margin: 4px 0 8px; }
/* Comentário com altura controlada e rolagem quando grande */
.mural-panel .mural-text {
  font-size: 0.92rem;
  line-height: 1.4;
  min-height: 60px;          /* área mínima para uniformizar o layout */
  max-height: 100px;         /* limita para manter cards do mesmo tamanho */
  overflow-y: auto;          /* rolagem quando excede */
  padding-right: 4px;        /* espaço para scrollbar não cobrir texto */
  overscroll-behavior: contain;
  word-break: break-word;    /* evita estouro por palavras longas */
}
.mural-panel .mural-footer {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; /* evita que quebre palavras em colunas muito estreitas */
  font-size: 0.85rem;
  color: #6b7280;
}
.mural-footer .author { font-weight: 500; color: #374151; }
.mural-footer .reco { white-space: nowrap; }
.mural-meta { display: flex; align-items: center; gap: 8px; }
.star-icon { color: #FFD700; font-size: 1.1rem; line-height: 1; }
.star-icon.hollow { color: #e5e7eb; }
.rating-bar { display: inline-flex; gap: 6px; }

/* ===== Formulário do Mural – visual mais bonito ===== */
.mural-form { margin: 18px 0 26px; }
/* Wrapper do formulário com imagem ao lado direito */
.mural-form-wrap { display: flex; gap: 16px; align-items: flex-start; }
.mural-form-wrap #muralForm.mural-card { margin: 0; flex: 1 1 0; }
.mural-form-side {
  flex: 0 0 clamp(200px, 20vw, 280px);
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(0,0,0,0.12);
  display: grid;
  place-items: center;
}
.mural-form-side img { width: 100%; height: 100%; object-fit: contain; }
#muralForm.mural-card {
  width: clamp(640px, 68vw, 940px); /* card maior para preencher os dados */
  max-width: 100%;
  margin: 0 auto;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.97), rgba(255,255,255,0.9)),
    radial-gradient(1200px 500px at 0% 0%, rgba(236,72,153,0.65), transparent 60%), /* pink mais vibrante */
    radial-gradient(1000px 500px at 100% 0%, rgba(59,130,246,0.65), transparent 60%), /* blue mais vibrante */
    radial-gradient(900px 450px at 10% 100%, rgba(252,165,3,0.52), transparent 65%), /* amber mais vibrante */
    radial-gradient(800px 400px at 90% 100%, rgba(34,197,94,0.52), transparent 65%); /* green mais vibrante */
  border-radius: 18px;
  box-shadow: 0 14px 32px rgba(0,0,0,0.14);
  padding: 24px 22px; /* mais espaço interno para os campos */
  overflow: visible; /* evita corte de conteúdo em alguns dispositivos */
  backdrop-filter: blur(4px);
}

/* --- Mural page: container e card maiores, sem afetar outras páginas --- */
.mural-page .container { max-width: 1360px; }
.mural-page #muralForm.mural-card { width: clamp(760px, 74vw, 1100px); padding: 26px 24px; }
.mural-page .mural-form-side { flex: 0 0 clamp(180px, 18vw, 260px); }
@media (orientation: portrait) {
  .mural-page #muralForm.mural-card { width: 96vw; }
}
@media (max-width: 768px) {
  #muralForm.mural-card { width: 92vw; }
  .mural-form-wrap { flex-direction: column; }
  .mural-form-side { width: 100%; flex: 0 0 auto; height: clamp(140px, 40vw, 260px); }
}

/* Garantir que o box lateral apareça em telas verticais (portrait) */
@media (orientation: portrait) {
  .mural-form-wrap { flex-direction: column; }
  .mural-form-side {
    display: block;
    order: 2;
    width: 100%;
    height: clamp(220px, 48vw, 320px);
    margin-top: 12px;
  }
  /* Garantir que o card permanece visível e ocupa bem a largura */
  #muralForm.mural-card {
    width: 94vw;
    margin: 0 auto;
  }
  /* Mais espaço abaixo do header fixo em telas verticais, com safe-area */
  .models-page { padding-top: calc(56px + env(safe-area-inset-top) + 24px); }
}
.mural-card .form-row { margin-bottom: 12px; }
.mural-card .form-label { display: block; font-weight: 600; color: #1f2937; margin-bottom: 8px; font-size: 1rem; }
.mural-card .form-input,
.mural-card .form-textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 1rem;
  transition: box-shadow .15s ease, border-color .15s ease;
}

/* Input de arquivo: reduzir área e estilizar botão no mobile/iOS */
.mural-card input[type="file"].form-input {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  padding: 6px 8px;
  font-size: 16px; /* evita zoom automático no iOS */
}
.mural-card input[type="file"]::file-selector-button {
  padding: 8px 12px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  color: #fff;
  box-shadow: 0 6px 14px rgba(59,130,246,0.30);
  cursor: pointer;
}
.mural-card input[type="file"]::-webkit-file-upload-button { /* Safari/iOS */
  padding: 8px 12px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  color: #fff;
  box-shadow: 0 6px 14px rgba(59,130,246,0.30);
  cursor: pointer;
}
.mural-card .form-input:focus,
.mural-card .form-textarea:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96,165,250,0.25);
}
.mural-card .form-textarea { min-height: 110px; resize: vertical; }
#checkout-form input[type="text"],
#checkout-form input[type="email"],
#checkout-form input[type="tel"],
#checkout-form input[type="number"],
#checkout-form input[type="password"],
#checkout-form select,
#checkout-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 10px; /* borda arredondada solicitada */
  padding: 8px 10px;
  font-size: 0.92rem;
  transition: box-shadow .15s ease, border-color .15s ease;
}
#checkout-form input:focus,
#checkout-form select:focus,
#checkout-form textarea:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96,165,250,0.25);
}
.mural-card .form-actions { margin-top: 10px; }
.mural-card .checkbox { display: inline-flex; align-items: center; gap: 8px; color: #374151; }
.mural-card .checkbox input { accent-color: #60a5fa; }

/* Linha de checkboxes lado a lado no desktop */
.mural-card .row-inline-checks { display: grid; grid-template-columns: auto auto; gap: 14px; align-items: center; }

/* Nome e Cidade lado a lado em telas maiores */
.mural-card .row-inline { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Empilhar campos e checks em telas pequenas */
@media (max-width: 480px) {
  .mural-card .row-inline { grid-template-columns: 1fr; }
  .mural-card .row-inline-checks { grid-template-columns: 1fr; }
}

/* Estrelas do formulário maiores e amarelas */
.mural-card .rating-bar { gap: 6px; }
.mural-card .rating-bar .star {
  font-size: 1.2rem;
  line-height: 1;
  color: #e5e7eb;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: transform .12s ease, color .12s ease;
}
.mural-card .rating-bar .star:hover { transform: scale(1.08); }
.mural-card .rating-bar .star.selected { color: #FFD700; }

/* Botão primário mais chamativo (respeita classe .cta) */
.mural-card .cta-primary {
  font-weight: 600;
  border-radius: 999px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  box-shadow: 0 8px 18px rgba(59,130,246,0.35);
}
.mural-card .cta-primary:hover { filter: brightness(1.05); }
.rating-bar .star { color: #FFD700; font-size: 1.4rem; background: transparent; border: none; cursor: pointer; }

/* Estado ativo do CTA secundário */
.cta-secondary[aria-current="page"] {
  background: #0056b3;
  border-color: #0056b3;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

/* Responsividade */
@media (max-width: 768px) {
  .page-header h1 {
    font-size: 2rem;
  }
  .page-title-image { max-width: 600px; }
  /* Empilha Nome/Cidade no mobile */
  .mural-card .row-inline { grid-template-columns: 1fr; }
  /* Empilha checkboxes no mobile */
  .mural-card .row-inline-checks { grid-template-columns: 1fr; }
  
  .models-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .filters {
    gap: 8px;
  }
  
  .filter-btn {
    padding: 6px 16px;
    font-size: 0.9rem;
  }
}

/* Ajustes focados para iPhone (larguras típicas 390–414px) */
@media (max-width: 414px) {
  .site-header { height: 56px; }
  .site-header .header-inner { padding: 0 12px; }
  .cta-group { gap: 6px; }
  .cta { padding: 6px 10px; font-size: 0.9rem; }

  .models-page { padding: calc(56px + env(safe-area-inset-top) + 24px) 0 28px; }
  .container { padding: 0 12px; }
  .page-header { margin-bottom: 28px; }
  .page-header h1 { font-size: 1.8rem; }
  .page-title-image { max-width: 95%; }
  .page-subtitle { font-size: 0.95rem; max-width: 95%; }

  /* Filtros viram chips roláveis horizontalmente */
  .filters {
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    padding: 0 4px;
    scroll-snap-type: x proximity;
  }
  .filters::-webkit-scrollbar { display: none; }
  .filter-btn {
    white-space: nowrap;
    scroll-snap-align: start;
    padding: 6px 14px;
    font-size: 0.9rem;
  }

  /* Cards mais compactos */
  .models-grid { gap: 14px; }
  .model-image { min-height: 140px; padding: 14px; }
  .model-info { padding: 14px; }
  .model-info h3 { font-size: 1.05rem; }
  .model-info p { font-size: 0.9rem; }
  .btn-preview, .btn-customize { padding: 9px 12px; font-size: 0.85rem; }
}

/* Ajustes extras para iPhone 12/13/14 (390px) */
@media (max-width: 390px) {
  .emoji-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; }
  .emoji-img { width: 64px; height: 64px; }
}

/* Ícones genéricos para navegação e CTAs */
.icon {
  width: 18px;
  height: 18px;
  display: inline-block;
}

/* Grupo de CTAs no header */
.cta-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  padding: 8px 14px;
  border: 2px solid transparent;
}

.cta-primary {
  background: #2f3a3d;
  color: #ffffff;
}
.cta-primary[aria-current="page"] {
  filter: brightness(1.06);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.4);
}
.cta-primary:hover { filter: brightness(1.08); }
.cta-primary:active { transform: translateY(1px); }

.cta-secondary {
  background: rgba(47,58,61,0.06);
  color: #2f3a3d;
  border-color: rgba(47,58,61,0.25);
}
.cta-secondary:hover { background: rgba(47,58,61,0.12); }
.cta-secondary:active { transform: translateY(1px); }

/* Página de emojis */
.emojis-page {
  min-height: 100vh;
  background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(248,249,250,0.95) 100%);
  padding: 80px 0 40px;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 16px;
}

.emoji-card {
  position: relative;
  /* Fundo dos boxes com imagem do anexo */
  background-image: url('assets/emoji-card-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 12px;
  border: 1px solid #3a3d41;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 10px 18px rgba(0,0,0,0.25);
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.emoji-card:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 14px 24px rgba(0,0,0,0.30);
  filter: brightness(1.02);
}

.emoji-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: transparent;
  /* Contorno branco aproximado da silhueta via drop-shadow */
  filter: drop-shadow(0 0 1px #fff)
          drop-shadow(0 0 2px #fff)
          drop-shadow(0 0 3px #fff);
}

.emoji-caption {
  display: none;
}

.error {
  padding: 12px;
  border-radius: 8px;
  background: #fee2e2;
  color: #b91c1c;
  text-align: center;
}

/* Modal de personalização */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  max-width: 480px;
  width: 90%;
  max-height: 95vh;
  overflow-y: auto;
  position: relative;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: #6b7280;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.modal-close:hover {
  background: #f3f4f6;
  color: #374151;
}

.modal-header {
  padding: 16px 16px 12px;
  text-align: center;
  border-bottom: 1px solid #e5e7eb;
}

.modal-emoji-preview {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 1px #fff)
          drop-shadow(0 0 2px #fff)
          drop-shadow(0 0 3px #fff);
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  color: #1f2937;
  font-weight: 500;
}

.modal-body {
  padding: 16px;
}

.option-group {
  margin-bottom: 16px;
}

.option-label {
  display: block;
  font-weight: 400;
  color: #374151;
  margin-bottom: 12px;
  font-size: 14px;
}

.size-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.size-btn {
  flex: 1;
  min-width: 110px;
  padding: 10px 12px;
  border: 2px solid #e5e7eb;
  background: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 400;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.size-btn:hover {
  border-color: #d1d5db;
  background: #f9fafb;
}

.size-btn.active {
  border-color: #2f3a3d;
  background: #2f3a3d;
  color: #fff;
}

/* Material options */
.material-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.material-btn {
  flex: 1;
  min-width: 160px;
  padding: 10px 12px;
  border: 2px solid #e5e7eb;
  background: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 400;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.material-btn:hover {
  border-color: #d1d5db;
  background: #f9fafb;
}

.material-btn.active {
  border-color: #2f3a3d;
  background: #2f3a3d;
  color: #fff;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qty-btn {
  width: 36px;
  height: 36px;
  border: 2px solid #e5e7eb;
  background: #fff;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 400;
  color: #374151;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.qty-btn:hover {
  border-color: #2f3a3d;
  background: #f9fafb;
}

#quantity-input {
  width: 80px;
  height: 36px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  text-align: center;
  font-size: 15px;
  font-weight: 400;
  color: #374151;
}

#quantity-input:focus {
  outline: none;
  border-color: #2f3a3d;
}

.price-summary {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  margin-top: 12px;
}

.total-label {
  font-size: 15px;
  color: #6b7280;
}

.total-price {
  font-size: 20px;
  font-weight: 500;
  color: #2f3a3d;
  margin-left: 8px;
}

.modal-footer {
  padding: 12px 16px 16px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.btn-cancel,
.btn-add-cart {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-cancel {
  background: #f3f4f6;
  color: #6b7280;
}

.btn-cancel:hover {
  background: #e5e7eb;
  color: #374151;
}

.btn-add-cart {
  background: #2f3a3d;
  color: #fff;
  min-width: 160px;
}

.btn-add-cart:hover {
  background: #1f2937;
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #10b981;
  color: #fff;
  padding: 16px 24px;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  transform: translateX(400px);
  transition: transform 0.3s ease;
  z-index: 1001;
  max-width: 320px;
  font-weight: 400;
  font-size: 16px;
}

.toast.show {
  transform: translateX(0);
}

/* Melhorar cursor nos emoji cards */
.emoji-card {
  cursor: pointer;
}

.emoji-card:hover {
  transform: translateY(-4px) scale(1.02);
}

/* Página do Carrinho */
.cart-page { padding-top: 84px; min-height: 100vh; background: #fff; }
.cart-page .container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.cart-page .page-header { margin: 10px 0 24px; }
.cart-page .page-header h1 { font-size: 28px; margin: 0; }
.cart-page .page-subtitle { color: #475569; margin: 6px 0 0; }
.cart-content { display: grid; grid-template-columns: 1fr 320px; gap: 18px; align-items: start; }
.cart-list { display: grid; gap: 12px; }
.cart-item { display: grid; grid-template-columns: 84px 1fr auto auto; gap: 12px; align-items: center; background:#fff; border-radius: 12px; padding: 10px; box-shadow: 0 6px 16px rgba(0,0,0,.06); }
.cart-thumb { width: 84px; height: 84px; border-radius: 10px; overflow: hidden; background: transparent; display: grid; place-items: center; }
.cart-thumb img { width: 100%; height: 100%; object-fit: contain; }
.cart-thumb-placeholder { font-size: 11px; color: #6b7280; }
.cart-info { display: grid; gap: 4px; }
.cart-title { font-weight: 500; }
.cart-meta { color: #64748b; font-size: 12px; }
.cart-price { text-align: right; min-width: 160px; }
.cart-price .unit-price { color: #64748b; font-size: 12px; }
.cart-price .total-price { font-weight: 500; }
.cart-actions { display: inline-flex; gap: 8px; align-items: center; }
.qty-btn { border: 0; background: #111; color: #fff; border-radius: 8px; width: 28px; height: 28px; cursor: pointer; }
.qty-input { width: 56px; height: 28px; border-radius: 8px; border: 1px solid #e2e8f0; text-align: center; }
.remove-btn { border: 0; background: #ef4444; color:#fff; border-radius: 8px; padding: 8px 12px; cursor: pointer; }

.cart-summary { background: transparent; color:#111; border-radius: 14px; padding: 14px; box-shadow: none; border: 1px solid #e2e8f0; position: sticky; top: 84px; }
.cart-summary .sum-row { display:flex; justify-content:space-between; align-items:center; padding:6px 0; border-bottom:1px dashed rgba(0,0,0,.12); }
.cart-summary .sum-total { display:flex; justify-content:space-between; align-items:center; padding:12px 0; font-weight:500; }
.cart-summary .sum-value { font-variant-numeric: tabular-nums; }
.summary-actions { display:flex; flex-direction:column; gap:10px; margin-top: 10px; }
.btn { border:0; border-radius:12px; padding:10px 16px; font-weight:500; cursor:pointer; }
.btn-primary { background:#10b981; color:#fff; }
.btn-secondary { background:#2563eb; color:#fff; text-align:center; }
.btn-light { background:#ffffff; color:#111; }
.btn:hover{ filter: brightness(1.06); }
.btn:active{ transform: translateY(1px); }

.empty-cart { text-align:center; padding:40px 0; }
.empty-cart p { color:#334155; margin-bottom: 14px; }

@media (max-width: 900px){
  .cart-content { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
}

/* Badge do contador de carrinho no cabeçalho */
.cart-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  margin-left: 6px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  background: #e11d48;
}

/* Spinner simples da página de emojis */
.emojis-page .loading {
  text-align: center;
  padding: 24px 0;
  color: #6b7280;
  font-weight: 400;
}

/* Box de cálculo de frete no resumo do carrinho */
.shipping-box {
  margin: 12px 0;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}
.shipping-label {
  font-weight: 500;
  color: #334155;
}
.shipping-input-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
.shipping-input {
  flex: 1;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 400;
}
.shipping-result { margin-top: 8px; }
.shipping-note { margin-top: 4px; font-size: 12px; color: #64748b; }

/* Escala global da página (reduz "zoom" de tudo) */
:root { --page-scale: 0.9; }
html { zoom: var(--page-scale); }
@supports not (zoom: 1) {
  body {
    transform: scale(var(--page-scale));
    transform-origin: top left;
    width: calc(100% / var(--page-scale));
    min-height: calc(100vh / var(--page-scale));
  }
}

/* Página de Login */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 80px 20px;
  background: radial-gradient(800px 800px at 50% 0%, rgba(0,0,0,0.25), rgba(0,0,0,0));
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: #1f1f1f;
  color: #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(0,0,0,0.45);
  padding: 24px;
}

.auth-title { font-size: 24px; font-weight: 500; margin: 0 0 6px; }
.auth-subtitle { color: #9ca3af; margin: 0 0 18px; }

.auth-providers { display: grid; gap: 12px; margin: 18px 0; }
.auth-btn {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  background: #111827;
  color: #e5e7eb;
  border: 1px solid #374151;
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: filter .15s ease, transform .08s ease;
}
.auth-btn:hover { filter: brightness(1.05); }
.auth-btn:active { transform: translateY(1px); }
.auth-icon { width: 22px; height: 22px; display: inline-grid; place-items: center; }

.auth-separator { text-align: center; color: #9ca3af; margin: 8px 0 12px; }
.auth-separator span { display:inline-block; padding: 0 10px; background: #1f1f1f; }

.auth-form { display: grid; gap: 12px; }
.auth-input-row { display: flex; align-items: center; gap: 8px; }
.auth-input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #374151;
  background: #0f172a;
  color: #e5e7eb;
}
.auth-input::placeholder { color: #9ca3af; }
.auth-submit { width: 100%; padding: 12px 16px; border-radius: 12px; border: 0; background: #2563eb; color:#fff; cursor:pointer; }
.auth-submit:hover { filter: brightness(1.06); }
.auth-submit:active { transform: translateY(1px); }
.auth-submit[disabled] { opacity: .6; cursor: not-allowed; filter: none; }

.auth-links { display:flex; justify-content:center; align-items:center; gap:8px; margin: 8px 0 0; }
.auth-link { background:none; border:0; color:#93c5fd; cursor:pointer; padding:0; }
.auth-link:hover { text-decoration: underline; }
.auth-links .sep { color: #6b7280; }

.auth-section { margin-top: 16px; }
.auth-section-title { margin: 0 0 10px; font-size: 18px; font-weight: 500; color:#e5e7eb; }
.auth-actions { display:flex; gap:8px; justify-content:flex-end; }
.auth-inline-btn { padding:10px 14px; border-radius:12px; border:0; }

/* Escopo: página conta (empresa-page) – inputs brancos e botão menor */
.empresa-page .auth-input {
  background: #ffffff;
  color: #111827;
  border: 1px solid #e5e7eb;
}
.empresa-page .auth-input::placeholder { color: #6b7280; }
.empresa-page .auth-input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.empresa-page .auth-submit { width: 100px; height: 35px; padding: 0 12px; font-size: 13px; }

/* Badge de status da conta */
.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 12px;
  line-height: 1.4;
}
.status-active { color: #065f46; background: #d1fae5; }
.status-pending { color: #7c2d12; background: #fef3c7; }
.status-blocked { color: #7f1d1d; background: #fee2e2; }
.status-unknown { color: #374151; background: #e5e7eb; }
.empresa-page .auth-actions { justify-content: flex-start; }
/* Ícone ao lado do título "Sua conta" */
.empresa-page .page-title { display: flex; align-items: center; gap: 8px; }
.empresa-page .page-title-icon { width: 35px; height: 50px; object-fit: contain; display: block; }

/* Bloco de login por telefone */
.phone-login { margin-top: 8px; padding-top: 8px; border-top: 1px solid #374151; }
#recaptcha-container { min-height: 1px; }
.phone-login .auth-actions { margin-top: 8px; }
.phone-login .auth-input { margin-bottom: 8px; }
/* Balão promocional topo direito */
.promo-bubble {
  position: fixed;
  top: 8px;
  right: 16px;
  z-index: 1;
  max-width: calc(340px - 50mm);
  background: #fff;
  border: 2px solid #111827;
  border-radius: 18px;
  padding: 14px 16px 16px 16px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
  transform: scale(0.7);
  transform-origin: top right;
}
.promo-bubble.has-image { background: transparent; border: none; box-shadow: none; padding: 0; top: 8px; right: 216px; transform: rotate(-10deg) scale(0.7); transform-origin: top right; max-width: calc(340px - 50mm); }
.promo-bubble:before {
  content: '';
  position: absolute;
  right: 24px;
  top: calc(100% - 2px);
  border-width: 10px 10px 0 0;
  border-style: solid;
  border-color: #111827 transparent transparent transparent;
}
.promo-bubble:after {
  content: '';
  position: absolute;
  right: 25px;
  top: 100%;
  border-width: 9px 9px 0 0;
  border-style: solid;
  border-color: #fff transparent transparent transparent;
}
.promo-bubble.has-image:before, .promo-bubble.has-image:after { display: none; }
.promo-bubble-text { color: #111827; font-size: 14px; line-height: 1.35; margin: 0 0 10px; }
.promo-bubble-img { display: block; width: 100%; height: auto; }
.promo-bubble-action {
  display: inline-block;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #fff;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 500;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.2);
}
.promo-bubble-action:active { transform: translateY(1px); }
.promo-bubble-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 28px; height: 28px;
  border: none; background: transparent; color: #6b7280; font-size: 20px;
  line-height: 1; cursor: pointer; border-radius: 6px;
}
.promo-bubble-close:hover { background: rgba(0,0,0,.06); }

@media (max-width: 640px) {
  .promo-bubble { right: 10px; left: 10px; top: 76px; max-width: calc(300px - 50mm); z-index: 1; }
  /* Ajuste do balão com imagem no mobile para evitar sobreposição */
  .promo-bubble.has-image {
    top: 80px;
    right: 10px;
    left: auto;
    transform: none;
    /* Menor no mobile: reduzimos largura máxima */
    max-width: clamp(130px, 48vw, 180px);
    z-index: 1;
  }
  /* Mover botão de upload para a esquerda no mobile para evitar sobreposição */
  .upload-btn {
    left: 12px;
    top: 136px;
  }
  /* Banner do mural menor e mais afastado das ações fixas no rodapé */
  .mural-banner { right: 12px; top: 12px; bottom: auto; }
  .mural-banner-img { width: 160px; height: 160px; }
}
.mural-card-row { flex-direction: column !important; align-items: center; gap: 12px; }
.mural-card-row .mural-panel { flex: 1 1 auto; }
.panel-header { display: flex; align-items: center; gap: 10px; }
/* avatar menor quando ao lado do título */
.mural-card-row .mural-avatar { width: clamp(40px, 4.5vw, 64px); border: 3px solid rgba(255,255,255,0.85); box-shadow: 0 6px 12px rgba(0,0,0,0.14); }
.mural-card-row .mural-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mural-side-photo {
  flex: 0 0 auto;                /* abaixo do texto, sem largura fixa de coluna */
  width: 96%;                    /* ocupa a largura do card como o painel */
  height: clamp(120px, 22vw, 200px); /* altura controlada para manter proporção visual */
  margin: 8px 0 0;               /* pequeno espaçamento abaixo do texto */
  border-radius: 18px;           /* igual ao outro lado do card */
  overflow: hidden;
  box-shadow: 0 5px 14px rgba(0,0,0,0.12);
  align-self: stretch;           /* estica para acompanhar a largura do card */
  background: rgba(255,255,255,0.5);
}
.mural-side-photo img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 768px) {
  .mural-cards .model-card { flex: 0 0 84vw; width: 84vw; }
  .mural-card-row { flex-direction: column !important; }
  .mural-side-photo { margin-left: 0; margin-right: 0; margin-top: 10px; flex: 0 0 auto; height: clamp(120px, 36vw, 200px); border-radius: 18px; }
}
/* Landing hero and sections */
.home-hero {
  padding: 56px 0;
  background: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: center;
}
.hero-copy h1 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin: 0 0 12px;
}
.hero-subtitle {
  color: var(--text-secondary, #555);
  margin: 0 0 16px;
}
.hero-media img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  object-fit: cover;
}

.feature-grid { padding: 24px 0; }
.features {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 0;
  margin: 0;
}
.feature {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  background: #fff;
}
.feature-icon { font-size: 20px; color: currentColor; }
.feature-text h3 { margin: 0 0 6px; font-size: 1rem; }
.feature-text p { margin: 0; color: var(--text-secondary, #555); }

.category-section { padding: 32px 0; }
.category-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  padding: 12px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.category-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
}
.category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.how-it-works { padding: 32px 0; }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.step {
  padding: 16px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  background: #fff;
}
.step-icon { font-size: 22px; display: inline-block; margin-bottom: 8px; }

/* CTA variants */
.cta-primary { background: var(--brand, #111); color: #fff; }
.cta-secondary { background: #fff; border: 1px solid rgba(0,0,0,0.12); }

/* Responsividade */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .features { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: 1fr; }
}
/* Ajuste quando o hero não tem mídia */
.hero-inner.single { grid-template-columns: 1fr; }
/* Fundo branco apenas na home */
body.home-page {
  background: #ffffff;
  background-image: none;
}
/* Avatar topo centralizado na home */
.top-avatar{ display:flex; justify-content:center; align-items:center; margin: 84px auto 16px; }
.top-avatar-link{ display:inline-block; padding:8px; border:2px solid #e5e7eb; border-radius:16px; background:#fff; box-shadow: 0 8px 24px rgba(0,0,0,.18); transition: transform .15s ease, box-shadow .15s ease; cursor:pointer; }
.top-avatar-link:hover{ transform: translateY(-1px); box-shadow: 0 12px 30px rgba(0,0,0,.22); }
.top-avatar-link:active{ transform: translateY(0); box-shadow: 0 8px 20px rgba(0,0,0,.18); }
.top-avatar img{ width: 20vw; height:auto; display:block; border-radius:12px; }

/* Card de Emojis fixo na home (aside) */
#emojiCard {
  position: fixed;
  top: 84px; /* será ajustado via JS para alinhar com o avatar */
  right: 212px; /* mover 200px para a esquerda a partir do posicionamento anterior */
  width: 120px; /* conforme solicitado */
  max-height: var(--emoji-card-h, 50vh); /* será sincronizado com altura do avatar */
  overflow-y: auto;
  overscroll-behavior: auto; /* permitir que o scroll "suba" para a página */
  -webkit-overflow-scrolling: touch; /* suaviza rolagem em iOS */
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  z-index: 10;
}

.emoji-card-header {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  padding: 8px 10px;
  border-bottom: 1px solid #f1f5f9;
}

.emoji-list {
  list-style: none;
  margin: 0;
  padding: 8px;
}

.emoji-list li {
  margin: 6px 0;
}

.emoji-list img {
  display: block;
  width: 100%; /* 1 emoji por linha, ocupando 120px de largura */
  height: auto;
}

/* Garantir comportamento fixo na home, sem mover ao rolar */
body.home-page #emojiCard {
  position: fixed !important;
  top: 84px !important;
  right: 212px !important;
  transform: none !important;
}
body.home-page #emojiCard:hover { transform: none !important; }
/* ===== Pagamentos ===== */
.payment-section { border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px; background: #f9fafb; }
.pay-options { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.pay-option { display: inline-flex; align-items: center; gap: 8px; color: #111827; }
.pay-option input { accent-color: #60a5fa; }
.pay-option .icon-svg { width: 22px; height: 22px; border-radius: 4px; }

.card-box { border:1px solid #e5e7eb; border-radius:10px; padding:10px; background:#fff; }
.card-list { list-style:none; padding:0; margin:0; display:grid; gap:8px; }
.card-item { display:flex; align-items:center; gap:10px; border:1px solid #e5e7eb; border-radius:10px; padding:8px; }
.card-brand { width:32px; height:20px; border-radius:4px; display:inline-block; background:#fff; border:1px solid #e5e7eb; }
.card-brand.visa { background-image: url('data:image/svg+xml;utf8,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 64 24%22><rect width=%2264%22 height=%2224%22 fill=%22white%22/><text x=%228%22 y=%2217%22 font-size=%2216%22 font-family=%22Arial%22 fill=%22%231a4ed8%22>VISA</text></svg>'); background-size: contain; background-repeat:no-repeat; }
.card-brand.mastercard { background-image: url('data:image/svg+xml;utf8,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 64 24%22><rect width=%2264%22 height=%2224%22 fill=%22white%22/><circle cx=%2226%22 cy=%2212%22 r=%228%22 fill=%22%23ef4444%22/><circle cx=%2238%22 cy=%2212%22 r=%228%22 fill=%22%23f59e0b%22 opacity=%220.9%22/></svg>'); background-size: contain; background-repeat:no-repeat; }
.card-brand.elo { background-image: url('data:image/svg+xml;utf8,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 64 24%22><rect width=%2264%22 height=%2224%22 fill=%22white%22/><text x=%2212%22 y=%2217%22 font-size=%2214%22 font-family=%22Arial%22 fill=%22%23000%22>elo</text></svg>'); background-size: contain; background-repeat:no-repeat; }
.card-meta { color:#374151; font-size:.9rem; }
.card-actions .btn.btn-secondary { background:#f3f4f6; border:1px solid #e5e7eb; color:#111827; border-radius:8px; padding:6px 10px; }

/* ===== Modal Cartão ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(17,24,39,.45); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal { width: min(640px, 92vw); background: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.25); padding: 12px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; }
.btn-close { border: none; background: transparent; font-size: 1.2rem; cursor: pointer; }
.card-form .row { margin-top: 10px; }
.card-form .row-inline { display:grid; grid-template-columns: 1fr 180px; gap: 10px; margin-top: 10px; }
.modal-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:12px; }

/* Bordas arredondadas e inputs do modal */
.card-form input[type="text"],
.card-form input[type="password"],
.card-form input[type="tel"],
.card-form select,
.card-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.92rem;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.card-form input:focus,
.card-form select:focus,
.card-form textarea:focus { outline: none; border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(96,165,250,0.25); }

/* Expiração compacta */
.exp-selects select { width: auto; display:inline-block; }
#card-month { width: 62px; }
#card-year { width: 88px; }
.card-selected { border:1px solid #93c5fd; background:#eff6ff; border-radius:10px; padding:8px; display:flex; align-items:center; gap:10px; }
.card-selected .card-meta { color:#1f2937; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.file-picker { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.file-picker { margin-top: 4px; }
.btn-file { display: inline-block; padding: 10px 14px; border-radius: 999px; background: linear-gradient(135deg, #60a5fa, #3b82f6); color: #fff; font-weight: 600; box-shadow: 0 8px 18px rgba(59,130,246,0.35); cursor: pointer; font-size: 16px; }
.file-name { color: #374151; max-width: 60ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 480px) {
  .file-picker { justify-content: flex-start; }
}
.x-userline { display:flex; align-items:center; gap:10px; }
.x-card { --indent-left: calc(48px + 10px); }
.x-userline { position: static; }
.x-message { position: static; margin-left: var(--indent-left); margin-top: 6px; }
.x-stats { position: static; margin-left: var(--indent-left); }
.x-user { font-size: clamp(15px, 3.6vw, 16px); }
.x-meta { font-size: clamp(14px, 3.3vw, 16px); }
.x-stats { font-size: clamp(12px, 3vw, 13px); }
@media (max-width: 480px) {
  .x-row { grid-template-columns: 44px 1fr auto; gap: 8px; }
  .x-card { padding: 12px 14px; }
}
.ig-designer { display: grid; grid-template-columns: 1fr; gap: 16px; padding: 16px; }
@media (min-width: 769px) { .ig-designer { grid-template-columns: 1fr; } }
.ig-card { position: relative; }
.ig-photo img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.image-wrap[data-type="ig"] .btn-bg,
.image-wrap[data-type="ig"] .btn-ct { display: none; }
.ig-template { display: grid; grid-template-columns: 1fr; gap: 16px; padding: 16px; }
.ig-card { position: relative; width: 60mm; height: 95mm; aspect-ratio: 60 / 95; background-size: cover; background-position: center; border-radius: 5mm; background-color: #f1f1f1; padding: 0; }
.ig-avatar { position: absolute; left: 3mm; top: 2mm; width: 8.4mm; height: 8.4mm; border-radius: 999px; overflow: hidden; background: #7c3aed; }
.ig-handle { position: absolute; left: 12.5mm; top: 4mm; font-size: 12px; color: #0f172a; display: inline-flex; align-items: center; gap: 2mm; }
.ig-verified { width: 16px; height: 16px; display: inline-block; vertical-align: middle; }
.ig-photo { position: absolute; left: 50%; top: 11mm; transform: translateX(-50%); width: 58mm; height: 71mm; border-radius: 1mm; overflow: hidden; background: #F1F2F6; background-size: contain; background-position: center; background-repeat: no-repeat; }
.ig-photo img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.ig-message { position: absolute; left: 5mm; right: 4mm; top: 89mm; font-size: 12px; color: #0f172a; }
