/* =========================================================
   DDR Tienda Pro - Skin Navideño Moderno (Ultra-Liviano)
   Solo se carga cuando ddr_xmas_mode === '1'
   ========================================================= */

/* 1. Guirnalda fija con Mini Papá Noel, Estrellas y Árboles */
.ddr-xmas-garland {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 34px;
  pointer-events: none;
  z-index: 9998;
  overflow: hidden;
}
.ddr-garland-svg {
  width: 100%;
  height: 26px;
  display: block;
}
.ddr-garland-ornaments {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  padding: 0 10px;
}
.ddr-garland-ornaments .ornament {
  font-size: 16px;
  line-height: 1;
  margin-top: 4px;
  transform-origin: top center;
  will-change: transform;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.18));
  animation: ddrOrnamentSwing 3s ease-in-out infinite alternate;
}
.ddr-garland-ornaments .ornament:nth-child(odd) {
  margin-top: 9px;
  animation-delay: 0.7s;
}
.ddr-garland-ornaments .ornament:nth-child(3n) {
  margin-top: 3px;
  animation-delay: 1.4s;
}
@keyframes ddrOrnamentSwing {
  0%   { transform: rotate(-6deg); }
  100% { transform: rotate(6deg); }
}

/* Mini luces RGB intercaladas en la guirnalda */
.xmas-rgb-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: 8px;
  flex-shrink: 0;
  will-change: background-color, box-shadow, transform;
  animation: ddrRgbCycle 2.4s linear infinite;
}
.xmas-rgb-dot.d2 {
  margin-top: 13px;
  animation-delay: -0.8s;
}
.xmas-rgb-dot.d3 {
  margin-top: 6px;
  animation-delay: -1.6s;
}
@keyframes ddrRgbCycle {
  0%, 100% { background: #ef4444; box-shadow: 0 0 8px #ef4444, 0 0 14px rgba(239,68,68,0.6); transform: scale(1); }
  25%      { background: #f59e0b; box-shadow: 0 0 10px #f59e0b, 0 0 16px rgba(245,158,11,0.7); transform: scale(1.18); }
  50%      { background: #10b981; box-shadow: 0 0 8px #10b981, 0 0 14px rgba(16,185,129,0.6); transform: scale(1); }
  75%      { background: #3b82f6; box-shadow: 0 0 10px #3b82f6, 0 0 16px rgba(59,130,246,0.7); transform: scale(1.18); }
}

/* 2. Acento sutil en la sección de Ofertas */
.home-offers {
  border-top: 2px solid rgba(220, 38, 38, 0.18);
  background: linear-gradient(180deg, rgba(254, 242, 242, 0.45) 0%, transparent 180px);
}

/* 3. Nieve Ultra-Liviana (GPU-only, sin bloquear clics) */
.ddr-xmas-snow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}
.ddr-xmas-flake {
  position: absolute;
  top: -12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 6px rgba(148, 163, 184, 0.45);
  will-change: transform;
  animation: ddrSnowFall linear infinite;
}
[data-theme="dark"] .ddr-xmas-flake {
  background: rgba(255, 255, 255, 0.65);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.35);
}

@keyframes ddrSnowFall {
  0% {
    transform: translate3d(0, -10px, 0);
    opacity: 0;
  }
  10% {
    opacity: 0.9;
  }
  90% {
    opacity: 0.7;
  }
  100% {
    transform: translate3d(24px, 102vh, 0);
    opacity: 0;
  }
}

.ddr-xmas-flake:nth-child(1)  { left: 5%;  width: 5px; height: 5px; animation-duration: 11s; animation-delay: 0s; }
.ddr-xmas-flake:nth-child(2)  { left: 12%; width: 4px; height: 4px; animation-duration: 14s; animation-delay: 2s; }
.ddr-xmas-flake:nth-child(3)  { left: 19%; width: 6px; height: 6px; animation-duration: 10s; animation-delay: 4s; }
.ddr-xmas-flake:nth-child(4)  { left: 26%; width: 4px; height: 4px; animation-duration: 15s; animation-delay: 1s; }
.ddr-xmas-flake:nth-child(5)  { left: 33%; width: 5px; height: 5px; animation-duration: 12s; animation-delay: 5s; }
.ddr-xmas-flake:nth-child(6)  { left: 41%; width: 6px; height: 6px; animation-duration: 9.5s; animation-delay: 3s; }
.ddr-xmas-flake:nth-child(7)  { left: 48%; width: 4px; height: 4px; animation-duration: 13s; animation-delay: 0.5s; }
.ddr-xmas-flake:nth-child(8)  { left: 55%; width: 5px; height: 5px; animation-duration: 11.5s; animation-delay: 2.5s; }
.ddr-xmas-flake:nth-child(9)  { left: 63%; width: 6px; height: 6px; animation-duration: 10.5s; animation-delay: 4.5s; }
.ddr-xmas-flake:nth-child(10) { left: 70%; width: 4px; height: 4px; animation-duration: 14.5s; animation-delay: 1.5s; }
.ddr-xmas-flake:nth-child(11) { left: 77%; width: 5px; height: 5px; animation-duration: 12.5s; animation-delay: 3.5s; }
.ddr-xmas-flake:nth-child(12) { left: 84%; width: 6px; height: 6px; animation-duration: 10s; animation-delay: 0.8s; }
.ddr-xmas-flake:nth-child(13) { left: 91%; width: 4px; height: 4px; animation-duration: 13.5s; animation-delay: 2.8s; }
.ddr-xmas-flake:nth-child(14) { left: 96%; width: 5px; height: 5px; animation-duration: 11s; animation-delay: 5.5s; }

@media (prefers-reduced-motion: reduce) {
  .ddr-xmas-snow,
  .ddr-garland-bulbs .bulb {
    animation: none !important;
  }
  .ddr-xmas-snow {
    display: none !important;
  }
}
@media (max-width: 640px) {
  .ddr-garland-bulbs .bulb:nth-child(n+12) {
    display: none;
  }
  .ddr-xmas-flake:nth-child(n+9) {
    display: none;
  }
}

/* 4. Gorrito navideño sobre el logo DDR */
.brand {
  position: relative;
}
.brand::before {
  content: '🎅';
  position: absolute;
  top: -10px;
  left: -8px;
  font-size: 18px;
  line-height: 1;
  transform: rotate(-18deg);
  pointer-events: none;
  z-index: 5;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25));
}

