:root {
  --header-offset: 96px;
  --crown-gap: 0px;
  --hero-overlay: 10px;
  --crown-rise: 0px;
}
/* =============================================
   🌈 HEADER CATABUM — CORREGIDO Y CENTRADO
============================================= */
.menu-top {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(90deg, #40026d 0%, #9c11a8 100%);
  border-bottom: 3px solid #ff8c3b;
  box-shadow: 0 3px 18px rgba(0, 0, 0, 0.35);
  padding: 4px 24px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
}

/* 🔹 Redes sociales */
.social-icons {
  display: flex;
  align-items: center;
  gap: 14px;
}
.social-icons img {
  width: 22px;
  filter: brightness(0) invert(1);
  opacity: 0.8;
  transition: all 0.3s ease;
}
.social-icons img:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* 🔹 Logo centrado */
.logo-center {
  position: absolute;
  left: 44%;
  transform: translateX(-50%);
  top: 10px;
  z-index: 10;
  margin-top: 60px;
  cursor: pointer;
  isolation: isolate;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.logo-center > .logo-home-pill {
  position: static;
  margin-top: 8px;
  transform: translateY(-6px);
  opacity: 0;
  pointer-events: none;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.3px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(217, 46, 130, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 6px 14px rgba(24, 0, 42, 0.35);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.25s ease;
  z-index: 2;
  white-space: nowrap;
}

.logo-center.show-home-pill > .logo-home-pill {
  opacity: 1;
  transform: translateY(0);
}

.logo-center.show-home-pill:hover > .logo-home-pill {
  background: rgba(217, 46, 130, 0.88);
}

@media (max-width: 991.98px) {
  .logo-center > .logo-home-pill {
    display: none !important;
  }
}

/* Wallet/Profile: mantener pill visible y hover activo en corona */
body.wallet-page .logo-center > .logo-home-pill,
body.profile-page .logo-center > .logo-home-pill {
  opacity: 1 !important;
  transform: translate(4px, -1px) !important;
  margin-top: 2px;
  pointer-events: none;
  font-size: clamp(10px, 0.76vw, 12px);
  padding: 4px 10px;
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(217, 46, 130, 0.82);
  box-shadow: 0 8px 16px rgba(24, 0, 42, 0.34);
}

body.wallet-page .logo-center::after,
body.profile-page .logo-center::after {
  display: block !important;
  opacity: 0.34;
  transform: translate(-50%, -50%) scale(0.68);
}

body.wallet-page .logo-center:hover::after,
body.profile-page .logo-center:hover::after,
body.wallet-page .logo-center:focus-visible::after,
body.profile-page .logo-center:focus-visible::after {
  opacity: 0.9;
  transform: translate(-50%, -50%) scale(1.02);
}

body.wallet-page .logo-center .logoHead,
body.profile-page .logo-center .logoHead {
  transition: transform 0.28s ease, filter 0.28s ease, opacity 0.25s ease;
}

body.wallet-page .logo-center:hover .logoHead,
body.profile-page .logo-center:hover .logoHead,
body.wallet-page .logo-center:focus-visible .logoHead,
body.profile-page .logo-center:focus-visible .logoHead {
  transform: translateY(-2px) scale(1.08) !important;
  filter: drop-shadow(0 12px 24px rgba(255, 62, 129, 0.56)) !important;
}

body.wallet-page .logo-center:hover > .logo-home-pill,
body.profile-page .logo-center:hover > .logo-home-pill,
body.wallet-page .logo-center:focus-visible > .logo-home-pill,
body.profile-page .logo-center:focus-visible > .logo-home-pill {
  background: rgba(217, 46, 130, 0.95);
  box-shadow: 0 10px 20px rgba(24, 0, 42, 0.44);
}

.logo-center::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 55%;
  width: clamp(150px, 22vw, 240px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%) scale(0.55);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0) 70%
  );
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: -1;
  pointer-events: none;
}
.logo-center.is-hover::after {
  opacity: 0.85;
  transform: translate(-50%, -50%) scale(1);
}
.logoHead {
  width: clamp(140px, 18vw, 210px);
  transition: filter 0.3s ease, opacity 0.35s ease;
}

