@keyframes drawerArrowBounce {
  0% { transform: translateY(0); opacity: 1; }
  30% { transform: translateY(8px); opacity: 1; }
  60% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}
.drawer-arrow-anim {
  pointer-events: none;
  animation: drawerArrowBounce 1.2s cubic-bezier(.6,0,.4,1) infinite;
  margin-left: 8px;
  vertical-align: middle;
}
.header{
  position:sticky;
  top:0;
  z-index:150;
  transition: background .18s ease, box-shadow .18s ease, border-color .18s ease;
  border-bottom: 1px solid transparent;
}

/* Estado TOP (inicio): se ve limpio, sin tapar feo */
.header.is-top{
  background: rgba(246,247,251,.35);
  backdrop-filter: blur(10px);
}

/* Estado SCROLL: más sólido para que se lea perfecto */
.header.is-scrolled{
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(16,24,40,.10);
  box-shadow: 0 14px 40px rgba(16,24,40,.08);
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding: 14px 0;
}

.brand{
  display:flex; align-items:center; gap:10px;
  font-weight:600;
  letter-spacing:.6px;
}
.brand-logo{
  width:40px; height:40px;
  border-radius: 12px;
  object-fit:cover;
}
.brand-name{ font-size:14px; opacity:.95 }

.nav{ display:flex; align-items:center; gap:6px; }
.nav-item{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 10px 12px;
  border-radius: 0;
  border: none;
  color: rgba(18,24,38,.88);
  background: transparent;
  cursor:pointer;
  position: relative;
}
.nav-item::after{
  content: '';
  position: absolute;
  bottom: 4px;
  left: 12px;
  right: 12px;
  height: 2px;
  background: #6366f1;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
  border-radius: 2px;
}
.nav-item:hover::after{
  transform: scaleX(1);
}
.nav-item:hover{
  background: transparent;
}

.header-actions{ display:flex; align-items:center; gap:10px; }
.header-actions a.icon-btn{ position:relative; }

.burger{
  width:42px; height:42px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background: #fff;
  display:none;
  cursor:pointer;
  padding:0;
}
.burger span{
  display:block;
  width:18px;
  height:2px;
  background: rgba(18,24,38,.92);
  margin: 4px auto;
  border-radius: 2px;
}

/* ===== MEGA MENU (FIX: no se pega al hero, no se ve "encima feo") ===== */
.mega{
  position:absolute;
  left:0; right:0;
  top: calc(100% + 10px); /* 👈 separación real */
  opacity:0;
  transform: translateY(-8px) scale(.98);
  pointer-events:none;
  transition: opacity .18s ease, transform .18s ease;
}

.mega::before{
  content:'';
  position:absolute;
  top:-20px;
  left:0;
  right:0;
  height:20px;
}

.mega.is-open{
  opacity:1;
  transform: translateY(0) scale(1);
  pointer-events:auto;
}
.mega-inner{
  display:grid;
  grid-template-columns: 1.05fr 1.6fr 1fr;
  gap:14px;
  padding: 14px;
  margin: 0 auto 14px;
  border-radius: var(--radius2);
  background: rgba(255,255,255,.96);
  border:1px solid rgba(16,24,40,.10);
  box-shadow: var(--shadow);
}

