/* Capa de mejoras UX/UI: promo, héroe, cupón, barra de compra móvil, legales, esqueletos y ajustes responsive. */

/* ---------- promoción ---------- */
.promo-bar { position: relative; background: linear-gradient(90deg, var(--accent), var(--accent-2) 55%, #ec4899); color: #fff; font-size: 13.5px; }
.promo-in { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 9px 44px; text-align: center; flex-wrap: wrap; }
.promo-x { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: rgb(255 255 255 / 18%); color: #fff; border: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.promo-x:hover { background: rgb(255 255 255 / 30%); }
.promo-chip { display: flex; align-items: center; gap: 7px; background: var(--accent-soft); color: var(--accent); border-radius: 10px; padding: 7px 11px; font-weight: 650; font-size: 13px; margin: 10px 0 2px; }
.was { color: var(--muted); font-weight: 500; font-size: .86em; text-decoration: line-through; }
.now { color: var(--accent); font-weight: 800; }
.disc { color: var(--ok) !important; font-weight: 650; }
.saving { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); background: var(--ok-soft); border-radius: 99px; padding: 3px 11px; font-size: 12.5px; font-weight: 700; }
.coupon summary { cursor: pointer; display: inline-flex; align-items: center; gap: 7px; color: var(--accent); font-weight: 650; font-size: 14px; list-style: none; padding: 6px 0; }
.coupon summary::-webkit-details-marker { display: none; }
.coupon-ok { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; background: var(--ok-soft); color: var(--ok); border-radius: 12px; padding: 7px 8px 7px 12px; margin-top: 4px; }
.coupon-ok b { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .04em; }
.coupon-ok .btn { margin-left: auto; color: inherit; }

/* ---------- héroe y portada del home ---------- */
.hero { position: relative; overflow: hidden; padding: 52px 0 36px; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: radial-gradient(60% 80% at 85% 0%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%), radial-gradient(50% 70% at 0% 100%, color-mix(in srgb, #ec4899 18%, transparent), transparent 70%); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--hero-img, none) center right / cover no-repeat; opacity: .42; mask-image: linear-gradient(90deg, transparent 15%, #000 80%); -webkit-mask-image: linear-gradient(90deg, transparent 15%, #000 80%); }
.hero-in { display: grid; }
.hero-copy { max-width: 620px; }
.hero h1 { font-size: clamp(32px, 6vw, 56px); line-height: 1.05; letter-spacing: -0.035em; margin-top: 14px; }
.hero p { font-size: clamp(16px, 2.4vw, 19px); }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--accent); font-weight: 700; font-size: 13px; border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.searchbar { max-width: 520px; }
.filters { display: flex; gap: 12px; align-items: center; margin-top: 18px; } .filters .chips { flex: 1; } .input.city { width: auto; min-width: 170px; }
.featured { margin-top: 26px; } .featured h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; } .featured h2 .ico { color: #f59e0b; }
.featured-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 340px); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; }
.featured-row .ev { scroll-snap-align: start; }
.events { padding-bottom: 36px; }
.how { padding: 28px 0 8px; } .how h2 { font-size: 24px; margin-bottom: 18px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.step { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.step p { margin: 4px 0 0; font-size: 14px; } .step-n { width: 46px; height: 46px; flex: none; border-radius: 14px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.cta { margin: 34px 0 56px; padding: 28px clamp(18px, 4vw, 36px); border-radius: 22px; display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--surface)), color-mix(in srgb, var(--accent-2) 10%, var(--surface))); border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line)); }
.cta h2 { font-size: 22px; } .cta p { margin: 6px 0 0; max-width: 520px; }
.ev-price .was { margin-right: 2px; } .ev-price .now { font-weight: 800; }