/* 🔹 Menú derecho */
.menu-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}
.menu-top .container-fluid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
  overflow: visible;
}
@media (max-width: 768px) {
  .menu-top,
  .menu-top .container-fluid {
    max-width: 100vw;
    overflow: visible;
    box-sizing: border-box;
    padding-left: 12px;
    padding-right: 12px;
  }
  .menu-right {
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .btn-wallet,
  .profile-btn {
    padding: 8px 14px;
  }
}
.menu-right span {
  font-weight: 600;
  color: #fff;
}

/* ✴️ Botones base */
.btn-login,
.btn-register,
.btn-wallet,
.profile-btn {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 8px 20px;
  border-radius: 30px;
  transition: all 0.3s ease;
  text-decoration: none;
  cursor: pointer;
}

/* 🩷 Entrar */
.btn-login {
  position: relative;
  color: #fff;
  background: transparent;
  border: none;
  overflow: visible;
  isolation: isolate;
  transform-origin: center;
  transition: filter 0.25s ease, letter-spacing 0.25s ease, color 0.25s ease;
}
.btn-login::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #ff3e81;
  box-shadow: 0 10px 24px rgba(64, 2, 109, 0.45);
  transition: transform 0.35s ease, box-shadow 0.3s ease, background 0.3s ease;
  z-index: -1;
}
.btn-login::after {
  content: "";
  position: absolute;
  inset: 50%;
  width: 110%;
  aspect-ratio: 1;
  background: url("../../assets/ico/explosion.png") center/contain no-repeat;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.25);
  filter: drop-shadow(0 0 18px rgba(250, 106, 106, 0.75));
  pointer-events: none;
  transition: opacity 0.25s ease,
    transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.btn-login:hover {
  letter-spacing: 0.06em;
  filter: brightness(1.12);
  color: transparent;
}
.btn-login:hover::before {
  transform: scaleX(0.6);
  box-shadow: 0 18px 36px rgba(64, 2, 109, 0.55),
    0 0 24px rgba(64, 2, 109, 0.45);
  background: rgba(255, 62, 129, 0);
}
.btn-login:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.24);
  animation: btnLoginPulse 1.1s ease-in-out 0.05s infinite;
}

@keyframes btnLoginPulse {
  0% {
    transform: translate(calc(-50% - 1px), calc(-50% + 1px)) scale(1.24)
      rotate(-1.2deg);
  }
  50% {
    transform: translate(calc(-50% + 1px), calc(-50% - 1px)) scale(1.34)
      rotate(1.3deg);
  }
  100% {
    transform: translate(calc(-50% - 1px), calc(-50% + 1px)) scale(1.24)
      rotate(-1.2deg);
  }
}

/* 🟠 Registrarse */
.btn-register {
  position: relative;
  background: linear-gradient(90deg, #ff3e81, #ff8c3b);
  color: #fff;
  border: none;
  box-shadow: 0 4px 10px rgba(255, 100, 140, 0.4);
  overflow: visible;
  isolation: isolate;
}
.btn-register::before,
.btn-register::after {
  content: "";
  position: absolute;
  inset: -4px;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  transform-origin: center;
  transition: opacity 0.35s ease, transform 0.45s ease;
}
.btn-register::before {
  background: url("../../assets/ico/confeti1.png") center/cover no-repeat;
  transform: scale(0.98);
  filter: drop-shadow(0 6px 12px rgba(255, 62, 129, 0.25));
}
.btn-register::after {
  background: url("../../assets/ico/confeti2.png") center/cover no-repeat;
  transform: scale(1.02);
  filter: blur(0.35px) drop-shadow(0 16px 22px rgba(255, 62, 129, 0.35));
}
.btn-register:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(255, 100, 140, 0.6);
}
.btn-register:hover::before {
  animation: confettiCharge 0.55s ease-out forwards;
}
.btn-register:hover::after {
  animation: confettiBlast 0.75s ease-out 0.15s forwards,
    confettiAura 2.1s ease-in-out 0.9s infinite alternate;
}

