/* ===========================================================
   Nébula store — public design system (real rebuild)
   Uses the admin panel's crimson/black language. New `nx-`
   class namespace so it REPLACES the old layout instead of
   layering over it. Injected on every public page by layout.js.
   =========================================================== */
:root {
  --nx-bg: #08080b;
  --nx-surface: #101015;
  --nx-surface-2: #16161d;
  --nx-surface-3: #1d1d26;
  --nx-line: rgba(255, 255, 255, 0.08);
  --nx-line-2: rgba(255, 255, 255, 0.14);
  --nx-line-red: rgba(224, 22, 43, 0.32);
  --nx-text: #f3f1f4;
  --nx-muted: #a6a4af;
  --nx-faint: #6e6c78;
  --nx-red: #e0162b;
  --nx-red-bright: #ff3b4e;
  --nx-grad: linear-gradient(135deg, #ff3b4e 0%, #e0162b 46%, #7a0c18 100%);
  --nx-grad-soft: linear-gradient(135deg, rgba(255, 59, 78, 0.16), rgba(122, 12, 24, 0.10));
  --nx-green: #35c98c;
  --nx-amber: #f0b429;
  --nx-r: 14px;
  --nx-r-sm: 10px;
  --nx-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  --nx-shadow-red: 0 14px 36px rgba(224, 22, 43, 0.24);
  --nx-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --nx-mono: "SFMono-Regular", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}

/* page base */
body.nx {
  margin: 0;
  font-family: var(--nx-sans);
  color: var(--nx-text);
  background:
    radial-gradient(1100px 520px at 82% -8%, rgba(224, 22, 43, 0.14), transparent 60%),
    radial-gradient(900px 480px at 4% 0%, rgba(122, 12, 24, 0.12), transparent 55%),
    var(--nx-bg);
  -webkit-font-smoothing: antialiased;
}
body.nx * { box-sizing: border-box; }
.nx ::selection { background: rgba(224, 22, 43, 0.34); color: #fff; }
.nx-wrap { width: min(1240px, 92vw); margin: 0 auto; }

/* ---------- components ---------- */
.nx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 0.9rem; line-height: 1;
  padding: 11px 17px; border-radius: var(--nx-r-sm);
  border: 1px solid var(--nx-line-2); background: var(--nx-surface-3); color: var(--nx-text);
  cursor: pointer; text-decoration: none;
  transition: transform .14s ease, background .14s ease, border-color .14s ease, box-shadow .14s ease, opacity .14s ease;
  white-space: nowrap;
}
.nx-btn:hover { transform: translateY(-1px); background: #24242e; }
.nx-btn:focus-visible { outline: 2px solid var(--nx-red-bright); outline-offset: 2px; }
.nx-btn--primary { background: var(--nx-grad); border-color: transparent; color: #fff; box-shadow: var(--nx-shadow-red); }
.nx-btn--primary:hover { box-shadow: 0 18px 44px rgba(224, 22, 43, 0.4); }
.nx-btn--secondary { background: rgba(255,255,255,.04); border-color: var(--nx-line-2); }
.nx-btn--secondary:hover { background: rgba(255,255,255,.08); }
.nx-btn--ghost { background: transparent; border-color: transparent; color: var(--nx-muted); }
.nx-btn--ghost:hover { background: rgba(255,255,255,.05); color: var(--nx-text); }
.nx-btn--sm { padding: 8px 12px; font-size: 0.82rem; }
.nx-btn--block { width: 100%; }

.nx-input {
  width: 100%; font: inherit; font-size: 0.92rem; color: var(--nx-text);
  background: #0c0c11; border: 1px solid var(--nx-line-2); border-radius: var(--nx-r-sm);
  padding: 11px 13px; transition: border-color .14s ease, box-shadow .14s ease;
}
.nx-input::placeholder { color: var(--nx-faint); }
.nx-input:focus { outline: none; border-color: var(--nx-red); box-shadow: 0 0 0 3px rgba(224,22,43,.2); }

.nx-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.72rem; font-weight: 700; padding: 4px 9px; border-radius: 7px;
  border: 1px solid var(--nx-line); background: var(--nx-surface-3); color: var(--nx-muted);
}
.nx-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.nx-badge--featured { background: var(--nx-grad); border-color: transparent; color: #fff; }
.nx-badge--featured::before { display: none; }
.nx-badge--in { color: var(--nx-green); border-color: rgba(53,201,140,.3); background: rgba(53,201,140,.08); }
.nx-badge--out { color: #ff8a96; border-color: rgba(224,22,43,.32); background: rgba(224,22,43,.08); }

.nx-card-surface { background: var(--nx-surface); border: 1px solid var(--nx-line); border-radius: var(--nx-r); }

/* ---------- header ---------- */
.nx-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--nx-line);
  background: rgba(10, 10, 14, 0.72);
  backdrop-filter: blur(14px);
}
.nx-header-inner { display: flex; align-items: center; gap: 18px; height: 66px; }
.nx-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--nx-text); }
.nx-brand img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; border: 1px solid var(--nx-line-2); box-shadow: var(--nx-shadow-red); }
.nx-brand .nm { font-weight: 800; letter-spacing: -0.01em; font-size: 1.1rem; }
.nx-nav { display: flex; gap: 4px; margin-left: 10px; }
.nx-nav a {
  padding: 9px 14px; border-radius: var(--nx-r-sm); color: var(--nx-muted);
  font-weight: 600; font-size: 0.92rem; text-decoration: none; transition: all .14s ease; position: relative;
}
.nx-nav a:hover { color: var(--nx-text); background: rgba(255,255,255,.04); }
.nx-nav a.active { color: #fff; }
.nx-nav a.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px;
  border-radius: 2px; background: var(--nx-grad);
}
.nx-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* cart */
.nx-cart {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: var(--nx-r-sm);
  border: 1px solid var(--nx-line-2); background: rgba(255,255,255,.04); color: var(--nx-text);
  text-decoration: none; transition: all .14s ease;
}
.nx-cart:hover { background: rgba(255,255,255,.08); }
.nx-cart-badge {
  position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 999px; background: var(--nx-grad); color: #fff; font-size: 11px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--nx-bg);
}

