/* ============================================================
   PIÑATITAS MELY — ESTILOS v2.0
   Archivo: assets/css/mely-v2.css
   ============================================================ */

/* ── TOKENS ── */
:root {
  --mely-purple:    #5b4ca7;
  --mely-purple-dk: #3d3280;
  --mely-pink:      #ff9ad9;
  --mely-pink-lt:   #fff0fa;
  --mely-accent:    #ff6ec7;
  --mely-wa:        #25d366;
  --radius-card:    1rem;
  --radius-pill:    999px;
  --transition:     0.2s cubic-bezier(0.16,1,0.3,1);
  --shadow-card:    0 4px 20px rgba(91,76,167,0.10);
  --shadow-hover:   0 8px 32px rgba(91,76,167,0.18);
}

/* ── BASE ── */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;-webkit-font-smoothing:antialiased}
body{font-family:'Poppins',sans-serif;color:#333;background:#fff;overflow-x:hidden}
img{display:block;max-width:100%;height:auto}

/* ── HERO V2 ── */
.hero-v2 {
  position: relative;
  min-height: 100vh;
  background-image: url('/assets/img/back-pinatitasmely.png');
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  padding-top: 80px;
}
.hero-v2__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(91,76,167,0.82) 0%, rgba(91,76,167,0.55) 50%, rgba(91,76,167,0.10) 100%);
}
.hero-v2__content {
  position: relative;
  z-index: 2;
  padding: 2rem 0;
}
.hero-v2__badge {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255,255,255,0.3);
  margin-bottom: 1.2rem;
  letter-spacing: 0.03em;
}
.hero-v2__title {
  font-family: 'Baloo 2', cursive;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 1rem;
}
.hero-v2__accent {
  color: var(--mely-pink);
  display: block;
}
.hero-v2__sub {
  color: rgba(255,255,255,0.88);
  font-size: clamp(1rem, 2vw, 1.2rem);
  margin-bottom: 2rem;
  max-width: 420px;
}
.hero-v2__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Mobile hero */
@media (max-width: 768px) {
  .hero-v2 {
    background-image: url('/assets/img/back-pinatitasmely.png');
    background-position: center top;
    min-height: 100svh;
    align-items: flex-end;
    padding-bottom: 3rem;
  }
  .hero-v2__overlay {
    background: linear-gradient(to top, rgba(91,76,167,0.92) 0%, rgba(91,76,167,0.60) 55%, rgba(91,76,167,0.05) 100%);
  }
}
@media (max-width: 480px) {
  .hero-v2 {
    background-image: url('/assets/img/mobilepinatitasmelynuevo.png');
  }
}

/* ── BOTONES GLOBALES ── */
.btn-mely-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--mely-purple);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1.6rem;
  border-radius: var(--radius-pill);
  border: 2px solid var(--mely-purple);
  text-decoration: none;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}
.btn-mely-primary:hover {
  background: var(--mely-purple-dk);
  border-color: var(--mely-purple-dk);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(91,76,167,0.30);
}
.btn-mely-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1.6rem;
  border-radius: var(--radius-pill);
  border: 2px solid rgba(255,255,255,0.6);
  text-decoration: none;
  transition: all var(--transition);
}
.btn-mely-outline:hover {
  background: rgba(255,255,255,0.15);
  border-color: #fff;
  color: #fff;
  transform: translateY(-2px);
}
.btn-mely-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--mely-wa);
  color: #fff;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: all var(--transition);
  flex-shrink: 0;
}
.btn-mely-wa:hover { background: #1ebe5d; transform: scale(1.1); }
.btn-sm-mely { font-size: 0.82rem; padding: 0.45rem 1.1rem; }
.btn-lg-mely { font-size: 1.05rem; padding: 0.8rem 2rem; }
.btn-icon { width: 1em; height: 1em; flex-shrink: 0; }

/* ── SECCIÓN HEADERS ── */
.section-tag {
  display: inline-block;
  background: var(--mely-pink-lt);
  color: var(--mely-purple);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.7rem;
}
.section-title-v2 {
  font-family: 'Baloo 2', cursive;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--mely-purple);
  margin-bottom: 0.5rem;
}
.section-sub {
  color: #888;
  font-size: 1rem;
}

/* ── CATEGORÍAS ── */
.col-lg-2-4 { flex: 0 0 auto; width: 20%; }
@media (max-width: 992px) { .col-lg-2-4 { width: 33.333%; } }
@media (max-width: 576px) { .col-lg-2-4 { width: 50%; } }