@keyframes confettiCharge {
  0% {
    opacity: 0;
    transform: scale(0.6);
    filter: drop-shadow(0 0 0 rgba(255, 62, 129, 0));
  }
  70% {
    opacity: 1;
    transform: scale(1.02);
  }
  100% {
    opacity: 0.35;
    transform: scale(1.06);
  }
}

@keyframes confettiBlast {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  35% {
    opacity: 1;
    transform: scale(1.06);
  }
  100% {
    opacity: 0.95;
    transform: scale(1.12);
  }
}

@keyframes confettiAura {
  0% {
    filter: blur(0.7px);
  }
  50% {
    filter: blur(2.8px);
  }
  100% {
    filter: blur(0.7px);
  }
}

/* 💰 Wallet */
.btn-wallet {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border: none;
  background: linear-gradient(135deg, #f72e74 0%, #fc2e72 100%);
  border-radius: 999px;
  line-height: 1;
  font-weight: 700;
  color: #fff;
  isolation: isolate;
  transition: transform 0.3s ease;
  box-shadow: 0 12px 24px rgba(255, 62, 129, 0.35);
  text-decoration: none;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
}
.btn-wallet::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  background: radial-gradient(
    circle at 35% 25%,
    rgba(255, 255, 255, 0.2),
    rgba(255, 255, 255, 0)
  );
  opacity: 0.6;
  pointer-events: none;
}
.btn-wallet::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(255, 180, 120, 0.38),
    rgba(255, 180, 120, 0)
  );
  opacity: 0.3;
  filter: blur(11px);
  transform: scale(0.9);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: -1;
}
.btn-wallet:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 26px rgba(255, 140, 120, 0.35),
    0 0 14px rgba(180, 96, 255, 0.28);
  background: linear-gradient(145deg, #f0119a 0%, #ff1080 100%);
}
.btn-wallet:hover::after {
  opacity: 0.62;
  transform: scale(0.96);
}
.btn-wallet__label {
  position: relative;
  z-index: 1;
  font-weight: 800;
  text-transform: none;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
}

/* 👤 Perfil */
.profile-btn {
  background: #fff;
  color: #53009b;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  box-shadow: 0 8px 20px rgba(21, 0, 43, 0.25);
  padding: 3px 13px;
}
.profile-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(21, 0, 43, 0.35);
  color: #2c0056;
}
.profile-btn__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.2));
  transition: transform 0.3s ease, filter 0.3s ease;
}
.profile-btn:hover .profile-btn__avatar {
  transform: translateY(-1px);
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.25));
}
.profile-btn .profile-btn__label {
  font-weight: 700;
  color: #53009b;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}

/* 🔻 Dropdown */
.profile-menu {
  position: relative;
}
.dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 45px;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  min-width: 160px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}
.dropdown a {
  display: block;
  color: #333;
  text-decoration: none;
  padding: 12px 20px;
  font-size: 14px;
}
.dropdown a:hover {
  background: #ff3e81;
  color: #fff;
}

/* =========================================
   📱 RESPONSIVE
========================================= */
@media (max-width: 992px) {
  .menu-top {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    padding: 12px 20px;
  }
  .logo-center {
    position: static;
    transform: none;
    margin: 8px 0;
  }
  .menu-right {
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
  }
}
@media (max-width: 480px) {
  .social-icons img {
    width: 18px;
  }
  .btn-login,
  .btn-register {
    font-size: 12px;
    padding: 6px 14px;
  }
}

/* =============================================
   OVERRIDES PARA CENTRAR LOGO Y RESPONSIVE
============================================= */