/* profile dropdown */
.nx-profile { position: relative; }
.nx-profile-btn {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  border: 1px solid var(--nx-line-2); background: rgba(255,255,255,.04); color: var(--nx-text);
  padding: 6px 12px 6px 6px; border-radius: 999px; font: inherit; font-weight: 600; font-size: 0.9rem;
  transition: all .14s ease;
}
.nx-profile-btn:hover { background: rgba(255,255,255,.08); }
.nx-profile-btn .av {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto; object-fit: cover;
  background: var(--nx-surface-3) center/cover no-repeat; display: grid; place-items: center; color: var(--nx-red-bright);
}
.nx-profile-btn .nm { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-profile-btn .caret { color: var(--nx-faint); font-size: 0.7rem; }
.nx-menu {
  position: absolute; top: calc(100% + 10px); right: 0; min-width: 210px;
  background: var(--nx-surface-2); border: 1px solid var(--nx-line-2); border-radius: var(--nx-r);
  box-shadow: var(--nx-shadow); padding: 8px; z-index: 60;
  opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .16s ease, transform .16s ease;
}
.nx-profile.open .nx-menu { opacity: 1; transform: none; pointer-events: auto; }
.nx-menu .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--nx-line); margin-bottom: 6px; }
.nx-menu .who .nm { font-weight: 700; font-size: 0.9rem; }
.nx-menu .who .id { font-size: 0.72rem; color: var(--nx-faint); font-family: var(--nx-mono); }
.nx-menu a, .nx-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border-radius: var(--nx-r-sm); color: var(--nx-text);
  font: inherit; font-size: 0.88rem; text-decoration: none; background: none; border: none; cursor: pointer; text-align: left;
  transition: background .12s ease;
}
.nx-menu a:hover, .nx-menu button:hover { background: rgba(255,255,255,.05); }
.nx-menu i { width: 16px; text-align: center; color: var(--nx-muted); }
.nx-menu .nx-admin-item { color: var(--nx-red-bright); }
.nx-menu .nx-admin-item i { color: var(--nx-red-bright); }
.nx-menu .danger { color: #ff8a96; }

/* hamburger (mobile) */
.nx-burger { display: none; }

/* ---------- catalog ---------- */
.nx-hero { padding: 36px 0 8px; }
.nx-hero .eyebrow { font-size: 0.72rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--nx-red-bright); font-weight: 700; }
.nx-hero h1 { margin: 10px 0 6px; font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em; }
.nx-hero p { margin: 0; color: var(--nx-muted); max-width: 60ch; }

.nx-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 22px 0 18px; }
.nx-search { position: relative; flex: 1 1 280px; }
.nx-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--nx-faint); }
.nx-search input {
  width: 100%; font: inherit; color: var(--nx-text);
  background: #0c0c11; border: 1px solid var(--nx-line-2); border-radius: 999px;
  padding: 12px 16px 12px 40px;
}
.nx-search input:focus { outline: none; border-color: var(--nx-red); box-shadow: 0 0 0 3px rgba(224,22,43,.18); }
.nx-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.nx-chip {
  border: 1px solid var(--nx-line-2); background: var(--nx-surface-3); color: var(--nx-muted);
  padding: 9px 14px; border-radius: 999px; font-size: 0.84rem; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px; transition: all .14s ease;
}
.nx-chip:hover { color: var(--nx-text); }
.nx-chip.active, .nx-chip.is-active { background: var(--nx-grad); border-color: transparent; color: #fff; box-shadow: var(--nx-shadow-red); }
.nx-sort { margin-left: auto; }
.nx-sort select {
  appearance: none; font: inherit; color: var(--nx-text); background: var(--nx-surface-3);
  border: 1px solid var(--nx-line-2); border-radius: var(--nx-r-sm); padding: 10px 34px 10px 14px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath fill='%23a6a4af' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}

.nx-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(244px, 1fr));
  gap: 18px; padding-bottom: 60px;
}

