﻿.detalle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}



    .detalle-media {
      display: grid;
      gap: .9rem;
    }

    .detalle-main-image {
      width: 100%;
      aspect-ratio: 4 / 3;
      object-fit: contain;
      background: #fff;
      border-radius: 16px;
      border: 1px solid var(--border-color);
      display: block;
    }

    .detalle-media-showcase {
      position: relative;
      border-radius: 20px;
      padding: 10px;
      background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--gold) 20%, transparent), transparent 60%),
                  radial-gradient(circle at 80% 80%, color-mix(in srgb, #ec4899 16%, transparent), transparent 55%);
    }

    .detalle-media-showcase .detalle-main-image {
      position: relative;
      z-index: 1;
    }

    .detalle-media-ribbon {
      position: absolute;
      top: 18px;
      left: 0;
      z-index: 2;
      display: inline-flex;
      align-items: center;
      gap: .35rem;
      background: linear-gradient(135deg, #ec4899, #f59e0b);
      color: #fff;
      font-weight: 800;
      font-size: .78rem;
      padding: .4rem .85rem .4rem .7rem;
      border-radius: 0 999px 999px 0;
      box-shadow: 0 8px 18px rgba(0, 0, 0, .25);
      animation: detalleRibbonPulse 2.4s ease-in-out infinite;
    }

    @keyframes detalleRibbonPulse {
      0%, 100% { transform: scale(1); }
      50% { transform: scale(1.05); }
    }

    .detalle-media-confetti {
      position: absolute;
      inset: 0;
      z-index: 2;
      pointer-events: none;
    }

    .detalle-media-confetti i {
      position: absolute;
      color: var(--gold);
      font-size: 1.1rem;
      animation: confettiPop 2.2s ease-in-out infinite;
    }

    .detalle-media-confetti i:nth-child(1) { top: 8%; right: 14%; color: #ec4899; animation-delay: 0s; }
    .detalle-media-confetti i:nth-child(2) { bottom: 12%; left: 10%; color: #06b6d4; animation-delay: .5s; }
    .detalle-media-confetti i:nth-child(3) { bottom: 20%; right: 8%; color: #10b981; animation-delay: 1s; }

    @keyframes confettiPop {
      0%, 100% { transform: scale(1) rotate(0deg); }
      50% { transform: scale(1.25) rotate(15deg); }
    }

    .detalle-thumbs {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
      gap: .7rem;
    }

    .detalle-thumb {
      aspect-ratio: 1;
      border: 1px solid var(--border-color);
      border-radius: 8px;
      padding: 4px;
      background: #fff;
      cursor: pointer;
      transition: border-color .2s, transform .2s;
    }

    .detalle-thumb.active,
    .detalle-thumb:hover {
      border-color: var(--gold);
      transform: translateY(-1px);
    }

    .detalle-thumb img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      display: block;
    }


.detalle-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--dark-2);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
}
.detalle-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.5rem;
  letter-spacing: 2px;
  color: var(--heading-color);
  margin: 0 0 .5rem;
}
.detalle-description {
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.6;
  margin-bottom: 1.2rem;
}
.detalle-result-card {
  display: grid;
  gap: .9rem;
  margin: 1.1rem 0 1.2rem;
  padding: 1.2rem;
  background:
    linear-gradient(135deg, rgba(34, 197, 94, .14), transparent 58%),
    var(--dark-2);
  border: 1px solid rgba(34, 197, 94, .34);
  border-radius: 12px;
}
.detalle-result-card.is-pending {
  background: color-mix(in srgb, var(--gold) 8%, transparent);
  border-color: color-mix(in srgb, var(--gold) 25%, transparent);
}
.detalle-result-kicker {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: #22c55e;
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.detalle-result-card.is-pending .detalle-result-kicker {
  color: var(--gold);
}
.detalle-result-winner span,
.detalle-result-ticket span {
  display: block;
  color: var(--text-muted);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.detalle-result-winner strong {
  display: block;
  margin-top: .15rem;
  color: var(--heading-color);
  font-size: 1.55rem;
  line-height: 1.15;
}
.detalle-result-ticket {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1rem;
  background: color-mix(in srgb, var(--gold) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--gold) 24%, transparent);
  border-radius: 10px;
}
.detalle-result-ticket strong {
  color: var(--gold);
  font-family: Consolas, 'Courier New', monospace;
  font-size: 1.7rem;
  line-height: 1;
}
.detalle-result-date {
  color: var(--text-muted);
  font-size: .86rem;
  font-weight: 700;
}
.detalle-replay-btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  border: 1px solid var(--gold);
  border-radius: 0;
  background: var(--gold);
  color: var(--button-text);
  font: inherit;
  font-size: .9rem;
  font-weight: 900;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.detalle-replay-btn:hover,
.detalle-replay-btn:focus-visible {
  color: var(--button-text);
  transform: translateY(-1px);
}
.detalle-prize-box {
  background: color-mix(in srgb, var(--gold) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--gold) 20%, transparent);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.2rem;
}
.detalle-box-label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
  margin-bottom: .3rem;
}
.detalle-box-value {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--heading-color);
}
.detalle-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.detalle-stats-grid-final {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.detalle-stat-card {
  background: var(--dark-2);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
}
.detalle-stat-label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: .3rem;
}
.detalle-stat-price {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  color: var(--gold);
}
.detalle-stat-date {
  font-weight: 700;
  font-size: 1rem;
  color: var(--heading-color);
}
.detalle-progress-box { margin-bottom: 1.5rem; }
.detalle-progress-bar { height: 10px; }
.detalle-legend {
  display: flex;
  gap: .7rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.detalle-legend-item {
  padding: .3rem .7rem;
  border-radius: 6px;
  font-size: .75rem;
  font-weight: 600;
}
.detalle-legend-dot {
  display: inline-block;
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  margin-right: .35rem;
}
.dot-libre { background: #22c55e; }
.dot-pendiente { background: #facc15; }
.dot-vendido { background: #ef4444; }
.detalle-selection-summary {
  display: none;
  background: color-mix(in srgb, var(--gold) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--gold) 25%, transparent);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
}
.detalle-selection-summary.is-visible { display: block; }
.detalle-selection-title {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold);
  margin-bottom: .3rem;
}
.detalle-selection-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}
.detalle-selection-boletos {
  font-weight: 600;
  font-size: .9rem;
  color: var(--text-light);
}
.detalle-selection-total {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
}
.detalle-limit-msg {
  display: none;
  margin: .9rem 0 0;
  padding: .65rem .8rem;
}
.detalle-limit-msg.is-visible { display: flex; }
.detalle-buy-btn {
  width: 100%;
  justify-content: center;
  font-size: 1rem;
  padding: .8rem;
}
.detalle-grid-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.2rem;
}
.detalle-grid-head h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 1px;
  color: var(--heading-color);
  margin: 0;
}
.detalle-ticket-actions {
  display: flex;
  gap: .5rem;
  align-items: center;
}
.detalle-ticket-search {
  max-width: 160px;
  font-size: .85rem;
}
.detalle-clear-btn {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: 6px;
  padding: .4rem .8rem;
  cursor: pointer;
  font-size: .8rem;
}
.detalle-grid-boletos {
  display: grid;
  grid-template-columns: repeat(auto-fill, 52px);
  gap: .5rem;
  align-items: center;
}
  #gridBoletos {
    grid-template-columns: repeat(auto-fill, 52px) !important;
    align-items: center;
  }

  .btn-boleto {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    padding: 0;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: .78rem;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s, transform .15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }

  .btn-boleto.libre {
    background: var(--dark-3);
    color: var(--text-light);
    border-color: var(--border-color);
  }

  .btn-boleto.libre:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: var(--dark-2);
  }

  .btn-boleto.libre.seleccionado {
    background: var(--gold);
    color: var(--button-text);
    border-color: var(--gold);
    box-shadow: none;
    transform: scale(1.04);
  }

  .btn-boleto.pendiente_verificacion {
    background: var(--dark-3);
    color: #d97706;
    border-color: #d97706;
    cursor: not-allowed;
    opacity: .75;
  }

  .btn-boleto.vendido {
    background: var(--dark-3);
    color: #dc2626;
    border-color: #dc2626;
    cursor: not-allowed;
    opacity: .55;
  }

  .btn-boleto.oculto {
    display: none;
  }

  @media (max-width:768px) {
    .detalle-grid {
      grid-template-columns: 1fr !important;
    }

    .detalle-stats-grid,
    .detalle-stats-grid-final {
      grid-template-columns: 1fr;
    }

    .detalle-result-ticket {
      align-items: flex-start;
      flex-direction: column;
    }

    .detalle-replay-btn {
      width: 100%;
    }

    #gridBoletos {
      grid-template-columns: repeat(auto-fill, 48px) !important;
    }

    .detalle-grid-boletos {
      grid-template-columns: repeat(auto-fill, 48px);
    }

    .btn-boleto {
      width: 48px;
      height: 48px;
      font-size: .72rem;
    }
  }

  /* ══════════════════════════════════════════════════════════
     DETALLE V2 — pagina fusionada (boletos + pago + datos)
     ══════════════════════════════════════════════════════════ */
  .detalle-v2-grid {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 2.2rem;
    align-items: start;
    margin-bottom: 3rem;
  }

  .detalle-v2-left {
    position: sticky;
    top: 90px;
    display: grid;
    gap: 1.2rem;
  }

  .detalle-v2-right {
    display: grid;
    gap: 1.2rem;
  }

  .detalle-v2-card {
    background: var(--dark-2);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.3rem 1.4rem;
  }

  .detalle-v2-card-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--heading-color);
    margin: 0 0 .7rem;
  }

  .detalle-v2-date {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: var(--gold);
    font-weight: 700;
    font-size: .88rem;
    margin-bottom: .5rem;
  }

  .detalle-v2-title {
    margin-bottom: 1rem;
  }

  .detalle-v2-progress {
    background: var(--dark-2);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.1rem 1.3rem;
  }

  .detalle-v2-progress .rifa-progress-labels {
    font-size: .82rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: .5rem;
  }

  /* ── Tarjeta compartir ────────────────────────────────────── */
  .detalle-share-hint {
    color: var(--text-muted);
    font-size: .84rem;
    margin: 0 0 1rem;
  }

  .detalle-share-link-row {
    display: flex;
    gap: .5rem;
    margin-bottom: 1rem;
  }

  .detalle-share-link-row .pub-input {
    flex: 1;
    min-width: 0;
    font-size: .82rem;
    color: var(--text-muted);
  }

  .detalle-share-copy-btn {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    background: var(--dark-3);
    color: var(--text-light);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .2s, color .2s;
  }

  .detalle-share-copy-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
  }

  .detalle-share-qr {
    display: flex;
    justify-content: center;
    padding: 1rem;
    background: #fff;
    border-radius: 12px;
    margin-bottom: 1rem;
  }

  .detalle-share-qr svg {
    width: 160px;
    height: 160px;
  }

  .detalle-share-btn {
    width: 100%;
    justify-content: center;
  }

  /* ── Pasos de compra ──────────────────────────────────────── */
  .detalle-step-card {
    background: var(--dark-2);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.4rem;
  }

  .detalle-step-head {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin-bottom: 1.1rem;
  }

  .detalle-step-head h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 1px;
    color: var(--heading-color);
    margin: 0;
  }

  .detalle-step-number {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--button-text);
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .92rem;
  }

  .detalle-step-price {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--text-muted);
    font-size: .88rem;
    margin-bottom: 1rem;
  }

  .detalle-step-price strong {
    background: color-mix(in srgb, var(--gold) 14%, transparent);
    color: var(--gold);
    padding: .2rem .6rem;
    border-radius: 999px;
    font-weight: 800;
  }

  .detalle-total-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: color-mix(in srgb, var(--gold) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--gold) 22%, transparent);
    border-radius: 14px;
    padding: 1rem 1.3rem;
    font-weight: 700;
    color: var(--text-light);
    transition: border-color .2s, background .2s;
  }

  .detalle-total-bar strong {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 1px;
    color: var(--gold);
  }

  .detalle-total-bar.is-active {
    background: color-mix(in srgb, var(--gold) 16%, transparent);
    border-color: var(--gold);
  }

  .detalle-dni-field {
    position: relative;
  }

  .detalle-dni-spinner {
    position: absolute;
    right: .8rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid color-mix(in srgb, var(--gold) 30%, transparent);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: dniSpin .7s linear infinite;
  }

  @keyframes dniSpin {
    to { transform: translateY(-50%) rotate(360deg); }
  }

  .detalle-dni-status {
    font-size: .76rem;
    margin-top: .35rem;
    min-height: 1em;
  }

  .detalle-dni-status.is-success { color: #16a34a; }
  .detalle-dni-status.is-warning { color: #d97706; }

  .detalle-trust-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .6rem;
    padding: .2rem .2rem .4rem;
  }

  .detalle-trust-label {
    font-size: .78rem;
    font-weight: 700;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: .35rem;
  }

  .detalle-trust-label i {
    color: #16a34a;
  }

  .detalle-trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
  }

  .detalle-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .65rem;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 700;
    border: 1px solid transparent;
  }

  .detalle-trust-badge.is-purple {
    background: rgba(124, 58, 237, .12);
    color: #7c3aed;
    border-color: rgba(124, 58, 237, .22);
  }

  .detalle-trust-badge.is-teal {
    background: rgba(6, 182, 212, .12);
    color: #0891b2;
    border-color: rgba(6, 182, 212, .22);
  }

  .detalle-trust-badge.is-blue {
    background: rgba(37, 99, 235, .12);
    color: #2563eb;
    border-color: rgba(37, 99, 235, .22);
  }

  .detalle-guest-hint {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    border: 1px solid color-mix(in srgb, var(--gold) 24%, var(--border-color));
    background: color-mix(in srgb, var(--gold) 8%, var(--dark-3));
    border-radius: 10px;
    color: var(--text-muted);
    font-size: .84rem;
    line-height: 1.45;
    margin-bottom: 1.1rem;
    padding: .75rem .85rem;
  }

  .detalle-guest-hint i {
    color: var(--gold);
    flex: 0 0 auto;
    margin-top: .1rem;
  }

  .detalle-guest-hint a {
    color: var(--gold);
    font-weight: 700;
  }

  .detalle-terms-note {
    font-size: .82rem;
    color: var(--text-muted);
    margin: .9rem 0;
  }

  .detalle-terms-note a {
    color: var(--gold);
    font-weight: 700;
  }

  .sticky-buy-bar {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 400;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom, 0px));
    background: var(--surface-bg);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, .12);
    backdrop-filter: blur(10px);
    transform: translateY(100%);
    transition: transform .3s ease;
  }

  @media (max-width: 767.98px) {
    .sticky-buy-bar {
      display: flex;
    }
  }

  .sticky-buy-bar.is-visible {
    transform: translateY(0);
  }

  .sticky-buy-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .sticky-buy-label {
    font-size: .74rem;
    color: var(--text-muted);
    font-weight: 700;
  }

  .sticky-buy-total {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 1px;
    color: var(--gold);
  }

  .sticky-buy-btn {
    flex-shrink: 0;
    padding: .65rem 1.3rem;
  }

  .detalle-confirm-box {
    grid-column: 1 / -1;
  }

  @media (max-width: 991.98px) {
    .detalle-v2-grid {
      grid-template-columns: 1fr;
    }

    .detalle-v2-left {
      position: static;
    }
  }

  @keyframes bounceIn {
    0% {
      transform: scale(0.5);
      opacity: 0;
    }

    70% {
      transform: scale(1.1);
    }

    100% {
      transform: scale(1);
      opacity: 1;
    }
  }
