/* ── CovexStudios shared styles ───────────────────── */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Inter:wght@400;500;600;700;800;900&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0d0e12;
  --bg2:       #13141a;
  --bg3:       #1a1b22;
  --border:    #2a2b35;
  --accent:    #FFBB00;
  --accent-dim:#D99E00;
  --accent-bg: rgba(255,187,0,0.08);
  --on-accent: #111;
  --green:     #22c55e;
  --red:       #ef4444;
  --text:      #f0f0f5;
  --muted:     #8b8c9a;
  --mono:      'IBM Plex Mono', monospace;
  --sans:      'Inter', sans-serif;
  --radius:    8px;
  --radius-lg: 12px;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}


/* ── Navbar ─────────────────────────────────────────── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13,14,18,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 0 28px; height: 72px;
  gap: 16px;
}
.logo { display: flex; align-items: center; text-decoration: none; color: var(--text); }
.logo-img { height: 64px; width: auto; display: block; object-fit: contain; }
.logo-icon {
  width: 36px; height: 36px;
  background: var(--accent); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  font-family: var(--sans); font-weight: 900; font-size: 13px;
  color: var(--on-accent); letter-spacing: -0.5px;
}
.logo-name { font-weight: 700; font-size: 16px; }
.nav-links { display: flex; align-items: center; justify-content: center; gap: 6px; }
.nav-link {
  padding: 7px 14px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500;
  color: var(--muted); text-decoration: none;
  transition: color 0.12s, background 0.12s;
}
.nav-link:hover { color: var(--text); background: var(--bg3); }
.nav-link.active {
  color: var(--text);
  position: relative;
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.nav-actions { display: flex; align-items: center; gap: 12px; justify-content: flex-end; }

/* ── Hamburger ───────────────────────────────────────── */
.nav-hamburger {
  display: none;
  background: none; border: none;
  color: var(--text); cursor: pointer;
  padding: 8px; border-radius: var(--radius);
  transition: background 0.12s; flex-shrink: 0;
}
.nav-hamburger:hover { background: var(--bg3); }
.nav-hamburger svg { display: block; }

/* Mobile slide-down menu */
.nav-mobile-menu {
  position: fixed; top: 64px; left: 0; right: 0;
  background: var(--bg2); border-bottom: 1px solid var(--border);
  z-index: 99; padding: 8px 12px 14px;
  transform: translateY(-110%);
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.nav-mobile-menu.open { transform: translateY(0); }
.nav-mobile-menu .nav-link {
  display: flex; align-items: center;
  padding: 13px 16px; font-size: 15px; font-weight: 600;
  border-radius: var(--radius); width: 100%;
  border-bottom: 1px solid var(--border);
}
.nav-mobile-menu .nav-link:last-child { border-bottom: none; }
.nav-mobile-menu .nav-link.active::after { display: none; }
.nav-mobile-menu .nav-link.active {
  color: var(--accent); background: var(--accent-bg);
}

@media (max-width: 768px) {
  nav { padding: 0 18px; height: 64px; }
  .logo-img { height: 52px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; align-items: center; justify-content: center; }
  .nav-actions { gap: 6px; }
}
.nav-btn {
  background: none; border: none; color: var(--text);
  cursor: pointer; padding: 6px; display: flex; align-items: center;
  position: relative; border-radius: var(--radius); transition: background 0.12s;
}
.nav-btn:hover { background: var(--bg3); }
.cart-badge {
  position: absolute; top: -2px; right: -2px;
  width: 16px; height: 16px;
  background: var(--accent); border-radius: 50%;
  font-size: 9px; font-weight: 700; color: var(--on-accent);
  display: flex; align-items: center; justify-content: center;
}

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: var(--radius);
  font-size: 14px; font-weight: 600; cursor: pointer;
  border: 1.5px solid transparent; text-decoration: none;
  transition: all 0.15s; font-family: var(--sans);
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-dim); border-color: var(--accent-dim); }
.btn-secondary { background: transparent; border-color: var(--border); color: var(--text); }
.btn-secondary:hover { border-color: var(--muted); background: var(--bg3); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--bg3); }
.btn-danger { background: transparent; border-color: var(--red); color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 16px 28px; font-size: 15px; font-family: var(--mono); letter-spacing: 0.3px; }
.btn-full { width: 100%; }