/* ---------- product card (brand-new component) ---------- */
.nx-card {
  display: flex; flex-direction: column;
  background: var(--nx-surface); border: 1px solid var(--nx-line); border-radius: var(--nx-r);
  overflow: hidden; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.nx-card:hover { transform: translateY(-5px); border-color: var(--nx-line-red); box-shadow: 0 24px 50px rgba(224,22,43,.18); }
.nx-card-thumb { position: relative; aspect-ratio: 16 / 11; background: #000 center/cover no-repeat; }
.nx-card-thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(8,8,11,.78)); }
.nx-card-flags { position: absolute; top: 10px; left: 10px; z-index: 2; display: flex; gap: 6px; flex-wrap: wrap; }
.nx-card-body { padding: 14px 15px 16px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.nx-card-title { font-weight: 700; font-size: 1rem; line-height: 1.25; min-height: 2.5em; }
.nx-card-stock { display: inline-flex; align-items: center; gap: 7px; font-size: 0.78rem; color: var(--nx-muted); }
.nx-card-stock .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--nx-green); }
.nx-card-stock.out .dot { background: #ff5668; }
.nx-card-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.nx-card-list li { position: relative; padding-left: 18px; font-size: 0.8rem; color: var(--nx-muted); line-height: 1.35; }
.nx-card-list li::before { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; left: 0; top: 1px; color: var(--nx-red-bright); font-size: 0.66rem; }
.nx-card-price { display: flex; align-items: baseline; gap: 9px; margin-top: auto; padding-top: 4px; }
.nx-card-price .now { font-size: 1.3rem; font-weight: 800; }
.nx-card-price .old { font-size: 0.85rem; color: var(--nx-faint); text-decoration: line-through; }
.nx-card-actions { display: flex; gap: 8px; margin-top: 4px; }
.nx-card-actions .nx-btn { flex: 1; }

.nx-empty {
  grid-column: 1 / -1; text-align: center; color: var(--nx-faint);
  padding: 50px 20px; border: 1px dashed var(--nx-line-2); border-radius: var(--nx-r); background: var(--nx-surface);
}

/* ---------- footer ---------- */
.nx-footer { border-top: 1px solid var(--nx-line); margin-top: 30px; padding: 34px 0 40px; color: var(--nx-muted); }
.nx-footer-inner { display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; }
.nx-footer-brand { max-width: 320px; }
.nx-footer-brand .row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.nx-footer-brand img { width: 32px; height: 32px; border-radius: 9px; object-fit: cover; }
.nx-footer-brand .nm { font-weight: 800; }
.nx-footer-brand p { font-size: 0.86rem; line-height: 1.5; margin: 0 0 8px; }
.nx-footer-col { display: flex; flex-direction: column; gap: 9px; }
.nx-footer-col .t { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--nx-faint); font-weight: 700; margin-bottom: 2px; }
.nx-footer-col a { color: var(--nx-muted); text-decoration: none; font-size: 0.88rem; transition: color .12s ease; }
.nx-footer-col a:hover { color: var(--nx-text); }
.nx-footer-copy { margin-top: 24px; font-size: 0.78rem; color: var(--nx-faint); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .nx-nav { display: none; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; gap: 2px;
    background: var(--nx-surface-2); border-bottom: 1px solid var(--nx-line); padding: 10px; }
  .nx-header.open .nx-nav { display: flex; }
  .nx-burger { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px;
    border-radius: var(--nx-r-sm); border: 1px solid var(--nx-line-2); background: rgba(255,255,255,.04); color: var(--nx-text); cursor: pointer; }
  .nx-profile-btn .nm { display: none; }
}
@media (prefers-reduced-motion: reduce) { body.nx * { transition: none !important; animation: none !important; } }

/* ===========================================================
   Page components (cart, checkout, services, reviews, redeem,
   login/success/error). Same crimson/black language as admin.
   =========================================================== */

/* generic page scaffold */
.nx-page { padding: 36px 0 60px; }
.nx-page-head { margin-bottom: 22px; }
.nx-page-head .eyebrow { font-size: 0.72rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--nx-red-bright); font-weight: 700; }
.nx-page-head h1 { margin: 8px 0 6px; font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 800; letter-spacing: -0.02em; }
.nx-page-head p { margin: 0; color: var(--nx-muted); max-width: 64ch; }
.nx-panel { background: var(--nx-surface); border: 1px solid var(--nx-line); border-radius: var(--nx-r); padding: 20px; }
.nx-muted { color: var(--nx-muted); }