/* esqueletos de carga */
.sk .cover, .sk-box { background: linear-gradient(100deg, var(--surface-2) 30%, var(--line) 50%, var(--surface-2) 70%); background-size: 300% 100%; animation: brillo 1.3s linear infinite; }
.sk .cover::before { display: none; }
.sk-line { display: block; height: 12px; border-radius: 6px; background: linear-gradient(100deg, var(--surface-2) 30%, var(--line) 50%, var(--surface-2) 70%); background-size: 300% 100%; animation: brillo 1.3s linear infinite; margin: 6px 0; }
.sk-line.w70 { width: 70%; height: 16px; } .sk-line.w50 { width: 50%; } .sk-line.w40 { width: 40%; }
@keyframes brillo { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ---------- página de evento ---------- */
.crumbs { padding: 16px 0 0; } .crumbs a { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-weight: 600; font-size: 14px; } .crumbs a:hover { color: var(--text); text-decoration: none; }
.evpage { padding-top: 14px; }
.trust { display: flex; gap: 10px 22px; flex-wrap: wrap; padding: 16px 0 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; font-weight: 600; } .trust span { display: inline-flex; align-items: center; gap: 7px; } .trust .ico { color: var(--accent); }
.tipo { border-radius: 12px; padding: 14px 10px; margin: 0 -10px; transition: background .15s; } .tipo.on { background: var(--accent-soft); }
.tipo .price { display: flex; gap: 6px; justify-content: flex-end; align-items: baseline; flex-wrap: wrap; }
.totalrow b { font-size: 26px; }
.buybar { display: none; }
@media (max-width: 900px) {
  .buybar { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--line); box-shadow: 0 -8px 30px rgb(0 0 0 / 10%); }
  .buybar[hidden] { display: none; } .buybar-total { font-size: 22px; letter-spacing: -0.02em; }
  .buybox .card > .btn.primary.lg { display: none; }
  .evpage { padding-bottom: 110px; }
}

/* ---------- entradas: en celular se deslizan una a una ---------- */
@media (max-width: 640px) {
  .tickets { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 86%; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; padding-bottom: 12px; margin: 0 calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none; }
  .ticket { scroll-snap-align: center; }
  .sheet .tickets { margin: 0; padding-inline: 0; }
}

/* ---------- pie ---------- */
.foot { margin-top: 20px; padding: 36px 0 28px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.foot-links { display: grid; gap: 8px; align-content: start; font-size: 14px; } .foot-links b { color: var(--text); margin-bottom: 2px; } .foot-links a { color: var(--muted); } .foot-links a:hover { color: var(--text); }
.foot-bottom { display: flex; gap: 8px 20px; justify-content: space-between; flex-wrap: wrap; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.foot-bottom a { color: var(--accent); font-weight: 600; }
@media (max-width: 720px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } footer.foot .container { display: block; } }

/* ---------- legales ---------- */
.legal { display: grid; gap: 14px; } .legal h1 { font-size: clamp(26px, 5vw, 34px); }
.legal h2 { font-size: 18px; margin-bottom: 6px; } .legal p, .legal li { line-height: 1.68; }
.legal ul { margin: 6px 0 0; padding-left: 22px; display: grid; gap: 6px; }
.legal-sec { display: grid; gap: 4px; padding-top: 14px; border-top: 1px solid var(--line); } .legal-sec .row { margin-top: 6px; }
.legal a { color: var(--accent); font-weight: 600; } .legal .kv dd { text-align: right; }

/* ---------- panel: primeros pasos ---------- */
.onboard { margin-bottom: 18px; border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 7%, var(--surface)), var(--surface)); }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.checklist li a { display: grid; gap: 1px; padding: 8px 10px; border-radius: 10px; flex: 1; } .checklist li a:hover { background: var(--surface-2); text-decoration: none; }
.checklist li { display: flex; align-items: center; gap: 10px; } .checklist .tick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; flex: none; color: #fff; }
.checklist li.done .tick { background: var(--ok); border-color: var(--ok); } .checklist li.done a { opacity: .6; } .checklist li.done b { text-decoration: line-through; }

