/* KuvaSubscriptions - Premium Custom Styling & Design System
 * Inspired by Apple, Stripe, Linear, Raycast, Framer
 */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: 'Manrope', var(--font-sans);

  /* Colors */
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8FAFC;
  --bg-tertiary: #F1F5F9;
  
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;

  --accent-violet: #6366F1;
  --accent-indigo: #4F46E5;
  --accent-blue: #2563EB;
  --accent-emerald: #10B981;

  --border-light: rgba(226, 232, 240, 0.8);
  --border-focus: rgba(99, 102, 241, 0.4);
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background-color: #FAFAFA;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .font-display {
  font-family: var(--font-display);
}

/* Glassmorphism Elements */
.glass-nav {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}

.glass-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(241, 245, 249, 1);
}

.glass-drawer {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Shadows */
.shadow-ambient {
  box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.05), 0 4px 6px -2px rgba(15, 23, 42, 0.02);
}

.shadow-card-hover {
  box-shadow: 0 20px 35px -10px rgba(99, 102, 241, 0.12), 0 10px 15px -3px rgba(15, 23, 42, 0.04);
}

.shadow-glow {
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.25);
}

.shadow-glow-sm {
  box-shadow: 0 0 15px rgba(79, 70, 229, 0.18);
}

/* Gradients */
.text-gradient {
  background: linear-gradient(135deg, #1E293B 0%, #4F46E5 50%, #2563EB 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-purple {
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 50%, #EC4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bg-radial-glow {
  background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
}

.bg-hero-grid {
  background-size: 32px 32px;
  background-image: 
    linear-gradient(to right, rgba(226, 232, 240, 0.35) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(226, 232, 240, 0.35) 1px, transparent 1px);
}

/* Animations */
@keyframes subtleFloat {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes subtleFloatReverse {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(8px);
  }
}

.animate-float {
  animation: subtleFloat 6s ease-in-out infinite;
}

.animate-float-reverse {
  animation: subtleFloatReverse 7s ease-in-out infinite;
}

/* Product Card Hover & Micro-interactions */
.product-card {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.3);
}

.product-card:hover .product-title {
  color: var(--accent-indigo);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: #F1F5F9;
}

::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Toast Container */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: #0F172A;
  color: #FFFFFF;
  border-radius: 14px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateY(20px);
  opacity: 0;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Badge Glows */
.badge-discount {
  background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
  color: #065F46;
  border: 1px solid #A7F3D0;
}

.badge-deal {
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  color: #1E40AF;
  border: 1px solid #BFDBFE;
}

