/* ASTRA — detalle + butacas + confirmación */

/* ============ DETALLE ============ */
.detail-hero { position: relative; }
.detail-bg { position: absolute; inset: 0; height: 100%; }
.detail-bg image-slot { position: absolute; inset: 0; width: 100%; height: 100%; }
.detail-bg image-slot::part(frame) { background: transparent; }
.detail-bg image-slot::part(ring), .detail-bg image-slot::part(empty) { display: none; }
.detail-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, var(--bg) 1%, rgba(12,10,13,.78) 35%, rgba(12,10,13,.6) 100%),
              linear-gradient(90deg, rgba(12,10,13,.9), rgba(12,10,13,.4) 70%);
}
.detail-hero-inner { position: relative; padding: 24px 28px 50px; }
.back-btn { margin-bottom: 30px; }
.detail-hero-grid { display: grid; grid-template-columns: 300px 1fr; gap: 44px; align-items: end; }
.detail-poster { width: 300px; box-shadow: var(--shadow); border-radius: var(--r); }
.detail-poster .poster { box-shadow: var(--shadow); }
.detail-title { font-size: clamp(38px, 5.5vw, 72px); line-height: .94; }
.detail-tag { font-size: clamp(17px, 2vw, 22px); color: var(--ink-soft); margin: 14px 0 18px; max-width: 600px; }
.detail-meta { font-size: 15px; align-items: center; }
.detail-syn { color: var(--ink-soft); max-width: 640px; margin: 22px 0 0; font-size: 16px; line-height: 1.65; }
.detail-credits { display: grid; gap: 12px; margin-top: 24px; max-width: 640px; }
.detail-credits > div { display: grid; grid-template-columns: 120px 1fr; gap: 14px; font-size: 14.5px; align-items: baseline; }
.cr-label { font-size: 11px; letter-spacing: .12em; color: var(--faint); }

/* showtimes */
.showtimes { padding-top: 50px; }
.st-toolbar { margin-bottom: 28px; }
.loc-lg { padding: 11px 18px; font-size: 15px; }
.st-block { padding: 22px 0; border-top: 1px solid var(--line); }
.st-block:first-of-type { border-top: 0; }
.st-label { display: flex; align-items: center; gap: 9px; font-size: 12px; letter-spacing: .12em; color: var(--muted); margin-bottom: 16px; }

.date-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.date-chip {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 72px; padding: 12px 10px; border-radius: var(--r); border: 1px solid var(--line-2);
  background: var(--panel); color: var(--ink-soft); transition: all .16s var(--ease);
}
.date-chip:hover { border-color: var(--line-2); color: var(--ink); transform: translateY(-2px); }
.date-chip.on { background: var(--panel-2); border-color: var(--gold); color: var(--ink); }
.dc-dow { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.dc-day { font-family: "Archivo", sans-serif; font-weight: 800; font-size: 26px; line-height: 1; }
.date-chip.on .dc-day { color: var(--gold); }
.dc-mon { font-size: 11px; color: var(--muted); }

.fmt-tab {
  padding: 10px 18px; border-radius: 7px; border: 1px solid var(--line-2);
  background: var(--panel); color: var(--ink-soft); font-weight: 600; font-size: 14px; letter-spacing: .02em;
  transition: all .16s var(--ease);
}
.fmt-tab:hover { color: var(--ink); }
.fmt-tab.on { background: var(--gold); border-color: var(--gold); color: #25180a; }

.times-row { display: flex; gap: 11px; flex-wrap: wrap; }
.time-chip {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 11px 20px; border-radius: var(--r); border: 1px solid var(--line-2);
  background: var(--panel); color: var(--ink); font-weight: 700; font-size: 17px;
  transition: all .16s var(--ease); position: relative;
}
.time-chip:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.tc-lang { font-size: 10px; letter-spacing: .1em; color: var(--muted); font-weight: 400; }
.time-chip:hover .tc-lang { color: var(--gold-deep); }

/* trailer modal */
.modal-back { position: fixed; inset: 0; z-index: 100; background: rgba(6,4,8,.82); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 24px; animation: fadeUp .25s var(--ease); }
.trailer-modal { width: min(900px, 100%); }
.trailer-frame { position: relative; aspect-ratio: 16/9; border-radius: var(--r-lg); overflow: hidden; display: grid; place-items: center; border: 1px solid var(--line-2); }
.trailer-play { width: 78px; height: 78px; border-radius: 50%; border: 0; background: var(--gold); display: grid; place-items: center; box-shadow: 0 10px 30px -8px rgba(0,0,0,.6); transition: transform .2s; }
.trailer-play:hover { transform: scale(1.06); }
.trailer-cap { position: absolute; bottom: 16px; left: 18px; font-size: 12px; letter-spacing: .12em; color: rgba(255,255,255,.85); }
.modal-close { margin: 16px auto 0; display: flex; }

/* ============ STEPPER de flujo ============ */
.flow-steps { display: flex; align-items: center; gap: 10px; margin: 26px 0 14px; flex-wrap: wrap; }
.flow-step { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 14px; color: var(--faint); }
.flow-step .flow-num { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); font-size: 13px; font-family: "Space Mono", monospace; }
.flow-step.on { color: var(--ink); }
.flow-step.on .flow-num { border-color: var(--gold); color: var(--gold); }
.flow-step.done { color: var(--ink-soft); }
.flow-step.done .flow-num { background: var(--gold); border-color: var(--gold); color: #25180a; }
.flow-line { width: 30px; height: 1px; background: var(--line-2); }

/* ============ resumen de función ============ */
.show-summary { display: flex; gap: 18px; align-items: center; margin: 20px 0 8px; padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); }
.ss-poster { position: relative; width: 64px; height: 88px; border-radius: 10px; overflow: hidden; flex: none; }
.ss-rating { position: absolute; top: 6px; left: 6px; min-width: 24px; height: 20px; font-size: 11px; }
.ss-title { font-size: 24px; letter-spacing: -.02em; }
.ss-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* ============ butacas ============ */
.seats-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 30px; margin-top: 30px; align-items: start; }
.seatmap-wrap { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 30px 24px 24px; overflow-x: auto; }
.screen-arc { position: relative; margin-bottom: 30px; }
.screen-svg { width: 100%; height: 56px; display: block; }
.screen-label { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); font-size: 11px; letter-spacing: .35em; color: var(--muted); white-space: nowrap; }