/* Layout interno del nav en 3 columnas */
.menu-top .container-fluid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  width: 100%;
  box-sizing: border-box;
}
.social-icons {
  grid-column: 1;
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo-center {
  position: static;
  left: auto;
  top: auto;
  transform: none;
  margin: 0;
  justify-self: center;
  grid-column: 2;
}
.logoHead {
  position: static;
  width: clamp(140px, 18vw, 210px);
  height: auto;
  margin: 0;
}
.menu-top {
  padding: 4px 24px;
}
.menu-right {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: 0;
}

@media (max-width: 1200px) {
  .logoHead {
    width: clamp(100px, 14vw, 160px);
  }
}

@media (max-width: 992px) {
  .menu-top {
    padding: 10px 14px;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }
  .menu-top .container-fluid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-areas: "social crown actions";
    column-gap: 10px;
  }
  .social-icons { grid-area: social; }
  .logo-center {
    grid-area: crown;
    justify-self: center;
  }
  .menu-right {
    grid-area: actions;
    justify-self: end;
    gap: 10px;
    flex-wrap: wrap;
  }
  .logoHead {
    width: clamp(90px, 12vw, 140px);
  }
  .btn-login,
  .btn-register,
  .btn-wallet,
  .profile-btn {
    font-size: 0.85rem;
    padding: 6px 14px;
  }
}

@media (max-width: 768px) {
  .social-icons img {
    width: 20px;
  }
}

@media (max-width: 480px) {
  .social-icons img {
    width: 18px;
  }
  .logoHead {
    width: clamp(70px, 18vw, 110px);
  }
  .btn-login,
  .btn-register {
    font-size: 0.78rem;
    padding: 5px 10px;
  }
}

/* En pantallas grandes, la corona cuelga debajo del header */
@media (min-width: 992px) {
  .menu-top {
    padding: 5px 20px;
  }
  .menu-top .container-fluid {
    position: static;
  }
  .logo-center {
    position: absolute !important;
    left: 50% !important;
    top: 100% !important; /* justo debajo del header */
    transform: translateX(-50%) !important;
    margin-top: calc(
      20px - var(--crown-rise, 0px)
    ) !important; /* solapa un poco el borde inferior */
    z-index: 1100;
  }
  .logoHead {
    width: clamp(110px, 8.2vw, 210px);
  }
}

/* Estado “dentro del banner” para pantallas grandes */
@media (min-width: 992px) {
  .logo-center.into-banner {
    position: fixed !important; /* flota sobre el banner */
    left: 50% !important;
    transform: translateX(-50%) scale(0.6) !important;
    margin-top: 0 !important;
    z-index: 1200;
    transition: transform 0.35s ease, top 0.35s ease, opacity 0.25s ease;
    filter: drop-shadow(0 10px 18px rgba(255, 62, 129, 0.35));
    top: 52px !important; /* valor inicial hasta que JS ajuste con precisión */
  }
  /* Evitar que se oculte por clases heredadas */
  .logo-center.into-banner.is-hidden {
    opacity: 1 !important;
    pointer-events: auto;
  }
}

/* Estado fijado dentro del header cuando se pasa el banner */
@media (min-width: 992px) {
  .logo-center.in-header {
    position: fixed !important;
    left: 50% !important;
    transform: translateX(-50%) scale(0.55) !important;
    margin-top: 0 !important;
    z-index: 1200;
    transition: transform 0.35s ease, top 0.35s ease, opacity 0.25s ease;
    filter: drop-shadow(0 8px 14px rgba(255, 62, 129, 0.3));
  }
}

/* Reacomodo mobile: todo centrado, corona grande al medio */
@media (max-width: 768px) {
  .menu-top {
    padding: 10px 12px;
  }
  .menu-top .container-fluid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-areas: "social crown actions";
    align-items: center;
    column-gap: 10px;
  }
  .social-icons {
    grid-area: social;
    justify-self: start;
    gap: 12px;
  }
  .logo-center {
    grid-area: crown;
    position: relative !important;
    transform: none !important;
    justify-self: center;
    padding: 0;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
  }
  .logo-center::after {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(0.7);
  }
  .logoHead {
    width: clamp(90px, 20vw, 130px);
    filter: drop-shadow(0 8px 16px rgba(255, 62, 129, 0.45));
  }
  .menu-right {
    grid-area: actions;
    justify-self: end;
    gap: 10px;
  }
  .btn-login,
  .btn-register,
  .btn-wallet,
  .profile-btn {
    font-size: 0.78rem;
    padding: 5px 10px;
  }
  .profile-btn {
    min-height: 40px;
    gap: 6px;
  }
}