.mega-col{
  padding: 10px;
  border-radius: var(--radius);
  background: var(--soft);
  border: 1px solid rgba(16,24,40,.08);
  min-height: 240px;
}
.mega-title{
  display:inline-flex;
  font-weight:600;
  letter-spacing:.4px;
  padding: 8px 12px;
  border-radius: 12px;
  margin-bottom: 10px;
  color:#111;
}
.mega-title.corporativo{ background: linear-gradient(90deg, #4cc9f0, #4895ef); }
.mega-title.personalizado{ background: linear-gradient(90deg, var(--brand2), #ff9f1c); }
.mega-title.impresion{ background: linear-gradient(90deg, #a78bfa, #7c3aed); color:#fff; }

.mega-group{ margin-top: 12px; }
.mega-group-title{
  font-weight:700;
  font-size:15px;
  letter-spacing:.2px;
  color: #1e293b;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(16,24,40,.08);
}

.mega-group a{
  display:block;
  position:relative;
  padding: 6px 10px;
  border-radius: 0;
  color: rgba(18,24,38,.65);
  border: none;
  font-size: 13px;
  font-weight: 400;
  background: transparent;
  transition: color 0.2s;
}
.mega-group a::after{
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 3px;
  height: 2px;
  background: #6366f1;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s cubic-bezier(.65,0,.076,1);
  border-radius: 2px;
}
.mega-group a:hover::after{
  transform: scaleX(1);
}
.mega-group a:hover{
  background: transparent;
  color: #1e293b;
}

.mega-row{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap:12px;
}

.mega-subgroup{ margin-top: 10px; }
.mega-subtitle{
  font-weight:600;
  font-size:13px;
  margin: 12px 0 6px;
  color: #475569;
}

.mega-promo{
  margin-top: 14px;
  padding: 14px;
  border-radius: var(--radius);
  background:
    radial-gradient(600px 220px at 20% 20%, rgba(255,107,107,.18), transparent 60%),
    radial-gradient(600px 220px at 80% 20%, rgba(76,201,240,.16), transparent 60%),
    #fff;
  border:1px solid rgba(16,24,40,.10);
}
.promo-badge{
  display:inline-flex;
  padding: 6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  background: var(--brand2);
  color:#111;
}
.mega-promo p{ margin: 0 0 10px; color: rgba(18,24,38,.72); font-size:13px; }

/* ===== DRAWER - BOTTOM SHEET GAMING STYLE ===== */
.drawer{
  position:fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 60vh;
  background: #ffffff;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index:220;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.drawer.is-open{ 
  transform: translateY(0);
}

/* Handle bar */
.drawer::before{
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 4px;
  background: #e2e8f0;
  border-radius: 4px;
}

/* Overlay behind drawer */
.drawer-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 210;
}

.drawer-overlay.is-open{
  opacity: 1;
  visibility: visible;
}

/* Pause Menu Header */
.drawer-top{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 20px 16px;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}

.drawer-top strong{
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawer-top strong::before{
  content: '☰';
  font-size: 16px;
}

.drawer-top .icon-btn{
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
}

.drawer-top .icon-btn:hover{
  background: #fee2e2;
  border-color: #fecaca;
  color: #ef4444;
}

/* Scrollable content */
.drawer-content{
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

/* Main Menu Links */
.drawer-link{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding: 14px 20px;
  border: none;
  border-bottom: 1px solid #f8fafc;
  background: transparent;
  color: #1e293b;
  font-size: 18px;
  font-weight: 600;
  transition: all 0.2s;
  margin: 0;
  border-radius: 0;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.drawer-link:hover,
.drawer-link:focus{
  background: #f8fafc;
  color: #6366f1;
}

.drawer-link i{
  color: #94a3b8;
  font-size: 18px;
  transition: transform 0.2s;
}

.drawer-link:hover i{
  color: #6366f1;
}

.drawer-divider{
  height: 1px;
  background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
  margin: 8px 20px;
}

/* ===== MOBILE MEGA MENU - LIGHT STYLE ===== */
.mobile-mega{
  display: none;
  flex-direction: column;
  padding: 12px 16px 20px;
  gap: 12px;
  animation: fadeInMenu 0.3s ease;
}

.mobile-mega.is-open{
  display: flex;
}

@keyframes fadeInMenu{
  from{ opacity: 0; transform: translateY(-10px); }
  to{ opacity: 1; transform: translateY(0); }
}

.mobile-mega-section{
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
}

.mobile-mega-title{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mobile-mega-title.corporativo{
  background: linear-gradient(135deg, rgba(76, 201, 240, 0.15), rgba(72, 149, 239, 0.08));
  color: #0891b2;
}

.mobile-mega-title.personalizado{
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(255, 159, 28, 0.08));
  color: #d97706;
}

.mobile-mega-title.impresion{
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.15), rgba(124, 58, 237, 0.08));
  color: #7c3aed;
}

.mobile-mega-title::before{
  content: '▸';
  font-size: 10px;
}

.mobile-mega-group{
  padding: 12px 14px;
}

.mobile-mega-group-title{
  font-size: 14px;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f1f5f9;
}

.mobile-mega-links{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mobile-mega-links a{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.mobile-mega-links a:hover{
  background: #6366f1;
  border-color: #6366f1;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

/* Promo Card in Mobile */
.mobile-mega-promo{
  margin: 8px 16px 16px;
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border: 1px solid #e2e8f0;
  text-align: center;
}

.mobile-mega-promo .promo-badge{
  display: inline-flex;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  margin-bottom: 10px;
}

.mobile-mega-promo h4{
  color: #1e293b;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.mobile-mega-promo p{
  color: #64748b;
  font-size: 13px;
  margin-bottom: 14px;
}

.mobile-mega-promo .btn{
  display: inline-flex;
  padding: 10px 20px;
  border-radius: 8px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.mobile-mega-promo .btn:hover{
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* Footer Gaming Style */
.drawer-footer{
  padding: 14px 20px;
  border-top: 1px solid #f1f5f9;
  text-align: center;
  flex-shrink: 0;
  background: #fafafa;
}

.drawer-footer p{
  font-size: 10px;
  color: #94a3b8;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.drawer-footer p span{
  color: #6366f1;
  font-weight: 700;
}

@media (max-width: 980px){
  .nav{ display:none; }
  .burger{ display:block; }
  .mega{ display:none; }
  .container{ width: min(var(--max), calc(100% - 32px)); }
}
