/* Citizens ya hechos. Usa las tarjetas .st-card de dz-streaming.css (las
   mismas de Streaming y Competitive Settings); aquí solo lo propio. */
.czp-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .czp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .czp-grid { grid-template-columns: 1fr; max-width: 420px; } }

/* Captura vertical: el personaje es lo que se tiene que ver. */
.st-card.has-art .czp-art { aspect-ratio: 4 / 5; }
.czp-art img { object-position: 50% 30%; filter: saturate(.85) brightness(.8); }

.czp-num {
  position: relative; z-index: 1; margin-top: .9rem;
  font-family: 'Space Mono', monospace; font-size: .62rem; letter-spacing: .18em; color: var(--pc);
}
.czp-card .st-name { margin-top: .25rem; font-size: 1.3rem; }
.czp-card .st-price { margin-top: .9rem; }
.czp-card .st-features { margin: 1rem 0 1.2rem; }

/* Aviso del Citizen 4: claro y visible, sin gritar. */
.czp-caution {
  position: relative; z-index: 1; margin: -.2rem 0 1.1rem; padding: .55rem .8rem;
  border: 1px solid rgba(248, 113, 113, .45); border-radius: 12px; background: rgba(248, 113, 113, .08);
  color: #FCA5A5; font-family: 'Space Mono', monospace; font-size: .64rem; letter-spacing: .08em;
  text-transform: uppercase; line-height: 1.5;
}

/* «Próximamente» mientras el producto no esté a la venta. */
.czp-card .czp-soon { display: none; }
.czp-card.is-soon .czp-buy { display: none; }
.czp-card.is-soon .czp-soon { display: inline; }
.czp-card [data-pack-buy]:disabled { opacity: .55; cursor: not-allowed; }
.czp-note { max-width: 620px; margin: 2rem auto 0; text-align: center; }

