/* ==========================================================================
   Konversa — Vista de USUARIO FINAL (descubrir modelos + chat con créditos)
   ========================================================================== */

.disc-body { background: var(--soft-2); min-height: 100vh; }

/* ---------- Barra superior ---------- */
.disc-top {
  position: sticky; top: 0; z-index: 40;
  background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 18px;
  padding: 14px 30px;
}
.disc-top .brand { font-size: 22px; }
.disc-top .brand svg { width: 28px; height: 28px; }
.disc-search { flex: 1; max-width: 420px; position: relative; }
.disc-search input { width: 100%; padding: 11px 14px 11px 40px; border: 1.5px solid var(--line); border-radius: 999px; font-family: inherit; font-size: 14px; }
.disc-search input:focus { outline: none; border-color: var(--brand); }
.disc-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }

.credits-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--soft); color: var(--brand-2);
  font-weight: 700; font-size: 15px; padding: 9px 16px; border-radius: 999px;
  border: 1.5px solid #e6e1ff;
}
.credits-pill .coin { font-size: 17px; }
.btn-buy {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--grad); color: #fff; border: none;
  font-weight: 700; font-size: 14px; padding: 11px 18px; border-radius: 999px;
  cursor: pointer; box-shadow: 0 6px 18px rgba(91,61,245,.28); transition: .15s;
}
.btn-buy:hover { filter: brightness(1.06); transform: translateY(-1px); }
.disc-user-av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; background: var(--ink-2); }