/* ---------- cart ---------- */
.nx-cart-layout { display: grid; grid-template-columns: 1.7fr 1fr; gap: 20px; align-items: start; }
.nx-cart-items { display: flex; flex-direction: column; gap: 12px; }
.nx-cart-items ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.nx-cart-items li {
  display: flex; align-items: center; gap: 14px; padding: 12px;
  background: var(--nx-surface); border: 1px solid var(--nx-line); border-radius: var(--nx-r);
}
.nx-cart-items li img { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; border: 1px solid var(--nx-line-2); background: #000; }
.nx-cart-items li .name { font-weight: 600; flex: 1; }
.nx-cart-items li .price { font-weight: 800; font-size: 1.05rem; }
.nx-cart-items li .remove-item {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--nx-line-2);
  background: rgba(255,255,255,.03); color: var(--nx-muted); cursor: pointer; font-size: 1.1rem; line-height: 1;
  transition: all .14s ease;
}
.nx-cart-items li .remove-item:hover { border-color: var(--nx-line-red); color: #ff8a96; background: rgba(224,22,43,.1); }
.nx-summary { background: var(--nx-surface); border: 1px solid var(--nx-line); border-radius: var(--nx-r); padding: 18px; position: sticky; top: 86px; }
.nx-cart-total { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--nx-line); }
.nx-cart-total strong { color: var(--nx-muted); font-weight: 600; }
.nx-cart-total span { font-size: 1.6rem; font-weight: 800; }
.nx-pay { display: flex; flex-direction: column; gap: 10px; }
.payment-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  font: inherit; font-weight: 700; font-size: 0.95rem; padding: 13px 16px; border-radius: var(--nx-r-sm);
  border: 1px solid var(--nx-line-2); background: var(--nx-surface-3); color: var(--nx-text); cursor: pointer;
  transition: all .14s ease;
}
.payment-btn img { height: 20px; width: auto; }
.payment-btn:hover:not(:disabled) { transform: translateY(-1px); background: #24242e; }
.payment-btn:disabled { opacity: .5; cursor: not-allowed; }
.payment-btn.preferred-payment, #pix-button { background: var(--nx-grad); border-color: transparent; color: #fff; box-shadow: var(--nx-shadow-red); }
.pay-info { font-size: 0.8rem; color: var(--nx-faint); margin-top: 12px; line-height: 1.5; }
.nx-trust { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.nx-trust article { padding: 12px; border: 1px solid var(--nx-line); border-radius: var(--nx-r-sm); background: rgba(255,255,255,.02); }
.nx-trust strong { display: block; margin-bottom: 4px; font-size: 0.88rem; }
.nx-trust p { margin: 0; font-size: 0.82rem; color: var(--nx-muted); line-height: 1.45; }
.empty-state { color: var(--nx-faint); text-align: center; padding: 36px 16px; border: 1px dashed var(--nx-line-2); border-radius: var(--nx-r); }

/* ---------- checkout / success / error ---------- */
.nx-center { min-height: 70vh; display: grid; place-items: center; padding: 40px 0; }
.nx-result {
  width: min(560px, 92vw); text-align: center; background: var(--nx-surface);
  border: 1px solid var(--nx-line); border-radius: var(--nx-r); padding: 36px 28px; box-shadow: var(--nx-shadow);
}
.nx-result .ico { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 16px; font-size: 1.6rem; }
.nx-result .ico.ok { background: rgba(53,201,140,.12); color: var(--nx-green); border: 1px solid rgba(53,201,140,.3); }
.nx-result .ico.err { background: rgba(224,22,43,.12); color: var(--nx-red-bright); border: 1px solid var(--nx-line-red); }
.nx-result .ico.wait { background: var(--nx-grad-soft); color: var(--nx-red-bright); border: 1px solid var(--nx-line-red); }
.nx-result h1 { margin: 0 0 8px; font-size: 1.5rem; font-weight: 800; }
.nx-result p { margin: 0 0 18px; color: var(--nx-muted); }
.nx-codes { text-align: left; background: #0c0c11; border: 1px solid var(--nx-line-2); border-radius: var(--nx-r-sm); padding: 14px; font-family: var(--nx-mono); font-size: 0.86rem; white-space: pre-wrap; word-break: break-word; margin: 16px 0; }
.nx-spinner { width: 40px; height: 40px; border-radius: 50%; border: 3px solid rgba(255,255,255,.12); border-top-color: var(--nx-red-bright); animation: nxspin .8s linear infinite; margin: 0 auto 16px; }
@keyframes nxspin { to { transform: rotate(360deg); } }

/* ---------- services ---------- */
.nx-services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.nx-service-card { background: var(--nx-surface); border: 1px solid var(--nx-line); border-radius: var(--nx-r); padding: 20px; display: flex; flex-direction: column; gap: 12px; transition: transform .18s ease, border-color .18s ease; }
.nx-service-card:hover { transform: translateY(-4px); border-color: var(--nx-line-red); }
.nx-service-card .ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--nx-grad-soft); color: var(--nx-red-bright); font-size: 1.2rem; border: 1px solid var(--nx-line-red); }
.nx-service-card h3 { margin: 0; font-size: 1.1rem; }
.nx-service-card p { margin: 0; color: var(--nx-muted); font-size: 0.88rem; line-height: 1.5; flex: 1; }
.nx-maintenance { text-align: center; padding: 40px; border: 1px dashed var(--nx-line-2); border-radius: var(--nx-r); background: var(--nx-surface); }
.nx-maintenance .ico { font-size: 2rem; color: var(--nx-amber); margin-bottom: 12px; }

/* ---------- reviews ---------- */
.nx-reviews-layout { display: grid; grid-template-columns: 1fr 1.6fr; gap: 20px; align-items: start; }
.nx-review-form { background: var(--nx-surface); border: 1px solid var(--nx-line); border-radius: var(--nx-r); padding: 20px; position: sticky; top: 86px; }
.nx-field { margin-bottom: 14px; }
.nx-field label { display: block; font-size: 0.82rem; color: var(--nx-muted); margin-bottom: 6px; font-weight: 600; }
.nx-stars { display: inline-flex; gap: 6px; font-size: 1.4rem; color: var(--nx-faint); }
.nx-stars i { cursor: pointer; transition: color .12s ease, transform .12s ease; }
.nx-stars i.on, .nx-stars i:hover { color: var(--nx-amber); }
.nx-stars i:hover { transform: scale(1.12); }
.nx-reviews-list { display: flex; flex-direction: column; gap: 12px; }
.nx-review { background: var(--nx-surface); border: 1px solid var(--nx-line); border-radius: var(--nx-r); padding: 16px; }
.nx-review-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.nx-review-top .av { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--nx-surface-3) center/cover; display: grid; place-items: center; color: var(--nx-red-bright); }
.nx-review-top .nm { font-weight: 700; font-size: 0.9rem; }
.nx-review-top .rt { margin-left: auto; color: var(--nx-amber); font-size: 0.85rem; }
.nx-review p { margin: 0; color: var(--nx-muted); font-size: 0.9rem; line-height: 1.5; }
.nx-summary-rating { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.nx-summary-rating .big { font-size: 2.4rem; font-weight: 800; }
.nx-summary-rating .stars { color: var(--nx-amber); }

/* ---------- redeem ---------- */
.nx-redeem { width: min(520px, 92vw); margin: 6vh auto 0; text-align: center; }
.nx-redeem .nx-panel { padding: 30px 26px; }
.nx-redeem .ico { width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 16px; background: var(--nx-grad-soft); color: var(--nx-red-bright); font-size: 1.5rem; border: 1px solid var(--nx-line-red); }
.nx-redeem h1 { margin: 0 0 6px; font-size: 1.5rem; font-weight: 800; }
.nx-redeem p { margin: 0 0 18px; color: var(--nx-muted); }
.nx-redeem-input { font-size: 1.1rem !important; text-align: center; letter-spacing: 0.12em; text-transform: uppercase; padding: 14px !important; font-family: var(--nx-mono); }

/* ---------- login / auth card ---------- */
.nx-auth { width: min(440px, 92vw); margin: 8vh auto 0; text-align: center; }
.nx-auth .nx-panel { padding: 34px 28px; }
.nx-auth img.logo { width: 56px; height: 56px; border-radius: 15px; object-fit: cover; margin-bottom: 16px; box-shadow: var(--nx-shadow-red); }
.nx-auth h1 { margin: 0 0 6px; font-size: 1.5rem; font-weight: 800; }
.nx-auth p { margin: 0 0 22px; color: var(--nx-muted); }
.nx-discord-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  background: #5865F2; color: #fff; border: none; border-radius: var(--nx-r-sm); padding: 14px 18px;
  font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer; text-decoration: none; transition: filter .14s ease, transform .14s ease;
}
.nx-discord-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* responsive */
@media (max-width: 860px) {
  .nx-cart-layout, .nx-reviews-layout { grid-template-columns: 1fr; }
  .nx-summary, .nx-review-form { position: static; }
}

