/* ================================================================
   MODO NATAL — Mérito Galardoado
   Ativado por classe .mg-christmas no <html>.
   Sem esta classe, TUDO fica invisível (nenhum impacto no site normal).
   ================================================================ */

/* Tudo escondido por defeito */
.mg-snow-canvas,
.mg-xmas-banner,
.mg-xmas-badge {
  display: none;
}

/* ================================================================
   BANNER SUPERIOR — barra dourada com mensagem festiva
   ================================================================ */
html.mg-christmas .mg-xmas-banner {
  display: block;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  padding: 10px 20px;
  background: linear-gradient(90deg, #8B6A1E 0%, #C9A24B 30%, #E8C877 50%, #C9A24B 70%, #8B6A1E 100%);
  background-size: 200% 100%;
  color: #1a1a1a;
  text-align: center;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  animation: mg-xmas-shimmer 8s ease-in-out infinite;
  line-height: 1.4;
}

@keyframes mg-xmas-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.mg-xmas-banner-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.mg-xmas-banner-emoji {
  display: inline-block;
  animation: mg-xmas-swing 3s ease-in-out infinite;
  font-size: 16px;
}

@keyframes mg-xmas-swing {
  0%, 100% { transform: rotate(-10deg); }
  50% { transform: rotate(10deg); }
}

.mg-xmas-banner b {
  color: inherit;
  font-weight: 700;
}

.mg-xmas-banner-close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.1);
  border: none;
  color: inherit;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.mg-xmas-banner-close:hover {
  background: rgba(0, 0, 0, 0.25);
}

/* Empurrar o header e body para baixo quando o banner está visível */
html.mg-christmas body {
  padding-top: 40px;
}
html.mg-christmas #site-header {
  top: 40px !important;
}

/* ================================================================
   NEVE — canvas fixo no fundo
   ================================================================ */
html.mg-christmas .mg-snow-canvas {
  display: block;
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9997;  /* abaixo do banner (9999) e do WhatsApp FAB (9998), acima do resto */
}

/* ================================================================
   SELO "ENCOMENDAS ATÉ 20 DEZ"
   ================================================================ */
html.mg-christmas .mg-xmas-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  border: 1px solid #C9A24B;
  color: #E8C877;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 100px;
  margin-top: 20px;
  box-shadow: 0 4px 20px rgba(201, 162, 75, 0.25);
  animation: mg-xmas-glow 3s ease-in-out infinite;
}

@keyframes mg-xmas-glow {
  0%, 100% { box-shadow: 0 4px 20px rgba(201, 162, 75, 0.25); }
  50% { box-shadow: 0 4px 28px rgba(201, 162, 75, 0.5); }
}

.mg-xmas-badge-icon {
  font-size: 16px;
}

/* ================================================================
   PEQUENO DETALHE NO LOGO (estrela dourada)
   ================================================================ */
html.mg-christmas .brand-logo-wrap {
  position: relative;
}
html.mg-christmas .brand-logo-wrap::after {
  content: '';
  position: absolute;
  top: -4px;
  right: -8px;
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23E8C877'%3E%3Cpath d='M12 2l2.4 7.4H22l-6 4.4 2.3 7.2L12 16.6 5.7 21l2.3-7.2-6-4.4h7.6z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  filter: drop-shadow(0 0 6px rgba(232, 200, 119, 0.8));
  animation: mg-xmas-twinkle 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes mg-xmas-twinkle {
  0%, 100% { opacity: 0.7; transform: scale(1) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.15) rotate(15deg); }
}

/* ================================================================
   RESPONSIVE — banner mais discreto em mobile
   ================================================================ */
@media (max-width: 600px) {
  html.mg-christmas .mg-xmas-banner {
    font-size: 11px;
    padding: 8px 14px;
    padding-right: 32px;
  }
  html.mg-christmas body {
    padding-top: 34px;
  }
  html.mg-christmas #site-header {
    top: 34px !important;
  }
  .mg-xmas-banner-inner {
    gap: 8px;
    line-height: 1.3;
  }
  html.mg-christmas .mg-xmas-badge {
    font-size: 10px;
    padding: 6px 12px;
  }
}

/* Respeitar preferência do sistema por menos movimento */
@media (prefers-reduced-motion: reduce) {
  html.mg-christmas .mg-xmas-banner,
  html.mg-christmas .mg-xmas-badge,
  html.mg-christmas .brand-logo-wrap::after,
  .mg-xmas-banner-emoji {
    animation: none !important;
  }
  html.mg-christmas .mg-snow-canvas {
    display: none;  /* sem neve para quem prefere menos movimento */
  }
}