/* ---------- responsive general ---------- */
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .topbar .container { height: 56px; gap: 8px; } .topbar nav .btn.ghost { display: none; } .brand { font-size: 17px; }
  .hero { padding: 30px 0 22px; } .searchbar { margin: 18px 0 8px; }
  .filters { flex-direction: column; align-items: stretch; gap: 8px; } .input.city { width: 100%; }
  .events { grid-template-columns: 1fr; gap: 16px; padding-top: 16px; } .featured-row { grid-auto-columns: 82%; }
  .cta .btn { width: 100%; } .page-head h1 { font-size: 24px !important; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; } .kpi { padding: 13px 14px; } .kpi b { font-size: 22px; }
  .card { padding: 16px; } .table-wrap { margin: 0; padding: 0; }
  .toolbar > * { flex: 1 1 100%; } .toolbar .btn { width: 100%; }
  .promo-in { padding: 8px 40px; font-size: 12.5px; } .promo-txt { display: none; }
  .sheet-body { padding: 8px 18px 22px; } .auth { padding: 16px; align-items: start; padding-top: 8vh; }
  .grid2 { grid-template-columns: 1fr !important; } .pos-cart { position: static; }
  .evpage .cover { aspect-ratio: 16 / 9; border-radius: 18px; } .info-row .ico-box { width: 38px; height: 38px; }
  .result .big { font-size: 30px; }
  .matrix th:first-child, .matrix td:first-child { min-width: 170px; }
  .tabs button { padding: 11px 12px; }
}
@media (min-width: 1500px) { .container { max-width: 1240px; } .main { max-width: 1360px; } }
@media (hover: none) { .ev:hover { transform: none; box-shadow: none; } .btn:hover { background: var(--surface); } .btn.primary:hover { filter: none; } .btn.ghost:hover { background: transparent; } }