/* ---------- reviews (reviews.js generated markup) ---------- */
#review-modal { display: none; position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.66); backdrop-filter: blur(4px); align-items: center; justify-content: center; padding: 20px; }
#review-modal.active { display: flex; }
#review-modal .modal-content {
  width: min(520px, 100%); background: var(--nx-surface-2); border: 1px solid var(--nx-line-2);
  border-radius: var(--nx-r); padding: 24px; box-shadow: var(--nx-shadow); position: relative;
}
#review-modal .close-btn { position: absolute; top: 12px; right: 14px; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--nx-line-2); background: rgba(255,255,255,.03); color: var(--nx-muted); cursor: pointer; font-size: 1.2rem; }
#review-modal .close-btn:hover { color: #ff8a96; border-color: var(--nx-line-red); }
#review-modal h2 { margin: 0 0 14px; }
#review-modal textarea { width: 100%; font: inherit; color: var(--nx-text); background: #0c0c11; border: 1px solid var(--nx-line-2); border-radius: var(--nx-r-sm); padding: 12px; margin: 12px 0; resize: vertical; }
#review-modal textarea:focus { outline: none; border-color: var(--nx-red); box-shadow: 0 0 0 3px rgba(224,22,43,.18); }
.modal-stars { display: inline-flex; gap: 8px; font-size: 1.5rem; color: var(--nx-faint); margin: 6px 0; }
.modal-stars i { cursor: pointer; transition: color .12s ease, transform .12s ease; }
.modal-stars i.fa-solid, .modal-stars i.active, .modal-stars i:hover { color: var(--nx-amber); }
#submit-review { width: 100%; }

