/* ═══════════════════════════════════════════════════════════════════════════
   NexShop — layer penyelaras untuk halaman lama
   Dimuat PALING AKHIR di halaman yang belum memakai `nexshop-fintech-2026.css`.
   Tujuannya menyamakan palet, tipografi, header, tombol, input, kartu, dan
   footer tanpa mengubah struktur markup atau logika halaman.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --nx26-primary: #0060AF;
  --nx26-primary-hover: #004B8A;
  --nx26-secondary: #00AEEF;
  --nx26-canvas: #F4F7FB;
  --nx26-ink: #0F172A;
  --nx26-muted: #475569;
  --nx26-line: #E2E8F0;
}

body:not(.nx26) {
  background: var(--nx26-canvas) !important;
  color: var(--nx26-ink) !important;
  font-family: "Segoe UI", "Segoe UI", Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased;
}

body:not(.nx26) h1,
body:not(.nx26) h2,
body:not(.nx26) h3,
body:not(.nx26) h4,
body:not(.nx26) h5,
body:not(.nx26) h6 {
  font-family: "Plus Jakarta Sans", "Segoe UI", Arial, sans-serif !important;
  letter-spacing: -.02em;
  color: var(--nx26-ink);
}

/* ── Header ───────────────────────────────────────────────────────────────── */

body:not(.nx26) .top,
body:not(.nx26) .nx-site-header {
  background: #fff !important;
  border-bottom: 1px solid var(--nx26-line) !important;
  box-shadow: none !important;
}

body:not(.nx26) .top-in,
body:not(.nx26) .nx-header-inner {
  max-width: 1280px !important;
  /* Kalau ruang sempit, header membungkus daripada tombol saling menimpa. */
  flex-wrap: wrap;
  row-gap: 8px;
}

body:not(.nx26) .nx26-wallet-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--nx26-line);
  border-radius: 999px;
  background: #fff;
  color: var(--nx26-primary);
  text-decoration: none;
  flex: 0 0 auto;
}

body:not(.nx26) .nx26-wallet-btn:hover {
  background: #E0EDF9;
  border-color: #B8D5ED;
}

body:not(.nx26) .nx26-wallet-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

body:not(.nx26) .nx26-wallet-amount {
  color: var(--nx26-ink);
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 520px) {
  body:not(.nx26) .nx26-wallet-btn { padding: 0 9px; gap: 5px; }
  body:not(.nx26) .nx26-wallet-amount { font-size: 11.5px; }
}

/**
 * Satu palet aksi untuk semua halaman lama.
 *
 * Banyak komponen lama masih memakai token --nx-action bawaan (#3157D5) atau
 * biru literal, sehingga tombol "Login", "Bayar", chip aktif, dan tombol
 * cookie tampil beda-beda. Nilai di bawah menyatukan semuanya ke biru 2026.
 */
body:not(.nx26) {
  --nx-action: #0060AF;
  --nx-action-hover: #004B8A;
  --nx-action-soft: #E0EDF9;
  --nx-brand-600: #0060AF;
  --nx-brand-700: #004B8A;
  --nx-brand-100: #E0EDF9;
  --blue: #0060AF;
  --blue-dark: #004B8A;
  --blue-soft: #E0EDF9;
  --cyan: #0060AF;
  --cyan-2: #004B8A;
}

body:not(.nx26) .btn-primary,
body:not(.nx26) .btn-bayar,
body:not(.nx26) .tv-auth-primary,
body:not(.nx26) .chip[aria-pressed="true"],
body:not(.nx26) .nexshop-cookie-button--primary {
  background: var(--nx26-primary) !important;
  border-color: var(--nx26-primary) !important;
  color: #fff !important;
}

body:not(.nx26) .btn-primary:hover,
body:not(.nx26) .btn-bayar:hover,
body:not(.nx26) .tv-auth-primary:hover {
  background: var(--nx26-primary-hover) !important;
  border-color: var(--nx26-primary-hover) !important;
}

body:not(.nx26) .pw-lihat {
  color: var(--nx26-primary) !important;
}

