/* ═══════════════════════════════════════════
   NEXMENT — global.css
   Navbar, sidebar, loader, toast, floating cart,
   logo border-radius, shared tokens
═══════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
  --bg:            #f9f8ff;
  --bg-section:    #ffffff;
  --bg-alt:        #f3f0ff;
  --surface:       #ffffff;
  --surface-2:     #f7f5ff;

  --accent:        #7c3aed;
  --accent-mid:    #9333ea;
  --accent-light:  #a855f7;
  --accent-pale:   #ede9fe;
  --accent-border: #ddd6fe;
  --accent-glow:   rgba(124, 58, 237, 0.18);

  --text-primary:  #1a1230;
  --text-secondary:#4b4468;
  --text-muted:    #8b82a8;
  --border:        #e8e3f4;
  --border-strong: #ccc5e8;

  --radius:        14px;
  --radius-sm:     9px;
  --radius-pill:   999px;

  --font-display:  'Plus Jakarta Sans', sans-serif;
  --font-serif:    'Lora', Georgia, serif;
  --font-body:     'Plus Jakarta Sans', sans-serif;

  --shadow-sm:  0 1px 4px rgba(100,60,200,0.07), 0 2px 12px rgba(100,60,200,0.05);
  --shadow-md:  0 4px 24px rgba(100,60,200,0.10), 0 1px 4px rgba(100,60,200,0.06);
  --shadow-lg:  0 8px 40px rgba(100,60,200,0.14);

  --nav-h: 62px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a   { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ── LOGO — 20px radius everywhere ── */
.footer-logo,
.loader-logo{
  border-radius: 20px;
  object-fit: contain;
}
.logo         { width: 32px; height: 32px; border-radius: 12px;}
.footer-logo  { width: 40px; height: 40px; }
.loader-logo  { width: 72px; height: 72px; }
.sidebar-logo { width: 28px; height: 28px; border-radius: 9px;}

/* ══════════════════════════════════════════
   LOADER
══════════════════════════════════════════ */
#loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.4s, visibility 0.4s;
}
#loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.loader-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.loader-bar {
  width: 160px; height: 4px;
  background: var(--accent-border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.loader-progress {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: var(--radius-pill);
  animation: loaderFill 1.6s ease forwards;
}
@keyframes loaderFill { to { width: 100%; } }
.loader-text { font-size: 13px; color: var(--text-muted); font-weight: 500; }

/* ══════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(249,248,255,0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: box-shadow 0.3s, background 0.3s;
}
.navbar.scrolled {
  background: rgba(249,248,255,0.97);
  box-shadow: var(--shadow-sm);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.3px;
}

.nav-middle {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-link {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
  color: var(--accent);
  background: var(--accent-pale);
}

/* Creator CTA */
.nav-creator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent) !important;
  background: var(--accent-pale);
  border: 1px solid var(--accent-border);
  font-weight: 600;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
  margin-left: 4px;
}
.nav-creator:hover {
  background: var(--accent);
  color: #fff !important;
  box-shadow: 0 4px 16px var(--accent-glow);
  transform: translateY(-1px);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-icon-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: 15px;
  transition: color 0.2s, background 0.2s;
  position: relative;
}
.nav-icon-btn:hover { color: var(--accent); background: var(--accent-pale); }

.nav-cart-wrap { position: relative; }
.nav-cart-dot {
  position: absolute;
  top: 7px; right: 7px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}
.hamburger:hover { background: var(--accent-pale); }
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  border-radius: 2px;
  background: var(--text-primary);
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ══════════════════════════════════════════
   OVERLAY
══════════════════════════════════════════ */
.overlay {
  position: fixed; inset: 0;
  background: rgba(26,18,48,0.45);
  backdrop-filter: blur(3px);
  z-index: 1100;
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.overlay.active { opacity: 1; visibility: visible; }

/* ══════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════ */
.sidebar {
  position: fixed;
  top: 0; right: -320px;
  width: 300px;
  height: 100dvh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  transition: right 0.32s cubic-bezier(0.4,0,0.2,1);
  box-shadow: var(--shadow-lg);
}
.sidebar.open { right: 0; }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  color: var(--accent);
}
.sidebar-close {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 15px;
  transition: background 0.2s, color 0.2s;
}
.sidebar-close:hover { background: var(--accent-pale); color: var(--accent); }

.sidebar-nav {
  padding: 12px 12px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 10px 16px;
}
.sidebar-actions {
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background 0.18s, color 0.18s;
}
.sidebar-link i { width: 16px; text-align: center; font-size: 14px; }
.sidebar-link:hover, .sidebar-link.active {
  background: var(--accent-pale);
  color: var(--accent);
}

.sidebar-cta {
  margin-top: auto;
  padding: 16px 12px 24px;
  flex-shrink: 0;
}
.sidebar-creator-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-mid));
  color: #fff;
  border-radius: var(--radius);
  transition: opacity 0.2s, transform 0.18s, box-shadow 0.2s;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.sidebar-creator-btn:hover {
  opacity: 0.93;
  transform: translateY(-1px);
  box-shadow: 0 8px 28px var(--accent-glow);
}
.sidebar-creator-icon { font-size: 18px; flex-shrink: 0; }
.sidebar-creator-text { flex: 1; }
.sidebar-creator-text span { display: block; font-size: 14px; font-weight: 700; }
.sidebar-creator-text small { font-size: 11.5px; opacity: 0.82; }
.sidebar-arrow { font-size: 12px; opacity: 0.7; flex-shrink: 0; }

/* ══════════════════════════════════════════
   FLOATING CART
══════════════════════════════════════════ */
.floating-cart {
  position: fixed;
  bottom: 24px; right: 20px;
  width: 52px; height: 52px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 6px 20px var(--accent-glow);
  z-index: 900;
  transition: transform 0.2s, box-shadow 0.2s;
}
.floating-cart:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 10px 30px var(--accent-glow);
}
.cart-count {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 18px; height: 18px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--bg);
}

/* ══════════════════════════════════════════
   TOAST
══════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 88px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--text-primary);
  color: #fff;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  z-index: 8000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  box-shadow: var(--shadow-md);
  max-width: 90vw;
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ══════════════════════════════════════════
   SHARED BUTTON STYLES
══════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-size: 14.5px;
  font-weight: 600;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
  cursor: pointer;
  border: 1.5px solid transparent;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 18px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-mid);
  box-shadow: 0 8px 28px var(--accent-glow);
  transform: translateY(-2px);
}
.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-pale);
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent-border);
}
.btn-outline:hover {
  background: var(--accent-pale);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 900px) {
  .nav-middle, .nav-right { display: none; }
  .hamburger { display: flex; }
}
@media (max-width: 480px) {
  .navbar { padding: 0 16px; }
}
