/* ==========================================================================
   TICKETU · Página de evento principal  (/event/{friendlyurl})
   Usa los tokens definidos en main.css
   ========================================================================== */

.ev { --ev-radius: var(--r-lg); }

/* tamaños de botón extra */
.btn--lg { padding: .9em 1.6em; font-size: 1.02rem; min-height: 52px; }
.btn--ghost-dark { background: rgba(255,255,255,.12); color:#fff; border:1.5px solid rgba(255,255,255,.4); }
.btn--ghost-dark:hover { background: rgba(255,255,255,.22); border-color:#fff; transform: translateY(-2px); }

/* ============ HERO ============ */
.ev-hero { position: relative; color:#fff; isolation:isolate; overflow:hidden; }
.ev-hero__bg {
  position:absolute; inset:0; z-index:-2;
  background-size:cover; background-position:center;
  transform: scale(1.08); filter: saturate(1.05);
}
.ev-hero__bg::after { content:""; position:absolute; inset:0; backdrop-filter: blur(4px); }
.ev-hero__scrim {
  position:absolute; inset:0; z-index:-1;
  background:
    linear-gradient(180deg, rgba(22,17,13,.35) 0%, rgba(22,17,13,.72) 55%, rgba(22,17,13,.94) 100%),
    radial-gradient(120% 80% at 15% 0%, rgba(255,102,0,.28), transparent 60%);
}
.ev-hero__inner { padding-block: 26px 48px; }

.ev-crumbs { display:flex; flex-wrap:wrap; align-items:center; gap:8px; font-size:.86rem; color:rgba(255,255,255,.75); margin-bottom:28px; }
.ev-crumbs a:hover { color:#fff; text-decoration:underline; }
.ev-crumbs b { color:#fff; font-weight:600; }
.ev-crumbs span { opacity:.5; }

.ev-hero__grid { display:grid; grid-template-columns: 300px 1fr; gap: clamp(24px,4vw,52px); align-items:end; }
.ev-hero__poster {
  margin:0; border-radius: var(--r-lg); overflow:hidden; aspect-ratio: 3/4;
  box-shadow: var(--shadow-3); border:1px solid rgba(255,255,255,.16); background:#211a14;
}
.ev-hero__poster img { width:100%; height:100%; object-fit:cover; }

.ev-hero__eyebrow { color:#fff; opacity:.85; }
.ev-hero__title {
  font-size: clamp(2rem, 5.2vw, 3.6rem); margin:.18em 0 .55em;
  text-shadow: 0 2px 30px rgba(0,0,0,.4);
}
.ev-facts { list-style:none; padding:0; margin:0 0 26px; display:flex; flex-direction:column; gap:11px; }
.ev-facts li { display:flex; align-items:center; gap:11px; font-size:1.02rem; color:rgba(255,255,255,.94); }
.ev-facts svg { width:20px; height:20px; flex:none; color:var(--orange-200); }

.ev-hero__cta { display:flex; flex-wrap:wrap; gap:12px; }

/* ---- Hero centrado (solo título, ubicación y funciones) ---- */
.ev-hero__grid--center { grid-template-columns: 1fr; justify-items:center; text-align:center; }
.ev-hero__grid--center .ev-hero__meta { display:flex; flex-direction:column; align-items:center; max-width:760px; }
.ev-hero__grid--center .ev-facts { align-items:center; }
.ev-hero__grid--center .ev-facts li { justify-content:center; }
.ev-hero__grid--center .ev-hero__cta { justify-content:center; width:auto; }
.ev-hero__grid--center .ev-hero__cta .btn { flex:none; }

/* ---- Imagen del evento (arriba de "Acerca del evento") ---- */
.ev-poster {
  margin:0; border-radius: var(--r-lg); overflow:hidden;
  box-shadow: var(--shadow-3); border:1px solid var(--border, rgba(0,0,0,.08)); background:#211a14;
}
.ev-poster img { width:100%; height:auto; display:block; object-fit:cover; }

/* ============ BODY LAYOUT ============ */
.ev-body {
  display:grid; grid-template-columns: minmax(0,1fr) 360px; gap: clamp(20px,3vw,34px);
  padding-block: clamp(32px,5vw,56px);
  align-items:start;
}
.ev-main { display:flex; flex-direction:column; gap:22px; min-width:0; }
.ev-aside { display:flex; flex-direction:column; gap:22px; position:sticky; top:90px; }

.ev-card {
  background: var(--surface); border:1px solid var(--line);
  border-radius: var(--r-lg); padding: clamp(20px,3vw,30px);
  box-shadow: var(--shadow-1);
}
.ev-h2 { font-size: 1.32rem; margin-bottom:4px; }
.ev-h2__sub { color: var(--muted); font-size:.95rem; margin-bottom:18px; }
.ev-card .ev-h2 + .ev-h2__sub { margin-top:2px; }

/* descripción (HTML del admin) */
.ev-desc { color: var(--text); line-height:1.7; margin-top:12px; }
.ev-desc :where(p,ul,ol) { margin-bottom:.9em; }
.ev-desc img { border-radius: var(--r-md); margin:.6em 0; }
.ev-desc a { color: var(--orange-700); text-decoration:underline; }
.ev-desc h1,.ev-desc h2,.ev-desc h3 { margin:.8em 0 .35em; }

/* ============ FECHAS / SUBEVENTOS ============ */
.ev-dates { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:12px; }
.ev-date {
  display:grid; grid-template-columns: 72px 1fr auto; gap:18px; align-items:center;
  padding:16px; border:1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); transition: border-color .2s, box-shadow .2s, transform .2s;
}
.ev-date:hover { border-color: var(--orange-200); box-shadow: var(--shadow-1); transform: translateY(-1px); }
.ev-date.is-off { opacity:.62; }
.ev-date.is-off:hover { transform:none; box-shadow:none; border-color:var(--line); }

.ev-date__cal {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  width:72px; height:78px; border-radius: var(--r-md);
  background: linear-gradient(160deg, var(--orange-100), #fff);
  border:1px solid var(--orange-200); color: var(--orange-700); line-height:1;
}
.ev-date__m { font-size:.74rem; font-weight:800; text-transform:uppercase; letter-spacing:.08em; }
.ev-date__d { font-family:"Bricolage Grotesque",sans-serif; font-size:1.7rem; font-weight:800; color: var(--ink); margin:2px 0; }
.ev-date__y { font-size:.72rem; color: var(--muted); }

.ev-date__info { min-width:0; }
.ev-date__info h3 { font-size:1.08rem; margin-bottom:6px; }
.ev-date__sub { display:flex; flex-direction:column; gap:4px; }
.ev-date__sub span { display:flex; align-items:center; gap:7px; color: var(--muted); font-size:.9rem; }
.ev-date__sub svg { width:15px; height:15px; flex:none; color: var(--orange-700); }
.ev-date__action { justify-self:end; }

.ev-badge { display:inline-flex; align-items:center; padding:.5em 1em; border-radius:999px; font-weight:700; font-size:.84rem; }
.ev-badge--off { background:#efeae6; color: var(--muted); }
.ev-badge--soon { background: var(--blue-100); color: var(--blue); }

.ev-empty { text-align:center; padding:34px 10px; color: var(--muted); }
.ev-empty svg { color: var(--line-2); margin-bottom:10px; }

/* ============ PROMOTOR ============ */
.ev-promo__row { display:flex; align-items:center; gap:14px; margin:14px 0 18px; }
.ev-promo__logo {
  width:60px; height:60px; flex:none; border-radius:14px; overflow:hidden;
  display:grid; place-items:center; background: var(--orange-100); color: var(--orange-700);
  border:1px solid var(--orange-200);
}
.ev-promo__logo img { width:100%; height:100%; object-fit:cover; }
.ev-promo__logo svg { width:28px; height:28px; }
.ev-promo__logo.is-empty { background: var(--orange-100); }
.ev-promo__row strong { font-size:1.05rem; }
.ev-promo__role { color: var(--muted); font-size:.88rem; }

/* ============ MAPA ============ */
.ev-map__venue { font-weight:700; margin-top:12px; }
.ev-map__addr { color: var(--muted); font-size:.92rem; margin:4px 0 14px; line-height:1.5; }
.ev-map__none { color: var(--muted); font-size:.92rem; margin-top:10px; }
.ev-map__frame {
  border-radius: var(--r-md); overflow:hidden; border:1px solid var(--line);
  aspect-ratio: 4/3; margin-bottom:14px; background: var(--bg);
}
.ev-map__frame iframe { width:100%; height:100%; border:0; display:block; }

/* ============ PUNTOS DE VENTA (dentro de Ubicación del evento) ============ */
.ev-sale { margin-top:20px; padding-top:18px; border-top:1px solid var(--line); }
.ev-sale__h { font-size:1.06rem; font-weight:800; }
.ev-sale__sub { color: var(--muted); font-size:.88rem; margin:3px 0 14px; }
.ev-sale__list { list-style:none; padding:0; margin:0; display:grid; gap:12px; }
.ev-sale__item {
  display:flex; gap:12px; padding:13px;
  border:1px solid var(--line); border-radius: var(--r-md); background: var(--bg);
}
.ev-sale__ic {
  width:38px; height:38px; flex:none; display:grid; place-items:center;
  border-radius:11px; background: var(--orange-100); color: var(--orange-700);
}
.ev-sale__ic svg { width:19px; height:19px; }
.ev-sale__body { min-width:0; }
.ev-sale__body strong { display:block; font-size:.97rem; margin-bottom:3px; }
.ev-sale__addr,
.ev-sale__city { color: var(--muted); font-size:.87rem; line-height:1.45; }
.ev-sale__tel,
.ev-sale__map {
  display:inline-flex; align-items:center; gap:6px;
  margin-top:8px; font-size:.87rem; font-weight:700; text-decoration:none;
}
.ev-sale__tel { color: var(--muted); }
.ev-sale__tel:hover { color: var(--orange-700); }
.ev-sale__tel svg { width:15px; height:15px; }

/* Botón "VER MAPA" (sólo aparece si e_ubicacionventa.urlmap trae URL) */
.ev-sale__map {
  padding:8px 14px; border-radius: var(--r-sm);
  background: var(--orange); color:#fff;
  font-size:.8rem; letter-spacing:.03em;
  border:1px solid transparent;
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.ev-sale__map:hover {
  background: var(--orange-600); color:#fff;
  box-shadow:0 6px 16px rgba(255,102,0,.32); transform:translateY(-1px);
}
.ev-sale__map:focus-visible { outline:2px solid var(--orange-700); outline-offset:2px; }
.ev-sale__map svg { width:15px; height:15px; }
.ev-sale__map .ev-sale__ext { width:13px; height:13px; opacity:.85; }
.ev-sale__tel + .ev-sale__map { margin-left:14px; }

/* ============ STICKY BAR MÓVIL ============ */
.ev-stickybar { display:none; }
/* se oculta mientras la sección "Fechas y funciones" está a la vista */
.ev-stickybar.is-hidden { display:none !important; }
#fechas { scroll-margin-top: 16px; }
html { scroll-behavior: smooth; }

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .ev-body { grid-template-columns: 1fr; }
  .ev-aside { position:static; }
}
@media (max-width: 720px) {
  .ev-hero__grid { grid-template-columns: 1fr; align-items:start; }
  .ev-hero__poster { width: 190px; aspect-ratio:3/4; }
  .ev-hero__cta { width:100%; }
  .ev-hero__cta .btn { flex:1; }

  .ev-date { grid-template-columns: 60px 1fr; }
  .ev-date__cal { width:60px; height:68px; }
  .ev-date__d { font-size:1.45rem; }
  .ev-date__action { grid-column: 1 / -1; justify-self:stretch; }
  .ev-date__action .btn { width:100%; }
  .ev-date__action .ev-badge { width:100%; justify-content:center; }

  /* barra fija inferior para compra rápida */
  .ev-stickybar {
    position: fixed; left:0; right:0; bottom:0; z-index: var(--z-sticky);
    display:flex; align-items:center; justify-content:space-between; gap:12px;
    margin:10px; padding:13px 18px; border-radius:999px;
    background: var(--orange); color:#fff; font-weight:600;
    box-shadow: 0 10px 30px rgba(214,70,0,.4);
  }
  .ev-stickybar b { display:block; font-size:1rem; }
  .ev-stickybar small { opacity:.9; font-size:.78rem; }
  main.ev { padding-bottom: 86px; }
}

/* ══════════════════════════════════════════════════════════════════
   Botón/badge PRECIOS y modal de precios (antes inline en Event/Index)
   ══════════════════════════════════════════════════════════════════ */
/* Botón/badge PRECIOS bajo el botón Comprar */
.ev-date__action { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.ev-precios-badge {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: .35em .9em; border-radius: 999px; cursor: pointer;
    font-weight: 700; font-size: .72rem; letter-spacing: .04em;
    color: var(--primary, #ff6600); background: rgba(255,102,0,.10);
    border: 1.5px solid rgba(255,102,0,.35); transition: all .18s ease;
}
.ev-precios-badge:hover { background: rgba(255,102,0,.18); border-color: var(--primary, #ff6600); }

/* Modal de precios */
.evp-modal { position: fixed; inset: 0; z-index: 1200; display: none; }
.evp-modal.open { display: block; }
.evp-modal__backdrop { position: absolute; inset: 0; background: rgba(20,15,10,.55); backdrop-filter: blur(2px); }
.evp-modal__dialog {
    position: relative; max-width: 460px; margin: 8vh auto 0; background: #fff;
    border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.3); overflow: hidden;
    animation: evpIn .2s ease;
}
@keyframes evpIn { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.evp-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 18px 20px; background: linear-gradient(135deg,#ff6b35 0%,#f7931e 100%); color: #fff;
}
.evp-head h3 { font-size: 1.02rem; margin: 0; }
.evp-head p { font-size: .78rem; margin: 2px 0 0; opacity: .92; }
.evp-x { background: rgba(255,255,255,.2); border: 0; color: #fff; width: 32px; height: 32px;
         border-radius: 50%; cursor: pointer; font-size: 18px; line-height: 1; flex: 0 0 auto; }
.evp-x:hover { background: rgba(255,255,255,.34); }
.evp-body { padding: 8px 20px 4px; max-height: 46vh; overflow-y: auto; }
.evp-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
           padding: 13px 2px; border-bottom: 1px solid #f0f0f0; }
.evp-row:last-child { border-bottom: 0; }
.evp-dot { width: 18px; height: 18px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(0,0,0,.05); }
.evp-sec { font-weight: 600; font-size: .92rem; color: #222; }
.evp-price { font-weight: 800; font-size: .98rem; color: #1a1a2e; }
.evp-price small { font-weight: 600; font-size: .72rem; color: #888; display: block; }
.evp-empty, .evp-loading { text-align: center; color: #999; padding: 26px 10px; font-size: .9rem; }
.evp-foot { padding: 16px 20px 20px; }
.evp-search {
    display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
    padding: 13px; border: 0; border-radius: 12px; cursor: pointer;
    font-weight: 700; font-size: .96rem; color: #fff;
    background: linear-gradient(135deg,#ff6b35 0%,#f7931e 100%);
    box-shadow: 0 6px 18px rgba(255,107,53,.35); transition: transform .15s ease;
}
.evp-search:hover { transform: translateY(-2px); }