.seatmap { display: flex; flex-direction: column; gap: 8px; align-items: center; min-width: max-content; margin: 0 auto; }
.seat-row { display: flex; align-items: center; gap: 10px; }
.row-label { width: 16px; text-align: center; font-size: 11px; color: var(--faint); }
.seat-cells { display: flex; gap: 6px; align-items: center; }
.aisle { width: 16px; flex: none; }
.seat {
  width: 26px; height: 24px; border-radius: 6px 6px 4px 4px; border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--faint); display: grid; place-items: center;
  font-size: 0; transition: transform .12s var(--ease), background .15s, border-color .15s;
  position: relative;
}
.seat .seat-n { font-size: 9px; font-family: "Space Mono", monospace; opacity: 0; }
.seat:hover:not(.occ) { transform: translateY(-2px); border-color: var(--gold); background: #2c2436; }
.seat.occ { background: #15121a; border-color: transparent; cursor: not-allowed; opacity: .4; }
.seat.sel { background: var(--gold); border-color: var(--gold-2); color: #25180a; }
.seat.vip:not(.occ):not(.sel) { border-color: rgba(255,106,77,.5); background: rgba(255,106,77,.1); }
.seat.vip.sel { background: var(--ember); border-color: var(--ember-2); color: #fff; }

.legend { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.legend .lg { display: inline-flex; align-items: center; gap: 8px; }
.legend .seat { width: 18px; height: 16px; pointer-events: none; }
.legend em { color: var(--ember-2); font-style: normal; font-size: 11px; }

/* panel compra */
.buy-panel { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 86px; }
.panel-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 18px; }
.panel-h { font-family: "Archivo", sans-serif; font-weight: 700; font-size: 16px; margin-bottom: 14px; }
.qty-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; }
.qty-label { font-weight: 600; font-size: 15px; }
.qty-sub { font-size: 12.5px; }
.stp { display: inline-flex; align-items: center; gap: 4px; background: var(--bg-1); border: 1px solid var(--line-2); border-radius: 9px; padding: 3px; }
.stp button { width: 30px; height: 30px; border-radius: 6px; border: 0; background: transparent; color: var(--ink); font-size: 19px; line-height: 1; display: grid; place-items: center; }
.stp button:hover:not(:disabled) { background: var(--panel-2); color: var(--gold); }
.stp button:disabled { opacity: .3; cursor: default; }
.stp span { min-width: 22px; text-align: center; font-size: 15px; }
.stp.sm button { width: 26px; height: 26px; font-size: 16px; }

.seat-hint { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--ink-soft); }
.seat-hint.ok { color: var(--ok); font-weight: 600; }
.pill-count { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 6px; padding: 3px 9px; font-size: 12px; color: var(--gold); }
.seat-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.seat-tag { display: inline-flex; align-items: center; gap: 6px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 7px; padding: 5px 9px; font-size: 13px; cursor: pointer; }
.seat-tag em { color: var(--ember-2); font-style: normal; font-size: 10px; }
.seat-tag b { color: var(--faint); }
.seat-tag:hover { border-color: var(--ember); } .seat-tag:hover b { color: var(--ember); }

/* lista de boletos (flujo asientos-primero): butaca + tipo + quitar */
.ticket-list { display: flex; flex-direction: column; gap: 8px; }
.ticket-row { display: flex; align-items: center; gap: 8px; }
.ticket-seat { flex: none; min-width: 36px; font-size: 13px; font-weight: 700; color: var(--ink); display: inline-flex; align-items: center; gap: 5px; }
.ticket-seat.vip { color: var(--ember-2); }
.ticket-seat em { font-style: normal; font-size: 9px; letter-spacing: .04em; color: var(--ember-2); }
.ticket-type { flex: 1; min-width: 0; background: var(--bg-1); border: 1px solid var(--line-2); border-radius: 8px; color: var(--ink); font-family: inherit; font-size: 13.5px; padding: 9px 10px; outline: none; cursor: pointer; transition: border-color .15s; }
.ticket-type:focus { border-color: var(--gold); }
.ticket-x { flex: none; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg-1); color: var(--muted); font-size: 19px; line-height: 1; display: grid; place-items: center; transition: all .15s; }
.ticket-x:hover { border-color: var(--ember); color: var(--ember); }

.combo-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.combo-art { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.combo-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.total-card { background: var(--panel-2); }
.tl-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; padding: 3px 0; }
.tl-row.total { font-size: 20px; font-weight: 700; }
.tl-row.total .mono { color: var(--gold); }
.pay-btn { width: 100%; margin-top: 14px; }
.pay-btn:disabled { opacity: .5; cursor: not-allowed; filter: grayscale(.4); }

/* ============ confirmación ============ */
.confirm-check { width: 70px; height: 70px; border-radius: 50%; background: rgba(89,192,138,.15); border: 1px solid rgba(89,192,138,.4); color: var(--ok); display: grid; place-items: center; margin: 0 auto; }
.confirm-head { margin: 20px 0 36px; }
.ticket { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow); }
.ticket-top { position: relative; padding: 26px 28px; }
.ticket-top-inner { position: relative; }
.ticket-perf { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; padding: 24px 28px; }
.tp { display: flex; flex-direction: column; gap: 4px; }
.tp span:last-child { font-weight: 600; font-size: 15px; }
.ticket-perforation { display: flex; justify-content: space-between; padding: 0 20px; position: relative; }
.ticket-perforation::before { content: ""; position: absolute; left: 28px; right: 28px; top: 50%; border-top: 2px dashed var(--line-2); }
.ticket-perforation span { width: 14px; height: 14px; border-radius: 50%; background: var(--bg); position: relative; z-index: 1; }
.ticket-perforation span:first-child { margin-left: -27px; } .ticket-perforation span:last-child { margin-right: -27px; }
.ticket-bottom { display: flex; align-items: center; justify-content: space-between; padding: 24px 28px 28px; }
.qr { width: 84px; height: 84px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; padding: 6px; background: #fff; border-radius: 8px; }
.qr i { background: #111; border-radius: 1px; }

@media (max-width: 1080px) {
  .seats-layout { grid-template-columns: 1fr; }
  .buy-panel { position: static; }
  .detail-hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .detail-poster { width: 200px; }
}
@media (max-width: 560px) {
  /* mapa de butacas: encoger para que el mapa completo quepa y se centre */
  .seatmap-wrap { padding: 20px 10px 18px; }
  .seatmap { min-width: 0; gap: 7px; }
  .seat-row { gap: 4px; }
  .seat { width: 14px; height: 16px; padding: 0; border-radius: 4px 4px 3px 3px; }
  .seat .seat-n { font-size: 8px; }
  .seat-cells { gap: 3px; } .aisle { width: 6px; }
  .row-label { width: 11px; font-size: 10px; }
  .detail-credits > div { grid-template-columns: 1fr; gap: 2px; }
  .ticket-perf { grid-template-columns: 1fr; padding: 20px; }
  .ticket-top { padding: 20px; }
  .ticket-bottom { padding: 20px; }
}

/* ===========================================================
   ASTRA PREMIUM UPGRADE — Seats & Checkout Adicional
   =========================================================== */

/* 3D Seat Screen Perspective View */
.seat-view-preview {
  margin-top: 20px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: var(--shadow-sm);
  animation: fadeUp 0.3s var(--ease);
}
.seat-view-title {
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.seat-view-theater {
  width: 100%;
  height: 160px;
  background: radial-gradient(circle at center 120%, #15101a 0%, #050507 80%);
  border-radius: var(--r);
  overflow: hidden;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 400px;
  border: 1px solid rgba(255, 252, 245, 0.05);
}
.seat-view-screen-mock {
  width: 180px;
  aspect-ratio: 16/9;
  background: #000;
  border: 1px solid var(--gold-deep);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 0 25px rgba(233,185,77,0.3);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  transform-style: preserve-3d;
}
.seat-view-screen-mock img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
}
.seat-view-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(233,185,77,0.15) 0%, transparent 60%);
  pointer-events: none;
  mix-blend-mode: screen;
}
.seat-view-seats-row-indicator {
  position: absolute;
  bottom: 12px;
  font-family: "Space Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  background: rgba(10,10,11,0.7);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--line);
}

/* Interactive Card Form 3D Flip */
.pay-card-wrapper {
  perspective: 1000px;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1.586/1;
  margin: 10px auto 24px;
}
.pay-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.pay-card.flipped {
  transform: rotateY(180deg);
}
.pay-card-front, .pay-card-back {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  padding: 20px;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.08);
}
.pay-card-front {
  background: linear-gradient(135deg, #1b263b 0%, #0d1b2a 100%);
  color: #fff;
}
.pay-card-back {
  background: linear-gradient(135deg, #0d1b2a 0%, #1b263b 100%);
  color: #fff;
  transform: rotateY(180deg);
  padding-left: 0;
  padding-right: 0;
  justify-content: flex-start;
  gap: 15px;
}
.pay-card-magnetic-strip {
  width: 100%;
  height: 38px;
  background: #111;
}
.pay-card-signature-area {
  margin: 0 20px;
  height: 32px;
  background: rgba(255,255,255,0.8);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 12px;
}
.pay-card-cvv-strip {
  font-family: "Space Mono", monospace;
  font-size: 13px;
  font-weight: 700;
  color: #111;
  letter-spacing: 0.05em;
  font-style: italic;
}
.pay-card-logo {
  font-family: "Archivo", sans-serif;
  font-weight: 900;
  font-size: 16px;
  letter-spacing: .02em;
}
.pay-card-logo b {
  color: var(--gold);
}
.pay-card-chip {
  width: 32px;
  height: 24px;
  background: linear-gradient(135deg, #ffd700 0%, #b88a2e 100%);
  border-radius: 4px;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.2);
}
.pay-card-number-display {
  font-family: "Space Mono", monospace;
  font-size: 15px;
  letter-spacing: 0.1em;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  margin: 12px 0;
  text-align: center;
}
.pay-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
}
.pay-card-holder { min-width: 0; }      /* permite que el nombre se recorte y no empuje el vencimiento */
.pay-card-expiry { flex: none; }
.pay-card-holder-name {
  display: block;
  max-width: 100%;
  font-family: "Archivo", sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.03em;
}
.pay-card-expiry-display {
  font-family: "Space Mono", monospace;
  font-size: 12.5px;
}

/* Form inputs for payment */
.pay-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}
.pay-form-group label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-transform: uppercase;
}
.pay-input {
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 11px 14px;
  color: var(--ink);
  font-family: inherit;
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.2s;
}
.pay-input:focus {
  border-color: var(--gold);
}
.pay-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Animación de Ticket Impreso en Confirmación */
.confirm-ticket-container {
  overflow: hidden;
  padding-top: 15px;
}
.ticket {
  transform: translateY(-80px);
  opacity: 0;
  animation: printTicket 1.2s cubic-bezier(0.19, 1, 0.22, 1) 0.5s both;
}
@keyframes printTicket {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Escáner Láser de Boleto */
.qr-container {
  position: relative;
  overflow: hidden;
}
.scanner-laser {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 106, 77, 0.85);
  box-shadow: 0 0 8px rgba(255, 106, 77, 0.8);
  top: 0;
  z-index: 5;
  animation: laserSweep 3s linear infinite;
}
@keyframes laserSweep {
  0% {
    top: 0%;
  }
  50% {
    top: 100%;
  }
  100% {
    top: 0%;
  }
}

/* Step 3 selector updates */
.flow-step-bar-wrapper {
  margin-bottom: 24px;
}

