* {
  box-sizing: border-box;
}

:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --text: #111827;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.08);
  --line-soft: rgba(15, 23, 42, 0.05);

  --red: #6b21a8;
  --red-dark: #4a1a6b;
  --red-soft: rgba(107, 33, 168, 0.08);

  --shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.07);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at 18% 0%, rgba(107, 33, 168, 0.06), transparent 30%),
    radial-gradient(circle at 90% 8%, rgba(16, 24, 39, 0.06), transparent 24%),
    linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  color: var(--text);
}

/* NAVBAR */

.events-navbar {
  width: min(1180px, calc(100% - 32px));
  margin: 18px auto 0;
  padding: 14px 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 16px 36px rgba(107, 33, 168, 0.22);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: sticky;
  top: 14px;
  z-index: 80;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  font-weight: 1000;
}

.brand img {
  width: 132px;
  max-height: 42px;
  object-fit: contain;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-actions a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  padding: 10px 14px;
  border-radius: 999px;
}

.nav-actions a:hover,
.nav-actions a.active {
  background: rgba(255, 255, 255, 0.14);
}

.nav-actions i {
  font-size: 18px;
}

/* PAGE */

.events-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 54px;
}

/* HERO */
.events-top {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 22px;
}

.events-top h1 {
  margin: 10px 0 0;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 0.95;
  font-weight: 1000;
  letter-spacing: -1.6px;
  color: var(--red);
}

.eyebrow,
.section-label {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(107, 33, 168, 0.1);
  color: var(--red);
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.see-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--red);
  font-size: 14px;
  font-weight: 900;
}

.see-all i {
  font-size: 18px;
}

@media (max-width: 760px) {
  .events-top {
    align-items: center;
    margin-bottom: 18px;
  }

  .events-top h1 {
    display: none;
  }

  .eyebrow {
    display: block !important;
    margin: 0;
  }

  .see-all {
    display: inline-flex !important;
    font-size: 13px;
  }
}

/* SLIDER */

.slider-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.slider-bar.hidden {
  display: none !important;
}

.dots {
  display: flex;
  gap: 7px;
  margin-top: 10px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #cbd5e1;
}

.dot.active {
  width: 22px;
  background: var(--red);
}

.slider-actions {
  display: flex;
  gap: 10px;
}

.nav-btn {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.nav-btn i {
  font-size: 20px;
}

.nav-btn:hover,
.nav-btn.active {
  color: var(--red);
  border-color: rgba(107, 33, 168, 0.25);
  background: var(--red-soft);
}

/* GRID */

.estado {
  color: var(--muted);
  padding: 24px 0;
  font-weight: 800;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

/* Cuando hay pocas cards, centrarlas */
.events-grid.cards-1 { grid-template-columns: minmax(0, 480px); justify-content: center; }
.events-grid.cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* CARD */

.event-card {
  border-radius: 20px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.event-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 36px rgba(15, 23, 42, 0.12);
}

.event-art {
  aspect-ratio: 16 / 9;
  background: #eef2f7;
  overflow: hidden;
}

.event-art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center top;
}

.event-info {
  padding: 14px;
  background: #fff;
}

.buy-btn {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 1000;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: 0 10px 22px rgba(107, 33, 168, 0.24);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.buy-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(107, 33, 168, 0.3);
}

/* RESPONSIVE */

@media (max-width: 940px) {
  .events-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .events-navbar {
    width: min(100% - 24px, 1180px);
    padding: 12px;
    border-radius: 18px;
  }

  .brand span,
  .nav-actions a span {
    display: none;
  }

  .brand img {
    width: 110px;
  }

  .nav-actions a {
    width: 38px;
    height: 38px;
    padding: 0;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
  }

  .events-hero {
    flex-direction: column;
    align-items: start;
    margin-bottom: 22px;
  }

  .see-all {
    display: none;
  }
}

@media (max-width: 620px) {
  .events-page {
    width: min(100% - 24px, 1180px);
    padding-top: 24px;
  }

  .slider-bar {
    margin-bottom: 20px;
  }

  .events-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .event-art {
    height: 190px;
  }

  .buy-btn {
    height: 48px;
    font-size: 13px;
  }
}

@media (max-width: 620px) {
  .event-art {
    height: auto;
    aspect-ratio: 16 / 9;
    background: #0f172a;
  }

  .event-art img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
  }

  .event-info {
    padding: 12px;
  }

  .buy-btn {
    height: 46px;
    border-radius: 12px;
  }
}

.loading-state {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}

.ball-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.loading-state strong {
  font-size: 1rem;
  font-weight: 700;
  color: #111;
}

.loading-state small {
  font-size: 0.85rem;
  color: #666;
}

.all-events-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: visible;
  gap: 18px;
}

@media (max-width: 760px) {
  .all-events-grid {
    grid-template-columns: 1fr;
  }
}

.month-block {
  display: grid;
  gap: 14px;
}

.month-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.month-head h2 {
  margin: 0;
  color: #0f172a;
  font-size: 24px;
  font-weight: 1000;
  text-transform: capitalize;
}

.month-head span {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(107, 33, 168, 0.08);
  color: #6b21a8;
  font-size: 12px;
  font-weight: 1000;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 760px) {
  .month-grid {
    grid-template-columns: 1fr;
  }
}