.badge-warranty {
  background: linear-gradient(135deg, #FAF5FF 0%, #F3E8FF 100%);
  color: #6B21A8;
  border: 1px solid #E9D5FF;
}

/* Sticky Bottom Nav for Mobile */
@media (max-width: 768px) {
  body {
    padding-bottom: 70px;
  }
}

/* ==========================================================================
   SOLID BUTTON VISIBILITY & CONTRAST PROTECTION
   Prevents any button from becoming white / invisible across all browsers
   ========================================================================== */

/* WhatsApp & Emerald Action Buttons */
.bg-emerald-600,
button.bg-emerald-600,
a.bg-emerald-600,
[class*="bg-emerald-600"] {
  background-color: #059669 !important;
  color: #ffffff !important;
  border-color: transparent !important;
}
.bg-emerald-600:hover,
button.bg-emerald-600:hover,
a.bg-emerald-600:hover,
.hover\:bg-emerald-700:hover,
button.hover\:bg-emerald-700:hover,
a.hover\:bg-emerald-700:hover {
  background-color: #047857 !important;
  color: #ffffff !important;
}

/* Indigo Primary Action Buttons */
.bg-indigo-600,
button.bg-indigo-600,
a.bg-indigo-600,
[class*="bg-indigo-600"] {
  background-color: #4f46e5 !important;
  color: #ffffff !important;
  border-color: transparent !important;
}
.bg-indigo-600:hover,
button.bg-indigo-600:hover,
a.bg-indigo-600:hover,
.hover\:bg-indigo-700:hover,
button.hover\:bg-indigo-700:hover,
a.hover\:bg-indigo-700:hover {
  background-color: #4338ca !important;
  color: #ffffff !important;
}

/* Dark Slate / Black Action Buttons */
.bg-slate-900,
button.bg-slate-900,
a.bg-slate-900,
[class*="bg-slate-900"] {
  background-color: #0f172a !important;
  color: #ffffff !important;
  border-color: transparent !important;
}
.bg-slate-900:hover,
button.bg-slate-900:hover,
a.bg-slate-900:hover,
.hover\:bg-slate-800:hover,
button.hover\:bg-slate-800:hover,
a.hover\:bg-slate-800:hover {
  background-color: #1e293b !important;
  color: #ffffff !important;
}

/* Light WhatsApp Secondary Buttons */
.bg-emerald-50,
button.bg-emerald-50,
a.bg-emerald-50 {
  background-color: #ecfdf5 !important;
  color: #065f46 !important;
}
.bg-emerald-50:hover,
button.bg-emerald-50:hover,
a.bg-emerald-50:hover,
.hover\:bg-emerald-100:hover,
button.hover\:bg-emerald-100:hover,
a.hover\:bg-emerald-100:hover {
  background-color: #d1fae5 !important;
  color: #047857 !important;
}

/* Light Slate Secondary Buttons */
.bg-slate-100,
button.bg-slate-100,
a.bg-slate-100 {
  background-color: #f1f5f9 !important;
  color: #1e293b !important;
}
.bg-slate-100:hover,
button.bg-slate-100:hover,
a.bg-slate-100:hover,
.hover\:bg-slate-200:hover,
button.hover\:bg-slate-200:hover,
a.hover\:bg-slate-200:hover {
  background-color: #e2e8f0 !important;
  color: #0f172a !important;
}

/* Light Indigo Secondary Buttons */
.bg-indigo-50,
button.bg-indigo-50,
a.bg-indigo-50 {
  background-color: #eef2ff !important;
  color: #3730a3 !important;
}
.bg-indigo-50:hover,
button.bg-indigo-50:hover,
a.bg-indigo-50:hover,
.hover\:bg-indigo-100:hover,
button.hover\:bg-indigo-100:hover,
a.hover\:bg-indigo-100:hover {
  background-color: #e0e7ff !important;
  color: #312e81 !important;
}

/* ==========================================================================
   MODERN TAILWIND COLOR PALETTES (EMERALD, SLATE, VIOLET, AMBER, ROSE, SKY)
   Extends Tailwind v2 to ensure full v3 design tokens render accurately
   ========================================================================== */

/* Emerald Palette */
.bg-emerald-50  { background-color: #ecfdf5; }
.bg-emerald-100 { background-color: #d1fae5; }
.bg-emerald-200 { background-color: #a7f3d0; }
.bg-emerald-300 { background-color: #6ee7b7; }
.bg-emerald-400 { background-color: #34d399; }
.bg-emerald-500 { background-color: #10b981; }
.bg-emerald-600 { background-color: #059669; }
.bg-emerald-700 { background-color: #047857; }
.bg-emerald-800 { background-color: #065f46; }
.bg-emerald-900 { background-color: #064e3b; }

.text-emerald-50  { color: #ecfdf5; }
.text-emerald-100 { color: #d1fae5; }
.text-emerald-200 { color: #a7f3d0; }
.text-emerald-300 { color: #6ee7b7; }
.text-emerald-400 { color: #34d399; }
.text-emerald-500 { color: #10b981; }
.text-emerald-600 { color: #059669; }
.text-emerald-700 { color: #047857; }
.text-emerald-800 { color: #065f46; }
.text-emerald-900 { color: #064e3b; }

.border-emerald-50  { border-color: #ecfdf5; }
.border-emerald-100 { border-color: #d1fae5; }
.border-emerald-200 { border-color: #a7f3d0; }
.border-emerald-300 { border-color: #6ee7b7; }
.border-emerald-500 { border-color: #10b981; }
.border-emerald-600 { border-color: #059669; }

/* Slate Palette */
.bg-slate-50  { background-color: #f8fafc; }
.bg-slate-100 { background-color: #f1f5f9; }
.bg-slate-200 { background-color: #e2e8f0; }
.bg-slate-300 { background-color: #cbd5e1; }
.bg-slate-400 { background-color: #94a3b8; }
.bg-slate-500 { background-color: #64748b; }
.bg-slate-600 { background-color: #475569; }
.bg-slate-700 { background-color: #334155; }
.bg-slate-800 { background-color: #1e293b; }
.bg-slate-900 { background-color: #0f172a; }
.bg-slate-950 { background-color: #020617; }

.text-slate-50  { color: #f8fafc; }
.text-slate-100 { color: #f1f5f9; }
.text-slate-200 { color: #e2e8f0; }
.text-slate-300 { color: #cbd5e1; }
.text-slate-400 { color: #94a3b8; }
.text-slate-500 { color: #64748b; }
.text-slate-600 { color: #475569; }
.text-slate-700 { color: #334155; }
.text-slate-800 { color: #1e293b; }
.text-slate-900 { color: #0f172a; }
.text-slate-950 { color: #020617; }

.border-slate-50  { border-color: #f8fafc; }
.border-slate-100 { border-color: #f1f5f9; }
.border-slate-200 { border-color: #e2e8f0; }
.border-slate-300 { border-color: #cbd5e1; }
.border-slate-400 { border-color: #94a3b8; }
.border-slate-800 { border-color: #1e293b; }

/* Violet Palette */
.bg-violet-50  { background-color: #f5f3ff; }
.bg-violet-100 { background-color: #ede9fe; }
.bg-violet-200 { background-color: #ddd6fe; }
.bg-violet-500 { background-color: #8b5cf6; }
.bg-violet-600 { background-color: #7c3aed; }
.bg-violet-700 { background-color: #6d28d9; }

.text-violet-500 { color: #8b5cf6; }
.text-violet-600 { color: #7c3aed; }
.text-violet-700 { color: #6d28d9; }
.border-violet-100 { border-color: #ede9fe; }
.border-violet-200 { border-color: #ddd6fe; }

/* Amber Palette */
.bg-amber-50  { background-color: #fffbeb; }
.bg-amber-100 { background-color: #fef3c7; }
.bg-amber-500 { background-color: #f59e0b; }
.bg-amber-600 { background-color: #d97706; }

.text-amber-500 { color: #f59e0b; }
.text-amber-600 { color: #d97706; }
.text-amber-700 { color: #b45309; }
.text-amber-800 { color: #92400e; }
.text-amber-900 { color: #78350f; }
.border-amber-200 { border-color: #fde68a; }

/* Rose Palette */
.bg-rose-50  { background-color: #fff1f2; }
.bg-rose-100 { background-color: #ffe4e6; }
.bg-rose-500 { background-color: #f43f5e; }
.bg-rose-600 { background-color: #e11d48; }

.text-rose-500 { color: #f43f5e; }
.text-rose-600 { color: #e11d48; }
.text-rose-700 { color: #be123c; }
.text-rose-800 { color: #9f1239; }
.border-rose-100 { border-color: #ffe4e6; }
.border-rose-200 { border-color: #fecdd3; }

/* Sky Palette */
.bg-sky-50  { background-color: #f0f9ff; }
.bg-sky-100 { background-color: #e0f2fe; }
.bg-sky-500 { background-color: #0ea5e9; }
.bg-sky-600 { background-color: #0284c7; }
.text-sky-600 { color: #0284c7; }
.border-sky-200 { border-color: #bae6fd; }

/* Opacity Slash Classes */
.bg-white\/90 { background-color: rgba(255, 255, 255, 0.9); }
.bg-white\/95 { background-color: rgba(255, 255, 255, 0.95); }
.bg-slate-900\/60 { background-color: rgba(15, 23, 42, 0.6); }
.bg-slate-900\/90 { background-color: rgba(15, 23, 42, 0.9); }
.bg-slate-800\/80 { background-color: rgba(30, 41, 59, 0.8); }
.bg-slate-50\/50  { background-color: rgba(248, 250, 252, 0.5); }
.bg-slate-50\/70  { background-color: rgba(248, 250, 252, 0.7); }
.bg-slate-50\/80  { background-color: rgba(248, 250, 252, 0.8); }
.bg-indigo-50\/40 { background-color: rgba(238, 242, 255, 0.4); }
.bg-indigo-50\/60 { background-color: rgba(238, 242, 255, 0.6); }
.bg-indigo-50\/80 { background-color: rgba(238, 242, 255, 0.8); }
.bg-emerald-50\/20 { background-color: rgba(236, 253, 245, 0.2); }
.bg-emerald-50\/40 { background-color: rgba(236, 253, 245, 0.4); }
.bg-emerald-50\/70 { background-color: rgba(236, 253, 245, 0.7); }
.bg-emerald-100\/80 { background-color: rgba(209, 250, 229, 0.8); }
.bg-emerald-500\/5  { background-color: rgba(16, 185, 129, 0.05); }
.bg-emerald-500\/10 { background-color: rgba(16, 185, 129, 0.1); }
.bg-amber-50\/70 { background-color: rgba(255, 251, 235, 0.7); }

.border-slate-200\/60 { border-color: rgba(226, 232, 240, 0.6); }
.border-slate-200\/80 { border-color: rgba(226, 232, 240, 0.8); }
.border-slate-200\/90 { border-color: rgba(226, 232, 240, 0.9); }
.border-emerald-200\/50 { border-color: rgba(167, 243, 208, 0.5); }
.border-emerald-200\/70 { border-color: rgba(167, 243, 208, 0.7); }
.border-emerald-200\/80 { border-color: rgba(167, 243, 208, 0.8); }
.border-emerald-300\/50 { border-color: rgba(110, 231, 183, 0.5); }
.border-emerald-500\/30 { border-color: rgba(16, 185, 129, 0.3); }
.border-amber-200\/60   { border-color: rgba(253, 230, 138, 0.6); }

/* ==========================================================================
   MEGA MENU & CATEGORIES RESPONSIVENESS FIXES
   ========================================================================== */

.categories-mega-dropdown {
  width: min(780px, calc(100vw - 2rem)) !important;
  max-width: 48rem !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(226, 232, 240, 0.9);
}

@media (max-width: 768px) {
  .categories-mega-dropdown {
    width: calc(100vw - 1.5rem) !important;
    left: 0.75rem !important;
    transform: none !important;
    max-height: 80vh !important;
  }
}

/* Category Cards Responsive Layout */
.category-card {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 1.5rem;
  padding: 1.5rem;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 20px 35px -10px rgba(99, 102, 241, 0.12), 0 10px 15px -3px rgba(15, 23, 42, 0.04);
}

.category-card:hover .cat-icon-box {
  background-color: #4f46e5;
  color: #ffffff;
}

.category-card:hover .cat-title {
  color: #4f46e5;
}

