/* ============================================================
   NEXREY — style.css v94 (Loader Baru, Menu Profile, Fix Store)
   ============================================================ */

:root {
  --bg: #050505;
  --surface: #0f0f0f;
  --ink: #F5F4EF;
  --ink-2: #A8A6A0;
  --ink-3: #6E6C68;
  --line: #262624;
  --accent: #2c67ed;
  --green: #067A46;
  --danger: #B42318;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html { background: var(--bg); scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100dvh;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 4px; }

/* ═══ LOADER SCREEN BARU ═══ */
.loader-screen {
  position: fixed; inset: 0; z-index: 9999; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.loader-screen.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-content { display: flex; flex-direction: column; align-items: center; gap: 20px; width: 100%; max-width: 300px; }
.loader-logo { font-family: 'Instrument Serif', serif; font-size: 36px; color: #fff; letter-spacing: -1px; margin-bottom: 10px; }
.loader-bar-bg { width: 100%; height: 4px; background: #222; border-radius: 100px; overflow: hidden; }
.loader-bar-fill { width: 0%; height: 100%; background: var(--accent); border-radius: 100px; transition: width 0.1s linear; }
.loader-percent { font-family: var(--font-mono); font-size: 14px; color: #888; font-weight: 600; letter-spacing: 1px; }

/* ═══ APP LAYOUT & NAVBAR ═══ */
.app { min-height: 100dvh; display: flex; flex-direction: column; position: relative; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }

.site-header {
  position: fixed; top: 16px; left: 0; right: 0; z-index: 200;
  padding: 0 16px; pointer-events: none; display: flex; justify-content: center;
}
.header-pill {
  pointer-events: auto; width: 100%; max-width: 640px;
  display: flex; align-items: center; gap: 8px; padding: 8px 16px;
  background: rgba(10, 10, 10, 0.7); backdrop-filter: blur(16px);
  border: 1px solid rgba(44, 103, 237, 0.3); border-radius: 100px;
  box-shadow: 0 0 20px rgba(44, 103, 237, 0.15);
  transition: all 0.3s ease;
}
.header-pill.scrolled { border-color: rgba(44, 103, 237, 0.6); box-shadow: 0 0 30px rgba(44, 103, 237, 0.4); }
.brand { display: flex; align-items: center; gap: 8px; }
.brand-mark { width: 28px; height: 28px; border-radius: 50%; overflow: hidden; border: 1px solid var(--accent); }
.brand-name { font-family: 'Instrument Serif', serif; font-size: 16px; color: #fff; letter-spacing: 0.5px; }
.site-nav { display: flex; align-items: center; gap: 4px; flex: 1; justify-content: center; }
.nav-item {
  padding: 6px 14px; font-size: 13px; font-weight: 500; color: #A8A6A0;
  border-radius: 100px; transition: all 0.2s ease;
}
.nav-item:hover { color: #fff; }
.nav-item.active { color: #fff; background: var(--accent); box-shadow: 0 0 10px rgba(44, 103, 237, 0.5); }
.header-tools { display: flex; gap: 6px; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05); display: flex; align-items: center; justify-content: center;
  color: #fff; transition: all 0.2s ease;
}
.icon-btn:hover { background: rgba(44, 103, 237, 0.2); border-color: var(--accent); }
.menu-btn { background: transparent; border: none; color: #fff; font-size: 20px; }

/* ═══ SPINNER ANIMASI ═══ */
.spinner-ring {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3); border-radius: 50%; border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══ PROFILE HOME ═══ */
.profile-container { max-width: 600px; margin: 0 auto; padding-top: 80px; padding-bottom: 60px; }
.profile-banner { width: 100%; height: 200px; overflow: hidden; position: relative; }
.profile-banner img { width: 100%; height: 100%; object-fit: cover; }
.profile-info {
  padding: 0 20px; position: relative; margin-top: -50px;
  display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px;
}
.profile-avatar {
  width: 100px; height: 100px; border-radius: 50%;
  border: 4px solid var(--bg); overflow: hidden; background: var(--surface); flex-shrink: 0;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-name-block { padding-bottom: 8px; }
.profile-name { font-size: 24px; font-weight: 800; color: #fff; display: flex; align-items: center; gap: 6px; line-height: 1.2; }
.profile-username { font-size: 14px; color: #888; margin-top: 2px; }
.profile-bio { padding: 0 20px; font-size: 15px; color: #ddd; line-height: 1.6; margin-bottom: 20px; }
.profile-tags { padding: 0 20px; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.ptag { font-size: 12px; padding: 6px 14px; border-radius: 100px; border: 1px solid #333; color: #aaa; background: rgba(255,255,255,0.02); }
.profile-projects { padding: 0 20px; }
.projects-title { font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.project-list { display: flex; flex-direction: column; gap: 12px; }
.project-card {
  display: flex; align-items: center; gap: 16px; background: #0a0a0a; border: 1px solid #222;
  border-radius: 16px; padding: 20px; transition: all 0.2s ease; cursor: pointer; text-decoration: none;
}
.project-card:hover { border-color: #444; transform: translateY(-2px); }
.pc-icon {
  width: 48px; height: 48px; border-radius: 12px; background: rgba(255,255,255,0.05);
  display: flex; align-items: center; justify-content: center; font-size: 24px; color: #fff; flex-shrink: 0;
}
.pc-text h3 { font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.pc-text p { font-size: 13px; color: #888; }

/* MENU SECTION DI PROFILE */
.profile-menu-section { padding: 0 20px; margin-top: 40px; }

/* ═══ STORE UI ═══ */
.page-head { padding: 60px 0 30px; text-align: center; }
.page-title { font-size: 36px; font-weight: 700; color: #fff; letter-spacing: -1px; }
.page-title em { color: var(--accent); font-style: normal; }
.page-lead { color: #888; margin-top: 8px; font-size: 14px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 24px; }
.cat-card { background: #0a0a0a; border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; overflow: hidden; transition: all 0.3s; display: flex; flex-direction: column; }
.cat-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 10px 30px -10px rgba(44, 103, 237, 0.3); }
.cat-card-media { height: 160px; background: linear-gradient(135deg, rgba(44, 103, 237, 0.1), rgba(0,0,0,0)); display: flex; align-items: center; justify-content: center; border-bottom: 1px solid rgba(255,255,255,0.05); flex-shrink: 0; }
.cat-card-media img { width: 100px; height: 100px; object-fit: contain; }
.cat-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.cat-card-title { font-size: 18px; font-weight: 700; color: #fff; margin: 4px 0 8px; }
.cat-card-price { font-size: 16px; font-weight: 700; color: var(--accent); margin-bottom: 20px; }
.cat-card-cat { font-size: 11px; text-transform: uppercase; color: #888; letter-spacing: 1px; }
.btn-card { display: block; width: 100%; padding: 12px; margin-top: auto; background: var(--accent); color: #fff; border-radius: 8px; font-weight: 600; font-size: 14px; transition: background 0.2s; text-align: center; }
.btn-card:hover { background: #1d4ed8; }

/* ═══ MODALS & SHEETS ═══ */
.sheet-bd, .modal-bd, .drawer-bd {
  position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(4px);
  display: none; align-items: flex-end; justify-content: center; z-index: 500;
}
.modal-bd { align-items: center; }
.drawer-bd { align-items: flex-end; }
.sheet-bd.show, .modal-bd.show, .drawer-bd.show { display: flex; }

.sheet {
  width: 100%; max-width: 520px; background: #fff; color: #111;
  border-top-left-radius: 24px; border-top-right-radius: 24px;
  padding: 24px; max-height: 90dvh; overflow-y: auto;
}
.sheet-handle { width: 40px; height: 4px; background: #ddd; border-radius: 2px; margin: 0 auto 20px; }
.sheet-head { display: flex; gap: 16px; margin-bottom: 24px; align-items: center; }
.sheet-thumb { width: 64px; height: 64px; border-radius: 12px; background: #f0fdf4; border: 1px solid #bbf7d0; display: flex; align-items: center; justify-content: center; }
.sheet-thumb img { width: 80%; height: 80%; object-fit: contain; }
.sheet-price { font-size: 24px; font-weight: 700; color: #006c45; }
.sheet-name { font-size: 14px; color: #666; }
.sheet-chip { display: inline-flex; flex-direction: column; align-items: center; padding: 10px 16px; border-radius: 12px; background: #fff; border: 1px solid #ddd; margin: 0 8px 8px 0; cursor: pointer; transition: all 0.2s; color:#111; white-space: nowrap; }
.sheet-chip.is-active { border-color: #006c45; background: #f0fdf4; }
.sheet-chip-dur { font-size: 14px; font-weight: 600; }
.sheet-chip-price { font-size: 12px; color: #666; }
.sheet-cta { width: 100%; padding: 16px; background: #006c45; color: #fff; border-radius: 100px; font-weight: 700; margin-top: 24px; display: flex; justify-content: center; gap: 8px; border:none; cursor:pointer; }

.modal { width: 100%; max-width: 440px; background: #0a0a0a; border-radius: 20px; border: 1px solid rgba(255,255,255,0.1); padding: 24px; max-height: 90dvh; overflow-y: auto; position: relative; }
.modal--wide { max-width: 480px; }
.modal-x { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,0.05); display: flex; align-items: center; justify-content: center; cursor:pointer; }
.modal-title { font-size: 24px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.modal-kicker { font-size: 12px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 4px; }
.field-label { display: block; font-size: 12px; color: #aaa; margin: 16px 0 8px; }
.field { width: 100%; padding: 12px 16px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; color: #fff; outline: none; font-size: 14px; }
.field:focus { border-color: var(--accent); }
.btn-primary { width: 100%; padding: 14px; background: var(--accent); color: #fff; border-radius: 10px; font-weight: 600; margin-top: 20px; transition: background 0.2s; cursor:pointer; border:none; text-align:center; display:flex; align-items:center; justify-content:center; gap:8px; text-decoration:none; }
.btn-ghost { width: 100%; padding: 12px; background: transparent; color: #aaa; border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; font-weight: 500; margin-top: 12px; cursor:pointer; }

.qr-frame { background: #fff; padding: 16px; border-radius: 16px; display: flex; justify-content: center; margin: 20px 0; }
.qr-frame img { width: 220px; height: 220px; }
.amount-block { text-align: center; background: rgba(255,255,255,0.03); padding: 20px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); }
.amount-block-value { font-size: 32px; font-weight: 700; color: #fff; }
.upload-box:hover { border-color: var(--accent); }

/* ═══ DRAWER MENU ═══ */
.drawer { width: 100%; max-width: 440px; background: #0a0a0a; border-top-left-radius: 24px; border-top-right-radius: 24px; padding: 24px; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.drawer-head h2 { margin: 0; font-size: 20px; }
.menu-section { margin-bottom: 24px; }
.menu-section-title { font-size: 11px; font-weight: 700; color: #666; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; padding-left: 4px; }
.menu-item { display: flex; align-items: center; gap: 14px; padding: 14px; background: #111; border: 1px solid #222; border-radius: 12px; margin-bottom: 8px; transition: all 0.2s ease; text-decoration: none; color: #fff; width: 100%; text-align: left; }
.menu-item:hover { border-color: #444; transform: translateX(4px); }
.menu-icon { width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,0.05); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.menu-text { flex: 1; min-width: 0; }
.menu-title { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.menu-desc { font-size: 11px; color: #888; }
.badge-online { font-size: 10px; font-weight: 700; color: #22c55e; background: rgba(34, 197, 94, 0.1); padding: 2px 8px; border-radius: 4px; border: 1px solid rgba(34, 197, 94, 0.2); }

/* FOOTER */
.site-footer { border-top: 1px solid rgba(255,255,255,0.05); padding: 32px 20px; margin-top: auto; position: relative; z-index: 10; background: var(--bg); }
.footer-wrap { display: flex; justify-content: space-between; align-items: center; max-width: 1080px; margin: 0 auto; }
.footer-brand { color: #fff; font-weight: 700; font-family:'Instrument Serif', serif; font-size: 20px; }
.footer-tag { font-size: 12px; color: #666; }

@media (max-width: 640px) {
  .header-pill { padding: 6px 12px; gap: 4px; }
  .brand-name { display: none; }
  .nav-item { padding: 6px 10px; font-size: 12px; }
  .page-title { font-size: 28px; }
  .modal { padding: 20px; }
}