@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --bg-main: #090d16;
  --bg-surface: #0f172a;
  --bg-surface-elevated: #1e293b;
  --bg-card: rgba(15, 23, 42, 0.75);
  
  --primary: #38bdf8;
  --primary-glow: rgba(56, 189, 248, 0.35);
  --accent: #818cf8;
  --accent-neon: #a855f7;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(56, 189, 248, 0.5);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Ambient Cybernetic Glow */
.cyber-bg-glow {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
  background: 
    radial-gradient(circle at 15% 20%, rgba(56, 189, 248, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(168, 85, 247, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(99, 102, 241, 0.06) 0%, transparent 50%);
}

.cyber-grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(to right, rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Glassmorphism Styles */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
}

.glass-nav {
  background: rgba(9, 13, 22, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #090d16;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Glowing Elements and Utilities */
.glow-cyan {
  box-shadow: 0 0 25px var(--primary-glow);
}

.text-gradient {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge-flagship {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(239, 68, 68, 0.2));
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.badge-tech {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* Transitions and Micro-interactions */
.smooth-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.smooth-hover:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 12px 30px -10px rgba(56, 189, 248, 0.25);
}

/* Animation Keyframes */
@keyframes pulseGlow {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.animate-pulse-glow {
  animation: pulseGlow 4s infinite ease-in-out;
}

/* =====================
   PRINT STYLESHEET — Commercial Invoice
   ===================== */
@media print {
  body * {
    visibility: hidden;
  }
  #checkout-modal-backdrop,
  #checkout-modal-backdrop * {
    visibility: visible;
  }
  #checkout-modal-backdrop {
    position: fixed;
    inset: 0;
    background: white;
    z-index: 9999;
    overflow: visible;
  }
  #checkout-modal-card {
    max-height: none !important;
    overflow: visible !important;
    box-shadow: none;
    border: none;
  }
  #checkout-back-nav-btn,
  #close-checkout-modal-btn,
  #header-edit-cart-btn,
  #summary-edit-cart-btn,
  #submit-payment-btn,
  #print-invoice-btn,
  #receipt-close-btn,
  #bottom-back-to-cart-btn {
    display: none !important;
  }
}

/* =====================
   HERO GRADIENT ANIMATION
   ===================== */
@keyframes heroGradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* =====================
   CARD HOVER RIPPLE
   ===================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.product-card-animate {
  animation: fadeIn 0.35s ease-out forwards;
}

/* =====================
   FORM FOCUS GLOW
   ===================== */
input:focus, select:focus, textarea:focus {
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

/* =====================
   SELECTION COLOR
   ===================== */
::selection {
  background: rgba(56, 189, 248, 0.35);
  color: #f8fafc;
}

/* =====================
   SAFE AREA INSETS (Mobile)
   ===================== */
@supports (padding: max(0px)) {
  .pb-safe {
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  }
}