/* TODOS LOS EVENTOS */

.all-events-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 34px !important;
  overflow: visible !important;
  transform: none !important;
}

.month-block {
  width: 100%;
  display: grid;
  gap: 16px;
}

.month-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.month-head h2 {
  margin: 0;
  color: #0f172a;
  font-size: 26px;
  font-weight: 1000;
  text-transform: capitalize;
}

.month-head span {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(107, 33, 168, 0.08);
  color: #6b21a8;
  font-size: 12px;
  font-weight: 1000;
}

.month-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.month-grid .event-card {
  width: 100% !important;
  min-width: 0 !important;
  transform: none !important;
}

.month-grid .event-card img {
  height: 260px;
  object-fit: cover;
}

@media (max-width: 760px) {
  .month-grid {
    grid-template-columns: 1fr;
  }

  .month-grid .event-card img {
    height: 210px;
  }
}

/* ══════════════════════════════════════
   FOOTER KAI EXPERIENCE
══════════════════════════════════════ */

.kai-footer {
  margin-top: 40px;
  margin-bottom: 24px;
  padding: 16px 24px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: 0 16px 36px rgba(107, 33, 168, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.kai-footer span {
  color: rgba(255, 255, 255, 0.80);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.kai-footer img {
  height: 26px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.90;
  transition: opacity 0.2s ease;
}

.kai-footer img:hover {
  opacity: 1;
}

/* ══════════════════════════════════════
   DESKTOP: slider oculto en móvil
══════════════════════════════════════ */

/* Desktop: slider visible, grid como scroll horizontal */
.desktop-only {
  display: flex;
}

/* ══════════════════════════════════════
   MÓVIL: grid de cards, sin slider
══════════════════════════════════════ */

@media (max-width: 760px) {
  /* Ocultar flechas y dots completamente */
  .desktop-only {
    display: none !important;
  }

  /* Grid de cards en 1 columna */
  .events-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    overflow: visible !important;
    transform: none !important;
    scroll-snap-type: none !important;
  }

  /* Cada card: ancho completo, sin min-width forzado */
  .events-grid .event-card {
    width: 100% !important;
    min-width: 0 !important;
    scroll-snap-align: none !important;
    flex: none !important;
  }

  /* Imagen: aspect ratio bonito en móvil */
  .events-grid .event-art {
    height: auto !important;
    aspect-ratio: 16 / 9;
  }

  .events-grid .event-art img {
    object-fit: cover !important;
  }
}

@media (min-width: 761px) and (max-width: 940px) {
  .events-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* ══════════════════════════════════════
   BOTTOM NAV — ESTILO APP
══════════════════════════════════════ */

.bottom-nav {
  display: none;
}

@media (max-width: 760px) {
  body {
    padding-bottom: 72px;
  }

  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 150;
    background: #fff;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
    padding: 8px 0 env(safe-area-inset-bottom, 8px);
  }

  .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    padding: 4px 0;
    transition: color 0.15s;
  }

  .bottom-nav-item i {
    font-size: 22px;
    line-height: 1;
  }

  .bottom-nav-item.active {
    color: var(--red);
  }

  .events-navbar,
  .orders-navbar {
    display: none !important;
  }
}

/* ── Header móvil con logo ── */
.mobile-top-bar {
  display: none;
}

@media (max-width: 760px) {
  .mobile-top-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px 10px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    border-radius: 0 0 20px 20px;
    margin-bottom: 16px;
    box-shadow: 0 6px 20px rgba(107, 33, 168, 0.22);
  }

  .mobile-top-bar img {
    height: 36px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
  }
}

/* ── Badge de fecha sobre la imagen del evento ── */
.event-art {
  position: relative;
}

.event-date-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}

.event-date-badge i {
  font-size: 14px;
  color: var(--red);
}

/* ── Nombre del evento en la card ── */
.event-card-name {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ══════════════════════════════════════
   EVENTOS.PHP — CARDS ESTILO BANORTE
   (misma estructura que eventos-banorte)
══════════════════════════════════════ */

/* Grid principal: 2 columnas en desktop, 1 en móvil */
.events-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 20px !important;
  overflow: visible !important;
  transform: none !important;
  scroll-snap-type: none !important;
}

.events-grid.cards-1 {
  grid-template-columns: minmax(0, 560px) !important;
  justify-content: center;
}

@media (max-width: 680px) {
  .events-grid,
  .events-grid.cards-2 {
    grid-template-columns: 1fr !important;
  }
}

/* Card clickeable */
.events-grid .event-card {
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  transform: none;
}

.events-grid .event-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 40px rgba(15, 23, 42, 0.12);
}

/* Imagen superior */
.events-grid .event-card > img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Cuerpo */
.events-grid .event-card .event-card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.events-grid .event-card .event-date {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.events-grid .event-card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 1000;
  color: #0f172a;
  line-height: 1.3;
}

/* Botón */
.events-grid .event-card button {
  margin-top: auto;
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 1000;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: 0 10px 22px rgba(107, 33, 168, 0.24);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.events-grid .event-card button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(107, 33, 168, 0.32);
}