/* ---------- Filtros ---------- */
.disc-filters { display: flex; gap: 10px; flex-wrap: wrap; padding: 20px 30px 6px; max-width: 1300px; margin: 0 auto; }
.chip { background: #fff; border: 1.5px solid var(--line); color: var(--muted); font-weight: 600; font-size: 14px; padding: 9px 16px; border-radius: 999px; cursor: pointer; transition: .12s; }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip .dot-on { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 2px; vertical-align: middle; }
.chip.active .dot-on { background: #fff; }
.chip:hover:not(.active) { border-color: var(--brand); color: var(--brand); }

.disc-title { max-width: 1300px; margin: 0 auto; padding: 18px 30px 4px; }
.disc-title h1 { font-size: 24px; font-weight: 800; letter-spacing: -.5px; }
.disc-title p { color: var(--muted); font-size: 15px; }

/* ---------- Grid de modelos ---------- */
.model-grid {
  max-width: 1300px; margin: 0 auto; padding: 18px 30px 60px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px;
}
.model-card {
  background: #fff; border-radius: 20px; overflow: hidden;
  box-shadow: var(--shadow-sm); cursor: pointer; transition: .18s;
  border: 1px solid var(--line);
}
.model-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.model-photo { position: relative; aspect-ratio: 3/4; overflow: hidden; }
.model-photo svg { width: 100%; height: 100%; display: block; }
.model-photo .scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(15,23,41,.72) 0%, rgba(15,23,41,0) 45%); }
.model-photo .status-badge {
  position: absolute; top: 12px; left: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.92); color: var(--ink);
  font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px;
}
.model-photo .status-badge .d { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; }
.model-photo .status-badge.on .d { background: var(--ok); box-shadow: 0 0 0 3px rgba(22,163,74,.2); }
.model-photo .fav {
  position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.9); border: none; cursor: pointer; display: grid; place-items: center; color: var(--accent); transition: .12s;
}
.model-photo .fav:hover { transform: scale(1.12); }
.model-photo .overlay-info { position: absolute; left: 14px; bottom: 12px; right: 14px; color: #fff; }
.model-photo .overlay-info .n { font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 6px; }
.model-photo .overlay-info .l { font-size: 13px; opacity: .9; display: flex; align-items: center; gap: 5px; margin-top: 2px; }
.model-card .card-actions { padding: 12px 14px 14px; display: flex; gap: 8px; align-items: center; }
.model-card .tags-mini { display: flex; gap: 6px; flex: 1; overflow: hidden; }
.model-card .tag-mini { background: var(--soft); color: var(--brand-2); font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.btn-chat {
  background: var(--grad); color: #fff; border: none; font-weight: 700; font-size: 13px;
  padding: 9px 15px; border-radius: 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: .15s; white-space: nowrap;
}
.btn-chat:hover { filter: brightness(1.06); }

/* ---------- Drawer de chat ---------- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(15,23,41,.5); z-index: 60; opacity: 0; pointer-events: none; transition: .2s; }
.drawer-backdrop.show { opacity: 1; pointer-events: auto; }
.chat-drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: 440px; max-width: 100%;
  background: var(--soft-2); z-index: 70; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .25s ease; box-shadow: -10px 0 40px rgba(15,23,41,.2);
}
.chat-drawer.show { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: #fff; border-bottom: 1px solid var(--line); }
.drawer-head .avatar { width: 44px; height: 44px; }
.drawer-head .who { flex: 1; min-width: 0; }
.drawer-head .who .name { font-weight: 700; font-size: 16px; }
.drawer-head .who .status { font-size: 13px; color: var(--ok); }
.drawer-head .who .status.off { color: var(--muted); }
.drawer-close { border: none; background: none; cursor: pointer; color: var(--muted); padding: 6px; border-radius: 8px; }
.drawer-close:hover { background: var(--soft); }

.drawer-msgs { flex: 1; overflow-y: auto; padding: 20px 18px 8px; display: flex; flex-direction: column; gap: 9px; }
.d-msg { max-width: 78%; padding: 10px 14px; border-radius: 15px; font-size: 14.5px; line-height: 1.45; }
.d-msg.in  { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.d-msg.out { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 5px; }
.d-msg .meta { font-size: 11px; opacity: .7; margin-top: 4px; }
.d-gift { align-self: flex-end; text-align: center; font-size: 40px; background: none; }
.cost-note { text-align: center; font-size: 12px; color: var(--muted); padding: 4px; }

.drawer-typing { align-self: flex-start; background: #fff; border: 1px solid var(--line); padding: 12px 15px; border-radius: 15px; display: none; }
.drawer-typing.show { display: block; }
.drawer-typing span { display: inline-block; width: 6px; height: 6px; background: var(--muted); border-radius: 50%; margin: 0 2px; animation: blink 1.2s infinite both; }
.drawer-typing span:nth-child(2){ animation-delay:.2s } .drawer-typing span:nth-child(3){ animation-delay:.4s }

.drawer-composer { background: #fff; border-top: 1px solid var(--line); padding: 12px 16px 16px; }
.gift-row { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.gift-btn { border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 7px 10px; cursor: pointer; font-family: inherit; display: flex; flex-direction: column; align-items: center; line-height: 1.2; transition: .12s; }
.gift-btn:hover { border-color: var(--accent); background: #fff5fa; }
.gift-btn .emo { font-size: 20px; }
.gift-btn .cst { font-size: 10px; font-weight: 700; color: var(--accent); margin-top: 2px; }
.drawer-box { display: flex; align-items: flex-end; gap: 8px; background: var(--soft-2); border: 1.5px solid var(--line); border-radius: 14px; padding: 5px 6px 5px 12px; }
.drawer-box textarea { flex: 1; border: none; background: none; resize: none; font-family: inherit; font-size: 15px; padding: 8px 0; max-height: 100px; }
.drawer-box textarea:focus { outline: none; }
.drawer-send { width: 42px; height: 42px; border-radius: 11px; border: none; background: var(--grad); color: #fff; cursor: pointer; display: grid; place-items: center; flex: none; }
.cost-hint { font-size: 12px; color: var(--muted); text-align: center; margin-top: 8px; }
.cost-hint b { color: var(--brand-2); }

/* ---------- Modal comprar créditos ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,41,.55); z-index: 80; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-backdrop.show { display: flex; }
.modal {
  background: #fff; border-radius: 22px; width: 520px; max-width: 100%; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow); animation: pop .2s ease;
}
@keyframes pop { from { transform: scale(.94); opacity: 0 } to { transform: scale(1); opacity: 1 } }
.modal-head { padding: 24px 26px 6px; text-align: center; position: relative; }
.modal-head h3 { font-size: 22px; font-weight: 800; }
.modal-head p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.modal-head .x { position: absolute; top: 18px; right: 20px; border: none; background: var(--soft); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; color: var(--muted); font-size: 18px; }
.pack-grid { padding: 18px 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pack {
  border: 2px solid var(--line); border-radius: 16px; padding: 18px 16px; text-align: center; cursor: pointer; transition: .15s; position: relative;
}
.pack:hover { border-color: var(--brand); transform: translateY(-2px); }
.pack.best { border-color: var(--accent); }
.pack.best::before { content: 'MÁS POPULAR'; position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.pack .amt { font-size: 26px; font-weight: 800; color: var(--brand); }
.pack .amt .coin { font-size: 20px; }
.pack .bonus { font-size: 12px; color: var(--ok); font-weight: 700; margin: 2px 0 8px; min-height: 16px; }
.pack .price { font-size: 18px; font-weight: 700; }
.modal-foot { padding: 6px 26px 24px; text-align: center; }
.modal-foot .disclaimer { font-size: 12px; color: var(--muted); }

/* ---------- Checkout multi-paso ---------- */
.co-steps { display: flex; justify-content: center; gap: 8px; margin-bottom: 12px; }
.co-dot { font-size: 12px; font-weight: 700; color: #b6b3c7; background: var(--soft); padding: 5px 12px; border-radius: 999px; transition: .2s; }
.co-dot.active { background: var(--grad); color: #fff; }
.co-dot.done { background: #dcfce7; color: #15803d; }
.co-body { padding: 4px 26px 8px; }
.order-chip { background: var(--soft); border: 1px solid #e6e1ff; border-radius: 12px; padding: 10px 14px; margin-bottom: 16px; font-size: 14px; display: flex; justify-content: space-between; align-items: center; }
.order-chip b { color: var(--brand); }
.co-back { background: none; border: none; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; margin-top: 14px; padding: 6px; }
.co-back:hover { color: var(--ink); }

/* Métodos de pago */
.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.method { border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 12px; cursor: pointer; display: flex; align-items: center; gap: 11px; transition: .14s; background: #fff; text-align: left; font-family: inherit; }
.method:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.method .m-ic { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 20px; flex: none; background: var(--soft-2); }
.method .m-info { min-width: 0; }
.method .m-name { font-weight: 700; font-size: 14.5px; }
.method .m-desc { font-size: 12px; color: var(--muted); }
.method .m-badge { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 5px; margin-left: auto; }
.method .m-badge.local { background: #dbeafe; color: #1d4ed8; }
.method .m-badge.fast { background: #dcfce7; color: #15803d; }

/* Formularios de pago */
.pay-form { }
.pay-form .pf-row { display: flex; gap: 12px; }
.pay-form .field { margin-bottom: 14px; flex: 1; }
.pay-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.pay-form input, .pay-form select { width: 100%; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 11px; font-family: inherit; font-size: 15px; background: #fff; }
.pay-form input:focus, .pay-form select:focus { outline: none; border-color: var(--brand); }
.card-visual { background: linear-gradient(135deg, #1e1b4b, #5b3df5); border-radius: 16px; padding: 18px 20px; color: #fff; margin-bottom: 18px; position: relative; height: 120px; }
.card-visual .cv-chip { width: 34px; height: 26px; border-radius: 6px; background: linear-gradient(135deg,#fde68a,#f59e0b); margin-bottom: 14px; }
.card-visual .cv-num { font-family: Consolas, monospace; font-size: 17px; letter-spacing: 2px; }
.card-visual .cv-brand { position: absolute; top: 18px; right: 20px; font-weight: 800; font-style: italic; font-size: 18px; }
.pay-btn { width: 100%; padding: 15px; border: none; border-radius: 12px; background: var(--grad); color: #fff; font-weight: 700; font-size: 16px; cursor: pointer; font-family: inherit; box-shadow: 0 8px 22px rgba(91,61,245,.3); margin-top: 4px; }
.pay-btn:hover { filter: brightness(1.05); }
.pay-btn.paypal { background: #ffc439; color: #003087; box-shadow: none; }
.pay-btn.pse { background: #e30613; box-shadow: none; }
.pay-note { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: 12px; line-height: 1.5; }

/* Cripto / OXXO */
.crypto-box, .oxxo-box { text-align: center; }
.crypto-box .qr-mini, .oxxo-box .qr-mini { width: 130px; height: 130px; margin: 0 auto 12px; border: 1px solid var(--line); border-radius: 12px; padding: 6px; background: #fff; }
.crypto-box .qr-mini svg, .oxxo-box .qr-mini svg { width: 100%; height: 100%; }
.wallet-addr { font-family: Consolas, monospace; font-size: 12.5px; background: var(--soft); border-radius: 9px; padding: 10px; word-break: break-all; margin: 10px 0; }
.oxxo-ref { font-family: Consolas, monospace; font-size: 22px; font-weight: 800; letter-spacing: 3px; color: var(--ink); margin: 8px 0; }

/* Resultado */
.pay-processing, .pay-success { text-align: center; padding: 24px 10px; }
.spinner { width: 54px; height: 54px; border: 5px solid var(--soft); border-top-color: var(--brand); border-radius: 50%; margin: 0 auto 18px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pay-success .check { width: 64px; height: 64px; border-radius: 50%; background: #dcfce7; color: #16a34a; font-size: 34px; display: grid; place-items: center; margin: 0 auto 16px; animation: pop .3s ease; }
.pay-success h3 { font-size: 22px; font-weight: 800; }
.pay-success p { color: var(--muted); margin: 6px 0 18px; }
.pay-success .new-balance { font-size: 15px; font-weight: 700; color: var(--brand); }

.secure-row { display: flex; justify-content: center; gap: 16px; font-size: 11.5px; color: var(--muted); font-weight: 600; margin-bottom: 8px; }

@media (max-width: 560px) { .method-grid { grid-template-columns: 1fr; } .pay-form .pf-row { flex-direction: column; gap: 0; } }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 13px 22px; border-radius: 12px; font-size: 14px; font-weight: 600; z-index: 100; opacity: 0; transition: .25s; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ID público de la modelo en la tarjeta */
.overlay-info .mid { font-family: 'Consolas', monospace; font-size: 11px; opacity: .85; letter-spacing: .4px; }

/* ---------- Botón flotante de ayuda / quejas ---------- */
.help-fab {
  position: fixed; left: 22px; bottom: 22px; z-index: 55;
  display: inline-flex; align-items: center; gap: 7px;
  background: #fff; border: 1.5px solid var(--line); color: var(--ink);
  font-family: inherit; font-weight: 700; font-size: 14px;
  padding: 12px 18px; border-radius: 999px; cursor: pointer;
  box-shadow: 0 8px 24px rgba(15,23,41,.16); transition: .15s;
}
.help-fab:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }

/* ---------- Age gate 18+ ---------- */
.agegate { position: fixed; inset: 0; z-index: 200; background: rgba(10,14,26,.86); backdrop-filter: blur(10px); display: none; align-items: center; justify-content: center; padding: 20px; }
.agegate.show { display: flex; }
.agegate-box { background: #fff; border-radius: 24px; max-width: 480px; width: 100%; padding: 38px 34px 28px; text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,.4); animation: pop .25s ease; }
.agegate-box .ag-logo { margin-bottom: 14px; }
.agegate-box h2 { font-size: 23px; font-weight: 800; letter-spacing: -.5px; margin-bottom: 10px; }
.agegate-box p { color: var(--muted); font-size: 14.5px; line-height: 1.6; margin-bottom: 22px; }
.ag-actions { display: flex; flex-direction: column; gap: 10px; }
.ag-yes { background: var(--grad); color: #fff; border: none; border-radius: 13px; padding: 15px; font-weight: 700; font-size: 15.5px; cursor: pointer; font-family: inherit; box-shadow: 0 8px 22px rgba(91,61,245,.32); }
.ag-yes:hover { filter: brightness(1.05); }
.ag-no { color: var(--muted); font-size: 14px; padding: 8px; }
.ag-legal { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

@media (max-width: 560px) {
  .disc-top { padding: 12px 16px; gap: 10px; flex-wrap: wrap; }
  .disc-search { order: 3; flex-basis: 100%; max-width: none; }
  .disc-top .credits-pill .lbl { display: none; }
  .model-grid { padding: 16px; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .chat-drawer { width: 100%; }
  .pack-grid { grid-template-columns: 1fr; }
}