.cat-card-v2 {
  display: block;
  border-radius: var(--radius-card);
  overflow: hidden;
  text-decoration: none;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
  aspect-ratio: 3/4;
  position: relative;
}
.cat-card-v2:hover { transform: translateY(-6px) scale(1.02); box-shadow: var(--shadow-hover); }
.cat-card-v2__img {
  position: absolute;
  inset: 0;
}
.cat-card-v2__img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.cat-card-v2:hover .cat-card-v2__img img { transform: scale(1.06); }
.cat-card-v2__body {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cat-card-v2__icon { font-size: 1.6rem; line-height: 1; }
.cat-card-v2__name {
  font-family: 'Fredoka', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
  text-align: center;
}

/* Colores fallback si no carga imagen */
.cat-superheroes-v2 { background: #ff5757; }
.cat-ninas-v2       { background: #ffa8e8; }
.cat-anime-v2       { background: #ffe066; }
.cat-navidad-v2     { background: #16a085; }
.cat-caricaturas-v2 { background: #8ee7ef; }

/* ── BANNER CREADOR ── */
.banner-creador {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  display: flex;
  align-items: center;
}
.banner-creador__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.banner-creador::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(91,76,167,0.88) 40%, rgba(91,76,167,0.30) 100%);
  z-index: 1;
}
.banner-creador__content {
  position: relative;
  z-index: 2;
  padding: 3rem 1rem;
}
.banner-creador__title {
  font-family: 'Baloo 2', cursive;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 1rem;
}
.banner-creador__sub {
  color: rgba(255,255,255,0.85);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  max-width: 480px;
}

/* ── GALERÍA GRID ── */
.galeria-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 280px;
  gap: 1rem;
  border-radius: var(--radius-card);
  overflow: hidden;
}
.galeria-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.galeria-item { overflow: hidden; }
.galeria-item:hover img { transform: scale(1.05); }
.galeria-item--wide { grid-column: 1; }
@media (max-width: 768px) {
  .galeria-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 180px 180px;
  }
  .galeria-item--wide { grid-column: 1 / -1; }
}

/* ── PRODUCT CARD V2 ── */
.product-card-v2 {
  border-radius: var(--radius-card);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.product-card-v2:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.product-card-v2__img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  display: block;
}
.product-card-v2__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card-v2__img-wrap:hover .product-card-v2__img { transform: scale(1.06); }
.product-card-v2__badge {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: var(--mely-purple);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  opacity: 0;
  transition: opacity var(--transition);
}
.product-card-v2__img-wrap:hover .product-card-v2__badge { opacity: 1; }
.product-card-v2__body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.4rem;
}
.product-card-v2__name {
  font-family: 'Fredoka', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--mely-purple);
  line-height: 1.3;
}
.product-card-v2__price {
  font-size: 1.1rem;
  font-weight: 700;
  color: #333;
  margin: 0;
}
.product-card-v2__price span { font-size: 0.75rem; color: #999; font-weight: 400; }
.product-card-v2__actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: auto;
  padding-top: 0.5rem;
}

/* ── CÓMO FUNCIONA ── */
.section-como { background: var(--mely-pink-lt); }
.como-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1rem;
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  height: 100%;
  gap: 0.6rem;
  transition: transform var(--transition);
}
.como-step:hover { transform: translateY(-4px); }
.como-step__num {
  width: 2rem; height: 2rem;
  background: var(--mely-purple);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.como-step__icon { color: var(--mely-purple); }
.como-step__icon svg { width: 2rem; height: 2rem; }
.como-step__title {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--mely-purple);
}
.como-step__desc { font-size: 0.85rem; color: #888; margin: 0; }

/* ── WHATSAPP FLOTANTE ── */
.whatsapp-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  background: var(--mely-wa);
  color: #fff;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition);
  animation: wa-pulse 2.5s infinite;
}
.whatsapp-float:hover { transform: scale(1.12); color: #fff; box-shadow: 0 6px 28px rgba(37,211,102,0.55); }
.whatsapp-float svg { width: 1.6rem; height: 1.6rem; }
@keyframes wa-pulse {
  0%,100% { box-shadow: 0 4px 20px rgba(37,211,102,0.4); }
  50%      { box-shadow: 0 4px 28px rgba(37,211,102,0.70); }
}

/* ── FOOTER MEJORADO ── */
footer {
  background: var(--mely-purple);
  color: rgba(255,255,255,0.85);
  padding: 2rem 1rem;
  text-align: center;
}
footer p { margin-bottom: 0.75rem; }
footer a { color: #fff; }