/* ── Cards ───────────────────────────────────────────── */
.card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}
.card:hover { border-color: #3a3b4a; transform: translateY(-2px); }

/* ── Tag / Badge ─────────────────────────────────────── */
.tag {
  display: inline-flex; align-items: center;
  background: var(--accent); color: var(--on-accent);
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 4px; letter-spacing: 0.3px;
}
.tag-muted { background: var(--bg3); color: var(--muted); border: 1px solid var(--border); }

/* ── Form elements ───────────────────────────────────── */
.input, .select, .textarea {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--radius);
  padding: 10px 14px; font-size: 14px; font-family: var(--sans);
  width: 100%; outline: none; transition: border-color 0.12s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); }
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.textarea { resize: vertical; min-height: 80px; }
.select { cursor: pointer; }
.label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; letter-spacing: 0.5px; text-transform: uppercase; }

/* ── Cart drawer ─────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 200;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.overlay.open { opacity: 1; pointer-events: all; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(380px, 100vw);
  background: var(--bg2); border-left: 1px solid var(--border);
  z-index: 201; transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--border);
}
.drawer-header h3 { font-size: 16px; font-weight: 700; }
.drawer-close {
  background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: 22px; line-height: 1; padding: 4px;
  transition: color 0.12s;
}
.drawer-close:hover { color: var(--text); }

/* ── Modal ───────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 300;
  display: flex; align-items: flex-end;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
@media (min-width: 640px) { .modal-overlay { align-items: center; justify-content: center; } }
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 16px 16px 0 0; width: 100%; max-height: 85vh; overflow-y: auto;
  transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  padding: 28px 24px 48px; position: relative;
}
@media (min-width: 640px) {
  .modal { border-radius: 16px; max-width: 560px; transform: scale(0.95) translateY(0); max-height: 90vh; }
  .modal-overlay.open .modal { transform: scale(1) translateY(0); }
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-drag { width: 40px; height: 4px; background: var(--border); border-radius: 2px; margin: 0 auto 24px; }
@media (min-width: 640px) { .modal-drag { display: none; } }

/* ── Fade in ─────────────────────────────────────────── */
.fade-in { opacity: 0; transform: translateY(12px); transition: opacity 0.4s ease, transform 0.4s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── Utility ─────────────────────────────────────────── */
.page { position: relative; z-index: 1; }
.separator { height: 1px; background: var(--border); }
.section { padding: 64px 24px; max-width: 1100px; margin: 0 auto; }
.section-sm { padding: 40px 24px; max-width: 1100px; margin: 0 auto; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.gap-8 { gap: 8px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }

/* ── Toast ───────────────────────────────────────────── */
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); font-size: 14px; font-weight: 500;
  padding: 12px 20px; border-radius: 100px; z-index: 999;
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
  white-space: nowrap; pointer-events: none;
  max-width: calc(100vw - 32px); text-align: center;
}
#toast.show { transform: translateX(-50%) translateY(0); }
#toast.success { border-color: var(--green); color: var(--green); }
#toast.error { border-color: var(--red); color: var(--red); }

/* ── Section responsive padding ─────────────────────── */
@media (max-width: 640px) {
  .section    { padding: 44px 18px; }
  .section-sm { padding: 28px 18px; }
}

/* ── Shared nav hamburger JS hook ────────────────────── */
.nav-overlay {
  position: fixed; inset: 0; z-index: 98;
  background: transparent; display: none;
}
.nav-overlay.open { display: block; }