/* Portal reseller: aturan lama memakai #0060AF dengan specificity tinggi. */
html:has(#sectionAuth) body.rs-portal-page.rs-portal-page #sectionAuth #btnLoginSubmit,
html:has(#sectionAuth) body.rs-portal-page.rs-portal-page #sectionAuth .tv-auth-card .tv-auth-primary,
html:has(#sectionAuth) body.rs-portal-page.rs-portal-page #sectionAuth .tv-auth-card button[type="submit"] {
  background: var(--nx26-primary) !important;
  border-color: var(--nx26-primary) !important;
  color: #fff !important;
}

html:has(#sectionAuth) body.rs-portal-page.rs-portal-page #sectionAuth #btnLoginSubmit:hover,
html:has(#sectionAuth) body.rs-portal-page.rs-portal-page #sectionAuth .tv-auth-card .tv-auth-primary:hover,
html:has(#sectionAuth) body.rs-portal-page.rs-portal-page #sectionAuth .tv-auth-card button[type="submit"]:hover {
  background: var(--nx26-primary-hover) !important;
  border-color: var(--nx26-primary-hover) !important;
}

html:has(#sectionAuth) body.rs-portal-page.rs-portal-page #sectionAuth .tv-auth-card input:focus,
html:has(#sectionAuth) body.rs-portal-page.rs-portal-page #sectionAuth .tv-auth-card select:focus {
  border-color: var(--nx26-primary) !important;
  outline-color: var(--nx26-primary) !important;
}

/* Banner cookie: dua pilihan harus tampil setara di semua halaman. */
body .nexshop-cookie-banner .nexshop-cookie-button,
body .nexshop-cookie-banner .nexshop-cookie-button--primary {
  background: #fff !important;
  color: #1e293b !important;
  border: 1px solid #94a3b8 !important;
}

/* Halaman login dulu bertema gelap; sekarang terang, jadi banner ikut terang. */
body.public-login-page .nexshop-cookie-banner {
  background: #fff !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.12) !important;
}
body.public-login-page .nexshop-cookie-banner h2 { color: #0f172a !important; }
body.public-login-page .nexshop-cookie-banner p { color: #475569 !important; }

body:not(.nx26) .brand,
body:not(.nx26) .nx-brand {
  color: var(--nx26-ink) !important;
  font-family: "Plus Jakarta Sans", "Segoe UI", Arial, sans-serif !important;
  font-weight: 700 !important;
}

/* Situs hanya punya satu tema (terang); kontrol ganti tema tidak punya efek. */
body:not(.nx26) .theme-toggle,
body:not(.nx26) #themeToggle {
  display: none !important;
}

/**
 * Satu logo untuk semua halaman lama.
 *
 * Sebelumnya header memakai mark 26×26 + teks "NexShop" yang dirender CSS,
 * sementara beranda memakai lockup gambar. Dua perlakuan itu membuat logo
 * terlihat berbeda antar halaman. Sekarang semuanya memakai lockup yang sama.
 */
body:not(.nx26) .brand img,
body:not(.nx26) .nx-brand img {
  width: auto !important;
  height: 32px !important;
  max-width: none !important;
  object-fit: contain;
}

@media (max-width: 640px) {
  body:not(.nx26) .brand img,
  body:not(.nx26) .nx-brand img {
    height: 26px !important;
  }
}

body:not(.nx26) .nav a,
body:not(.nx26) .nx-main-nav a,
body:not(.nx26) .foot-nav a {
  font-family: "Plus Jakarta Sans", "Segoe UI", Arial, sans-serif !important;
  font-weight: 600 !important;
  color: var(--nx26-muted) !important;
}

body:not(.nx26) .nav a:hover,
body:not(.nx26) .nav a[aria-current="page"],
body:not(.nx26) .nx-main-nav a:hover,
body:not(.nx26) .nx-main-nav a[aria-current="page"] {
  color: var(--nx26-primary) !important;
}

/* ── Tombol ───────────────────────────────────────────────────────────────── */

body:not(.nx26) .btn,
body:not(.nx26) .cta,
body:not(.nx26) button.btn {
  border-radius: 9999px !important;
  font-family: "Plus Jakarta Sans", "Segoe UI", Arial, sans-serif !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

body:not(.nx26) .btn-primary,
body:not(.nx26) .btn-ink,
body:not(.nx26) .btn.btn-primary,
body:not(.nx26) .btn.btn-ink {
  background: var(--nx26-primary) !important;
  border-color: var(--nx26-primary) !important;
  color: #fff !important;
}

body:not(.nx26) .btn-primary:hover,
body:not(.nx26) .btn-ink:hover {
  background: var(--nx26-primary-hover) !important;
  border-color: var(--nx26-primary-hover) !important;
}

body:not(.nx26) .btn-ghost,
body:not(.nx26) .btn-secondary {
  background: #fff !important;
  border: 1px solid var(--nx26-line) !important;
  color: var(--nx26-primary) !important;
}

/* ── Input ────────────────────────────────────────────────────────────────── */

body:not(.nx26) input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
body:not(.nx26) select,
body:not(.nx26) textarea {
  border: 1px solid var(--nx26-line) !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: var(--nx26-ink) !important;
  font-family: "Segoe UI", "Segoe UI", Arial, sans-serif !important;
}

body:not(.nx26) input:focus,
body:not(.nx26) select:focus,
body:not(.nx26) textarea:focus {
  outline: none !important;
  border-color: var(--nx26-secondary) !important;
  box-shadow: 0 0 0 3px rgba(0, 174, 239, .15) !important;
}

/* ── Kartu & panel ────────────────────────────────────────────────────────── */

body:not(.nx26) .card,
body:not(.nx26) .panel,
body:not(.nx26) .nx-product-card,
body:not(.nx26) .nx-news-card {
  border: 1px solid var(--nx26-line) !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, .06) !important;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */

body:not(.nx26) .foot,
body:not(.nx26) .nx-site-footer {
  background: #fff !important;
  border-top: 1px solid var(--nx26-line) !important;
}

/* ── Tautan teks ──────────────────────────────────────────────────────────── */

body:not(.nx26) a {
  color: inherit;
}

body:not(.nx26) a:hover {
  color: var(--nx26-primary);
}

/* ── Fokus yang terlihat ──────────────────────────────────────────────────── */

body:not(.nx26) :focus-visible {
  outline: 3px solid rgba(0, 174, 239, .45);
  outline-offset: 2px;
}

/* Footer riwayat selalu di bawah layar */
body{min-height:100vh;display:flex;flex-direction:column}
body>main.wrap{flex:1 0 auto;width:100%}
body>footer{margin-top:auto!important;padding-bottom:28px}

/* Kartu marketplace seragam dengan beranda.
   Selector HARUS dibatasi ke halaman marketplace. Versi lama memakai
   `body .card` / `body .grid` tanpa cakupan, sehingga ikut menimpa
   `.card{padding:24px}` di /game dan /checkout (teks menempel ke tepi
   kartu) dan grid dua kolom di /bayar. */
body.marketplace-page .grid{grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:16px!important}
body.marketplace-page .card{background:#fff!important;border:1px solid #E4E9F2!important;border-radius:14px!important;padding:0 0 12px!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;text-align:left!important}
body.marketplace-page .card::before,body.marketplace-page .card::after{content:none!important;display:none!important}
body.marketplace-page .card img{width:100%!important;aspect-ratio:1/1!important;object-fit:contain!important;padding:16px!important;background:#F7F9FC!important;margin:0 0 10px!important}
body.marketplace-page .card b{font-size:13px!important;font-weight:600!important;margin:0 12px!important;line-height:1.35!important;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important;min-height:2.7em;overflow-wrap:anywhere!important;word-break:break-word!important}
body.marketplace-page .card small{font-size:11px!important;color:#5F6B7F!important;margin:2px 12px 0!important}
body.marketplace-page .card .price{margin:auto 12px 0!important;padding-top:10px!important;border-top:1px solid #EEF2F8!important;font-size:12.5px!important;color:#0060AF!important;font-weight:600!important}
@media (max-width:1100px){body.marketplace-page .grid{grid-template-columns:repeat(5,minmax(0,1fr))!important}}
@media (max-width:860px){body.marketplace-page .grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}}
@media (max-width:640px){body.marketplace-page .grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important}}
/* Di 390 px, empat kolom menyisakan ~56 px untuk nama operator sehingga
   "DATA SMARTFREN" terpotong. Tiga kolom memberi ruang dua baris penuh. */
@media (max-width:520px){body.marketplace-page .grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