.review-controls { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.review-controls label { font-size: 0.8rem; color: var(--nx-muted); margin-right: 8px; }
.review-controls select { font: inherit; color: var(--nx-text); background: var(--nx-surface-3); border: 1px solid var(--nx-line-2); border-radius: var(--nx-r-sm); padding: 9px 12px; }
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.review-card { background: var(--nx-surface); border: 1px solid var(--nx-line); border-radius: var(--nx-r); padding: 16px; }
.review-meta { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.review-pack { font-weight: 700; font-size: 0.92rem; }
.review-author { color: var(--nx-muted); font-size: 0.82rem; }
.review-card .stars { color: var(--nx-amber); font-size: 0.85rem; margin-top: 4px; }
.review-card .date { color: var(--nx-faint); font-size: 0.78rem; white-space: nowrap; }
.review-verified { display: inline-flex; align-items: center; gap: 6px; font-size: 0.76rem; color: var(--nx-green); margin-bottom: 8px; }
.review-card .comment { color: var(--nx-muted); font-size: 0.9rem; line-height: 1.5; }
.no-reviews { color: var(--nx-faint); text-align: center; padding: 40px; border: 1px dashed var(--nx-line-2); border-radius: var(--nx-r); }
.average-rating { display: inline-flex; align-items: center; gap: 8px; color: var(--nx-muted); margin-top: 10px; }
.average-rating strong { color: var(--nx-amber); font-size: 1.2rem; }
#review-feedback { margin: 10px 0; font-size: 0.85rem; }
#review-feedback.error { color: #ff8a96; }
#review-feedback.success { color: var(--nx-green); }

/* ===========================================================
   Fixes + prefs modal + premium animations (round 5)
   =========================================================== */

/* CRITICAL: author display rules were overriding the hidden attribute,
   which made the "Entrar" button show even while logged in. */
.nx [hidden], .nx-header [hidden], [hidden] { display: none !important; }

/* language + currency modal */
.nx-modal {
  position: fixed; inset: 0; z-index: 90; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(0,0,0,.68); backdrop-filter: blur(5px);
}
.nx-modal.open { display: flex; animation: nxFade .18s ease; }
.nx-modal-box {
  width: min(420px, 100%); background: var(--nx-surface-2);
  border: 1px solid var(--nx-line-2); border-radius: var(--nx-r);
  box-shadow: var(--nx-shadow); overflow: hidden; animation: nxPop .2s cubic-bezier(.2,.8,.3,1.2);
}
.nx-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--nx-line); }
.nx-modal-head h3 { margin: 0; font-size: 1.05rem; display: flex; align-items: center; gap: 9px; }
.nx-modal-head h3 i { color: var(--nx-red-bright); }
.nx-modal-x { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--nx-line-2); background: rgba(255,255,255,.03); color: var(--nx-muted); cursor: pointer; }
.nx-modal-x:hover { color: #ff8a96; border-color: var(--nx-line-red); }
.nx-modal-body { padding: 18px; }
.nx-modal-body .nx-field { margin-bottom: 14px; }
.nx-modal-body .nx-field label { display: block; font-size: 0.82rem; color: var(--nx-muted); margin-bottom: 6px; font-weight: 600; }
.nx-modal-body select.nx-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath fill='%23a6a4af' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; cursor: pointer; }
.nx-prefs-note { font-size: 0.78rem; color: var(--nx-faint); line-height: 1.5; margin: 4px 0 0; display: flex; gap: 8px; }
.nx-prefs-note i { color: var(--nx-amber); margin-top: 2px; }
.nx-modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--nx-line); background: rgba(0,0,0,.18); }
.nx-currency-note { font-size: 0.8rem; color: var(--nx-faint); display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; }

/* ---------- premium animations ---------- */
@keyframes nxFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes nxPop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes nxRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* card entrance (staggered) */
.nx-grid .nx-card { animation: nxRise .42s ease both; }
.nx-grid .nx-card:nth-child(1) { animation-delay: .02s; }
.nx-grid .nx-card:nth-child(2) { animation-delay: .06s; }
.nx-grid .nx-card:nth-child(3) { animation-delay: .10s; }
.nx-grid .nx-card:nth-child(4) { animation-delay: .14s; }
.nx-grid .nx-card:nth-child(5) { animation-delay: .18s; }
.nx-grid .nx-card:nth-child(6) { animation-delay: .22s; }
.nx-grid .nx-card:nth-child(n+7) { animation-delay: .26s; }

/* dropdown menu animation (already had opacity transition; add slight scale) */
.nx-profile .nx-menu { transform-origin: top right; }
.nx-profile.open .nx-menu { animation: nxPop .16s ease; }

/* buy button press feedback */
.nx-btn--primary:active { transform: translateY(0) scale(.98); }

/* cart items + review cards + service cards entrance */
.nx-cart-items li, .review-card, .nx-service-card, .nx-result, .nx-redeem .nx-panel { animation: nxRise .4s ease both; }

@media (prefers-reduced-motion: reduce) {
  .nx-grid .nx-card, .nx-cart-items li, .review-card, .nx-service-card, .nx-result, .nx-redeem .nx-panel,
  .nx-modal.open, .nx-modal-box, .nx-profile.open .nx-menu { animation: none !important; }
}

