/* ═══════════════════════════════════════════════════════════════════
   Antojito's Cakes — Design System v1.0
   ─────────────────────────────────────
   INCLUIR EN TODAS LAS PÁGINAS del sitio (antes del </head>):
   <link rel="stylesheet" href="design-system.css">

   Este archivo contiene los estándares de diseño permanentes.
   No borrar ni modificar sin actualizar TODAS las páginas.
   ═══════════════════════════════════════════════════════════════════ */

/* ── 1. FONDO CON PATRÓN DE PUNTOS ────────────────────────────────────────
   Capa fija de puntitos rosa sutiles sobre el fondo de la página.
   Se aplica vía ::before para no interferir con el background propio de cada página.
   ─────────────────────────────────────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(rgba(233,30,140,0.05) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* ── 2. SHIMMER EN IMÁGENES DE CARDS ──────────────────────────────────────
   Al hacer hover sobre una card, un destello de luz cruza la imagen.
   ─────────────────────────────────────────────────────────────────────────── */
.card-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.38) 50%, transparent 70%);
  transform: translateX(-150%);
  pointer-events: none;
  transition: none;
}
.card:hover .card-img-wrap::after {
  transform: translateX(150%);
  transition: transform .62s ease;
}

/* ── 3. CARD DESTACADA (primera de cada sección) ──────────────────────────
   La primera card de cada sección ocupa todo el ancho con layout horizontal.
   ─────────────────────────────────────────────────────────────────────────── */
.card-featured {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: row;
  height: 188px;
}
.card-featured .card-img-wrap {
  width: 44%;
  flex-shrink: 0;
  aspect-ratio: unset;
  height: 100%;
}
.card-featured .card-body {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(135deg, #fff 0%, #FFF3FA 100%);
  padding: 16px 14px;
}
.card-featured .card-name  { font-size: 16px; margin-bottom: 6px; }
.card-featured .card-desc  { -webkit-line-clamp: 3; font-size: 10.5px; margin-bottom: 10px; }
.card-featured .card-price { font-size: 15px; font-family: 'Bodoni Moda', serif; font-weight: 700; }
.card-featured .card-body::before {
  content: '✦ Destacado';
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #FF6FB4, #E91E8C);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}
.card-featured:hover { transform: translateY(-4px) scale(1); }

/* ── 4. PARTÍCULAS FLOTANTES EN HEADER ────────────────────────────────────
   Usar con: <div class="header-particles" id="hParticles"></div>
   y el JS de generación de partículas en cada página que tenga header oscuro.
   ─────────────────────────────────────────────────────────────────────────── */
.header-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.header-logo,
.header-title,
.header-sub,
.header-tagline {
  position: relative;
  z-index: 1;
}
.hparticle {
  position: absolute;
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  animation: floatP var(--dur, 4s) ease-in-out infinite var(--delay, 0s);
  opacity: 0;
  will-change: transform, opacity;
  user-select: none;
}
@keyframes floatP {
  0%   { opacity: 0;    transform: translateY(0)     rotate(0deg)  scale(0.8); }
  15%  { opacity: 0.65; }
  50%  { opacity: 0.4;  transform: translateY(-36px)  rotate(18deg) scale(1.1); }
  85%  { opacity: 0.65; }
  100% { opacity: 0;    transform: translateY(-72px)  rotate(36deg) scale(0.8); }
}

/* ── 5. PRECIO CON FLIP EN MODAL ──────────────────────────────────────────
   Usar en JS: priceEl.classList.remove('pop'); void priceEl.offsetWidth; priceEl.classList.add('pop');
   ─────────────────────────────────────────────────────────────────────────── */
@keyframes priceFlip {
  0%   { transform: translateY(8px) scale(0.88); opacity: 0; }
  60%  { transform: translateY(-2px) scale(1.04); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
.modal-price-tag.pop {
  animation: priceFlip .44s cubic-bezier(0.34,1.56,0.64,1) both;
}

/* ── 6. WHATSAPP FLOAT — PULSO SUAVE ──────────────────────────────────────
   Se aplica automáticamente a cualquier .wa-float en la página.
   ─────────────────────────────────────────────────────────────────────────── */
@keyframes waPulse {
  0%, 100% {
    box-shadow: 0 4px 20px rgba(37,211,102,.5);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 6px 30px rgba(37,211,102,.75), 0 0 0 9px rgba(37,211,102,.13);
    transform: scale(1.04);
  }
}
.wa-float {
  animation: waPulse 2.8s ease-in-out infinite;
}
.wa-float:hover {
  animation: none;
  transform: scale(1.1) !important;
}

/* ── 7. SCROLL REVEAL — CARDS ─────────────────────────────────────────────
   Animación de entrada estándar para cards.
   Activar con IntersectionObserver + class "in-view".
   ─────────────────────────────────────────────────────────────────────────── */
.reveal-card {
  opacity: 0;
  transform: translateY(28px) scale(0.97);
  transition: opacity .5s cubic-bezier(0.22,1,0.36,1),
              transform .5s cubic-bezier(0.22,1,0.36,1);
}
.reveal-card.in-view {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ── 8. SECCIÓN TITLE — ENTRADA LATERAL ──────────────────────────────────
   Estándar para títulos de sección.
   ─────────────────────────────────────────────────────────────────────────── */
.ds-section-title {
  opacity: 0;
  transform: translateX(-18px);
  transition: opacity .5s cubic-bezier(0.22,1,0.36,1),
              transform .5s cubic-bezier(0.22,1,0.36,1);
}
.ds-section-title.in-view {
  opacity: 1;
  transform: translateX(0);
}