/* ilustración del héroe: entrada de ejemplo */
.hero-in { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 40px; }
.hero-art { display: none; }
@media (min-width: 960px) { .hero-art { display: block; padding: 0 40px 0 0; } }
.mini-ticket { width: 230px; background: var(--surface); border-radius: 26px; box-shadow: var(--shadow-lg); transform: rotate(5deg); overflow: hidden; text-align: center; border: 1px solid var(--line); padding-bottom: 14px; }
.mini-top { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; padding: 16px 18px; text-align: left; display: grid; } .mini-top b { font-size: 22px; letter-spacing: -0.02em; }
.mini-qr { margin: 16px auto 8px; width: 150px; height: 150px; background: #fff; border-radius: 12px; padding: 4px; } .mini-qr img { width: 100%; height: 100%; }

/* ======================= RESPONSIVE v3 ======================= */
/* Tablet: el menú lateral pasa a un riel de íconos */
@media (min-width: 901px) and (max-width: 1180px) {
  .shell { grid-template-columns: 78px minmax(0, 1fr); }
  .side { padding: 14px 10px; align-items: stretch; }
  .side .brand { padding: 4px 0 14px; justify-content: center; font-size: 0; gap: 0; } .side .brand .brand-mark { font-size: 16px; }
  .nav-group { font-size: 0; padding: 0; height: 1px; margin: 10px 16px; background: var(--line); overflow: hidden; }
  .nav-item { justify-content: center; padding: 12px 0; } .nav-item > span:not(.n) { display: none; }
  .nav-item .n { position: absolute; top: 4px; right: 6px; margin: 0; padding: 0 5px; font-size: 10px; }
  .nav-item:hover { padding-left: 0; } .nav-item[aria-current="page"]::before { left: -10px; }
  .me { justify-content: center; padding: 6px 0; } .me > span:last-child { display: none; }
  .side-foot .row { flex-direction: column; } .side-foot .btn.grow { display: none; }
  .main { padding-inline: 22px; }
  .grid2 { grid-template-columns: 1fr; }
  .events { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}
@media (min-width: 641px) and (max-width: 900px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .events { grid-template-columns: repeat(2, 1fr); }
  .container { padding-inline: 24px; }
  .tickets { grid-template-columns: repeat(2, 1fr); }
}

/* Celular: objetivos táctiles de 44 px, tipografía 16 px (evita el zoom de iOS) y acciones a ancho completo */
@media (max-width: 640px) {
  body { font-size: 15px; }
  .input, select.input, textarea.input { font-size: 16px; min-height: 46px; }
  .btn { min-height: 44px; } .btn.sm { min-height: 38px; } .btn.icon { width: 44px; } .btn.icon.sm { width: 38px; }
  .stepper button { width: 44px; height: 44px; } .stepper output { min-width: 36px; font-size: 17px; }
  .chip { padding: 9px 16px; } .seg button { padding: 9px 14px; }
  .page-head { align-items: stretch; } .page-head > .row { width: 100%; } .page-head > .row > .btn { flex: 1 1 auto; }
  h1 { font-size: clamp(24px, 7.4vw, 30px); } h2 { font-size: 18px; }
  .hero h1 { font-size: clamp(30px, 9.4vw, 40px); }
  .hero-copy > .searchbar { max-width: none; }
  .pm { padding: 14px; } .tipo { gap: 10px; }
  .sheet-head { padding: 14px 10px 6px 18px; } .sheet-head h2 { font-size: 18px; }
  .sheet-body { padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .table tr { padding: 10px 4px; } .table td { padding: 6px 12px; }
  .kv { font-size: 14px; }
  .foot-grid { gap: 20px; } .foot-links { font-size: 14.5px; } .foot-bottom { flex-direction: column; gap: 6px; }
  .result { padding: 18px; } .result .who { font-size: 20px; }
  .scanbox { aspect-ratio: 3 / 4; max-height: 58dvh; border-radius: 18px; }
  .counter b { font-size: 30px; }
  .ticket-qr { padding: 18px; } .qr { width: min(240px, 78%); }
  .legal h1 { font-size: 26px; }
  .tabs { margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .matrix th, .matrix td { padding: 8px 10px; }
  .perm-row { grid-template-columns: 1fr; gap: 8px; } .perm-row .seg { justify-self: start; }
  .bars { height: 120px; gap: 3px; } .bar span { font-size: 9px; }
  .cover .cat { font-size: 11px; } .datebadge b { font-size: 18px; }
  .buybox .card { padding: 16px; }
  .auth .card { padding: 22px; }
}
/* Pantallas muy chicas (320 px) */
@media (max-width: 360px) {
  :root { --gutter: 14px; }
  .topbar .container { gap: 6px; } .brand { font-size: 16px; } .brand-mark { width: 28px; height: 28px; }
  .topbar nav .btn.sm { padding: 0 10px; font-size: 12.5px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 8px; } .kpi b { font-size: 19px; }
  .featured-row { grid-auto-columns: 88%; } .tickets { grid-auto-columns: 90%; }
  .buybar { gap: 8px; } .buybar .btn { padding: 0 18px; }
  .promo-in { font-size: 12px; padding: 7px 38px; }
}
/* Celular en horizontal: hojas y barras sin tapar el contenido */
@media (max-height: 480px) and (orientation: landscape) {
  .sheet { max-height: 96dvh; } .mobilebar { padding-block: 2px; } .mobilebar a, .mobilebar button { padding: 3px; font-size: 10px; }
  .scanbox { max-height: 70dvh; aspect-ratio: 16 / 9; } .hero { padding: 24px 0 16px; } .buybar { padding-block: 8px; }
}
/* Monitores grandes */
@media (min-width: 1700px) { .events { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); } .hero h1 { font-size: 62px; } }
/* Notch / barras del sistema */
.topbar { padding-top: env(safe-area-inset-top); } .main { padding-left: max(clamp(16px, 3vw, 40px), env(safe-area-inset-left)); padding-right: max(clamp(16px, 3vw, 40px), env(safe-area-inset-right)); }
/* Impresión de entradas */
@media print { .promo-bar, .buybar, .hero-art { display: none !important; } .rv { opacity: 1 !important; transform: none !important; } }

/* Barra de herramientas de las listas: el buscador nunca se aplasta, los filtros saltan de línea */
.toolbar > .grow { flex: 1 1 240px; min-width: min(100%, 240px); }
.toolbar > select.input { flex: 0 1 190px; min-width: 150px; }
.toolbar > .btn { flex: none; }
@media (max-width: 640px) { .toolbar > .grow, .toolbar > select.input, .toolbar > .btn { flex: 1 1 100%; min-width: 0; } }