/* ---------- redeem warnings ---------- */
.nx-redeem { width: min(720px, 92vw); }
.nx-warn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 22px; }
.nx-warn {
  display: flex; gap: 11px; padding: 14px; text-align: left;
  background: var(--nx-surface); border: 1px solid var(--nx-line); border-radius: var(--nx-r-sm);
  animation: nxRise .4s ease both;
}
.nx-warn i { color: var(--nx-red-bright); font-size: 1rem; margin-top: 2px; flex: 0 0 auto; }
.nx-warn .t { font-weight: 700; font-size: 0.84rem; margin-bottom: 3px; }
.nx-warn .d { font-size: 0.8rem; color: var(--nx-muted); line-height: 1.4; }
.redeem-message { border-radius: var(--nx-r-sm); padding: 12px 14px; font-size: 0.88rem; }
.redeem-message.success, .redeem-message.is-success { background: rgba(53,201,140,.1); border: 1px solid rgba(53,201,140,.3); color: var(--nx-green); }
.redeem-message.error, .redeem-message.is-error { background: rgba(224,22,43,.1); border: 1px solid var(--nx-line-red); color: #ff8a96; }
.redeem-account { display: inline-flex; align-items: center; gap: 10px; justify-content: center; margin: 0 auto 14px; padding: 8px 14px; border: 1px solid var(--nx-line-2); border-radius: 999px; background: rgba(255,255,255,.03); font-size: 0.85rem; }
.redeem-account img { width: 26px; height: 26px; border-radius: 50%; }

/* ---------- success: support block ---------- */
.nx-support {
  margin-top: 22px; text-align: left; padding: 18px;
  background: linear-gradient(135deg, rgba(88,101,242,.12), rgba(88,101,242,.04));
  border: 1px solid rgba(88,101,242,.3); border-radius: var(--nx-r);
}
.nx-support h3 { margin: 0 0 4px; font-size: 1rem; }
.nx-support p { margin: 0 0 14px; color: var(--nx-muted); font-size: 0.88rem; line-height: 1.5; }

/* ---------- purchase history (client.html) ---------- */
.nx-profile-card { display: flex; align-items: center; gap: 16px; background: var(--nx-surface); border: 1px solid var(--nx-line); border-radius: var(--nx-r); padding: 20px; margin-bottom: 18px; }
.nx-profile-card .av { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; border: 1px solid var(--nx-line-2); background: var(--nx-surface-3) center/cover; flex: 0 0 auto; }
.nx-profile-card .meta { flex: 1; min-width: 0; }
.nx-profile-card .meta h1 { margin: 0; font-size: 1.4rem; font-weight: 800; }
.nx-profile-card .meta p { margin: 4px 0 0; color: var(--nx-muted); font-size: 0.9rem; }
.nx-history-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.nx-history-head h2 { margin: 0; font-size: 1.2rem; }
.nx-history-head .right { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.nx-history-head select { font: inherit; color: var(--nx-text); background: var(--nx-surface-3); border: 1px solid var(--nx-line-2); border-radius: var(--nx-r-sm); padding: 9px 12px; }
.nx-table-wrap { background: var(--nx-surface); border: 1px solid var(--nx-line); border-radius: var(--nx-r); overflow: hidden; }
.nx-table { width: 100%; border-collapse: collapse; }
.nx-table th { text-align: left; font-size: 0.72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--nx-faint); padding: 12px 16px; border-bottom: 1px solid var(--nx-line); }
.nx-table td { padding: 14px 16px; border-bottom: 1px solid var(--nx-line); font-size: 0.9rem; vertical-align: middle; }
.nx-table tr:last-child td { border-bottom: none; }
.nx-table tr:hover td { background: rgba(255,255,255,.02); }
.nx-code { display: inline-flex; align-items: center; gap: 8px; }
.nx-code code { font-family: var(--nx-mono); font-size: 0.78rem; background: #0c0c11; border: 1px solid var(--nx-line-2); border-radius: 7px; padding: 5px 9px; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-copy { width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--nx-line-2); background: rgba(255,255,255,.03); color: var(--nx-muted); cursor: pointer; flex: 0 0 auto; }
.nx-copy:hover { color: #fff; border-color: var(--nx-line-red); }
.nx-history-empty { padding: 46px 20px; text-align: center; color: var(--nx-faint); }
.nx-history-cards { display: none; }
@media (max-width: 720px) {
  .nx-table-wrap { display: none; }
  .nx-history-cards { display: flex; flex-direction: column; gap: 12px; }
  .nx-hcard { background: var(--nx-surface); border: 1px solid var(--nx-line); border-radius: var(--nx-r); padding: 14px; }
  .nx-hcard .pk { font-weight: 700; margin-bottom: 8px; }
  .nx-hcard .nx-code code { max-width: 100%; }
}

/* purchase history: review status + action */
.order-review-state { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.order-review-state.is-reviewed { color: var(--nx-green); background: rgba(53,201,140,.1); border: 1px solid rgba(53,201,140,.3); }
.order-review-state.is-pending { color: var(--nx-amber); background: rgba(240,180,41,.1); border: 1px solid rgba(240,180,41,.3); }
#purchase-table .order-review-link, #purchase-table a.review-link, .order-review-link {
  display: inline-flex; align-items: center; gap: 7px; font-size: 0.82rem; font-weight: 600;
  padding: 7px 12px; border-radius: var(--nx-r-sm); text-decoration: none;
  background: var(--nx-grad); color: #fff; border: 1px solid transparent;
}
.order-review-link:hover { filter: brightness(1.06); }

/* ---------- legal / info pages (faq, terms, privacy, refund) ---------- */
.info-page { width: min(900px, 92vw); margin: 0 auto; padding: 40px 0 60px; }
.info-hero { margin-bottom: 24px; }
.info-hero h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 800; letter-spacing: -.02em; margin: 0 0 8px; }
.info-hero p { color: var(--nx-muted); max-width: 64ch; margin: 0; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.info-card { background: var(--nx-surface); border: 1px solid var(--nx-line); border-radius: var(--nx-r); padding: 18px 20px; animation: nxRise .4s ease both; }
.info-card h2, .info-card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.info-card p { margin: 0; color: var(--nx-muted); font-size: 0.9rem; line-height: 1.55; }
.info-section { background: var(--nx-surface); border: 1px solid var(--nx-line); border-radius: var(--nx-r); padding: 22px 24px; margin-bottom: 16px; }
.info-section h2 { margin: 0 0 10px; font-size: 1.15rem; }
.info-section p, .info-section li { color: var(--nx-muted); line-height: 1.6; font-size: 0.92rem; }

.info-note { margin-top: 16px; padding: 16px 18px; border: 1px solid var(--nx-line-red); border-radius: var(--nx-r); background: var(--nx-grad-soft); color: var(--nx-muted); font-size: 0.9rem; line-height: 1.55; }
.info-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.info-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--nx-muted); font-size: 0.9rem; line-height: 1.5; }
.info-list li i { margin-top: 3px; flex: 0 0 auto; }
.info-list li i.fa-check { color: var(--nx-green); }
.info-list li i.fa-xmark { color: #ff8a96; }

/* ---------- service username confirmation modal ---------- */
body.service-username-modal-open { overflow: hidden; }
.nx-service-username-modal[hidden] { display: none !important; }
.nx-service-username-modal {
  position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; padding: 20px;
}
.nx-service-username-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,.72); backdrop-filter: blur(8px);
}
.nx-service-username-card {
  position: relative; width: min(520px, 100%); border: 1px solid var(--nx-line-2); border-radius: 24px;
  background: linear-gradient(180deg, rgba(22,22,29,.98), rgba(10,10,15,.98));
  box-shadow: 0 24px 90px rgba(0,0,0,.62), 0 0 0 1px rgba(255,255,255,.02) inset;
  padding: 28px; color: var(--nx-text);
}
.nx-service-username-close {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 999px;
  border: 1px solid var(--nx-line-2); background: rgba(255,255,255,.04); color: var(--nx-text);
  font-size: 22px; line-height: 1; cursor: pointer;
}
.nx-service-username-close:hover { background: rgba(255,255,255,.08); }
.nx-service-username-kicker {
  display: inline-flex; align-items: center; gap: 8px; color: var(--nx-red-bright);
  font-size: .74rem; text-transform: uppercase; letter-spacing: .18em; font-weight: 800;
}
.nx-service-username-card h2 { margin: 10px 0 8px; font-size: clamp(1.35rem, 4vw, 2rem); }
.nx-service-username-text { margin: 0 0 18px; color: var(--nx-muted); line-height: 1.55; }
.nx-service-username-discord {
  border: 1px solid var(--nx-line); border-radius: 16px; background: rgba(255,255,255,.035); padding: 13px 15px; margin-bottom: 14px;
}
.nx-service-username-discord small, .nx-service-username-field span {
  display: block; color: var(--nx-faint); font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px;
}
.nx-service-username-discord strong { display: block; font-size: 1rem; font-family: var(--nx-mono); word-break: break-word; }
.nx-service-username-field { display: block; margin: 0 0 10px; }
.nx-service-username-field input {
  width: 100%; box-sizing: border-box; border: 1px solid var(--nx-line-2); border-radius: 14px;
  background: #09090d; color: var(--nx-text); padding: 13px 14px; font: inherit; outline: none;
}
.nx-service-username-field input:focus { border-color: var(--nx-red); box-shadow: 0 0 0 3px rgba(224,22,43,.18); }
.nx-service-username-error { margin: 8px 0 0; color: #ff8a96; font-size: .88rem; }
.nx-service-username-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }
.nx-service-username-actions .nx-btn { justify-content: center; }
.nx-service-username-actions .nx-btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
@media (max-width: 560px) {
  .nx-service-username-card { padding: 22px; border-radius: 20px; }
  .nx-service-username-actions { flex-direction: column-reverse; }
  .nx-service-username-actions .nx-btn { width: 100%; }
}

