/* NexoPlay V37 - Compra rapida invitados, perfil proveedor y carrusel continuo. */

/* Mantiene la misma familia visual, agregando fuentes de emoji como fallback. */
html,body,button,input,textarea,select{
  font-family:Inter,system-ui,-apple-system,"Segoe UI","Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji",Arial,sans-serif;
}

.nx37-modal-bg{position:fixed;inset:0;z-index:15000;background:rgba(2,6,23,.72);backdrop-filter:blur(8px);display:none;align-items:center;justify-content:center;padding:18px;overflow:auto}
.nx37-modal-bg.open{display:flex}
.nx37-close{border:0;background:transparent;color:inherit;font-size:25px;line-height:1;cursor:pointer;padding:4px 8px;border-radius:10px}
.nx37-close:hover{background:rgba(148,163,184,.14)}
.nx37-loading,.nx37-profile-empty{padding:28px;text-align:center;color:#8491a6;font-size:12px}
.nx37-btn{border:1px solid rgba(148,163,184,.25);border-radius:11px;padding:10px 14px;font-weight:850;cursor:pointer;background:#151a24;color:#fff}
.nx37-btn.primary{background:linear-gradient(135deg,#6d4aff,#8958ff);border-color:transparent;color:#fff}
.nx37-btn.secondary{background:#151a24;color:#e8edf6}
.nx37-btn.whatsapp{background:#173c2b;border-color:#2c6b4c;color:#d6ffe8}
.nx37-btn:disabled{opacity:.48;cursor:not-allowed}

/* Proveedor dentro del modal de planes. */
#modalBg .nx37-modal-provider{grid-column:1/-1;border:1px solid rgba(139,92,246,.24);background:rgba(124,85,232,.08);border-radius:12px;padding:10px 12px;display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:2px}
#modalBg .nx37-modal-provider[hidden]{display:none!important}
#modalBg .nx37-modal-provider>span{font-size:9px;font-weight:850;letter-spacing:.05em;text-transform:uppercase;color:#8791a4}
#modalBg .nx37-modal-provider button{border:0;background:transparent;padding:0;color:inherit;font:inherit;font-weight:900;cursor:pointer;text-decoration:underline;text-decoration-style:dotted;text-underline-offset:3px}
#modalBg .nx37-modal-provider small{margin-left:auto;font-size:9px;color:#7f8ba0}
#modalBg .nx37-quick-buy-btn{border:1px solid rgba(34,211,238,.42);background:rgba(34,211,238,.10);color:#d9fbff;border-radius:10px;padding:10px 14px;font-weight:900;cursor:pointer}
#modalBg .nx37-quick-buy-btn:hover{background:rgba(34,211,238,.17)}
#modalBg .nx37-quick-buy-btn:disabled{opacity:.45;cursor:not-allowed}
#modalBg .nx37-quick-buy-btn[hidden]{display:none!important}

/* Enlace de proveedor en tarjetas: solo V37 lo inserta para invitados. */
#grid .product .product-info .nx37-card-provider{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:0;background:transparent;padding:2px 0 0;margin:0;color:inherit;opacity:.72;font-size:9px;font-weight:800;cursor:pointer;text-align:left}
#grid .product .product-info .nx37-card-provider:hover{opacity:1;text-decoration:underline;text-decoration-style:dotted;text-underline-offset:2px}

/* Compra rapida. */
.nx37-quick-modal{width:min(680px,100%);max-height:min(92vh,820px);overflow:auto;border-radius:18px;background:linear-gradient(155deg,#121725,#090c13);border:1px solid rgba(139,92,246,.28);box-shadow:0 25px 70px rgba(0,0,0,.46);color:#eef4ff}
.nx37-quick-head{display:flex;justify-content:space-between;gap:14px;padding:18px 20px;border-bottom:1px solid rgba(148,163,184,.16)}
.nx37-quick-head h3{margin:3px 0 4px;font-size:20px}
.nx37-quick-head p{margin:0;color:#8d99aa;font-size:10px;line-height:1.55}
.nx37-quick-summary{margin:16px 18px 0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.nx37-quick-summary>div{border:1px solid rgba(148,163,184,.16);background:rgba(255,255,255,.025);border-radius:11px;padding:10px 11px;min-width:0}
.nx37-quick-summary span{display:block;color:#7f8ba0;font-size:8px;text-transform:uppercase;font-weight:850;letter-spacing:.04em;margin-bottom:4px}
.nx37-quick-summary b,.nx37-quick-summary button{font-size:11px;font-weight:900;color:#f6f8fc;word-break:break-word}
.nx37-quick-summary button{border:0;background:transparent;padding:0;cursor:pointer;text-align:left;text-decoration:underline;text-decoration-style:dotted;text-underline-offset:3px}
.nx37-quick-form{padding:15px 18px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
.nx37-quick-form label{display:block}
.nx37-quick-form label:nth-child(4){grid-column:1/-1}
.nx37-quick-form label>span{display:block;font-size:9px;font-weight:850;color:#a5afbd;margin-bottom:5px}
.nx37-quick-form label>span em{color:#fb7185;font-style:normal}
.nx37-quick-form label>span small{font-weight:650;color:#7f8ba0}
.nx37-quick-form input,.nx37-quick-form select,.nx37-quick-form textarea{width:100%;border:1px solid rgba(148,163,184,.22);background:#0b0f17;color:#fff;border-radius:10px;padding:10px 11px;outline:none;font-size:10px}
.nx37-quick-form input:focus,.nx37-quick-form select:focus,.nx37-quick-form textarea:focus{border-color:#8b5cf6;box-shadow:0 0 0 3px rgba(139,92,246,.10)}
.nx37-form-error{grid-column:1/-1;min-height:16px;color:#fb7185;font-size:9px;font-weight:750}
.nx37-quick-actions{display:flex;justify-content:flex-end;gap:8px;padding:0 18px 18px;flex-wrap:wrap}

/* Perfil publico. */
.nx37-provider-profile-modal{width:min(620px,100%);max-height:90vh;overflow:auto;border-radius:18px;background:linear-gradient(155deg,#111725,#090c13);border:1px solid rgba(139,92,246,.28);box-shadow:0 25px 70px rgba(0,0,0,.46);color:#eef4ff}
.nx37-profile-head{display:flex;gap:13px;align-items:center;padding:19px;border-bottom:1px solid rgba(148,163,184,.16)}
.nx37-profile-avatar{width:62px;height:62px;border-radius:17px;overflow:hidden;background:rgba(139,92,246,.14);display:grid;place-items:center;flex:0 0 auto;border:1px solid rgba(139,92,246,.25)}
.nx37-profile-avatar img{width:100%;height:100%;object-fit:cover}.nx37-profile-avatar span{font-size:28px}
.nx37-profile-title{min-width:0;flex:1}.nx37-profile-title h3{margin:3px 0 6px;font-size:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nx37-status{display:inline-flex!important;align-items:center;gap:4px;font-size:9px!important;font-weight:850!important;text-transform:none!important;letter-spacing:0!important;margin:0!important}.nx37-status.available{color:#86efac!important}.nx37-status.delayed{color:#fde68a!important}.nx37-status.offline{color:#fda4af!important}
.nx37-profile-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;padding:16px 18px 8px}.nx37-profile-stats>div{border:1px solid rgba(148,163,184,.16);border-radius:12px;padding:12px;background:rgba(255,255,255,.025)}.nx37-profile-stats span{display:block;color:#8d99aa;font-size:8px;text-transform:uppercase;font-weight:850}.nx37-profile-stats b{display:block;font-size:22px;margin:3px 0}.nx37-profile-stats small{font-size:8px;color:#6f7c90}
.nx37-profile-info{padding:8px 18px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.nx37-profile-info>div{border:1px solid rgba(148,163,184,.14);border-radius:10px;padding:10px}.nx37-profile-info span{display:block;color:#8d99aa;font-size:8px;margin-bottom:4px}.nx37-profile-info b{font-size:10px}
.nx37-profile-description{margin:8px 18px 4px;border:1px solid rgba(148,163,184,.14);border-radius:11px;padding:12px;color:#c9d2df;font-size:10px;line-height:1.65;white-space:pre-wrap}
.nx37-profile-actions{padding:13px 18px 18px;display:flex;justify-content:flex-end}

/* Editor de perfil dentro del Centro Proveedor. */
.nx37-provider-editor{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(230px,.75fr);gap:14px}
.nx37-provider-editor-main,.nx37-provider-editor-side{border:1px solid rgba(148,163,184,.18);background:rgba(255,255,255,.025);border-radius:14px;padding:15px}
.nx37-editor-heading{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:13px}.nx37-editor-heading h4{margin:3px 0 4px;font-size:15px}.nx37-editor-heading p{margin:0;color:#7e8a9d;font-size:9px;line-height:1.5}
.nx37-profile-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.nx37-profile-form-grid label.full{grid-column:1/-1}.nx37-profile-form-grid label>span{display:block;color:#a8b1bf;font-size:9px;font-weight:850;margin-bottom:5px}.nx37-profile-form-grid input,.nx37-profile-form-grid textarea,.nx37-profile-form-grid select{width:100%;border:1px solid rgba(148,163,184,.22);background:#0c1018;color:#fff;border-radius:9px;padding:9px 10px;font-size:10px;outline:none}.nx37-profile-form-grid small{display:block;color:#6f7c90;font-size:8px;line-height:1.4;margin-top:4px}
.nx37-avatar-input{display:flex;gap:7px}.nx37-avatar-input input:first-child{flex:1;min-width:0}.nx37-avatar-input .nx37-btn{padding:8px 10px;white-space:nowrap}
.nx37-switches{display:grid;gap:8px;margin-top:12px}.nx37-switches label{display:flex;align-items:center;gap:8px;color:#c4cedc;font-size:9px;font-weight:800}.nx37-switches input{accent-color:#8b5cf6}
.nx37-editor-note{margin-top:11px;border:1px solid rgba(34,211,238,.18);background:rgba(34,211,238,.06);border-radius:10px;padding:9px 10px;color:#9ccdd4;font-size:8px;line-height:1.5}.nx37-editor-actions{display:flex;justify-content:flex-end;margin-top:12px}
.nx37-provider-editor-side{text-align:center}.nx37-editor-avatar{width:82px;height:82px;margin:0 auto 9px;border-radius:22px;overflow:hidden;background:rgba(139,92,246,.13);display:grid;place-items:center;font-size:34px}.nx37-editor-avatar img{width:100%;height:100%;object-fit:cover}.nx37-provider-editor-side>strong{font-size:14px}.nx37-side-stat{text-align:left;border:1px solid rgba(148,163,184,.14);border-radius:10px;padding:10px;margin-top:10px}.nx37-side-stat span{display:block;color:#7e8a9d;font-size:8px}.nx37-side-stat b{display:block;font-size:19px;margin:2px 0}.nx37-side-stat small,.nx37-provider-editor-side p{color:#6f7c90;font-size:8px;line-height:1.5}

/* Admin: ajuste de contador de ventas. */
.nx37-admin-sales-modal{width:min(520px,100%);border-radius:17px;background:linear-gradient(155deg,#111725,#090c13);border:1px solid rgba(139,92,246,.28);box-shadow:0 25px 70px rgba(0,0,0,.46);color:#eef4ff;padding-bottom:16px}.nx37-admin-sales-head{display:flex;justify-content:space-between;gap:12px;padding:17px;border-bottom:1px solid rgba(148,163,184,.16)}.nx37-admin-sales-head h3{margin:3px 0 0}.nx37-admin-sales-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:16px}.nx37-admin-sales-grid>div{border:1px solid rgba(148,163,184,.15);border-radius:10px;padding:10px}.nx37-admin-sales-grid span{display:block;color:#8793a5;font-size:8px}.nx37-admin-sales-grid b{display:block;font-size:19px;margin-top:4px}.nx37-admin-sales-grid input{width:100%;margin-top:5px;border:1px solid rgba(148,163,184,.22);background:#0b0f17;color:#fff;border-radius:8px;padding:8px}.nx37-admin-sales-modal>p{margin:0 16px 14px;color:#8491a6;font-size:9px;line-height:1.55}

/* Carrusel V37: direccion contraria a V36 y dos grupos identicos sin huecos. */
#grid .product .product-info h3.nx37-title-carousel{overflow:hidden;white-space:nowrap;position:relative}
#grid .product .product-info h3.nx37-title-carousel .nx37-title-track{display:inline-flex;align-items:baseline;width:max-content;will-change:transform;animation:nx37-product-title-carousel var(--nx37-title-duration,12s) linear infinite}
#grid .product .product-info h3.nx37-title-carousel .nx37-title-group{display:inline-flex;align-items:baseline;flex:0 0 auto}
#grid .product .product-info h3.nx37-title-carousel .nx37-title-copy{flex:0 0 auto;margin-right:2em;font:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;-webkit-text-fill-color:inherit}
#grid .product:hover .product-info h3.nx37-title-carousel .nx37-title-track{animation-play-state:paused}
@keyframes nx37-product-title-carousel{from{transform:translateX(-50%)}to{transform:translateX(0)}}

@media (max-width:760px){
  .nx37-quick-summary,.nx37-quick-form,.nx37-profile-stats,.nx37-profile-info,.nx37-profile-form-grid,.nx37-admin-sales-grid{grid-template-columns:1fr}
  .nx37-quick-form label:nth-child(4),.nx37-profile-form-grid label.full{grid-column:auto}
  .nx37-provider-editor{grid-template-columns:1fr}
  .nx37-editor-heading{flex-direction:column}
  #modalBg .nx37-modal-provider small{margin-left:0;width:100%}
}
@media (prefers-reduced-motion:reduce){
  #grid .product .product-info h3.nx37-title-carousel .nx37-title-track{animation:none;transform:none}
  #grid .product .product-info h3.nx37-title-carousel .nx37-title-group[aria-hidden="true"]{display:none}
  #grid .product .product-info h3.nx37-title-carousel .nx37-title-copy:not(:first-child){display:none}
}

/* Tema claro: mismos componentes, contraste adaptado sin afectar el resto del panel. */
body[data-nx-theme="light"] .nx37-quick-modal,
body[data-nx-theme="light"] .nx37-provider-profile-modal,
body[data-nx-theme="light"] .nx37-admin-sales-modal{background:#f8fbff;color:#17233a;border-color:#d9e2ef;box-shadow:0 25px 70px rgba(15,23,42,.18)}
body[data-nx-theme="light"] .nx37-quick-head,
body[data-nx-theme="light"] .nx37-profile-head,
body[data-nx-theme="light"] .nx37-admin-sales-head{border-bottom-color:#dce5f0}
body[data-nx-theme="light"] .nx37-quick-summary>div,
body[data-nx-theme="light"] .nx37-profile-stats>div,
body[data-nx-theme="light"] .nx37-profile-info>div,
body[data-nx-theme="light"] .nx37-profile-description,
body[data-nx-theme="light"] .nx37-provider-editor-main,
body[data-nx-theme="light"] .nx37-provider-editor-side,
body[data-nx-theme="light"] .nx37-side-stat,
body[data-nx-theme="light"] .nx37-admin-sales-grid>div{background:#fff;border-color:#dce5f0;color:#17233a}
body[data-nx-theme="light"] .nx37-quick-summary b,
body[data-nx-theme="light"] .nx37-quick-summary button{color:#17233a}
body[data-nx-theme="light"] .nx37-quick-form input,
body[data-nx-theme="light"] .nx37-quick-form select,
body[data-nx-theme="light"] .nx37-quick-form textarea,
body[data-nx-theme="light"] .nx37-profile-form-grid input,
body[data-nx-theme="light"] .nx37-profile-form-grid textarea,
body[data-nx-theme="light"] .nx37-profile-form-grid select,
body[data-nx-theme="light"] .nx37-admin-sales-grid input{background:#fff;color:#17233a;border-color:#ccd8e6}
body[data-nx-theme="light"] .nx37-btn.secondary{background:#fff;color:#22324d;border-color:#ccd8e6}
body[data-nx-theme="light"] .nx37-close{color:#17233a}
body[data-nx-theme="light"] #modalBg .nx37-quick-buy-btn{color:#0f6071;background:#e9fbff;border-color:#9edce8}