/* ═══════════ Detalle de un Citizen (al pulsar la tarjeta) ═══════════ */
.czp-card { cursor: pointer; }
.czp-art { position: relative; }
.czp-open { position: absolute; inset: 0; z-index: 2; border: 0; padding: 0; background: transparent; cursor: zoom-in; }
.czp-open:focus-visible { outline: 2px solid var(--pc); outline-offset: -4px; border-radius: 4px; }
.czp-zoom {   /* lupa que aparece al pasar por encima */
  position: absolute; right: .9rem; bottom: 1.4rem; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(11, 11, 11, .72); border: 1px solid color-mix(in srgb, var(--pc) 50%, transparent);
  backdrop-filter: blur(6px); opacity: 0; transform: scale(.85); transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.czp-zoom::before, .czp-zoom::after { content: ""; position: absolute; background: var(--pc); border-radius: 2px; }
.czp-zoom::before { left: 11px; right: 11px; top: 18px; height: 2px; }
.czp-zoom::after { top: 11px; bottom: 11px; left: 18px; width: 2px; }
.czp-card:hover .czp-zoom, .czp-open:focus-visible .czp-zoom { opacity: 1; transform: scale(1); }

.czp-modal {
  width: min(1240px, calc(100vw - 2rem)); max-width: none; max-height: calc(100dvh - 2rem);
  padding: 0; border: 0; background: transparent; color: var(--text); overflow: visible;
  /* Centrado: los estilos base de la web ponen margin:0 a todo y eso anula
     el centrado automático de <dialog>. */
  position: fixed; inset: 0; margin: auto; height: fit-content;
}
.czp-modal::backdrop { background: rgba(0, 0, 0, .72); backdrop-filter: blur(8px); }
.czp-modal[open] { animation: czp-in .32s var(--ease, ease) both; }
@keyframes czp-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.czp-modal-panel {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); overflow: hidden;
  max-height: calc(100dvh - 2rem);
  border: 1px solid color-mix(in srgb, var(--pc) 40%, var(--line)); border-radius: 24px;
  background: linear-gradient(165deg, #0e0e0e, #060606);
  box-shadow: 0 30px 120px -30px color-mix(in srgb, var(--pc) 45%, transparent);
}
.czp-modal-panel::before {
  content: ""; position: absolute; top: -40%; right: -30%; width: 90%; height: 120%; pointer-events: none;
  background: radial-gradient(circle, var(--pc), transparent 62%); opacity: .1;
}
/* Sin fondo propio: la captura queda centrada sobre el fondo del panel,
   sin franjas negras cuando la información es más alta que la imagen. */
.czp-modal-media { position: relative; min-height: 0; display: flex; align-items: center; padding: 1.2rem 0 1.2rem 1.2rem; }
.czp-modal-media img { border-radius: 14px; box-shadow: 0 20px 60px -20px rgba(0, 0, 0, .8); }
/* Captura completa (16:9): se ve entera, sin recortar. */
.czp-modal-media img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; max-height: calc(100dvh - 2rem); object-fit: contain; }
.czp-modal-media::after { content: none; }
.czp-modal-info { position: relative; z-index: 1; display: flex; flex-direction: column; padding: 2.6rem 2.4rem 2.2rem; overflow-y: auto; }
.czp-modal-name { font-family: 'Inter Tight', sans-serif; font-weight: 800; font-size: clamp(1.8rem, 3.2vw, 2.6rem); letter-spacing: -.02em; margin: .3rem 0 .4rem; }
.czp-modal-price { font-family: 'Inter Tight', sans-serif; font-weight: 800; font-size: 2.4rem; letter-spacing: -.02em; color: var(--pc); margin: .2rem 0 1.4rem; }
.czp-modal-price small { font-family: 'Space Mono', monospace; font-size: .62rem; color: var(--text-faint); letter-spacing: .14em; }
.czp-modal-label { font-family: 'Space Mono', monospace; font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--text-faint); }
.czp-modal-features { margin: .5rem 0 1.2rem; flex: 0 0 auto; }
.czp-modal-features li::before { color: var(--pc); }
.czp-modal .czp-caution { margin: 0 0 1.2rem; }
.czp-modal-buy { width: 100%; justify-content: center; margin-top: auto; }
.czp-modal .czp-soon { display: none; }
.czp-modal.is-soon .czp-buy { display: none; }
.czp-modal.is-soon .czp-soon { display: inline; }
.czp-modal-buy:disabled { opacity: .55; cursor: not-allowed; }
.czp-modal-note { margin-top: 1rem; font-size: .76rem; line-height: 1.55; color: var(--text-faint); }
.czp-modal-close {
  position: absolute; top: 1rem; right: 1rem; z-index: 3; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(11, 11, 11, .75); color: var(--text); font-size: 1rem; cursor: pointer;
  backdrop-filter: blur(6px); transition: border-color .25s, transform .25s;
}
.czp-modal-close:hover { border-color: var(--pc); transform: rotate(90deg); }
html:has(.czp-modal[open]) { overflow: hidden; }   /* la página no se desplaza detrás */

@media (max-width: 760px) {
  .czp-modal { width: calc(100vw - 1.2rem); max-height: calc(100dvh - 1.2rem); }
  .czp-modal-panel { grid-template-columns: 1fr; max-height: calc(100dvh - 1.2rem); overflow-y: auto; }
  .czp-modal-media { padding: 0; }
  .czp-modal-media img { max-height: none; border-radius: 0; box-shadow: none; }
  .czp-modal-media::after { background: none; }
  .czp-modal-info { padding: 1.4rem 1.4rem 1.6rem; overflow: visible; }
}
@media (prefers-reduced-motion: reduce) {
  .czp-modal[open] { animation: none; }
  .czp-zoom, .czp-modal-close { transition: none; }
}

/* Citizens: tras quitar la comparativa y la sección «Qué es», las tarjetas
   van justo debajo del título. Solo en esta página (el hero lo comparten
   Streaming y Competitive Settings). */
.cz-hero:has(+ #citizen-packs) { padding-bottom: 1.5rem; }
#citizen-packs { padding-top: 1rem; }
/* Oculto a la vista, pero lo leen los lectores de pantalla: la sección
   conserva su encabezado aunque visualmente solo haya un título. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