/* 5. Insignia festiva en tarjetas de Oferta */
.card-badge.badge-sale::before {
  content: '🎄 ';
}
.card-badge.badge-sale {
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.35), 0 0 0 1px rgba(245, 158, 11, 0.5);
}

/* 6. Destello dorado en botón principal */
.hero-actions .btn-primary {
  box-shadow: 0 6px 20px rgba(225, 29, 72, 0.35), 0 0 0 2px rgba(245, 158, 11, 0.35);
}

/* 7. Botón flotante de Música Navideña (Mute ON/OFF Responsive) */
.ddr-xmas-music-btn {
  position: fixed;
  bottom: 84px;
  left: 18px;
  z-index: 9998;
  background: rgba(15, 23, 42, 0.88);
  color: #f8fafc;
  border: 1.5px solid rgba(245, 158, 11, 0.55);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  padding: 0;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(6px);
  touch-action: manipulation;
  transition: transform 0.15s ease, background 0.15s ease;
}
.ddr-xmas-music-btn:hover {
  transform: scale(1.05);
  background: #0f172a;
}
.ddr-xmas-music-btn.is-muted {
  opacity: 0.8;
  border-color: rgba(148, 163, 184, 0.45);
}
@media (max-width: 640px) {
  .ddr-xmas-music-btn {
    bottom: 136px;
    left: auto;
    right: 14px;
    padding: 8px 12px;
    font-size: 12px;
  }
}
