/* ========================================================
   TechStore Pro - Modern E-Commerce SaaS Stylesheet
   Typography: Be Vietnam Pro + Plus Jakarta Sans
   ======================================================== */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-glow: rgba(37, 99, 235, 0.35);
  --accent: #0284c7;
  --accent-glow: rgba(2, 132, 199, 0.35);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --bg-dark: #0b0f19;
  --card-dark: #111827;
  --card-border: #1f2937;
}

body {
  font-family: 'Be Vietnam Pro', 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-dark);
  color: #f3f4f6;
  overflow-x: hidden;
  letter-spacing: -0.01em;
  padding-bottom: calc(90px + env(safe-area-inset-bottom, 12px));
}

/* ================= Light Mode Support (Luxury White - Apple / Stripe Aesthetic) ================= */
html.light body {
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

html.light .glass-nav {
  background: rgba(255, 255, 255, 0.90) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 4px 0 rgba(15, 23, 42, 0.04) !important;
}

/* Light Backgrounds */
html.light .bg-gray-900,
html.light .bg-gray-950,
html.light .bg-\[\#0b0f19\],
html.light .bg-dark-card {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

html.light .bg-gray-800 {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
}

html.light .bg-gray-900\/50,
html.light .bg-gray-900\/60,
html.light .bg-gray-900\/70,
html.light .bg-gray-900\/80,
html.light .bg-gray-900\/90,
html.light .bg-gray-900\/95,
html.light .bg-gray-950\/60,
html.light .bg-gray-950\/70,
html.light .bg-gray-950\/80,
html.light .bg-gray-950\/90,
html.light .bg-gray-950\/95,
html.light .bg-gray-800\/60,
html.light .bg-gray-800\/80,
html.light .bg-gray-800\/90 {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

/* Light Borders */
html.light .border-gray-800,
html.light .border-gray-800\/80,
html.light .border-gray-800\/60,
html.light .border-gray-700,
html.light .border-gray-700\/80,
html.light .border-gray-700\/70,
html.light .border-gray-700\/60,
html.light .border-\[\#1f293d\] {
  border-color: #e2e8f0 !important;
}

/* Light Text */
html.light .text-white {
  color: #0f172a !important;
}

html.light .text-gray-100,
html.light .text-gray-200,
html.light .text-gray-300 {
  color: #334155 !important;
}

html.light .text-gray-400 {
  color: #64748b !important;
}

html.light .text-gray-500 {
  color: #94a3b8 !important;
}

/* Specific Solid Action Buttons & Badges keep white text */
html.light a.bg-blue-600,
html.light button.bg-blue-600,
html.light .btn-glow,
html.light a.bg-emerald-600,
html.light button.bg-emerald-600,
html.light a.bg-red-600,
html.light button.bg-red-600,
html.light .category-pill.active,
html.light .apple-dock-item.active,
html.light .bg-red-600,
html.light .bg-rose-600,
html.light .bg-emerald-600,
html.light .bg-blue-600 {
  color: #ffffff !important;
}

html.light a.bg-blue-600 *,
html.light button.bg-blue-600 *,
html.light .btn-glow *,
html.light a.bg-emerald-600 *,
html.light button.bg-emerald-600 *,
html.light a.bg-red-600 *,
html.light button.bg-red-600 *,
html.light .category-pill.active *,
html.light .apple-dock-item.active *,
html.light .bg-red-600 *,
html.light .bg-rose-600 *,
html.light .bg-emerald-600 *,
html.light .bg-blue-600 * {
  color: #ffffff !important;
}

/* Form Inputs in Light Mode */
html.light input:not([type="checkbox"]):not([type="radio"]),
html.light select,
html.light textarea {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

html.light input::placeholder,
html.light textarea::placeholder {
  color: #94a3b8 !important;
}

html.light input:focus,
html.light select:focus,
html.light textarea:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}

/* Cards in Light Mode */
html.light .product-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 18px -2px rgba(15, 23, 42, 0.05) !important;
}

html.light .product-card:hover {
  transform: translateY(-5px);
  border-color: #3b82f6 !important;
  box-shadow: 0 16px 32px -8px rgba(37, 99, 235, 0.14) !important;
}

/* Top Quick Search in Light Mode */
html.light header button.bg-gray-900\/60 {
  background-color: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #64748b !important;
}

html.light header button.bg-gray-900\/60:hover {
  background-color: #e2e8f0 !important;
  color: #0f172a !important;
}

/* Pills & Badges in Light Mode */
html.light .bg-blue-500\/10 {
  background-color: rgba(37, 99, 235, 0.08) !important;
  border-color: rgba(37, 99, 235, 0.2) !important;
  color: #2563eb !important;
}

html.light .bg-emerald-500\/10 {
  background-color: rgba(16, 185, 129, 0.08) !important;
  border-color: rgba(16, 185, 129, 0.2) !important;
  color: #059669 !important;
}

html.light .bg-cyan-500\/10 {
  background-color: rgba(6, 182, 212, 0.08) !important;
  border-color: rgba(6, 182, 212, 0.2) !important;
  color: #0891b2 !important;
}

html.light .bg-yellow-500\/10,
html.light .bg-amber-500\/10 {
  background-color: rgba(245, 158, 11, 0.08) !important;
  border-color: rgba(245, 158, 11, 0.2) !important;
  color: #d97706 !important;
}

/* Category Filter Pills in Catalog */
html.light .category-pill:not(.active) {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #475569 !important;
}

html.light .category-pill:not(.active):hover {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
}

/* Footer in Light Mode */
html.light footer {
  background-color: #ffffff !important;
  border-top-color: #e2e8f0 !important;
  color: #64748b !important;
}

html.light footer h4 {
  color: #0f172a !important;
}

html.light footer a {
  color: #64748b !important;
}

html.light footer a:hover {
  color: #2563eb !important;
}

/* ================= Navigation & Glow Effects ================= */
.glass-nav {
  background: rgba(11, 15, 25, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.btn-glow {
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px var(--primary-glow);
}
.btn-glow:hover {
  box-shadow: 0 6px 22px var(--primary-glow);
  transform: translateY(-2px);
}

.nav-link-effect {
  position: relative;
  transition: color 0.3s ease;
}
.nav-link-effect::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: linear-gradient(90deg, #2563eb, #0284c7);
  transition: width 0.3s ease;
  border-radius: 9999px;
}
.nav-link-effect:hover::after,
.nav-link-effect.active::after {
  width: 100%;
}

.product-card {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.product-card:hover {
  transform: translateY(-5px);
  border-color: rgba(37, 99, 235, 0.5);
  box-shadow: 0 12px 30px -10px rgba(37, 99, 235, 0.25);
}

/* Text Gradients (Tech Blue - No Purple) */
.text-gradient {
  background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.text-gradient-gold {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.category-pill {
  transition: all 0.25s ease;
}
.category-pill.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #0b0f19;
}
::-webkit-scrollbar-thumb {
  background: #1f2937;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #374151;
}

.modal-overlay {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
}

/* ================= Apple Dock v2 Navigation System ================= */
.apple-dock-wrapper {
  position: fixed;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  pointer-events: none;
  width: auto;
  max-width: calc(100vw - 20px);
}

.apple-dock-nav {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9999px;
  padding: 5px 8px;
  gap: 3px;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.65),
              0 0 0 1px rgba(255, 255, 255, 0.08) inset,
              0 1px 0 rgba(255, 255, 255, 0.25) inset;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light mode Apple Dock */
html.light .apple-dock-nav {
  background: rgba(255, 255, 255, 0.90) !important;
  border: 1px solid rgba(226, 232, 240, 0.95) !important;
  box-shadow: 0 16px 36px -6px rgba(15, 23, 42, 0.12),
              0 0 0 1px rgba(15, 23, 42, 0.05),
              0 1px 0 rgba(255, 255, 255, 1) inset !important;
}

html.light .apple-dock-item {
  color: #334155 !important;
}

html.light .apple-dock-item:hover {
  color: #0f172a !important;
  background: rgba(241, 245, 249, 0.8) !important;
}

html.light .apple-dock-item.active {
  background: #2563eb !important;
  color: #ffffff !important;
  font-weight: 700;
  border: 1px solid #1d4ed8 !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35) !important;
}

html.light .apple-dock-item.active .apple-dock-icon,
html.light .apple-dock-item.active .apple-dock-label {
  color: #ffffff !important;
}

.apple-dock-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 48px;
  padding: 3px 6px;
  border-radius: 9999px;
  text-decoration: none;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

@media (min-width: 640px) {
  .apple-dock-nav {
    padding: 7px 12px;
    gap: 6px;
  }
  .apple-dock-item {
    min-width: 68px;
    height: 52px;
    padding: 5px 12px;
  }
  .apple-dock-item:hover {
    transform: translateY(-4px) scale(1.08);
    color: #ffffff;
  }
  html.light .apple-dock-item:hover {
    color: #0f172a !important;
  }
}

/* Active State - Matches user's screenshot capsule bubble (Arcade pill) */
.apple-dock-item.active {
  background: rgba(37, 99, 235, 0.22);
  color: #3b82f6 !important;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2),
              0 0 0 1px rgba(59, 130, 246, 0.35) inset;
}

.apple-dock-item.active .apple-dock-icon,
.apple-dock-item.active .apple-dock-label {
  color: #3b82f6 !important;
}

.apple-dock-icon {
  font-size: 1.15rem;
  line-height: 1;
  margin-bottom: 2px;
  transition: transform 0.22s ease;
}

.apple-dock-item:hover .apple-dock-icon {
  transform: scale(1.15);
}

.apple-dock-label {
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

/* Flyouts positioned right above dock */
.dock-popover {
  position: fixed;
  bottom: calc(74px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 950;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 1.5rem;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7),
              0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

html.light .dock-popover {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: rgba(226, 232, 240, 0.9) !important;
  color: #0f172a !important;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.15),
              0 0 0 1px rgba(0, 0, 0, 0.04) !important;
}

/* Auth Pages Glassmorphism */
.glass-card-auth {
  position: relative;
  background: rgba(17, 24, 39, 0.8);
  backdrop-filter: blur(30px) saturate(190%);
  -webkit-backdrop-filter: blur(30px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.6),
              0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  border-radius: 1.75rem;
}

html.light .glass-card-auth {
  background: rgba(255, 255, 255, 0.88) !important;
  border: 1px solid rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.12),
              0 0 0 1px rgba(0, 0, 0, 0.04) !important;
}

.aurora-bg-glow {
  position: absolute !important;
  border-radius: 9999px !important;
  filter: blur(90px) !important;
  pointer-events: none !important;
  opacity: 0.6 !important;
}

/* Modal & Flyouts Light Mode Enhancements */
html.light #dock-search-card {
  background: rgba(255, 255, 255, 0.98) !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.16) !important;
}

html.light #dock-search-input {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

html.light #dock-search-card button.bg-gray-800\/80 {
  background-color: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #334155 !important;
}

html.light #dock-search-card button.bg-gray-800\/80:hover {
  background-color: #2563eb !important;
  color: #ffffff !important;
}

html.light #dock-cat-menu,
html.light #dock-user-flyout {
  background: rgba(255, 255, 255, 0.96) !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15) !important;
}

html.light #dock-cat-menu a:hover,
html.light #dock-user-flyout a:hover {
  background-color: #eff6ff !important;
  color: #2563eb !important;
}

html.light #buy-modal > div > div {
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.25) !important;
}

