/* ===== GLOBAL DESIGN SYSTEM ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg-primary: #07071a;
  --bg-secondary: #0f0f2d;
  --bg-card: rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.08);
  --glass: rgba(255,255,255,0.06);
  --glass-border: rgba(255,255,255,0.12);
  --accent-purple: #7c3aed;
  --accent-purple-light: #9d5cf6;
  --accent-cyan: #06b6d4;
  --accent-cyan-light: #22d3ee;
  --accent-pink: #ec4899;
  --accent-gold: #f59e0b;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --border: rgba(255,255,255,0.1);
  --shadow: 0 25px 50px rgba(0,0,0,0.5);
  --shadow-sm: 0 4px 20px rgba(0,0,0,0.3);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(124,58,237,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(6,182,212,0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 60% 10%, rgba(236,72,153,0.08) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent-purple); border-radius: 3px; }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ===== NAVIGATION ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(7,7,26,0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--glass-border);
  padding: 0 2rem;
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 2rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 800;
}

.nav-logo .logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}

.nav-logo span { 
  background: linear-gradient(135deg, var(--accent-purple-light), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-search {
  flex: 1;
  max-width: 500px;
  position: relative;
}

.nav-search input {
  width: 100%;
  padding: 10px 20px 10px 44px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: var(--transition);
}

.nav-search input:focus {
  border-color: var(--accent-purple);
  background: rgba(124,58,237,0.1);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.2);
}

.nav-search input::placeholder { color: var(--text-muted); }

.nav-search .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: var(--glass);
}

.nav-link.active { color: var(--accent-purple-light); }

.cart-badge {
  position: absolute;
  top: 2px; right: 2px;
  min-width: 18px; height: 18px;
  background: var(--accent-purple);
  border-radius: var(--radius-pill);
  font-size: 0.65rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  color: white;
  transition: var(--transition);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  outline: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-purple-light));
  color: white;
  box-shadow: 0 4px 20px rgba(124,58,237,0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(124,58,237,0.6);
}

.btn-secondary {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-purple);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--accent-purple);
  color: var(--accent-purple-light);
}
.btn-outline:hover {
  background: rgba(124,58,237,0.15);
  transform: translateY(-1px);
}

.btn-danger {
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.3);
  color: var(--danger);
}
.btn-danger:hover { background: rgba(239,68,68,0.25); }

.btn-success {
  background: linear-gradient(135deg, #059669, #10b981);
  color: white;
  box-shadow: 0 4px 20px rgba(16,185,129,0.3);
}
.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(16,185,129,0.5);
}

.btn-sm { padding: 7px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  transition: var(--transition);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(124,58,237,0.3);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(124,58,237,0.1);
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-purple { background: rgba(124,58,237,0.2); color: var(--accent-purple-light); border: 1px solid rgba(124,58,237,0.3); }
.badge-cyan { background: rgba(6,182,212,0.2); color: var(--accent-cyan-light); border: 1px solid rgba(6,182,212,0.3); }
.badge-gold { background: rgba(245,158,11,0.2); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
.badge-green { background: rgba(16,185,129,0.2); color: #34d399; border: 1px solid rgba(16,185,129,0.3); }
.badge-pink { background: rgba(236,72,153,0.2); color: #f472b6; border: 1px solid rgba(236,72,153,0.3); }
.badge-red { background: rgba(239,68,68,0.2); color: #f87171; border: 1px solid rgba(239,68,68,0.3); }

/* ===== STARS ===== */
.stars { color: var(--accent-gold); letter-spacing: 2px; }
.star-empty { color: var(--text-muted); }

/* ===== FORM ELEMENTS ===== */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; margin-bottom: 6px; font-size: 0.875rem; font-weight: 500; color: var(--text-secondary); }

.form-control {
  width: 100%;
  padding: 11px 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: var(--transition);
}
.form-control:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
  background: rgba(124,58,237,0.05);
}
.form-control::placeholder { color: var(--text-muted); }

select.form-control option { background: var(--bg-secondary); color: var(--text-primary); }

textarea.form-control { resize: vertical; min-height: 100px; }

/* ===== DIVIDER ===== */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

/* ===== SECTION ===== */
.section { padding: 4rem 2rem; position: relative; z-index: 1; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: 2.2rem; margin-bottom: 0.5rem; }
.section-header p { color: var(--text-secondary); font-size: 1rem; }