/* ---------- service validation error modal ---------- */
body.service-error-modal-open { overflow: hidden; }
.nx-service-error-modal[hidden] { display: none !important; }
.nx-service-error-modal {
  position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 20px;
}
.nx-service-error-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,.76); backdrop-filter: blur(8px);
}
.nx-service-error-card {
  position: relative; width: min(500px, 100%); border: 1px solid rgba(224,22,43,.35); border-radius: 24px;
  background: linear-gradient(180deg, rgba(22,22,29,.98), rgba(10,10,15,.98));
  box-shadow: 0 24px 90px rgba(0,0,0,.66), 0 0 0 1px rgba(255,255,255,.03) inset;
  padding: 28px; color: var(--nx-text); text-align: left;
}
.nx-service-error-close {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 999px;
  border: 1px solid var(--nx-line-2); background: rgba(255,255,255,.04); color: var(--nx-text);
  font-size: 22px; line-height: 1; cursor: pointer;
}
.nx-service-error-kicker {
  display: inline-flex; color: #ff8a96; font-size: .74rem; text-transform: uppercase; letter-spacing: .18em; font-weight: 800;
}
.nx-service-error-card h2 { margin: 10px 0 8px; font-size: clamp(1.35rem, 4vw, 1.9rem); }
.nx-service-error-card p { margin: 0 0 18px; color: var(--nx-muted); line-height: 1.55; }
.nx-service-error-card .nx-btn { width: 100%; justify-content: center; }

/* Foto opcional de serviço (quando o pack tem image custom, não o placeholder). */
.nx-service-card .ico.has-photo { padding: 0; background: none; border: none; overflow: hidden; }
.nx-service-card .nx-service-photo { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; display: block; }