html.light #buy-modal .bg-gray-950,
html.light #buy-modal .bg-gray-950\/60 {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
}


/* ================= Modern Hero Prompt & Glowing Effects ================= */
.aurora-prompt-box {
  position: relative;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1.5px solid rgba(59, 130, 246, 0.35);
  box-shadow: 0 10px 30px -10px rgba(37, 99, 235, 0.18),
              0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

html.dark .aurora-prompt-box {
  background: rgba(17, 24, 39, 0.88);
  border: 1.5px solid rgba(59, 130, 246, 0.45);
  box-shadow: 0 20px 45px -15px rgba(0, 0, 0, 0.7),
              0 0 30px -5px rgba(37, 99, 235, 0.28),
              0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.aurora-prompt-box:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2),
              0 25px 50px -15px rgba(37, 99, 235, 0.35);
  transform: translateY(-2px);
}

.prompt-hot-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  user-select: none;
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid rgba(203, 213, 225, 0.8);
  color: #334155;
}

html.dark .prompt-hot-chip {
  background: rgba(17, 24, 39, 0.8);
  border: 1px solid rgba(55, 65, 81, 0.8);
  color: #d1d5db;
}

.prompt-hot-chip:hover {
  transform: translateY(-2px) scale(1.03);
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff !important;
  box-shadow: 0 8px 20px -4px rgba(37, 99, 235, 0.45);
}

.prompt-hot-chip.active-chip {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff !important;
  box-shadow: 0 8px 20px -4px rgba(37, 99, 235, 0.45);
}

/* Floating Fast Contact Pill */
.floating-support-pill {
  position: fixed;
  right: 20px;
  bottom: calc(90px + env(safe-area-inset-bottom, 12px));
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.support-btn-pill {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #ffffff !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(12px);
}

.support-btn-pill:hover {
  transform: translateY(-2px) scale(1.05);
}

.support-btn-telegram {
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
}

.support-btn-zalo {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}


/* ================= GSAP Performance Enhancements (gsap-performance) ================= */
.product-item-card,
.category-visual-card,
.why-choose-card,
.aurora-prompt-box,
.floating-support-pill,
.apple-dock-nav,
.apple-dock-item,
.prompt-hot-chip,
.btn-glow {
  will-change: transform, opacity;
  transform: translateZ(0);
  -webkit-font-smoothing: antialiased;
}

/* Reduced Motion Graceful Degradation */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