.gradient-text {
  background: linear-gradient(135deg, var(--accent-purple-light), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== CONTAINER ===== */
.container { max-width: 1400px; margin: 0 auto; }

/* ===== FOOTER ===== */
.footer {
  background: rgba(0,0,0,0.4);
  border-top: 1px solid var(--border);
  padding: 3rem 2rem 1.5rem;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-top: 0.75rem;
  line-height: 1.7;
}

.footer-col h4 { font-size: 0.875rem; font-weight: 600; margin-bottom: 1rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; }
.footer-col a { display: block; color: var(--text-muted); font-size: 0.875rem; margin-bottom: 0.6rem; transition: var(--transition); }
.footer-col a:hover { color: var(--accent-purple-light); transform: translateX(4px); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  top: 90px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: rgba(15,15,45,0.95);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(20px);
  min-width: 300px;
  max-width: 400px;
  box-shadow: var(--shadow);
  animation: slideInRight 0.3s ease;
  transition: var(--transition);
}

.toast.toast-success { border-left: 4px solid var(--success); }
.toast.toast-error { border-left: 4px solid var(--danger); }
.toast.toast-info { border-left: 4px solid var(--accent-cyan); }
.toast.toast-warning { border-left: 4px solid var(--warning); }

.toast-icon { font-size: 1.2rem; flex-shrink: 0; }
.toast-msg { font-size: 0.875rem; font-weight: 500; flex: 1; }
.toast-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.1rem; padding: 0; transition: var(--transition); }
.toast-close:hover { color: var(--text-primary); }

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(100px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(100px); }
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.active { opacity: 1; visibility: visible; }

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: var(--transition);
}

.modal-overlay.active .modal { transform: scale(1); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
}
.modal-close:hover { color: var(--danger); transform: rotate(90deg); }

/* ===== QUANTITY CONTROL ===== */
.qty-control {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.qty-btn {
  width: 34px; height: 34px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.qty-btn:hover { background: rgba(124,58,237,0.2); color: var(--accent-purple-light); }

.qty-display {
  width: 40px;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: none;
  color: var(--text-primary);
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--glass);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
  transition: width 0.5s ease;
}

/* ===== LOADING SPINNER ===== */
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--glass);
  border-top-color: var(--accent-purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}
.empty-state .empty-icon { font-size: 5rem; margin-bottom: 1.5rem; opacity: 0.3; }
.empty-state h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-secondary); }

/* ===== FLOATING SUPPORT BUTTON ===== */
.support-fab {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 2000;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 8px 30px rgba(124,58,237,0.5);
  transition: var(--transition);
  animation: pulse-fab 2s infinite;
}

.support-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 40px rgba(124,58,237,0.7);
}

@keyframes pulse-fab {
  0%, 100% { box-shadow: 0 8px 30px rgba(124,58,237,0.5); }
  50% { box-shadow: 0 8px 40px rgba(124,58,237,0.8), 0 0 0 8px rgba(124,58,237,0.1); }
}

.support-chat-popup {
  position: fixed;
  bottom: 100px;
  right: 30px;
  z-index: 2000;
  width: 340px;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: none;
  flex-direction: column;
  max-height: 480px;
  animation: slideUp 0.3s ease;
}

.support-chat-popup.open { display: flex; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-header {
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-info { display: flex; align-items: center; gap: 10px; }
.chat-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.chat-header h4 { font-size: 0.9rem; font-weight: 600; }
.chat-header p { font-size: 0.75rem; opacity: 0.8; }
.chat-close-btn { background: none; border: none; color: white; font-size: 1.2rem; cursor: pointer; opacity: 0.8; transition: var(--transition); }
.chat-close-btn:hover { opacity: 1; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 200px;
  max-height: 280px;
}

.chat-msg {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.chat-msg.user { flex-direction: row-reverse; }

.chat-bubble {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 0.825rem;
  line-height: 1.5;
}

.chat-msg.bot .chat-bubble {
  background: var(--glass);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.chat-msg.user .chat-bubble {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-purple-light));
  color: white;
  border-bottom-right-radius: 4px;
}

.chat-input-area {
  padding: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
}

.chat-input {
  flex: 1;
  padding: 8px 12px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  outline: none;
}

.chat-input:focus { border-color: var(--accent-purple); }

.chat-send-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  border: none;
  color: white;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}
.chat-send-btn:hover { transform: scale(1.1); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-search { display: none; }
  .nav-links .nav-link span { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .section { padding: 2.5rem 1rem; }
  .support-chat-popup { right: 10px; width: calc(100vw - 20px); }
}
